ML-KEM
NIST's primary post-quantum key encapsulation mechanism, standardised in FIPS 203
Overview
ML-KEM is the Module-Lattice-Based Key-Encapsulation Mechanism standardised by NIST in FIPS 203. It lets two parties establish a shared secret that is believed to resist attacks by both classical and quantum computers, and it is the default choice for post-quantum key establishment.
ML-KEM is derived from CRYSTALS-Kyber, the lattice-based KEM that NIST selected at the end of the third round of its post-quantum standardisation process. Its security rests on the Module Learning With Errors problem: recovering a secret vector from noisy linear equations over a polynomial ring. Arithmetic takes place in the ring of polynomials of degree below 256 with coefficients modulo 3329, which allows fast multiplication with the number-theoretic transform.
The scheme starts from an IND-CPA public-key encryption scheme and turns it into an IND-CCA2 secure KEM with a variant of the Fujisaki-Okamoto transform. Decapsulation re-encrypts the recovered message and compares the result with the received ciphertext; on mismatch it returns a pseudorandom value derived from a secret seed (implicit rejection), so invalid ciphertexts reveal nothing useful to an attacker.
Three parameter sets are defined. ML-KEM-512 targets NIST security category 1 (comparable to AES-128), ML-KEM-768 targets category 3 and ML-KEM-1024 targets category 5. ML-KEM-768 is the most widely deployed set and is the one used in the X25519MLKEM768 hybrid key exchange for TLS 1.3. Public keys range from 800 to 1568 bytes and ciphertexts from 768 to 1568 bytes. Secret keys are larger, up to 3168 bytes, because they embed the public key and its hash.
History
2016–2025NIST calls for post-quantum KEMs and signatures
NIST Post-Quantum Cryptography standardisationCRYSTALS-Kyber submitted to NIST PQC
26 candidates advance to round 2
NIST Post-Quantum Cryptography standardisationRound 3 finalists and alternates announced
NIST Post-Quantum Cryptography standardisationKyber selected by NIST
Draft FIPS 203 released
ML-KEM published as FIPS 203
HQC selected as a second KEM
NIST Post-Quantum Cryptography standardisation
How it works
- KeyGen samples a public matrix A from a seed and small secret and error vectors s and e, and publishes t = As + e.
- Encaps picks a random message m, derives encryption randomness from m and the public key, and encrypts m under the public key.
- The shared secret is derived from m with SHA-3 based functions, and the ciphertext is sent to the key holder.
- Decaps decrypts to recover m, re-encrypts it and checks the result matches the ciphertext.
- On a mismatch, decapsulation returns a pseudorandom secret derived from a stored rejection seed instead of an error.
Security notes
ML-KEM is considered sound and is NIST's recommended post-quantum KEM. Implementations must be constant time: timing leaks in decapsulation (for example the KyberSlash division issue in several Kyber libraries) have allowed key recovery. During the transition it is commonly deployed in hybrid mode alongside X25519 or ECDH.
Typical uses
Variants in NextSSL
3| Algorithm | Tier | Sizes (bytes) | Standards | API |
|---|---|---|---|---|
| ML-KEM-1024 ml-kem-1024 |
safe FIPS | pk 1568 · sk 3168 · ct 1568 · ss 32 · seed 64 · coins 32 | FIPS 203 | safe |
| ML-KEM-512 ml-kem-512 |
safe FIPS | pk 800 · sk 1632 · ct 768 · ss 32 · seed 64 · coins 32 | FIPS 203 | safe |
| ML-KEM-768 ml-kem-768 |
safe FIPS | pk 1184 · sk 2400 · ct 1088 · ss 32 · seed 64 · coins 32 | FIPS 203 | safe |
Frequently asked questions
Which ML-KEM variants does NextSSL include?
NextSSL registers 3 ML-KEM variants: ml-kem-1024, ml-kem-512, ml-kem-768.
Other key encapsulation
All 110Related
The Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2
CRYSTALS-Kyber (Round 3)The Round 3 submission of Kyber, predecessor of the ML-KEM standard
ECDH (including X25519 and X448)Elliptic-curve Diffie-Hellman key agreement on NIST curves, Curve25519 and Curve448
HPKEHybrid Public Key Encryption: a KEM, a KDF and an AEAD combined per RFC 9180
ML-DSANIST's primary post-quantum signature scheme, standardised in FIPS 204
SHA-3 and KeccakThe Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2