Module fips203::ml_kem_512

source ·
Expand description

Functionality for the ML-KEM-512 security parameter set, which is claimed to be in security category 1, see table 2 & 3 on page 33 of spec.

See https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.ipd.pdf

Typical usage flow entails:

  1. The originator runs try_keygen() to get an encaps key encapsKey and decaps key decapsKey.
  2. The originator serializes the encaps key via encapsKey.into_bytes() and sends to the remote party.
  3. The remote party deserializes the bytes via try_from_bytes(<bytes>) and runs try_encaps() to get the shared secret key ssk and ciphertext cipherText.
  4. The remote party serializes the cipertext via cipherText.into_bytes() and sends to the originator.
  5. The originator deserializes the ciphertext via try_from_bytes(<bytes>) then runs decapsKey.try_decaps(cipherText) to the get shared secret ket ssk.
  6. Both the originator and remote party now have the same shared secret key ssk.

–> See traits for the keygen, encapsulation, decapsulation, and serialization/deserialization functionality.

Structs§

  • Supports the KeyGen trait, allowing for keypair generation

Constants§

  • Serialized Ciphertext Key Length (in bytes)
  • Serialized Decapsulation Key Length (in bytes)
  • Serialized Encapsulation Key Length (in bytes)

Type Aliases§

  • Correctly sized ciphertext specific to the target security parameter set.
  • Correctly sized decapsulation key specific to the target security parameter set.
  • Correctly sized encapsulation key specific to the target security parameter set.