Recent

↑ ↓ to move ↵ to open esc to close

Post-Quantum Cryptography Engineering Guide: NIST FIPS 203, 204, 205, HQC & Hybrid Migration

Exact byte budgets, mathematical assumptions, side-channel traps, and production deployment blueprints for ML-KEM, ML-DSA, SLH-DSA, HQC, TLS 1.3, OpenSSH, and age encryption

Key Findings & Executive Synthesis
Cryptographically relevant quantum computers running Shor's algorithm will break RSA, X25519, and ECDSA, exposing recorded classical traffic to Harvest Now, Decrypt Later decryption. NIST finalized FIPS 203 (ML-KEM), FIPS 204 (ML-DSA), and FIPS 205 (SLH-DSA), plus selected code-based HQC as a non-lattice backup KEM; engineers should deploy hybrid X25519MLKEM768 key exchange immediately across TLS 1.3, OpenSSH, and file encryption.

Even if cryptanalytically relevant quantum computers take years to arrive, your encrypted traffic is already on the clock. Intelligence collectors and adversaries capture classical RSA and X25519 handshakes on fiber links today so they can decrypt recorded archives once quantum hardware matures, which is why browsers, Cloudflare, Signal, and OpenSSH are shipping hybrid post-quantum key exchange now.

Start Here · 30-Second Migration Priority
1. Upgrade Key Exchange Now

Enable hybrid X25519MLKEM768 on TLS 1.3 proxies, OpenSSH 9.9+ servers, and age backups to stop Harvest-Now-Decrypt-Later immediately.

2. Keep AES & Classical Fallbacks

Do not deploy pure experimental lattice-only key exchange; hybrid combiners guarantee security never drops below battle-tested X25519.

3. Check Your Endpoints

Verify live browser group negotiation with our Transport Echo Inspector and keep unspent cold BTC on fresh never-reused bc1q scripts.

1. Threat Asymmetry: Shor vs. Grover & the NIST IR 8547 Clock

