ML-KEM (FIPS 203): the ML-KEM algorithm explained
ML-KEM is the post-quantum key-encapsulation mechanism standardised by NIST in FIPS 203, derived from CRYSTALS-Kyber. This guide explains how it works, its three parameter sets, how it is deployed in hybrid TLS, and the implementation issues that reviewers should check.
ML-KEM is the Module-Lattice-Based Key-Encapsulation Mechanism that NIST standardised in FIPS 203 on August 13, 2024. It lets two parties establish a shared 32-byte secret over a public channel in a way that is believed to resist attack by quantum computers, and it is the replacement for ECDH, finite-field Diffie-Hellman and RSA key transport. NIST IR 8547 states that ML-KEM is currently the only approved post-quantum key-establishment scheme and recommends ML-KEM-768 as the default parameter set.
This guide explains the ML-KEM algorithm, its parameter sets, how it differs from encryption, how it is deployed in hybrid TLS, the implementation issues that reviewers should check, and how ML-DSA fits alongside it. For the wider programme, see our post-quantum cryptography guide.
From CRYSTALS-Kyber to FIPS 203
ML-KEM is derived from CRYSTALS-Kyber, which NIST selected in its post-quantum standardisation process. FIPS 203 Appendix C lists the differences from the third-round Kyber submission:
- The shared secret key is fixed at 256 bits.
- Encapsulation and decapsulation use a different variant of the Fujisaki-Okamoto transform, and encapsulation no longer hashes the ciphertext into the shared secret.
- The extra hashing of the initial randomness was removed, because FIPS 203 requires NIST-approved random bit generation.
- Explicit input checks were added for encapsulation and decapsulation keys.
- After the August 24, 2023 draft, NIST added domain separation to key generation so that keys generated for one security level cannot be reused at another.
These changes make ML-KEM incompatible with pre-standard Kyber. Google moved Chrome from Kyber to ML-KEM in Chrome 131 and changed the TLS codepoint from 0x6399 to 0x11EC as a result. Systems still negotiating Kyber-based groups are running a pre-standard algorithm.
How the ML-KEM algorithm works
ML-KEM's security rests on the Module Learning with Errors (MLWE) problem: recovering a secret vector from linear equations over polynomial rings that have had small random errors added. No efficient classical or quantum algorithm is known for it. Internally, ML-KEM builds a public-key encryption scheme, K-PKE, and wraps it in a Fujisaki-Okamoto transform to make it secure against chosen-ciphertext attack.
The interface has three algorithms:
- KeyGen produces an encapsulation key (public) and a decapsulation key (private).
- Encaps takes the encapsulation key and returns a ciphertext and a 32-byte shared secret.
- Decaps takes the decapsulation key and the ciphertext and returns the same shared secret.
KEM vs encryption
Searches for "ML-KEM encryption" are common, but ML-KEM does not encrypt application data. It is a key-establishment mechanism: the sender cannot choose the shared secret, which is generated during encapsulation. The secret is then used as, or used to derive, a symmetric key for AES-GCM or a similar cipher. This differs from RSA encryption, where the sender encrypts a chosen value, and from Diffie-Hellman, where both parties contribute key shares symmetrically. Protocol designers moving from ECDH to ML-KEM therefore need to adapt message flows, a point NIST covers in SP 800-227, Recommendations for Key-Encapsulation Mechanisms (September 2025).
ML-KEM parameter sets
FIPS 203 approves three parameter sets. Sizes are in bytes, from FIPS 203 Table 3; security categories from NIST IR 8547 Table 5; decapsulation failure rates from FIPS 203 Table 1.
| Parameter set | Security category | Classical strength | Encapsulation key | Decapsulation key | Ciphertext | Shared secret | Failure rate |
|---|---|---|---|---|---|---|---|
| ML-KEM-512 | 1 (AES-128) | 128 bits | 800 | 1,632 | 768 | 32 | 2^-138.8 |
| ML-KEM-768 | 3 (AES-192) | 192 bits | 1,184 | 2,400 | 1,088 | 32 | 2^-164.8 |
| ML-KEM-1024 | 5 (AES-256) | 256 bits | 1,568 | 3,168 | 1,568 | 32 | 2^-174.8 |
NIST recommends ML-KEM-768 as the default because it provides a large security margin at reasonable cost. The NSA's CNSA 2.0 suite requires ML-KEM-1024 for all classification levels in national security systems; see our CNSA 2.0 guide.
Hybrid deployment: X25519MLKEM768
Most production ML-KEM today runs in hybrid mode. In TLS 1.3, the hybrid group X25519MLKEM768 performs an X25519 exchange and an ML-KEM-768 encapsulation in the same handshake and combines both secrets. If a flaw is found in ML-KEM, X25519 still protects against classical attackers; if a quantum computer breaks X25519, ML-KEM still protects the session. NIST IR 8547 confirms that a hybrid can be FIPS 140-validated as long as at least one component is an approved scheme, and that SP 800-56C allows combining the secrets through an approved key derivation.
Performance vs X25519
The cost of ML-KEM is bandwidth more than computation. Cloudflare's 2025 analysis notes that even ML-KEM-512 puts 1,568 bytes on the wire against 64 bytes for X25519, while ML-KEM-1024 is typically faster than X25519 in CPU terms, depending on platform. For ML-KEM-768, the encapsulation key and ciphertext total 2,272 bytes. Cloudflare reports that Chrome measured a 4% increase in TLS handshake time from the hybrid deployment's extra 1.2 kB client-to-server and 1.1 kB server-to-client. The practical risks are larger ClientHello messages that some middleboxes and older servers handle badly, and constrained devices or protocols with tight packet budgets.
Implementation pitfalls
- Side channels. Researchers documented KyberSlash, a set of timing leaks in which several Kyber software libraries used division operations whose timing depended on secret data. Implementations should be constant-time and taken from maintained libraries with a record of fixing such issues.
- Decapsulation failure handling. ML-KEM uses implicit rejection: when a ciphertext is invalid, decapsulation returns a pseudorandom value derived from a secret 32-byte seed and the ciphertext instead of an error. Code that adds its own error signalling, or that returns early, can reopen chosen-ciphertext attacks. The genuine decapsulation failure rate for honest ciphertexts is negligible (table above).
- Input checking. FIPS 203 requires checks on the encapsulation key before encapsulation and on the decapsulation key and ciphertext before decapsulation. Reviewers should confirm these are present.
- Randomness and key handling. FIPS 203 requires approved random bit generators at a strength matching the parameter set (128, 192 or 256 bits) and requires that decapsulation keys, shared secrets and intermediate values be destroyed when no longer needed.
- Pre-standard code. Libraries that still implement round-three Kyber will not interoperate with FIPS 203 and are not approved.
Validated implementations and FIPS 140-3 status
For US federal use and many regulated buyers, the relevant question is whether ML-KEM runs inside a FIPS 140-3 validated cryptographic module. In December 2024, AWS announced that AWS-LC FIPS 3.0, including ML-KEM, had been added to the CMVP modules-in-process list, describing it as the first open source module with post-quantum support inside the FIPS boundary. Executive Order 14412 (June 22, 2026) directs NIST to revise CMVP processes to accelerate validations, and NIST IR 8547 states that this work is under way. Because validation status changes often, buyers should check each vendor's certificate number in the NIST CMVP database and confirm that ML-KEM is listed as an approved algorithm in the module's security policy.
Where ML-KEM is deployed
- Browsers: Chrome 131 and later negotiate hybrid ML-KEM by default; Cloudflare reports Firefox enabled hybrid PQ key agreement by default on desktop in November 2024.
- Apple platforms: iOS 26, iPadOS 26, macOS Tahoe 26 and visionOS 26 advertise X25519MLKEM768 in TLS 1.3 by default.
- Libraries: OpenSSL 3.5.0 (April 8, 2025) added ML-KEM and offers X25519MLKEM768 in its default key shares. Google's BoringSSL and AWS-LC also implement ML-KEM.
- Networks: Cloudflare reported in June 2026 that more than two-thirds of browser traffic to its network used post-quantum key agreement.
ML-DSA, the companion standard
ML-DSA (FIPS 204), derived from CRYSTALS-Dilithium, is the module-lattice digital signature standard published alongside ML-KEM. It replaces RSA, ECDSA and EdDSA signatures. Its three parameter sets have public keys and signatures of 1,312 and 2,420 bytes (ML-DSA-44), 1,952 and 3,309 bytes (ML-DSA-65), and 2,592 and 4,627 bytes (ML-DSA-87). CNSA 2.0 requires ML-DSA-87. ML-KEM protects confidentiality against harvest-now, decrypt-later collection, so it is usually deployed first; ML-DSA migration touches certificates, PKI and code signing and takes longer.
For software vendors facing customer questions about ML-KEM support, and for acquirers assessing a target's exposure, our post-quantum cryptography readiness work reviews libraries, protocols, modules and roadmaps. Engagements draw on specialists with quantum physics and applied cryptography backgrounds.
We review ML-KEM and wider post-quantum readiness for software vendors and acquirers.
Get a quoteSources
- NIST: FIPS 203, Module-Lattice-Based Key-Encapsulation Mechanism Standard
- NIST: FIPS 204, Module-Lattice-Based Digital Signature Standard
- NIST: IR 8547, Transition to Post-Quantum Cryptography Standards (October 2026)
- NIST: SP 800-227, Recommendations for Key-Encapsulation Mechanisms
- NSA: CNSA 2.0 and Quantum Computing FAQ
- The White House: Executive Order 14412, Securing the Nation Against Advanced Cryptographic Attacks
- Google Security Blog: A new path for Kyber on the web
- Apple: Prepare your network for quantum-secure encryption in TLS
- OpenSSL: OpenSSL 3.5 release notes
- Cloudflare: State of the post-quantum Internet in 2025
- Cloudflare: The White House's post-quantum executive order
- AWS Security Blog: AWS-LC FIPS 3.0, first cryptographic library to include ML-KEM in FIPS 140-3 validation
- KyberSlash: division timings depending on secrets in Kyber software
Questions
What is ML-KEM?
ML-KEM (Module-Lattice-Based Key-Encapsulation Mechanism) is the post-quantum key-establishment algorithm specified in NIST FIPS 203, published August 13, 2024. It is derived from CRYSTALS-Kyber and lets two parties agree a 32-byte shared secret over a public channel. Its security rests on the Module Learning with Errors problem.
Is ML-KEM the same as Kyber?
ML-KEM is the standardised version of CRYSTALS-Kyber with small technical changes, including a fixed 256-bit shared secret, a different Fujisaki-Okamoto transform variant and mandatory input checks. The changes make it incompatible with pre-standard Kyber, which is why Chrome changed TLS codepoints when it moved to ML-KEM.
Which ML-KEM parameter set should we use?
NIST IR 8547 recommends ML-KEM-768 as the default. ML-KEM-1024 is required by the NSA's CNSA 2.0 suite for national security systems. ML-KEM-512 is approved but offers the smallest security margin.
Is ML-KEM encryption?
ML-KEM is a key-encapsulation mechanism, which is a form of key establishment. It produces a shared secret key that is then used with a symmetric cipher such as AES-GCM to encrypt data. It is not used to encrypt messages directly.
What is the difference between ML-KEM and ML-DSA?
ML-KEM (FIPS 203) establishes shared keys. ML-DSA (FIPS 204), derived from CRYSTALS-Dilithium, produces digital signatures. Both are module-lattice schemes, and a full post-quantum migration needs both: ML-KEM to replace ECDH and RSA key exchange, ML-DSA to replace RSA and ECDSA signatures.
Let's discuss
your transaction.
Tell us about the opportunity and the questions you need answered. We respond within one business day with a proposed scope and fee.
