How Quantum Algorithms Threaten Classical Cryptosystems
Shor's Algorithm and Public-Key Cryptography
RSA's security rests on the computational intractability of factoring the product of two large primes. The best known classical algorithm — the General Number Field Sieve — runs in sub-exponential time Ln[⅓, 1.923], making RSA-2048 infeasible to break with any foreseeable classical hardware. Shor's algorithm (1994) exploits quantum parallelism and the Quantum Fourier Transform to solve the period-finding problem in O((log N)³) time, reducing integer factorisation from sub-exponential to polynomial complexity.
The same algorithmic framework breaks the discrete logarithm problem (DLP), which underpins Diffie-Hellman key exchange and all elliptic curve cryptography (ECC). Since both factoring and DLP are instances of the Hidden Subgroup Problem over abelian groups, Shor's algorithm dispatches them with equal efficiency. A sufficiently large, fault-tolerant quantum computer would render RSA, DSA, ECDSA, ECDH, and EdDSA simultaneously and completely insecure.
Resource estimates: Early analyses estimated millions of physical qubits to break RSA-2048. A March 2025 paper by Bluvstein et al. demonstrated that advances in high-rate quantum error-correcting codes reduce this to as few as ~13,000 reconfigurable atomic qubits, with a runtime of days to weeks for RSA-2048 and potentially just days for ECC P-256 with ~12,000 qubits.
Grover's Algorithm and Symmetric Cryptography
Grover's algorithm (1996) provides a quadratic speedup for unstructured search: finding a marked item among N candidates in O(√N) queries instead of O(N). Applied to cryptographic key search, it effectively halves the security level of any symmetric cipher or hash function.
Practical impact: AES-128 drops to ~64-bit effective security — well within reach of a quantum adversary. AES-256 retains ~128 bits of effective security, which remains computationally infeasible. SHA-256 retains ~128-bit preimage resistance. The mitigation is straightforward: double key and hash lengths. No symmetric primitive is fundamentally broken.
Theoretical ceiling: Bennett, Bernstein, Brassard, and Vazirani proved that Grover's quadratic speedup is optimal — no quantum algorithm can do better for unstructured search. This means symmetric cryptography faces a bounded, well-characterised quantum threat, unlike the existential threat to asymmetric systems.
Shor's Algorithm — Conceptual Pipeline
From Factoring to Period Finding
Step 1 — Classical reduction: Factoring N is reduced to finding the period r of the function f(x) = ax mod N for a randomly chosen a coprime to N. If r is even and ar/2 ≢ −1 (mod N), then gcd(ar/2 ± 1, N) yields non-trivial factors.
Step 2 — Quantum period finding: Prepare a superposition over all x in {0, …, 22n−1}, compute f(x) into an ancilla register, then apply the Quantum Fourier Transform (QFT) to the input register. Measurement yields a value close to a multiple of 22n/r, from which r is extracted via the continued fractions algorithm.
Step 3 — Classical post-processing: Given r, compute gcd(ar/2 ± 1, N) classically. If the result is trivial, repeat with a different random a. The probability of success per iteration is at least 1 − 1/2k−1 where k is the number of distinct prime factors of N — typically succeeding in one or two attempts.
Key insight: The quantum advantage comes entirely from Step 2. Classically, period finding for f(x) = ax mod N requires evaluating an exponential number of values. The QFT extracts the period from a quantum superposition of all function values simultaneously — this is the exponential speedup.
Cryptographic Vulnerabilities Exposed by Quantum Computation
The Quantum Fourier Transform
Classical vs Quantum Approaches to Cryptanalysis
Quantum Cryptanalytic Techniques
Shor's Algorithm
Factors integers and computes discrete logarithms in polynomial time by reducing both problems to quantum period finding via the QFT. Completely breaks RSA, DSA, DH, and all standard elliptic curve schemes. Published by Peter Shor in 1994; demonstrated on 15 (IBM, 2001) and 21 (photonic, 2012).
Grover's Algorithm
Provides optimal O(√N) quantum search for unstructured problems. Halves effective key length of symmetric ciphers and hash functions. Provably optimal — no quantum algorithm can search faster. Mitigation: double key sizes (AES-256, SHA-512).
Hidden Subgroup Problem
The mathematical generalisation underlying Shor's algorithm. Efficient quantum solutions exist for HSP over abelian groups (covering factoring and DLP). HSP over non-abelian groups — relevant to lattice and graph isomorphism problems — remains open, which is one reason lattice-based PQC is considered quantum-resistant.
Emerging Approaches
The JVG algorithm (2026) claims to offload more computation classically, potentially requiring only ~5,000 qubits to break RSA-2048. Quantum walks, variational quantum eigensolvers, and hybrid classical-quantum methods are active areas of cryptanalytic research — the threat surface continues to expand.
Qubit Estimates for Cryptographically Relevant Attacks
How Close Is the Threat?
The practical timeline for quantum cryptanalysis depends on three factors: qubit count, error rates, and gate speeds. As error correction improves, the physical qubit requirements drop rapidly — five orders of magnitude over two decades of research.
Quantum Cryptanalysis Timeline