ML-KEM is the algorithm that's going to carry most of the post-quantum transition for key establishment. If you're encrypting a TLS connection or a file in 2031, there's a good chance ML-KEM is doing the key exchange. Here's what it actually is and why the parameter set you pick matters.
What ML-KEM does
ML-KEM stands for Module-Lattice-Based Key-Encapsulation Mechanism. It's in FIPS 203, one of the three post-quantum standards NIST finalized in August 2024.
A key-encapsulation mechanism does one narrow job: two parties agree on a shared secret without anyone eavesdropping on the exchange. That's the same job RSA key transport and Diffie-Hellman do today. ML-KEM replaces both.
Its security rests on lattice problems that are believed to be hard even for a quantum computer. That's the whole point. RSA and ECDH fall to Shor's algorithm; ML-KEM doesn't, as far as anyone knows.
The three parameter sets
| Parameter set | Security strength | NIST category | Public key size | Ciphertext size |
|---|---|---|---|---|
| ML-KEM-512 | 128-bit | 1 | 800 B | 768 B |
| ML-KEM-768 | 192-bit | 3 | 1,184 B | 1,088 B |
| ML-KEM-1024 | 256-bit | 5 | 1,568 B | 1,568 B |
The tradeoff is straightforward: bigger numbers mean more security and more bytes. The sizes above matter because they change TLS handshake performance, especially for the many connections a busy server handles.
Why 768 is the default
NIST recommends ML-KEM-768 for most uses. The reasoning is simple. ML-KEM-512 only costs a little less than 768 in terms of key size, but it gives you less margin. 768 sits at 192-bit security, which is a comfortable buffer against future improvements in lattice attacks, without the extra weight of 1024.
ML-KEM-1024 is there if you genuinely need 256-bit security, which mostly means high-assurance systems or data that has to stay confidential for a very long time.
How it compares to what you're replacing
Against RSA, the sizes are actually similar. An RSA-2048 public key is about 256 bytes, but the ciphertext it encrypts is also 256 bytes. ML-KEM's public key is bigger (around 1.2 KB for 768), but that's fine because it only travels once per connection setup. The real difference is that ML-KEM is quantum-resistant and RSA isn't.
Compared to ECDH, ML-KEM is heavier. An X25519 public key is 32 bytes. ML-KEM-768's is 1,184 bytes. That's why hybrid approaches, running ECDH and ML-KEM side by side, are popular during the transition: you keep classical security and add quantum resistance, at the cost of extra bytes.
HQC is the backup
ML-KEM is the only approved post-quantum KEM today, but it isn't alone forever. NIST selected HQC in March 2025 as an alternative, and its FIPS is under development. HQC uses error-correcting codes rather than lattices. The point of having it is diversity: if a breakthrough ever breaks lattices, you want a second KEM that doesn't depend on them.
When to migrate to ML-KEM
Now, for anything that encrypts data with a long confidentiality lifetime. The harvest-now-decrypt-later problem means attackers could be storing your ciphertext today. If that data still matters in 2035, you should already be planning the move. Federal high-value assets have to be on post-quantum key establishment by December 31, 2030.