Skip to Content
oxcrypto

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
VariantsPrivate keyPublic keyCiphertextShared secret
FRODOKEM_640_AES, FRODOKEM_640_SHAKE19888 bytes9616 bytes9752 bytes16 bytes
FRODOKEM_976_AES, FRODOKEM_976_SHAKE31296 bytes15632 bytes15792 bytes24 bytes
FRODOKEM_1344_AES, FRODOKEM_1344_SHAKE43088 bytes21520 bytes21696 bytes32 bytes
EFRODOKEM_640_AES, EFRODOKEM_640_SHAKE19888 bytes9616 bytes9720 bytes16 bytes
EFRODOKEM_976_AES, EFRODOKEM_976_SHAKE31296 bytes15632 bytes15744 bytes24 bytes
EFRODOKEM_1344_AES, EFRODOKEM_1344_SHAKE43088 bytes21520 bytes21632 bytes32 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-kem 0.1.0, stable release, no published audit. Builds with Rust 1.88.
  • Vectors: FrodoKEM reference KATs PQCkemKAT_19888, PQCkemKAT_31296 and PQCkemKAT_43088 (AES and SHAKE, count 0) for FrodoKEM and eFrodoKEM, from RustCrypto/KEMs frodo-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.

On this page