Post-Quantum Cryptography Explained
Post-Quantum Cryptography Explained
Every secure website, encrypted message, and digital signature relies on public-key cryptography. But quantum computing will break these algorithms. This article explains why, what NIST has standardized as replacements, and what developers should do now.
Why Quantum Computing Breaks Current Crypto
Current public-key cryptography relies on mathematical problems that are computationally hard for classical computers. Shor's algorithm (1994) proved that quantum computers can solve these problems efficiently:
| Algorithm | Math Problem | Quantum Threat |
|---|---|---|
| RSA | Integer factoring | Shor's algorithm breaks it |
| ECC | Elliptic curve discrete log | Shor's algorithm breaks it |
| Diffie-Hellman | Discrete logarithm | Shor's algorithm breaks it |
| AES-256 | Block cipher | Grover weakens (use 256-bit) |
| SHA-256 | Hash function | Grover weakens (still safe) |
The Harvest Now, Decrypt Later Threat
The most urgent reason to migrate is not that quantum computers exist today -- they do not. The threat is "harvest now, decrypt later":
- Today: Adversaries collect encrypted traffic and store it
- Future: When quantum computers arrive, they decrypt the stored data
- Impact: Secrets, credentials, and sensitive data become exposed
Data that must remain secret for 10+ years (medical records, government secrets, financial data) is already at risk. The encryption protecting it today will be broken tomorrow.
NIST Post-Quantum Cryptography Standards
On August 13, 2024, NIST finalized three post-quantum cryptography standards:
| Standard | Algorithm | Type | Math Basis |
|---|---|---|---|
| FIPS 203 | ML-KEM (Kyber) | Key Encapsulation | Module LWE |
| FIPS 204 | ML-DSA (Dilithium) | Digital Signatures | Module LWE + SIS |
| FIPS 205 | SLH-DSA (SPHINCS+) | Digital Signatures | Hash-based |
Additional algorithms in development:
- FN-DSA (Falcon): Compact signatures, expected standardization 2027
- HQC: Code-based KEM, backup for ML-KEM
ML-KEM: Key Encapsulation (FIPS 203)
ML-KEM (Module Learning With Errors Key Encapsulation Mechanism) replaces RSA and ECDH for key exchange:
# ML-KEM-768 key encapsulation
import oqs
# Generate keypair
kem = oqs.KeyEncapsulation('ML-KEM-768')
pk = kem.generate_keypair() # 1,184 bytes (public key)
sk = kem.export_secret_key() # 2,400 bytes (secret key)
# Encapsulate (Bob)
ct, ss = kem.encap_secret(pk) # ct = ciphertext, ss = shared secret
# Decapsulate (Alice)
ss2 = kem.decap_secret(ct, sk) # ss2 == ss (same shared secret)
ML-DSA: Digital Signatures (FIPS 204)
ML-DSA (Module Digital Signature Algorithm) replaces RSA and ECDSA for signatures:
# ML-DSA-65 digital signatures
sig = oqs.Signature('ML-DSA-65')
pk = sig.generate_keypair() # 1,952 bytes
message = b'Important document'
signature = sig.sign(message) # ~3,293 bytes
# Verify
valid = sig.verify(message, signature, pk) # True
Key Size Tradeoff
The main practical difference: PQC keys are significantly larger.
| Algorithm | Public Key | Private Key | Ciphertext/Signature |
|---|---|---|---|
| RSA-2048 | 256 bytes | 256 bytes | 256 bytes |
| ECC-256 | 32 bytes | 32 bytes | 64 bytes |
| ML-KEM-768 | 1,184 bytes | 2,400 bytes | 1,088 bytes |
| ML-DSA-65 | 1,952 bytes | 4,032 bytes | 3,293 bytes |
| SLH-DSA-256f | 32 bytes | 64 bytes | 17,088 bytes |
ML-KEM public keys are ~5x larger than RSA. ML-DSA signatures are ~13x larger. This is acceptable for most applications but requires testing in bandwidth-constrained environments.
Migration Timeline
| Date | Milestone |
|---|---|
| August 2024 | NIST finalizes ML-KEM, ML-DSA, SLH-DSA |
| 2025-2026 | Organizations begin migration planning |
| 2030 | NIST plans to deprecate RSA and ECC |
| 2035 | NIST plans to disallow RSA and ECC |
What Developers Should Do Now
- Inventory cryptographic usage -- Find all RSA, ECC, and DH in your systems
- Classify data by sensitivity -- What must stay secret for 10+ years?
- Test PQC in non-production -- Use liboqs, AWS KMS, or Cloudflare PQC
- Start with new systems -- Use PQC-first for new deployments
- Plan migration timeline -- Prioritize long-lived secrets
- Monitor NIST updates -- FN-DSA and HQC may become additional standards
Try It Yourself
- AES Key Generator -- Generate quantum-safe symmetric keys
- Secure Random Token Generator -- Generate cryptographically secure tokens
- Hashing vs Encryption vs Encoding -- Understand cryptographic primitives
Related BestWordz Articles
- Quantum Computing for Software Developers -- Why quantum threatens crypto
- Qubits vs Classical Bits -- Quantum fundamentals
- How HTTPS and TLS Actually Work -- TLS handshake (PQC will replace this)
- Hashing vs Encryption vs Encoding -- Crypto concepts
- Secrets Management for Developers -- Protecting secrets
- API Authentication Methods -- Auth mechanisms
Summary
Post-quantum cryptography is not theoretical -- the standards are finalized and ready for implementation:
- Shor's algorithm breaks RSA, ECC, and Diffie-Hellman
- ML-KEM (FIPS 203) replaces RSA/ECDH for key exchange
- ML-DSA (FIPS 204) replaces RSA/ECDSA for signatures
- SLH-DSA (FIPS 205) provides conservative hash-based signatures
- Symmetric crypto (AES, SHA) is quantum-safe with standard key sizes
- Start migration now -- harvest now, decrypt later attacks are real
Further Reading
- NIST Post-Quantum Cryptography
- NIST PQC Standards Announcement
- Open Quantum Safe (liboqs)
- Cloudflare: NIST PQC Standards
NIST standards verified: FIPS 203, 204, 205 (August 13, 2024). Migration timeline from NIST IR 8547.
💬 Discuss this topic
Have questions or insights about Post-Quantum Cryptography Explained? Join the BestWordz Community.
📚 Related Articles
The 8-Stage Cybersecurity Roadmap
Cybersecurity in 2026 requires a layered learning path: networking fundamentals, Linux proficiency,…
CybersecurityHow HTTPS and TLS Actually Work
Key Takeaway --> HTTPS is HTTP running over TLS. The TLS handshake performs three critical functio…
CybersecurityThe 10-Stage CS Learning Roadmap
A computer science education in 2026 requires more than traditional coursework. Today's students ne…
CybersecuritySecrets Management for Developers: From .env Files to Secret Managers
KEY TAKEAWAY Secrets management is the practice of storing, accessing, rotating and revoking cred…
CybersecurityIs AI-Generated Code Secure? A Developer Security Checklist
Key Takeaway AI-generated code is not automatically secure. LLMs produce syntactically …
CybersecurityThe "It Works on My Machine" Problem — But for Cryptography
Post-quantum security isn't just a cryptography problem — it's a software engineering problem. Deve…
🔧 Related Tools
AES Key Generator
Generate cryptographically secure AES-128, AES-192, or AES-256 keys.
Try it now →ECDH Key Agreement
Derive a shared secret using Elliptic Curve Diffie-Hellman.
Try it now →Secure Random Token Generator
Generate cryptographically secure random tokens for API keys, session IDs, and more.
Try it now →Diffie-Hellman Demo
Educational demonstration of classic Diffie-Hellman key exchange.
Try it now →💬 Discuss on BestWordz Community
Join the conversation about LLMs, Encryption, Cryptography on the BestWordz Community forum.
Visit Forum →