PQC Migration Roadmap: How to Build One and Where to Start
Jul 02, 2026
ArticleBuild a PQC migration roadmap: inventory and CBOM, risk ranking with Mosca, hybrid ML-KEM first, PKI next, and the 2027-2035 deadlines.
Read article
ML-KEM (FIPS 203) explained: parameter sets and key sizes, Kyber vs ML-KEM, CNSA 2.0, hybrid TLS and how to generate, store and rotate ML-KEM keys.
ML-KEM key management is the set of controls for generating, storing, distributing, rotating and destroying the keys used by ML-KEM, the post-quantum key-encapsulation mechanism standardized by NIST in FIPS 203. Most ML-KEM keys are ephemeral and live for a single TLS handshake; the static ones need the same custody as any long-term private key, with two new details: larger keys, and a 64-byte seed that is as sensitive as the private key itself.
Key establishment is the part of your cryptography exposed to "harvest now, decrypt later": traffic recorded today with RSA or ECDH key exchange can be decrypted once a large enough quantum computer exists. That is why NIST's draft transition plan and the US federal timeline put key establishment first, and why ML-KEM is the first post-quantum algorithm most organizations will run in production, often already through hybrid TLS in recent OpenSSL builds.
This guide covers the FIPS 203 key sizes, how ML-KEM key management differs from RSA and ECDH, hybrid TLS with X25519MLKEM768, where ML-KEM keys should live, a lifecycle table, the NIST IR 8547 and CNSA 2.0 deadlines, the wider PQC key management picture (ML-DSA, SLH-DSA and the key hierarchy), and migration planning.
ML-KEM (Module-Lattice-Based Key-Encapsulation Mechanism) is specified in FIPS 203, which NIST published on 13 August 2024. In NIST's words, it is a key-encapsulation mechanism that two parties can use "to establish a shared secret key over a public channel". Its security rests on the Module Learning with Errors problem, which is believed to resist attacks by quantum computers.
Two points matter for key management:
KeyGen produces an encapsulation key ek (public) and a decapsulation key dk (private). Encaps(ek) returns a ciphertext and a 32-byte shared secret. Decaps(dk, ciphertext) recovers the same shared secret.| Item | Detail |
|---|---|
| Standard | NIST FIPS 203, final, 13 August 2024 |
| Type | Key-encapsulation mechanism (KEM) for key establishment |
| Based on | CRYSTALS-Kyber, selected by NIST in 2022 |
| Security basis | Module Learning with Errors (module lattices) |
| Parameter sets | ML-KEM-512, ML-KEM-768 (NIST default), ML-KEM-1024 |
| Shared secret | 32 bytes for every parameter set |
| Main uses | Hybrid TLS 1.3 and IPsec key exchange, key wrapping, encryption to a recipient's public key |
| US national security systems | ML-KEM-1024 for all classification levels (CNSA 2.0) |
ML-KEM vs Kyber. ML-KEM is not byte-for-byte the same as the CRYSTALS-Kyber submission. The NSA's CNSA 2.0 FAQ notes that the CRYSTALS algorithms "had a variety of versions" with tweaks made before the FIPS was published. Implementations of pre-standard Kyber, such as the early X25519Kyber768Draft00 TLS group, do not interoperate with ML-KEM and should be upgraded.
ML-KEM is one of three NIST post-quantum standards, alongside ML-DSA (FIPS 204) and SLH-DSA (FIPS 205); our post-quantum cryptography overview compares them.
NIST's companion recommendation, SP 800-227 (final, September 2025), explains how to use KEMs safely, including static versus ephemeral keys, data at rest and hybrid constructions. Read it alongside FIPS 203 when you write an ML-KEM policy.
FIPS 203 approves three parameter sets. The sizes below are from FIPS 203, Table 3; the security categories from Section 8.
| Parameter set | NIST security category | Encapsulation key (public) | Decapsulation key (private) | Ciphertext | Shared secret |
|---|---|---|---|---|---|
| ML-KEM-512 | 1 | 800 bytes | 1,632 bytes | 768 bytes | 32 bytes |
| ML-KEM-768 | 3 | 1,184 bytes | 2,400 bytes | 1,088 bytes | 32 bytes |
| ML-KEM-1024 | 5 | 1,568 bytes | 3,168 bytes | 1,568 bytes | 32 bytes |
For comparison, an X25519 public key is 32 bytes.
Which one to pick. FIPS 203 states: "NIST recommends using ML-KEM-768 as the default parameter set, as it provides a large security margin at a reasonable performance cost." It also advises using the strongest parameter set that is practical when you first establish protection, to avoid a later transition. National security systems follow CNSA 2.0, which points to ML-KEM-1024 (see Deadlines).
The seed. ML-KEM key generation starts from two 32-byte random values, d and z. FIPS 203 allows you to store this 64-byte seed and re-derive the key pair later, but adds that "it is sensitive data and shall be treated with the same safeguards as a decapsulation key."
1. A different interface. With ECDH, each side combines its private key with the peer's public key. With RSA key transport, the sender picks a secret and encrypts it. ML-KEM is neither: the encapsulating party gets a fresh shared secret and a ciphertext, and only the holder of dk can recover that secret. Libraries, HSM APIs and key-wrapping workflows built around encrypt/decrypt or derive need a new encapsulate/decapsulate path. PKCS#11 3.2 adds exactly that (see the FAQ).
2. Ephemeral and static keys follow different rules. SP 800-227 is explicit: "If an application uses an ephemeral key pair, the key pair shall be used for only one execution of key-establishment via a KEM and shall be destroyed as soon as possible after its use." A static ML-KEM key, by contrast, is a long-term private key that needs custody, backup and rotation.
3. Two private formats to manage. A private ML-KEM key can be stored as the 64-byte seed, as the expanded dk (1,632 to 3,168 bytes), or both. SP 800-227 notes that "some applications might call for storing keys using only a short seed, while other applications might call for storing keys in an expanded format that allows for faster computations." Your policy must state which format is stored, exported and backed up, because a seed-only backup cannot be restored into a system that accepts only dk, and vice versa.
4. Proof of possession changes. A KEM key cannot sign a certificate request. SP 800-227 says a party that uses someone else's static encapsulation key "must have assurance of the other party's ownership of the key", obtained from a certificate authority or through proof of possession plus identity verification. Expect enrollment flows for ML-KEM certificates to differ from the CSR-with-signature model you use for RSA.
5. Input checking is mandatory. FIPS 203 requires Encaps and Decaps to run only on checked inputs (Section 7). Importing a key from an untrusted source is therefore a validation step, not just a file copy.
6. Larger objects. Bigger keys and ciphertexts affect TLS handshakes, database columns, attribute limits and HSM storage quotas.
| Aspect | RSA (key transport) / ECDH (key agreement) | ML-KEM (FIPS 203) |
|---|---|---|
| Quantum resistance | No; NIST IR 8547 draft proposes deprecation after 2030 (112-bit) and disallowance after 2035 | Designed to resist quantum attacks |
| Operation | RSA: encrypt/decrypt a chosen secret. ECDH: derive from two key pairs | Encapsulate/decapsulate; secret generated during encapsulation |
| Typical public key size | X25519: 32 bytes; RSA-2048: 256-byte modulus | 800 / 1,184 / 1,568 bytes |
| Private key storage | Private key value | 64-byte seed, expanded dk (1,632 to 3,168 bytes), or both |
| Ephemeral use | ECDHE in TLS 1.3 | ML-KEM key share in hybrid TLS 1.3; one key-establishment execution per key pair |
| Static use | RSA key transport, static ECDH | Long-term encapsulation key published or certified; dk held in KMS/HSM |
| Proof of possession | Signed CSR (RSA) | No signature possible; CA- or protocol-based PoP |
| Can it sign? | RSA yes; ECDH keys no | No; use ML-DSA or SLH-DSA |
| HSM/API support | PKCS#11, KMIP, cloud KMS for many years | PKCS#11 3.2 defines ML-KEM objects and mechanisms; product support varies |
| Transition mode | Classical only | Usually hybrid with X25519 or ECDH during the transition |
X25519MLKEM768 is a TLS 1.3 key-exchange group that runs ML-KEM-768 and X25519 in parallel and combines both shared secrets, so the session stays secure as long as either algorithm holds. It is standardized in RFC 10024, "Post-Quantum Traditional (PQ/T) Hybrid Key Agreement Mechanisms for TLS 1.3" (Standards Track, August 2026), which was published from the IETF draft draft-ietf-tls-ecdhe-mlkem.
RFC 10024 defines three groups:
| Group | Code point | Recommended | Client share | Server share | Shared secret |
|---|---|---|---|---|---|
| X25519MLKEM768 | 4588 (0x11EC) | Y | 1,216 bytes (1,184 ML-KEM + 32 X25519) | 1,120 bytes (1,088 ML-KEM + 32 X25519) | 64 bytes |
| SecP256r1MLKEM768 | 4587 (0x11EB) | N | 1,249 bytes | 1,153 bytes | 64 bytes |
| SecP384r1MLKEM1024 | 4589 (0x11ED) | N | 1,665 bytes | 1,665 bytes | 80 bytes |
One detail trips up implementers: in X25519MLKEM768 the ML-KEM part comes first in the key share and in the concatenated shared secret, while the two NIST-curve groups put the ECDH part first.
What this means for key management: nothing to store. In hybrid TLS 1.3, the client generates a fresh ML-KEM key pair per handshake, sends the 1,184-byte encapsulation key, and the server answers with a ciphertext. Both key pairs are ephemeral and destroyed after the handshake, exactly like ECDHE today. The server still authenticates with its existing RSA or ECDSA certificate.
It is also already deployed. Browser and server support, handshake-size issues and configuration examples are in our hybrid post-quantum TLS guide. OpenSSL 3.5.0 (8 April 2025) added ML-KEM, ML-DSA and SLH-DSA and changed "the default TLS keyshares ... to offer X25519MLKEM768 and X25519". To check whether a server negotiates it:
# OpenSSL 3.5 or later
openssl s_client -connect example.com:443 -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i -E "group|temp key"
The first decision is which keys need management at all.
| Use | Key type | Where the private part lives | Management effort |
|---|---|---|---|
| Hybrid TLS 1.3 (X25519MLKEM768) | Ephemeral | Process memory of the TLS library, for one handshake | Configuration only: enable the group, monitor negotiation |
| Hybrid IPsec / VPN key exchange | Ephemeral | Gateway memory | Configuration and firmware level |
| Encrypting data or keys to a long-term recipient | Static | KMS or HSM; dk should not leave it | Full lifecycle: custody, backup, rotation, destruction |
| Key wrapping between systems or tenants | Static | KMS or HSM | Full lifecycle plus access policy |
| Devices or services with a certified KEM key | Static | Device secure element, TPM or HSM | Lifecycle plus certificate issuance and revocation |
For static keys, SP 800-227 sets the baseline: private data (seeds and decapsulation keys) "needs to be stored within the cryptographic module in a manner that is secure against both leakage and unauthorized modification", and import and export "needs to be performed in a secure manner". In practice: generate inside the KMS or HSM, keep dk non-exportable unless backup requires a wrapped export, and expose only Decaps to applications.
Use this table as a starting point for a static ML-KEM key policy. Ephemeral TLS keys need only the generation and destruction rows, and those are handled by the TLS library.
| Stage | What to decide | ML-KEM specifics |
|---|---|---|
| Generation | Where keys are generated; which parameter set | Generate inside a validated module. FIPS 203 requires an approved RBG with at least 128, 192 or 256 bits of security strength for ML-KEM-512, -768 and -1024. Default to ML-KEM-768; ML-KEM-1024 for CNSA 2.0 scope |
| Storage | Format and protection | Store seed, dk or both, and record which. Treat the seed exactly like dk. The public ek must be protected against modification, not disclosure |
| Distribution | How peers get the encapsulation key | Certificate or authenticated channel; plan proof of possession, since the key cannot sign |
| Usage | Who may call Decaps | Restrict by application identity; log every decapsulation for static keys |
| Rotation | Cryptoperiod and re-wrapping | Set a cryptoperiod per policy. Data or keys wrapped to the old key must be re-wrapped or the old dk retained (decrypt-only) until they expire |
| Backup and recovery | Export format and custody | Wrapped export only. A 64-byte seed is compact but must be backed up with the same controls as the full key; confirm the target system accepts the format |
| Destruction | When and how | FIPS 203 says the decapsulation key "must be destroyed after it is no longer needed". Destroy seed and dk together, including backups |
| Audit | Evidence | Record generation, usage, rotation and destruction events in a tamper-evident log |
If you need a portable key file for testing, OpenSSL 3.5 shows the seed choice directly. By default it keeps the seed; this command writes only the FIPS 203 dk:
openssl genpkey -provparam ml-kem.retain_seed=no -algorithm ml-kem-768 -out priv-only.pem
Use such software keys for testing only.
NIST IR 8547. NIST's Transition to Post-Quantum Cryptography Standards is still an initial public draft (published 12 November 2024; comments closed 10 January 2025). For key establishment it proposes that finite-field DH/MQV, elliptic-curve DH/MQV and RSA key establishment at 112 bits of security be deprecated after 2030, and that these algorithms at 112 bits and 128 bits or more be disallowed after 2035. As a draft, these dates show NIST's direction rather than final rules.
CNSA 2.0. National security systems in the US follow NSA's CNSA 2.0 suite. An NSA-authored IETF Internet-Draft profiling TLS for CNSA 2.0 (draft-becker-cnsa2-tls-profile) states that "CNSA 2.0 requires the use of ML-KEM-1024 for key establishment in TLS". The NSA's CNSA 2.0 FAQ lists ML-KEM-1024 "for all classification levels". CNSA 2.0 algorithms are required in new national security system acquisitions from 1 January 2027 and mandated by 31 December 2031; see the CNSA 2.0 timeline. How these dates interact with the civilian federal timeline is covered in our US post-quantum regulation guide covering NIST, OMB and CNSA 2.0.
PQC key management applies key lifecycle controls (generation, storage, distribution, rotation, backup, destruction and audit) to post-quantum keys and to the key hierarchy that protects them. ML-KEM is one part of it. A complete post-quantum key management policy also covers signature keys and the keys at the top of your hierarchy.
| Algorithm | Standard | Purpose | Public key | Private key | Output | Key management notes |
|---|---|---|---|---|---|---|
| ML-KEM | FIPS 203 | Key establishment | 800 to 1,568 bytes | 1,632 to 3,168 bytes (or a 64-byte seed) | Ciphertext 768 to 1,568 bytes | Mostly ephemeral; static keys need full custody (this guide) |
| ML-DSA | FIPS 204 | Signatures (certificates, code, documents) | 1,312 / 1,952 / 2,592 bytes | 2,560 / 4,032 / 4,896 bytes | Signature 2,420 / 3,309 / 4,627 bytes | Long-lived CA and code-signing keys; plan certificate size and HSM support |
| SLH-DSA | FIPS 205 | Signatures where a hash-based, conservative scheme is preferred | 32 to 64 bytes | 64 to 128 bytes | Signature 7,856 to 49,856 bytes | Small keys, large and slow signatures; suited to roots and firmware |
Sizes are from FIPS 203, FIPS 204 (Table 2, ML-DSA-44/65/87) and FIPS 205. Stateful hash-based signatures (LMS and XMSS, NIST SP 800-208) add one more rule: the signer must never reuse a one-time key, so state must be backed up and synchronised with great care. Symmetric keys are not the problem: AES-256 stays acceptable, and CNSA 2.0 requires it.
A post-quantum leaf key protected by a classical parent is only as strong as that parent. If an RSA key wraps your key-encryption keys, or a key is exported under RSA-OAEP, a recorded copy of that exchange is exposed to "harvest now, decrypt later" even if every data key below it is quantum-safe. In practice:
Post-quantum key management fails in practice where a key store cannot hold the new objects. For each HSM, cloud KMS and secrets manager, ask for dated answers on:
Keep the answers in your cryptographic inventory so the PQC migration roadmap can schedule each key store.
dk storage and wrapped export.DuoKey addresses the inventory and policy steps above. According to DuoKey's documentation:
classical, hybrid or pqc_only), key reference and backend at runtime. The hybrid posture with ML-KEM and ML-DSA is available out of the box. Moving to PQC-only is a policy edit; application code does not change.CAP runs on DuoKey Cockpit today through a REST API and Java/Spring Boot and .NET/EF Core reference clients; packaged SDKs are on the roadmap. For anything not listed here, such as a specific HSM model's ML-KEM support, contact DuoKey.
Q: What is ML-KEM key management?
It is the set of controls for generating, storing, distributing, rotating, backing up and destroying ML-KEM keys, the post-quantum KEM keys defined in FIPS 203. Ephemeral keys used in hybrid TLS need only correct configuration; static keys need full lifecycle management in a KMS or HSM, including protection of the 64-byte seed.
Q: What is PQC key management?
PQC key management is the lifecycle management of post-quantum keys (ML-KEM for key establishment, ML-DSA and SLH-DSA for signatures) and of the key hierarchy above them. It covers where keys are generated and stored, which formats are backed up, how classical wrapping keys are replaced, and which KMS and HSM products support the new algorithms. See PQC Key Management: Beyond ML-KEM.
Q: What is ML-KEM?
ML-KEM (Module-Lattice-Based Key-Encapsulation Mechanism) is the post-quantum key-encapsulation mechanism standardized by NIST in FIPS 203 on 13 August 2024. Two parties use it to agree on a 32-byte shared secret over a public channel. It comes in three parameter sets, ML-KEM-512, -768 and -1024, with ML-KEM-768 as NIST's recommended default.
Q: Is ML-KEM the same as Kyber?
ML-KEM is the standardized version of CRYSTALS-Kyber, but the two are not identical: the algorithm was adjusted before FIPS 203 was published. Pre-standard Kyber implementations do not interoperate with ML-KEM.
Q: Is ML-KEM approved for CNSA 2.0?
Yes, at the ML-KEM-1024 parameter set, which the NSA requires for all classification levels in national security systems. ML-KEM-512 and ML-KEM-768 are NIST-approved but are not the CNSA 2.0 choice.
Q: Is ML-KEM a replacement for RSA?
Partly. ML-KEM replaces RSA (and ECDH) for key establishment: key transport and key agreement. It does not replace RSA signatures; for those, NIST standardized ML-DSA (FIPS 204) and SLH-DSA (FIPS 205). During the transition, ML-KEM is usually combined with X25519 or ECDH in a hybrid.
Q: What is X25519MLKEM768?
A hybrid TLS 1.3 key-exchange group that combines ML-KEM-768 with X25519, standardized in RFC 10024 with code point 0x11EC. The client share is 1,216 bytes, the server share 1,120 bytes, and the combined shared secret 64 bytes. OpenSSL 3.5 offers it by default.
Q: Can an HSM store ML-KEM keys?
It depends on the HSM and its firmware. The PKCS#11 3.2 standard (OASIS Standard, June 2026) defines ML-KEM key objects (CKK_ML_KEM), a key-pair generation mechanism (CKM_ML_KEM_KEY_PAIR_GEN), C_EncapsulateKey and C_DecapsulateKey, and attributes for both the seed (CKA_SEED) and the decapsulation key (CKA_VALUE). Whether a given HSM implements them, and with which validation status, is a question for its vendor.
Q: Should I store the ML-KEM seed or the decapsulation key?
Either is allowed. FIPS 203 permits storing the 64-byte seed and re-deriving the key pair, as long as the seed gets the same safeguards as the decapsulation key. Choose one canonical format per system, and make sure your backup format can be imported where you would restore it.
Q: Which ML-KEM parameter set should I use?
NIST recommends ML-KEM-768 as the default and advises the strongest parameter set that is practical. Use ML-KEM-1024 where CNSA 2.0 applies or your policy requires security category 5.
Q: Do I need new certificates to use ML-KEM in TLS?
Not for hybrid key exchange. X25519MLKEM768 changes the key exchange, not authentication, so your existing RSA or ECDSA certificates keep working. Certificates change when you migrate signatures to ML-DSA.
ML-KEM changes less about key management than its key sizes suggest, as long as you separate the two cases. Ephemeral keys in hybrid TLS are a configuration task you can start this quarter. Static keys need a policy that covers the seed, the KEM interface and proof of possession.
dk, or both), cryptoperiod, backup and destructionWritten by
DuoKey Team
Related Resources
Tell us where control is difficult today. We will help you identify a practical next step.