Shor's quantum period-finding algorithm breaks all integer factorization (RSA) and discrete-logarithm (DH, ECDH, X25519, ECDSA, Ed25519, secp256k1) assumptions once cryptanalytically relevant quantum computers (CRQCs) exist. Symmetric primitives (AES-256, ChaCha20-Poly1305, SHA-384, SHAKE256) face only Grover's sequential quadratic search and remain secure without replacement. Under NIST IR 8547 and CNSA 2.0 schedules, 112-bit classical asymmetric schemes face deprecation by 2030 and disallowance by 2035:

  1. Key Exchange (URGENT NOW): Ephemeral TLS 1.3, OpenSSH, messaging, and age backups suffer Harvest Now, Decrypt Later (HNDL) archival interception today (Mosca's inequality: secrets needing X years of confidentiality plus Y years migration exceed time to CRQC Z). Deploy hybrid X25519MLKEM768 immediately.
  2. Ephemeral vs. Long-Lived Signatures (2026-2030): A quantum computer in 2035 cannot spoof a verified 2026 TLS session, but hardware root CAs, Secure Element boot ROMs, and OS OTA signing anchors deployed today must embed hash-based (SLH-DSA) or lattice (ML-DSA) anchors now.
  3. Blockchain Public Keys (STRUCTURAL): Reused Bitcoin (P2PKH/P2WPKH), P2TR (Taproot), early P2PK outputs (~1.7M+ BTC), and spent EVM 0x... addresses already expose raw secp256k1 points on-chain. Unspent fresh bc1q addresses keep keys shielded behind RIPEMD160(SHA256(pk)) until spent (paired with BIP-360 P2QRH proposals).

NIST IR 8547 Transition Phasing & Deprecation Timetable

  • Phase 1 (2024-2030, Hybrid Migration Baseline): Organizations must catalog assets via automated Cryptographic Bill of Materials (CBOM) tooling and deploy hybrid post-quantum key agreement (X25519MLKEM768) across internet-facing TLS 1.3 edge proxies. Classical algorithms (RSA-2048, ECDSA P-256, ECDH) remain permitted for general operational continuity while software stacks validate constant-time lattice primitives.
  • Phase 2 (2030-2035, Formal Deprecation Window): Classical public-key schemes face formal deprecation under federal information processing standards. Standalone classical key encapsulation without post-quantum augmentation is disallowed for sensitive infrastructure; classical digital signatures transition to legacy verification-only mode, mandating FIPS 204 (ML-DSA) or FIPS 205 (SLH-DSA) for all freshly issued certificates and code signatures.
  • Phase 3 (2035+, Complete Disallowance): Classical public-key algorithms are completely disallowed across federal procurement, defense supply chains (CNSA 2.0), and regulated critical infrastructure. Systems must enforce pure post-quantum algorithms (FIPS 203, FIPS 204, FIPS 205, and HQC).

2. NIST Post-Quantum Portfolio (FIPS 203 / 204 / 205 / 206 & HQC)

  • FIPS 203 (ML-KEM, ex-Kyber): Module-LWE over R_q = Z_q[X]/(X^256+1) (q = 3329). Final ML-KEM-768 (Cat. 3) is wire-incompatible with draft Kyber768Draft00 because NIST bound H(ek) directly into Fujisaki-Okamoto shared-secret derivation (G(m || H(ek))). Executes faster than X25519 on AVX2/NEON.
  • FIPS 204 (ML-DSA, ex-Dilithium): Module-LWE/MSIS general-purpose signatures (q = 8,380,417). Defaults to hedged (randomized) signing against fault attacks. A pure 3-cert ML-DSA-65 TLS chain adds ~15.8 KB, requiring RFC 8879 cert compression or IETF Merkle Tree Certificates (MTC) to fit cellular TCP initcwnd (~14.6 KB).
  • FIPS 205 (SLH-DSA, ex-SPHINCS+) & Draft FIPS 206 (FN-DSA): Pure stateless hash-only signatures (32-64 B pubkeys, 7.8 KB+ sigs) immune to algebraic lattice breaks and ideal for firmware root CAs. FN-DSA-512 (Falcon) shrinks pk+sig (897 B + 666 B) for UDP/DNSSEC at the cost of constant-time IEEE-754 FPU arithmetic.
  • HQC (Hamming Quasi-Cyclic, March 2025 Round-4 Selection): Error-correcting linear code KEM providing mathematical diversity independent of structured lattices (HQC-128: 2,249 B pk, 4,481 B ct; tracked in DT.gl Advisories).

3. Master Byte-Budget & Cryptographic Comparison Table (2026)

Algorithm & StandardNIST Cat.Hardness AssumptionPublic Key (Bytes)Ciphertext / Sig (Bytes)Relative CPU & Primary Engineering Role
X25519 (Classical Baseline)0 (Shor broken)Elliptic-Curve ECDLP (Curve25519)32 B32 BBaseline classical ECDH; vulnerable to Harvest-Now-Decrypt-Later
ML-KEM-512 (FIPS 203)Cat. 1 (~AES-128)Module-LWE (k=2, q=3329)800 B768 BUltra-fast (faster than X25519 w/ AVX2); constrained IoT KEM
ML-KEM-768 (FIPS 203)Cat. 3 (~AES-192)Module-LWE (k=3, q=3329)1,184 B1,088 BGlobal Recommended Default KEM (~0.04 ms handshake cost)
ML-KEM-1024 (FIPS 203)Cat. 5 (~AES-256)Module-LWE (k=4, q=3329)1,568 B1,568 BCNSA 2.0 national-security profile & Signal PQXDH prekeys
X25519MLKEM768 (IETF Hybrid)Cat. 3 + ClassicalDual: ECDLP AND Module-LWE1,216 B1,120 BProduction Standard in TLS 1.3 (0x11EC), OpenSSH & age
HQC-128 (NIST 5th PQC Selection)Cat. 1 (~AES-128)Quasi-Cyclic Code Decoding (Hamming)2,249 B4,481 BNon-lattice mathematical backup KEM if algebraic lattices weaken
Ed25519 (Classical Baseline)0 (Shor broken)Twisted Edwards ECDLP (SHA-512)32 B64 BCompact classical signature; safe online short-term until CRQCs
ML-DSA-44 (FIPS 204)Cat. 2 (~SHA-256)Module-LWE + Module-SIS (4x4)1,312 B2,420 BFast lattice signature for WebPKI leaf certs & API tokens
ML-DSA-65 (FIPS 204)Cat. 3 (~AES-192)Module-LWE + Module-SIS (6x5)1,952 B3,309 BRecommended Default General-Purpose PQ Signature
ML-DSA-87 (FIPS 204)Cat. 5 (~AES-256)Module-LWE + Module-SIS (8x7)2,592 B4,627 BCNSA 2.0 high-assurance code/firmware & PKI root signing
FN-DSA-512 (Draft FIPS 206)Cat. 1 (~AES-128)NTRU Lattice (SIS w/ FFT sampling)897 B666 BSmallest PQ pk + sig footprint (DNSSEC); tricky constant-time FPU
SLH-DSA-SHA2-128s (FIPS 205)Cat. 1 (Hash-Only)Pure SHA-256 Stateless Merkle/FORS32 B7,856 BSlow sign (~50-150 ms), fast verify; ideal Root CA & OS Boot ROM

4. Hybrid X25519MLKEM768 Handshake & Key-Combiner Architecture Diagram

Hybrid X25519MLKEM768 (Codepoint 0x11EC) TLS 1.3 & OpenSSH Key Exchange Byte FlowByte-accurate diagram showing ClientHello 1,216-byte hybrid key_share (1,184B ML-KEM-768 ek + 32B X25519), ServerHello 1,120-byte response (1,088B ct + 32B X25519), and HKDF/SHA-256 dual-secret combiner.HYBRID KEM COMBINER: TLS 1.3 GROUP 0x11EC (X25519MLKEM768) & OPENSSH 9.9+Initiator (Client)1. ML-KEM-768.KeyGen()ek_pq: 1,184 B (public)dk_pq: 2,400 B (RAM only)2. X25519 Ephemeralpk_ec: 32 B | sk_ec: 32 B5. Dual Decaps & Derivess_pq = Decaps(dk_pq, ct)ss_ec = X25519(sk_ec, pk_s)SS = ss_pq || ss_ec (64 B)ClientHello key_share -->ek_pq (1,184B) || pk_ec (32B)Total share: 1,216 Bytes (~1 MTU)Fits cleanly inside TCP 10-MSS<-- ServerHello key_sharect_pq (1,088B) || pk_s (32B)Total reply: 1,120 Bytes (1-RTT)Zero extra RTTs vs classical TLSHKDF-Extract(Salt, ss_pq || ss_ec)Secure if EITHER MLWE or X25519 holds.Responder (Server)3. ML-KEM-768.Encaps(ek)Validates modulus check(ek[i] < 3329 per FIPS 203)-> (ss_pq: 32B, ct: 1088B)4. Classical ECDHss_ec = X25519(sk_s, pk_ec)Zero-Trust InvariantImplicit FO rejection hidesinvalid ciphertext oracles.
Figure 10.1: Byte-exact wire flow of IANA TLS 1.3 NamedGroup 0x11EC (X25519MLKEM768), adding roughly 2.27 KB total handshake payload while preserving 1-RTT latency.

5. Production Infrastructure Configuration & Verification

5.1 TLS 1.3 (X25519MLKEM768), OpenSSH (9.9+) & age Encryption

  • TLS 1.3 (0x11EC): Enable X25519MLKEM768:X25519:P-256 (ssl_ecdh_curve / Groups) on Nginx, HAProxy, and Cloudflare/AWS-LC origins so clients negotiate 1,216 B ClientHello key shares without extra RTTs. Verify your browser session via DT.gl's Encrypted Transport Echo.
  • OpenSSH (9.9+ / 10.x) /etc/ssh/sshd_config:
    KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,[email protected],curve25519-sha256
    Ciphers [email protected],[email protected]
    MACs [email protected],[email protected]
    
  • Long-Lived Backups (age age1pq1... vs OpenPGP RFC 9580): Encrypt object-store archives (S3/B2/Arweave) with age mlkem768x25519 HPKE (X-Wing) recipients or RFC 9580 v6 OpenPGP composite ML-KEM-768+X25519 keys; pair transit tunnels with PQXDH/SPQR messengers and WireGuard Rosenpass PSKs.

5.2 Constant-Time & FIPS 203 Implementation Invariants

  1. Enforce FIPS 203 Section 7.2 modulus validation (ByteEncode_12(ByteDecode_12(ek)) == ek, ensuring coefficients < 3329) prior to encapsulation.
  2. Ban variable-time CPU integer division (DIV/UDIV, KyberSlash class) via formally verified libraries (libcrux, aws-lc).
  3. Preserve constant-time implicit Fujisaki-Okamoto rejection (J(z || c)) inside ML-KEM.Decaps, never branching early on invalid ciphertexts.

6. WebPKI Bloat, Merkle Tree Certificates (MTC), & Blockchain Exposure

Replacing a ~550 B classical TLS X.509 cert chain with naive ML-DSA-65 expands handshake authentication past 20 KB (> 14.6 KB TCP initcwnd). IETF Merkle Tree Certificates (MTC) resolve this by shipping CA Merkle roots inside browser trust stores so servers emit compact ~640-832 B SHA-256 inclusion proofs instead of intermediate cert chains, while RFC 8879 Brotli/Zstd compresses leaf payloads and DNSSEC moves oversize keys onto Encrypted DNS (DoH/DoQ).

On public blockchains, BIP-39/SLIP-39 seeds and BIP-32 HMAC-SHA512 derivation remain quantum-resistant; exposed secp256k1 public keys (P2PK, Taproot P2TR, and any address that signed at least one spend) face long-range Shor recovery. Park unspent cold vaults on fresh, never-reused P2WPKH (bc1q) or P2WSH scripts (Self-Custody Wallets) pending BIP-360 (P2QRH).


7. CBOM Discovery, SP 800-227 Combiners, & Embedded Secure Elements

  1. Generate a CycloneDX v1.6+ CBOM: Scan repositories and containers (Semgrep, Syft, cbomkit) to detect hard-coded RSA-2048 tokens, fixed C structs (uint8_t pk[64] overflowing 1,952 B ML-DSA-65), and pinned legacy crates.
  2. NIST SP 800-227 / X-Wing Key Combiners: Bind raw PQ + classical shared secrets alongside public-key/ciphertext context (SHA3-256(label || ss_pq || ss_ec || ct_ec || pk_ec)), then zeroize 2,400 B dk_pq buffers (explicit_bzero / zeroize).
  3. Smartcard & Hardware Token Constraints: 8-32 KB SRAM Secure Elements (FIDO2 & Hardware Keys) require streaming SHAKE128 NTT matrix expansion and ISO/IEC 7816-4 command chaining for multi-kilobyte ML-DSA/SLH-DSA transfers over tap NFC.

Frequently Verified Technical Questions

Why must key exchange (ML-KEM) be upgraded to post-quantum cryptography before digital signatures (ML-DSA)?

Confidentiality faces an immediate Harvest Now, Decrypt Later threat: passive adversaries recording TLS 1.3, SSH, or VPN ciphertexts today can store them until a fault-tolerant quantum computer breaks the classical X25519 handshake. Digital signatures authenticate identity at the moment of verification; a quantum computer built in 2034 cannot retroactively invalidate a TLS server signature verified in 2026, though long-lived root certificates and firmware bootloaders must already plan signature agility.

Primary Reference: NIST FIPS 203 (Module-Lattice-Based KEM)

What is X25519MLKEM768 and why do browsers and OpenSSH prefer hybrid key exchange?

X25519MLKEM768 combines a classical 32-byte X25519 elliptic-curve Diffie-Hellman exchange with a 1,184-byte NIST FIPS 203 ML-KEM-768 lattice key encapsulation in a single concatenated key share, deriving the session secret over both outputs. Hybridization guarantees that even if a subtle implementation bug or unexpected lattice cryptanalysis weakens ML-KEM, session security never drops below battle-tested X25519.

Primary Reference: IETF Hybrid Key Exchange in TLS 1.3

Why did NIST select HQC in 2025 when ML-KEM (FIPS 203) was already standardized?

Both FIPS 203 (ML-KEM) and FIPS 204 (ML-DSA) rely on structured algebraic module lattices (Module-LWE and Module-SIS). To ensure cryptographic diversity in case a mathematical breakthrough ever weakens structured lattices, NIST selected HQC (Hamming Quasi-Cyclic) in March 2025 as a fifth standard built on completely distinct error-correcting code problems in the Hamming metric.

Primary Reference: NIST PQC Standardization Project

Does post-quantum cryptography require doubling AES-256 or SHA-384 key sizes?

No. Quantum computers do not run Shor's algorithm against unstructured symmetric ciphers or cryptographic hashes; they apply Grover's search algorithm, which offers at most a quadratic speedup requiring sequential serial oracle queries that parallelize poorly. AES-256, ChaCha20-Poly1305, SHA-384, SHA-512, and SHAKE256 retain huge post-quantum security margins without structural replacement.

Primary Reference: NIST IR 8547 (Transition to Post-Quantum Cryptography Standards)

Cryptographic & Editorial Revision Ledger

Published: | Last Verified:

  • 2026-11-14: Integrated official NIST IR 8547 transition schedule, 2030 and 2035 deprecation-to-disallowance deadlines, and IETF X25519MLKEM768 deployment criteria.
  • 2026-11-11: Initial V1 engineering specification covering NIST FIPS 203/204/205, March 2025 HQC selection, NIST IR 8547 deprecation timelines, and hybrid X25519MLKEM768 deployment.