FrodoKEM
Unstructured-lattice KEM, including the ephemeral eFrodoKEM variants.
from oxcrypto.kem.frodo_kem import FRODOKEM
private_key = FRODOKEM.FRODOKEM_640_SHAKE.generate()
ciphertext, shared_secret = private_key.public_key().encapsulate()
assert private_key.decapsulate(ciphertext) == shared_secret| Variants | Private key | Public key | Ciphertext | Shared secret |
|---|---|---|---|---|
FRODOKEM_640_AES, FRODOKEM_640_SHAKE | 19888 bytes | 9616 bytes | 9752 bytes | 16 bytes |
FRODOKEM_976_AES, FRODOKEM_976_SHAKE | 31296 bytes | 15632 bytes | 15792 bytes | 24 bytes |
FRODOKEM_1344_AES, FRODOKEM_1344_SHAKE | 43088 bytes | 21520 bytes | 21696 bytes | 32 bytes |
EFRODOKEM_640_AES, EFRODOKEM_640_SHAKE | 19888 bytes | 9616 bytes | 9720 bytes | 16 bytes |
EFRODOKEM_976_AES, EFRODOKEM_976_SHAKE | 31296 bytes | 15632 bytes | 15744 bytes | 24 bytes |
EFRODOKEM_1344_AES, EFRODOKEM_1344_SHAKE | 43088 bytes | 21520 bytes | 21632 bytes | 32 bytes |
Private keys serialize in the full FrodoKEM secret-key encoding. The eFrodoKEM variants drop the encapsulation salt and are meant for keys used for a single encapsulation.
Warning
Experimental. FrodoKEM is being standardized as an amendment to ISO/IEC 18033-2 and is not yet a published standard.
- Crate: RustCrypto
frodo-kem0.1.0, stable release, no published audit. Builds with Rust 1.88. - Vectors: FrodoKEM reference KATs
PQCkemKAT_19888,PQCkemKAT_31296andPQCkemKAT_43088(AES and SHAKE, count 0) for FrodoKEM and eFrodoKEM, from RustCrypto/KEMsfrodo-kem/tests.
Zeroization
Retained state: the secret-key bytes. frodo-kem 0.1.0 implements Zeroize
for its DecryptionKey and SharedSecret but has no Drop that calls it, so
oxcrypto holds them in zeroize::Zeroizing, as it does the decrypted message
decapsulate returns. The RustCrypto/KEMs main branch adds the Drop
implementations; they are not released yet.
Short-lived copies not wiped by the upstream crate: the key-generation,
encapsulation and decapsulation routines wipe their matrix, seed and message
buffers explicitly. Decapsulation does not wipe the buffer that holds the
selected key or rejection value s before hashing; the RustCrypto/KEMs main
branch wipes it, not released yet. Register and spilled stack copies are not
covered either.
frodo-kem does not enable the zeroize features of sha3 0.11 and aes;
oxcrypto enables them, so the SHAKE and AES states that expand seeds are wiped
on drop.