Module fips203::ml_kem_768
source · Expand description
Functionality for the ML-KEM-768 security parameter set, which is claimed to be in security category 3, see table 2 & 3 on page 39 of spec.
See https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.203.pdf
Typical usage flow entails:
- The originator runs
try_keygen()
to get an encaps keyencapsKey
and decaps keydecapsKey
. - The originator serializes the encaps key via
encapsKey.into_bytes()
and sends to the remote party. - The remote party deserializes the bytes via
try_from_bytes(<bytes>)
and runstry_encaps()
to get the shared secret keyssk
and ciphertextcipherText
. - The remote party serializes the cipertext via
cipherText.into_bytes()
and sends to the originator. - The originator deserializes the ciphertext via
try_from_bytes(<bytes>)
then runsdecapsKey.try_decaps(cipherText)
to the get shared secret ketssk
. - Both the originator and remote party now have the same shared secret key
ssk
.
–> See crate::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.