Post-Quantum Cryptography: The Quantum Threat and Cryptographic Foundations
A comprehensive deep-dive into the mathematical foundations of post-quantum cryptography. Understand Shor's algorithm, Grover's algorithm, and why current cryptographic systems are vulnerable to quantum attacks.

- The Quantum Computing Threat Model
- Classical vs. Quantum Computation
- The Complexity Landscape
- Shor's Algorithm: Breaking RSA and ECC
- The Mathematics of Shor's Algorithm
- Experimental Realizations
- Implications for Elliptic Curve Cryptography
- Grover's Algorithm: Threatening Symmetric Cryptography
- The Unstructured Search Problem
- Mathematical Framework
- Impact on Symmetric Cryptography
- Practical Limitations of Grover's Algorithm
- Why Current Cryptography Fails
- RSA: Integer Factorization
- Diffie-Hellman: Discrete Logarithm
- ECDSA/ECDH: Elliptic Curve Discrete Log
- The Common Thread: Hidden Subgroups
- Post-Quantum Hardness Assumptions
- Lattice Problems
- Hash Function Preimages
- Error-Correcting Code Problems
- Multivariate Polynomial Equations
- The NIST Post-Quantum Cryptography Standardization
- Historical Timeline
- Standardized Algorithms (FIPS 203, 204, 205)
- Security Levels
- NIST IR 8413 and IR 8545: Status Reports
- The Q-Day Threat Model
- Harvest Now, Decrypt Later (HNDL)
- Migration Timeline Estimates
- NIST SP 800-208 and Migration Guidance
- Mathematical Prerequisites for Parts 2 and 3
- Abstract Algebra Essentials
- Linear Algebra over Finite Fields
- Probability and Distinguishing Advantage
- Conclusion and Series Overview
- Coming in Part 2: Lattice-Based Cryptography
- Coming in Part 3: Alternative Mathematical Frameworks
- References and Further Reading
- Primary Sources
- Surveys and Educational Resources
- Experimental Quantum Computing
- Appendix: Security Parameter Reference
- ML-KEM (FIPS 203) Parameters
- ML-DSA (FIPS 204) Parameters
- SLH-DSA (FIPS 205) Parameters
Series: Post-Quantum Cryptography
- Part 1Post-Quantum Cryptography: The Quantum Threat and Cryptographic Foundations
- Part 2Post-Quantum Cryptography: Lattice-Based Cryptography and Mathematical Foundations
- Part 3Post-Quantum Cryptography: Alternative Mathematical Frameworks and Cryptanalytic Lessons
The emergence of cryptographically relevant quantum computers (CRQCs) poses an existential threat to RSA, ECDSA, and Diffie-Hellman, the cryptographic foundations of internet security. Organizations must begin migration to post-quantum algorithms now, as encrypted data harvested today can be decrypted once quantum computers mature ("harvest now, decrypt later").
The year is 2026, and we stand at a pivotal moment in cryptographic history. The algorithms that have secured our digital infrastructure for decades, RSA, elliptic curve cryptography (ECC), and Diffie-Hellman key exchange, face an unprecedented threat from quantum computing. This isn't speculative science fiction: NIST has already finalized three post-quantum cryptographic standards (FIPS 203, 204, 205), Google has demonstrated 105-qubit quantum processors, and nation-states are actively stockpiling encrypted communications for future decryption.
This three-part series provides an exhaustive mathematical treatment of post-quantum cryptography (PQC). In Part 1, we establish the threat model by examining Shor's and Grover's algorithms, exploring the complexity-theoretic foundations of cryptographic security, and understanding why certain mathematical problems remain hard even for quantum computers.
The Quantum Computing Threat Model
Classical vs. Quantum Computation
Before diving into cryptographic implications, we must understand what makes quantum computers fundamentally different from classical machines.
Classical computers operate on bits: binary values that are definitively 0 or 1. Quantum computers operate on qubits, which exist in a superposition of states until measured:
where and are complex probability amplitudes satisfying . This superposition, combined with entanglement (correlations between qubits that have no classical analog) and interference (constructive and destructive combination of quantum amplitudes), enables quantum algorithms to solve certain problems exponentially faster than any known classical algorithm.
For qubits, the quantum state exists in a -dimensional Hilbert space:
This exponential state space is what gives quantum computers their power, but only for problems with the right mathematical structure to exploit it.
The Complexity Landscape
Cryptographic security rests on computational hardness assumptions: the belief that certain mathematical problems cannot be solved efficiently. We categorize problems by complexity classes:
| Class | Definition | Classical Example | Quantum Status |
|---|---|---|---|
| P | Solvable in polynomial time | Sorting, matrix multiplication | Unchanged |
| NP | Verifiable in polynomial time | SAT, graph coloring | Largely unchanged |
| BPP | Probabilistic poly-time with bounded error | Primality testing | Contained in BQP |
| BQP | Quantum poly-time with bounded error | Integer factorization | The quantum class |
The critical insight: BQP ⊄ P (we believe). Quantum computers can efficiently solve problems in BQP that classical computers (limited to P or BPP) cannot. The question for cryptography is: which hard problems remain hard for quantum computers?
Quantum computers don't make everything faster. They provide exponential speedups only for problems with specific mathematical structure, particularly those involving periodicity detection (exploited by Shor's algorithm) and unstructured search (exploited by Grover's algorithm).
Shor's Algorithm: Breaking RSA and ECC
Peter Shor's 1994 algorithm represents the most significant theoretical threat to modern cryptography. It provides polynomial-time quantum algorithms for:
- Integer Factorization: Given , find primes and
- Discrete Logarithm: Given , find
- Elliptic Curve Discrete Logarithm: Given , find
These are precisely the hard problems underlying RSA, Diffie-Hellman, and ECDSA.
The Mathematics of Shor's Algorithm
Shor's algorithm exploits a deep connection between factorization and period finding. The key insight: if we can find the period of the function for random coprime to , we can factor efficiently.
Step 1: Reduction to Period Finding
For a random with , the sequence is periodic. Let be the smallest positive integer such that . This is called the order of modulo .
Theorem: If is even and , then:
is a non-trivial factor of .
Proof Sketch:
- We have
- Thus
- So
- If , neither factor is divisible by
- Therefore gives a proper divisor
This works with probability for random , so we repeat with different choices until we succeed.
Step 2: Quantum Period Finding
Classical period finding requires time at best. Shor's quantum algorithm finds in polynomial time using the Quantum Fourier Transform (QFT).
The algorithm proceeds as follows:
-
Initialize superposition: Create equal superposition over all possible exponents
-
Compute modular exponentiation: Apply the unitary that computes
-
Measure the second register: Collapses to some value , leaving the first register in superposition over all with where is the number of valid values.
-
Apply Quantum Fourier Transform: The QFT converts periodicity in the computational basis to peaks in the frequency basis
-
Measure to find period: The resulting state has peaks at values for integer . Using continued fractions, we recover .
Complexity Analysis
| Operation | Quantum Complexity | Classical Equivalent |
|---|---|---|
| Modular exponentiation | gates | |
| Quantum Fourier Transform | gates | FFT |
| Continued fractions | classical | |
| Total | quantum gates | GNFS |
For a 2048-bit RSA modulus, Shor's algorithm requires roughly logical qubits and quantum gates, compared to the classical General Number Field Sieve requiring operations.
Experimental Realizations
Shor's algorithm has been demonstrated experimentally, though only for trivially small numbers:
- 2001 (Vandersypen et al.): Factored 15 = 3 × 5 using 7-qubit NMR quantum computer
- 2012 (Lucero et al.): Factored 15 using superconducting qubits
- 2019 (various): Factored 21 = 3 × 7 using different quantum platforms
- 2023 (IBM): Demonstrated components of Shor's algorithm on 127-qubit processor
Current quantum computers have ~1000 noisy physical qubits. Breaking RSA-2048 requires roughly 20 million physical qubits with error correction. The gap is enormous, but progress is exponential, qubit counts are doubling every 1-2 years.
Implications for Elliptic Curve Cryptography
Shor's algorithm also breaks elliptic curve cryptography by solving the Elliptic Curve Discrete Logarithm Problem (ECDLP).
Given an elliptic curve over a finite field , a base point , and a public key (scalar multiplication), find the private key .
The quantum algorithm works analogously:
- Use quantum superposition to evaluate the group operation for all
- Find the period of this two-dimensional function
- The period reveals the discrete logarithm
For a 256-bit elliptic curve (equivalent to 128-bit classical security), Shor's algorithm requires approximately:
This is actually easier than factoring RSA-2048, because elliptic curve key sizes are smaller for equivalent classical security.
Grover's Algorithm: Threatening Symmetric Cryptography
While Shor's algorithm provides exponential speedups, Grover's 1996 algorithm offers a more modest, but still significant, quadratic speedup for unstructured search problems.
The Unstructured Search Problem
Given a function that outputs 1 for exactly one input (the "marked" element), find that input.
- Classical complexity: function evaluations (check each possibility)
- Grover's algorithm: quantum evaluations
For cryptography, this means:
- AES-128: Classically 2^128 security → Quantumly 2^64 security
- AES-256: Classically 2^256 security → Quantumly 2^128 security
Mathematical Framework
Grover's algorithm uses amplitude amplification to increase the probability of measuring the marked state.
Initial Setup
Start with uniform superposition:
where is the target state and is the uniform superposition over non-target states.
The Grover Iterate
The algorithm applies two reflection operators repeatedly:
-
Oracle reflection : Flip the phase of the target state
-
Diffusion operator : Reflect about the average amplitude
The Grover iterate rotates the state vector toward in the two-dimensional subspace spanned by .
Geometric Interpretation
Let be defined by . Each Grover iterate rotates by :
Maximum probability occurs at iterations, where:
Impact on Symmetric Cryptography
The Grover speedup has direct implications for symmetric key sizes:
| Algorithm | Bits | Classical Security | Quantum Security | Mitigation |
|---|---|---|---|---|
| AES-128 | 128 | 2^128 | 2^64 | Use AES-256 |
| AES-192 | 192 | 2^192 | 2^96 | Adequate |
| AES-256 | 256 | 2^256 | 2^128 | Recommended |
| SHA-256 (preimage) | 256 | 2^256 | 2^128 | Use SHA-512 |
| SHA-256 (collision) | 128 | 2^128 | 2^85 | Use SHA-512 |
Unlike public-key cryptography, symmetric algorithms require only doubling key sizes to maintain security against quantum attacks. AES-256 and SHA-512 provide adequate post-quantum security for most applications.
Practical Limitations of Grover's Algorithm
Several factors make the Grover threat less immediate than Shor's:
-
Depth requirements: Grover needs sequential oracle queries, making parallelization infeasible
-
Error accumulation: Each iteration introduces errors; for iterations (breaking AES-128), fault tolerance requirements are extreme
-
No super-Grover speedups: Provably, no quantum algorithm can search faster than
Why Current Cryptography Fails
Let's synthesize why the specific hard problems underlying modern cryptography are vulnerable to quantum attacks.
RSA: Integer Factorization
Hard Problem: Given for large primes , find and .
Classical Hardness: The best classical algorithm (General Number Field Sieve) runs in sub-exponential time:
For RSA-2048, this is approximately operations.
Quantum Vulnerability: Shor's algorithm finds factors in time, a polynomial, by exploiting the hidden periodic structure in modular exponentiation.
Diffie-Hellman: Discrete Logarithm
Hard Problem: Given (generator), (prime), and , find .
Classical Hardness: Also sub-exponential via Number Field Sieve variants.
Quantum Vulnerability: Shor's period-finding algorithm directly solves discrete log in polynomial time.
ECDSA/ECDH: Elliptic Curve Discrete Log
Hard Problem: Given curve , point , and , find .
Classical Hardness: Best attacks (Pollard-rho) run in where is the group order, fully exponential.
Quantum Vulnerability: Shor's algorithm adapts to elliptic curves, providing polynomial-time solution.
The Common Thread: Hidden Subgroups
All these problems are instances of the Hidden Subgroup Problem (HSP):
Given a function that is constant on cosets of a hidden subgroup of a group , and distinct on different cosets, find .
For abelian groups (like or elliptic curve groups), the quantum Fourier transform efficiently solves HSP. This is the deep mathematical reason why Shor's algorithm works.
Post-Quantum Hardness Assumptions
The foundation of post-quantum cryptography rests on problems that appear hard for both classical and quantum computers. We briefly introduce the main families (detailed in Parts 2 and 3).
Lattice Problems
A lattice is a discrete additive subgroup of , defined by a basis :
Key Hard Problems:
- Shortest Vector Problem (SVP): Find the shortest non-zero vector in the lattice
- Closest Vector Problem (CVP): Given a target point, find the closest lattice point
- Learning With Errors (LWE): Distinguish from random, where is small error
The best known quantum algorithms for these problems (using quantum walks and amplitude estimation) provide at most polynomial speedups, nowhere near the exponential speedups of Shor against factoring.
Hash Function Preimages
Given for a cryptographic hash, finding is an unstructured search problem. Grover provides only quadratic speedup:
This is why hash-based signatures (SPHINCS+/SLH-DSA) are quantum-resistant.
Error-Correcting Code Problems
Syndrome Decoding: Given a parity-check matrix and syndrome , find the low-weight error vector .
No efficient quantum algorithm is known. The McEliece cryptosystem (1978) has resisted 45+ years of cryptanalysis.
Multivariate Polynomial Equations
MQ Problem: Given a system of quadratic polynomials over a finite field, find a common root.
This is NP-complete classically, and no known quantum algorithm provides super-polynomial speedup.
The NIST Post-Quantum Cryptography Standardization
Historical Timeline
The National Institute of Standards and Technology (NIST) has led the most comprehensive cryptographic standardization effort since AES.
Standardized Algorithms (FIPS 203, 204, 205)
| Standard | Algorithm | Original Name | Type | Hard Problem |
|---|---|---|---|---|
| FIPS 203 | ML-KEM | CRYSTALS-Kyber | Key Encapsulation | Module-LWE |
| FIPS 204 | ML-DSA | CRYSTALS-Dilithium | Digital Signature | Module-LWE |
| FIPS 205 | SLH-DSA | SPHINCS+ | Digital Signature | Hash functions |
NIST recommends ML-KEM for key encapsulation and ML-DSA as the primary digital signature algorithm. SLH-DSA is recommended when long-term security is paramount, as it relies only on hash function security (no algebraic assumptions).
Security Levels
NIST defines five security levels corresponding to the effort required to break the scheme:
| Level | Target Security | Classical Equivalent | Example Scheme |
|---|---|---|---|
| 1 | ≥ 2^128 | AES-128 block search | ML-KEM-512 |
| 2 | ≥ 2^192 | SHA-384 collision search | N/A |
| 3 | ≥ 2^192 | AES-192 block search | ML-KEM-768 |
| 4 | ≥ 2^256 | SHA-512 collision search | N/A |
| 5 | ≥ 2^256 | AES-256 block search | ML-KEM-1024 |
These levels account for both classical and quantum attacks, with Grover's algorithm setting the quantum security floor.
NIST IR 8413 and IR 8545: Status Reports
NIST's technical reports provide detailed security analysis:
NIST IR 8413 (Third Round):
- Analyzed cryptographic strength of all candidates
- Discussed implementation considerations
- Evaluated resistance to side-channel attacks
NIST IR 8545 (Fourth Round):
- Continued evaluation of BIKE, Classic McEliece, HQC
- Focus on code-based alternatives to lattice-based KEM
- Addresses desire for algorithm diversity
The Q-Day Threat Model
"Q-Day" refers to the point when cryptographically relevant quantum computers (CRQCs) can break RSA-2048 or equivalent. The threat exists in multiple dimensions:
Harvest Now, Decrypt Later (HNDL)
Adversaries with long-term strategic interests are collecting encrypted communications today for future decryption:
- Intercept: Capture TLS traffic, VPN sessions, encrypted emails
- Store: Archive petabytes of encrypted data
- Wait: Until quantum computers can break the session keys
- Decrypt: Access all historical communications
For data with long secrecy requirements (state secrets, medical records, competitive intelligence), this threat is already active.
Migration Timeline Estimates
The cryptographic community debates when CRQCs will emerge:
| Prediction | Source | Q-Day Estimate |
|---|---|---|
| Conservative | Most academics | 2040-2050 |
| Moderate | NIST, NSA | 2030-2035 |
| Aggressive | Some industry | Before 2030 |
Large organizations need 5-15 years to complete cryptographic migrations. If Q-Day arrives in 2035, migrations should have started in 2020-2025. The window is closing.
NIST SP 800-208 and Migration Guidance
NIST Special Publication 800-208 provides guidance on hash-based signatures for firmware and software integrity. Key recommendations:
- Prioritize high-value, long-lived data for earliest migration
- Implement cryptographic agility in new systems
- Use hybrid schemes (classical + PQC) during transition
- Plan for algorithm replacement as standards mature
Mathematical Prerequisites for Parts 2 and 3
Before diving into specific PQC families, readers should be comfortable with these mathematical foundations.
Abstract Algebra Essentials
Groups: A set with operation satisfying:
- Closure:
- Associativity:
- Identity: such that
- Inverse: , such that
Rings: A set with two operations (addition, multiplication) where addition forms an abelian group and multiplication is associative and distributes over addition.
Fields: A ring where non-zero elements form a multiplicative group. Examples: , , (integers mod prime ).
Polynomial Rings: consists of polynomials with coefficients from ring . The quotient ring is crucial for lattice-based cryptography.
Linear Algebra over Finite Fields
For lattice-based cryptography, we work with matrices over rings:
where is a discrete error distribution (often Gaussian).
Key operations:
- Matrix-vector multiplication:
- Modular reduction:
Probability and Distinguishing Advantage
Cryptographic security is often defined via distinguishing games:
A problem is hard if all efficient adversaries have negligible advantage (e.g., ).
For LWE: distinguish from where is uniform random.
Conclusion and Series Overview
In this first part, we've established the quantum computing threat to modern cryptography:
- Shor's algorithm breaks RSA, Diffie-Hellman, and ECC in polynomial time by solving the Hidden Subgroup Problem
- Grover's algorithm provides quadratic speedups against symmetric cryptography, requiring doubled key sizes
- NIST has standardized three post-quantum algorithms (ML-KEM, ML-DSA, SLH-DSA) with more under evaluation
- Migration must begin now due to the "harvest now, decrypt later" threat
Coming in Part 2: Lattice-Based Cryptography
We'll dive deep into the mathematical foundations of lattice-based cryptography:
- The geometry of lattices and shortest vector problems
- The Learning With Errors (LWE) problem and its variants
- Worst-case to average-case reductions
- How ML-KEM (Kyber) and ML-DSA (Dilithium) work at the mathematical level
- Implementation considerations and side-channel resistance
Coming in Part 3: Alternative Mathematical Frameworks
We'll explore non-lattice approaches to post-quantum security:
- Hash-based signatures (SPHINCS+/SLH-DSA): Security from Merkle trees
- Code-based cryptography (McEliece): Goppa codes and syndrome decoding
- Isogeny-based cryptography: Supersingular elliptic curves (and the SIKE break)
- Multivariate cryptography: MQ-hard problems
Post-quantum cryptography isn't about quantum computers being "faster", it's about exploiting different mathematical structures. Problems with hidden periodicity (factoring, discrete log) fall to quantum algorithms, while problems without such structure (lattices, codes, hashes) remain hard. Understanding why certain problems resist quantum speedups is essential for trusting PQC algorithms.
References and Further Reading
Primary Sources
- Shor, P. (1994). "Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer"
- Grover, L. (1996). "A Fast Quantum Mechanical Algorithm for Database Search"
- NIST IR 8105 (2016). "Report on Post-Quantum Cryptography"
- NIST IR 8413 (2022). "Status Report on the Third Round of the NIST PQC Standardization Process"
- NIST IR 8545 (2024). "Status Report on the Fourth Round"
- FIPS 203, 204, 205 (2024). ML-KEM, ML-DSA, SLH-DSA Standards
Surveys and Educational Resources
- Bernstein, D.J. & Lange, T. (2017). "Post-Quantum Cryptography": Encyclopedic survey
- Regev, O. (2005). "On Lattices, Learning with Errors, Random Linear Codes, and Cryptography"
- Micciancio, D. & Regev, O. (2008). "Lattice-based Cryptography": Foundational survey
- Bavdekar et al. (2022). "Post Quantum Cryptography: Techniques, Challenges, Standardization, and Directions"
Experimental Quantum Computing
- Vandersypen et al. (2001). "Experimental Realization of Shor's Quantum Factoring Algorithm"
- Willsch et al. (2023). "Large-Scale Simulation of Shor's Quantum Factoring Algorithm" (arXiv:2308.05047)
Appendix: Security Parameter Reference
For practitioners implementing PQC, here are the recommended parameter sets:
ML-KEM (FIPS 203) Parameters
| Parameter Set | Security Level | Public Key (bytes) | Ciphertext (bytes) | Shared Secret (bytes) |
|---|---|---|---|---|
| ML-KEM-512 | 1 | 800 | 768 | 32 |
| ML-KEM-768 | 3 | 1,184 | 1,088 | 32 |
| ML-KEM-1024 | 5 | 1,568 | 1,568 | 32 |
ML-DSA (FIPS 204) Parameters
| Parameter Set | Security Level | Public Key (bytes) | Signature (bytes) |
|---|---|---|---|
| ML-DSA-44 | 2 | 1,312 | 2,420 |
| ML-DSA-65 | 3 | 1,952 | 3,293 |
| ML-DSA-87 | 5 | 2,592 | 4,595 |
SLH-DSA (FIPS 205) Parameters
| Parameter Set | Security Level | Public Key (bytes) | Signature (bytes) |
|---|---|---|---|
| SLH-DSA-128s | 1 | 32 | 7,856 |
| SLH-DSA-128f | 1 | 32 | 17,088 |
| SLH-DSA-256s | 5 | 64 | 29,792 |
| SLH-DSA-256f | 5 | 64 | 49,856 |
The "s" variants optimize for signature size; "f" variants optimize for signing speed.
On this page
- The Quantum Computing Threat Model
- Classical vs. Quantum Computation
- The Complexity Landscape
- Shor's Algorithm: Breaking RSA and ECC
- The Mathematics of Shor's Algorithm
- Experimental Realizations
- Implications for Elliptic Curve Cryptography
- Grover's Algorithm: Threatening Symmetric Cryptography
- The Unstructured Search Problem
- Mathematical Framework
- Impact on Symmetric Cryptography
- Practical Limitations of Grover's Algorithm
- Why Current Cryptography Fails
- RSA: Integer Factorization
- Diffie-Hellman: Discrete Logarithm
- ECDSA/ECDH: Elliptic Curve Discrete Log
- Post-Quantum Hardness Assumptions
- Lattice Problems
- Hash Function Preimages
- Error-Correcting Code Problems
- Multivariate Polynomial Equations
- The NIST Post-Quantum Cryptography Standardization
- Historical Timeline
- Standardized Algorithms (FIPS 203, 204, 205)
- Security Levels
- NIST IR 8413 and IR 8545: Status Reports
- The Q-Day Threat Model
- Harvest Now, Decrypt Later (HNDL)
- Migration Timeline Estimates
- NIST SP 800-208 and Migration Guidance
- Mathematical Prerequisites for Parts 2 and 3
- Abstract Algebra Essentials
- Linear Algebra over Finite Fields
- Probability and Distinguishing Advantage
- Conclusion and Series Overview
- Coming in Part 2: Lattice-Based Cryptography
- Coming in Part 3: Alternative Mathematical Frameworks
- References and Further Reading
- Primary Sources
- Surveys and Educational Resources
- Experimental Quantum Computing
- Appendix: Security Parameter Reference
- ML-KEM (FIPS 203) Parameters
- ML-DSA (FIPS 204) Parameters
- SLH-DSA (FIPS 205) Parameters