NIST finalized ML-KEM (FIPS 203) and ML-DSA (FIPS 204) as the post-quantum standards for key encapsulation and digital signatures. Here's what a production implementation looks like — and why the primitives alone don't solve security.
Direct answer: ML-KEM replaces RSA/ECDH for key exchange. ML-DSA replaces RSA/ECDSA for signatures. A production implementation requires more than calling the algorithms — it requires key lifecycle management, signature bundle verification, algorithm rotation capability, and attestation that the PQ protection is actually in place.
A reference implementation calls ml_kem_keygen(), ml_kem_encaps(), and ml_kem_decaps(). A production system handles key generation, storage, rotation, revocation, multi-party verification, and failure modes. The gap between the two is where most PQ migration projects stall.
| Concern | Reference Implementation | Production System |
|---|---|---|
| Key generation | One call, keys in memory | HSM-backed, audit-logged, rotation-scheduled |
| Key storage | File or memory | Encrypted at rest, access-controlled, zeroized on expiry |
| Signature verification | Single algorithm check | Multi-family verification (all must pass) |
| Algorithm compromise | Rebuild everything | Disable one family, continue with remaining |
| Compliance proof | None | Cryptographic attestation that PQ is active |
ML-KEM (formerly Kyber) is a key encapsulation mechanism. It lets two parties establish a shared secret over an insecure channel, even if an adversary has a quantum computer. It replaces the key exchange step in TLS, SSH, VPN, and any protocol that uses Diffie-Hellman or RSA key transport.
What ML-KEM does NOT do:
| Parameter Set | NIST Level | Public Key | Ciphertext | Shared Secret |
|---|---|---|---|---|
| ML-KEM-512 | Level 1 (128-bit) | 800 bytes | 768 bytes | 32 bytes |
| ML-KEM-768 | Level 3 (192-bit) | 1,184 bytes | 1,088 bytes | 32 bytes |
| ML-KEM-1024 | Level 5 (256-bit) | 1,568 bytes | 1,568 bytes | 32 bytes |
ML-DSA (formerly Dilithium) is the primary post-quantum signature algorithm. It replaces RSA and ECDSA for signing documents, API responses, certificates, and any data that needs integrity and authentication.
The production challenge with ML-DSA is signature size. An ML-DSA-65 signature is 3,309 bytes — roughly 50x larger than an ECDSA signature. This matters for bandwidth-constrained applications, certificate chains, and protocols with fixed-size fields.
| Parameter Set | NIST Level | Public Key | Signature |
|---|---|---|---|
| ML-DSA-44 | Level 2 (~128-bit) | 1,312 bytes | 2,420 bytes |
| ML-DSA-65 | Level 3 (~192-bit) | 1,952 bytes | 3,309 bytes |
| ML-DSA-87 | Level 5 (~256-bit) | 2,592 bytes | 4,627 bytes |
NIST standardized ML-DSA (lattice-based) and SLH-DSA (hash-based) as two independent signature families. The reason: if the Module Learning With Errors problem turns out to be easier than expected, SLH-DSA provides a fallback based on a completely different mathematical assumption (hash function collision resistance).
A production system should sign with at least two families. If you sign with three — ML-DSA, FALCON (NTRU-lattice), and SLH-DSA (hash-based) — an attacker must break three independent mathematical problems simultaneously. No known or theoretical quantum algorithm can do this.
The three-hardness-assumption approach: ML-DSA (Module LWE), FALCON (NTRU Short Integer Solution), SLH-DSA (hash collision resistance). Three independent bets. If any one assumption holds, the signature is valid. This is not defense in depth — it is mathematical diversification.
Most organizations implementing ML-KEM and ML-DSA focus on the algorithm. The actual challenge is the system around the algorithm:
Instead of implementing ML-KEM and ML-DSA into every system individually, use an attestation layer that wraps your existing infrastructure:
The result: your existing systems continue to work. PQ protection wraps them. Migration of internal components happens on your timeline.
The implementation reality: ML-KEM and ML-DSA are well-specified algorithms with mature reference implementations. The hard part is not calling the functions — it is building the key management, rotation, multi-family verification, and compliance attestation infrastructure around them. That infrastructure is the difference between a demo and a production system.
See a Production Implementation →