Shor's Quantum ECDLP Algorithm
- Shor's Quantum ECDLP Algorithm is a quantum method that recasts the elliptic curve discrete logarithm problem as a hidden subgroup problem, enabling polynomial-time solutions.
- It utilizes optimized circuit designs—especially in modular inversion and affine point addition—to reduce qubit counts and gate complexities in practical quantum attacks.
- Resource estimates reveal that quantum attacks on ECC could outperform RSA breaches, emphasizing the urgency of migrating cryptographic systems in the advent of scalable quantum computers.
Shor's Quantum ECDLP Algorithm is the category of quantum algorithms solving the elliptic curve discrete logarithm problem (ECDLP) in polynomial time, rendering classical elliptic curve cryptosystems (ECC) theoretically insecure in the presence of large-scale quantum computers. The core quantum algorithm, originally introduced by Peter Shor, adapts hidden subgroup problem techniques from finite fields to the more complex structure of elliptic curve groups over finite fields. Recent research emphasizes space- and gate-efficient circuit designs—especially modular inversion—and precise resource estimation for practical quantum attacks.
1. Mathematical Structure and Quantum Period-Finding
At its foundation, the ECDLP asks: given an elliptic curve of large prime order , a generator , and a target point , recover . Shor’s quantum approach reframes this as a hidden subgroup problem (HSP) in the abelian group via the function
which is constant on cosets of the hidden subgroup . The quantum circuit proceeds as follows:
- Prepare two -qubit exponent registers in the superposition and an accumulator register initialized to the group identity.
- Cohesively compute 0 via a sequence of controlled point additions and doublings in 1.
- Apply (semi-)classical or full quantum Fourier transforms (QFTs) to the exponent registers.
- Measure the outputs and post-process (e.g., via continued fractions) to recover 2 (Luo et al., 2 Apr 2026, Roetteler et al., 2017, Huang et al., 18 Feb 2025).
2. Quantum Circuit Architecture: Arithmetic and Group Action
The computational bottleneck is implementing the group-action oracle 3 efficiently and reversibly. Each double-scalar multiplication is realized by decomposing 4 into windows of size 5 and iteratively applying controlled point addition and doubling circuits. In affine Weierstrass form, point addition involves evaluating the slope 6 and updating coordinates via field operations:
7
With each controlled addition requiring four inversions, four multiplications, one squaring, and several additions/negations, the underlying field arithmetic drives resource demands (Luo et al., 2 Apr 2026, Roetteler et al., 2017, Häner et al., 2020).
A significant advance in (Luo et al., 2 Apr 2026) is the introduction of a space-efficient, reversible modular inversion circuit via a refined extended Euclidean algorithm, utilizing register-sharing and dynamic bit-length tracking. The construction reduces the modular inversion circuit width from 78 to 9 logical qubits.
3. Resource Estimates and Scaling Laws
Resource estimates for Shor's ECDLP algorithm depend on both the elliptic curve arithmetic variant and the underlying field size 0.
For affine Weierstrass coordinates (prime field):
- Modular inversion: 1 qubits, 2 Toffoli gates per inversion (Luo et al., 2 Apr 2026).
- Point addition: 3 qubits per controlled addition, dominated by the modular inversion.
- Double-scalar multiplication: 4 Toffoli gates per complete oracle query.
- For 5, the total logical-qubit count is reduced to 1333 compared to 2124 in Häner et al., while maintaining 6 Toffoli count (Luo et al., 2 Apr 2026, Häner et al., 2020, Roetteler et al., 2017).
The importance of modular inversion (vs. multiplication or addition) is highlighted by comparative qubit and gate counts. Prior low-width approaches required 77 qubits for inversion; the refined approach in (Luo et al., 2 Apr 2026) lowers this to 8, which, when substituted into the overall group operation, produces a 9 total.
Windowed arithmetic further optimizes circuit depth and gate count. By decomposing scalars into windows and employing table look-ups for precomputed multiples, the number of point addition steps is reduced from 0 to 1, yielding leading Toffoli and CNOT count expressions of 2 (Häner et al., 2020, Liu et al., 2023).
4. Coordinate Systems: Affine vs. Projective Representations
While projective coordinates eliminate explicit inversions by representing points as 3 and using only multiplications/additions for point operations, they introduce substantial uncomputation and reversibility overhead. Each addition involves 32–62 multiplications instead of two inversions and two multiplications in the affine case, and the need to canonicalize superpositions or uncompute intermediates inhibits resource savings. As shown in (Huang et al., 18 Feb 2025), affine coordinates remain superior in resource efficiency due to lower depth, T-count, and qubit requirements per operation:
- Affine: 4 qubits, 5 depth, 6 T-gates
- Projective: 7 qubits, 8–9 depth, 0–1 T-gates
5. Success Probability and Algorithmic Optimizations
Baseline implementations of Shor’s ECDLP algorithm achieve a single-run success probability of 2–3 when using the semiclassical Fourier transform. By introducing small amounts of register padding (increasing control qubit length by 4), and conducting limited 1D or 2D classical searches in the post-processing stage, the probability can be boosted to 5 in one run, with only linear quantum overhead (Ekerå, 2019). The cost to further increase the success probability to near-unity decreases rapidly as 6 and search window sizes grow. The computational burden remains polynomial in 7 with these enhancements, and the number of required algorithm runs to reach high confidence is bounded independently of 8.
6. Impact of Modular Inversion and Recent Advances
Modular inversion is the dominant operation in quantum resource requirements for ECDLP circuits. In (Luo et al., 2 Apr 2026), the presented modular inversion quantum circuit achieves both correctness and space efficiency by sharing registers, tracking the bit-length of intermediates, and location-controlled swaps based on the status of the extended Euclidean update. The inversion cost is quantified as 9 Toffoli gates, a marked improvement over previous 448 0-level designs.
Integrating this inversion block into the overall affine addition circuit reduces circuit width to 1 logical qubits and maintains 2 Toffoli scaling, facilitating an end-to-end attack on ECDLP with minimized logical-qubit overhead.
7. Practical Feasibility, Cost Metrics, and Cryptanalytic Outlook
Recent resource estimates across multiple hardware paradigms (surface code, repetition cat, and LDPC cat codes), for the 256-bit secp256k1 curve, forecast logical resource requirements in the 3–4 qubit regime with 5–6 Toffoli gates. Total physical qubits (with fault tolerance) typically range between 7 to 8 and runtimes from hours (aggressive error rates, photonic codes) to weeks (conservative surface codes) (Dallaire-Demers et al., 19 Aug 2025).
In terms of classical-to-quantum cryptanalytic comparison, ECC offers an easier quantum target than RSA due to smaller parameter sizes and lower total gate counts. For example, attacking P-256 requires 9 fewer qubits and 0 fewer Toffolis than RSA-3072 (Roetteler et al., 2017). A plausible implication is that quantum attacks on ECC will become practical before equivalent threats to RSA reach feasibility.
Current trends project that end-to-end breaks of 256-bit ECC by large-scale, fault-tolerant quantum computers could be realized in the late 2020s or early 2030s, motivating proactive cryptographic migration strategies (Dallaire-Demers et al., 19 Aug 2025).
References:
- "Space-Efficient Quantum Algorithm for Elliptic Curve Discrete Logarithms with Resource Estimation" (Luo et al., 2 Apr 2026)
- "Quantum resource estimates for computing elliptic curve discrete logarithms" (Roetteler et al., 2017)
- "Revisiting Shor's quantum algorithm for computing general discrete logarithms" (Ekerå, 2019)
- "Minimizing CNOT-count in quantum circuit of the extended Shor's algorithm for ECDLP" (Liu et al., 2023)
- "Choosing Coordinate Forms for Solving ECDLP Using Shor's Algorithm" (Huang et al., 18 Feb 2025)
- "Quantum resource estimates for computing binary elliptic curve discrete logarithms" (Garn et al., 4 Mar 2025)
- "Brace for impact: ECDLP challenges for quantum cryptanalysis" (Dallaire-Demers et al., 19 Aug 2025)
- "Improved quantum circuits for elliptic curve discrete logarithms" (Häner et al., 2020)