Skip to main content
Home › Categories › Software Engineering, Cloud & Cybersecurity › Post-Quantum Cryptography Explained: Shor’s Algorithm, Harvest-Now-Decrypt-Later, and NIST ML-KEM / ML-DSA Migration

Post-Quantum Cryptography Explained: Shor’s Algorithm, Harvest-Now-Decrypt-Later, and NIST ML-KEM / ML-DSA Migration

Author: ZUVDEX Team 4 min read
post quantum cryptography explained nist fips 203 ml kem kyber nist fips 204 ml dsa dilithium harvest now decrypt later threat shor vs grover algorithm aes 256 hybrid x25519mlkem768 tls 1.3

Post-Quantum Cryptography (PQC) consists of new public-key encryption and digital signature algorithms designed to run on ordinary classical servers and browsers while resisting attacks from both classical supercomputers and future fault-tolerant quantum computers. Standardized by NIST in FIPS 203 (ML-KEM), FIPS 204 (ML-DSA), and FIPS 205 (SLH-DSA), post-quantum algorithms replace integer-factoring and elliptic-curve math with hard high-dimensional lattice and cryptographic hash problems.

Key Highlights

  • Quantum computers do NOT break all cryptography equally: Shor’s algorithm completely shatters RSA, Diffie-Hellman, and Elliptic Curve Cryptography (ECDSA/X25519), whereas symmetric AES-256 and SHA-384/SHA-512 remain secure against Grover’s quadratic speedup.
  • Confidentiality migration is urgent today because of 'Harvest Now, Decrypt Later' (HNDL)—encrypted TLS sessions captured today can be decrypted years from now if protected only by classical ECDHE.
  • Digital signatures for interactive logins face less immediate HNDL danger (an attacker cannot retroactively forge today’s TLS handshake ten years later), EXCEPT on long-lived root CA certificates, firmware bootloaders, and legal archives.
  • Deploy Hybrid Key Exchange (`X25519MLKEM768`) in TLS 1.3 first: combining battle-tested X25519 with post-quantum ML-KEM-768 guarantees security as long as either math family holds.

1. Shor’s Algorithm vs Grover’s Algorithm: Separating Fact From Hype

Public-key cryptography securing HTTPS, SSH, VPNs, and code signing over the past four decades rests on two algebraic trapdoors: factoring products of large primes (RSA) and computing discrete logarithms over finite fields or elliptic curves (ECDH, ECDSA, Ed25519). In 1994, Peter Shor proved that a sufficiently large, error-corrected quantum computer using Quantum Fourier Transforms solves both problems in polynomial time.

By contrast, symmetric ciphers (AES) and cryptographic hash functions (SHA-2, SHA-3) have no hidden algebraic group structure for Shor’s algorithm to exploit. Lov Grover’s quantum search algorithm provides at most a square-root speedup against brute-force key search—reducing 256-bit AES security to 2^128 quantum operations, which remains physically unbreakable across cosmic timescales.

Classical vs NIST Post-Quantum Cryptographic Primitives & Wire Sizes
Primitive & Use Case Legacy Classical Standard Quantum Status NIST PQC Standard & Typical Wire Size
TLS / VPN Key Exchange X25519 / ECDH P-256 (32–65 B) Broken by Shor’s Algorithm FIPS 203 ML-KEM-768 (~1,184 B pubkey, 1,088 B ciphertext)
General Digital Signatures ECDSA P-256 (64 B) / RSA-2048 (256 B) Broken by Shor’s Algorithm FIPS 204 ML-DSA-65 (~1,952 B pubkey, 3,309 B signature)
Conservative Firmware / Root CA RSA-4096 Broken by Shor’s Algorithm FIPS 205 SLH-DSA (Hash-based; tiny keys, 7.8–17 KB sigs)
Bulk Data Encryption AES-128-GCM / AES-256-GCM AES-256 Safe (Grover = 2^128) Keep AES-256-GCM / ChaCha20-Poly1305
Cryptographic Hashing SHA-256 / SHA-384 / SHA-3 SHA-384 / SHA-512 Safe Keep SHA-384, SHA-512, or SHA3-256+

2. Practical Engineering Gotchas: Larger Keys and TCP Packet Splitting

On modern server CPUs, ML-KEM-768 key encapsulation actually runs in microseconds—often faster than RSA-2048! The real operational challenge during enterprise PQC rollouts is byte size, not CPU cycles.

Whereas an X25519 TLS `ClientHello` fits comfortably inside a single 1,500-byte Ethernet MTU packet, hybrid `X25519MLKEM768` plus post-quantum X.509 certificate chains span multiple TCP segments. Poorly written legacy middleboxes, deep-packet-inspection firewalls, or embedded IoT stacks that hard-code single-packet `ClientHello` buffers can drop connections—making staged staging tests essential.

3. Four-Step Cryptographic Agility & Migration Playbook

Execute post-quantum readiness methodically without panic or vendor snake oil:

  • 1. Build a Cryptographic Bill of Materials (CBOM): Inventory where RSA, ECDSA, and ECDH live across load balancers, service meshes, VPNs, JWT tokens, SSH hosts, and KMS vaults.
  • 2. Turn On Hybrid TLS 1.3 First: Enable `X25519MLKEM768` on external CDNs, ingress proxies (Nginx/Envoy/OpenSSL 3.5+), and cross-datacenter VPN tunnels to neutralize Harvest-Now-Decrypt-Later immediately.
  • 3. Eliminate Hardcoded Key Buffers: Ensure internal protocols, database columns, and PKI tools support multi-kilobyte public keys and signatures.
  • 4. Plan Root PKI & Firmware Dual-Signing: Prepare hardware security modules (HSMs) and firmware updaters for ML-DSA / SLH-DSA long-lived trust anchors.

FAQs

Why use Hybrid X25519 + ML-KEM instead of pure ML-KEM right away?

Lattice cryptography is deeply studied, yet younger than 25-year-old elliptic curves. Hybrid key derivation XORs/HKDFs both shared secrets together: even if a surprising mathematical flaw were ever found in ML-KEM, your connection remains at least as secure as classical X25519—and vice versa against quantum adversaries.

Do I need to replace bcrypt, scrypt, or Argon2id password hashes for post-quantum safety?

No. Password hashing uses cryptographic hash/memory-hard functions (immune to Shor’s algorithm), and server-stored password hashes are never exposed on the wire unless your database itself is breached.

What is Mosca’s Theorem (`X + Y > Z`) in post-quantum planning?

If your data must stay confidential for `X` years, and migrating your infrastructure takes `Y` years, and a cryptographically relevant quantum computer arrives in `Z` years, whenever `X + Y > Z` you are already late to protect newly transmitted secrets.

References & Sources

  • NIST FIPS 203 — Module-Lattice-Based Key-Encapsulation Mechanism Standard (ML-KEM).
  • NIST FIPS 204 — Module-Lattice-Based Digital Signature Standard (ML-DSA).
  • NIST FIPS 205 — Stateless Hash-Based Digital Signature Standard (SLH-DSA).
  • IETF TLS Working Group — Hybrid Key Exchange in TLS 1.3 (X25519MLKEM768).