secp256k1 point addition
Lower qubits × Toffolis for one point addition on Bitcoin's curve.
STATISTICAL VERIFICATION — 9,024 sampled input/measurement trials; not a proof of coherent equivalence.
Leaderboard: secp256k1, classical Q at run time Hot
QArena's record 7,818,571,440 qubits × Toffoli by QArena's own run Ties it
| # | Participant | Score (qubits × Toffoli) | vs QArena baseline | Submission |
|---|---|---|---|---|
| 1 | qarena-baseline (QArena's run)(QArena) Baseline | 7,818,571,440 | #1 | |
| 2 | yicheng2 | 7,818,571,440 | #3 |
Baseline: QArena's own run: 7,818,571,440 qubits × Toffoli (nothing published fits this instance)
Instance: Curve and offset
Overview
Task
Build a circuit that adds a classical point Q to a quantum point P on the curve secp256k1:
p = 2256 − 232 − 977, y2 = x3 + 7 (mod p),
λ = (yQ − yP) / (xQ − xP),
xR = λ2 − xP − xQ, yR = λ(xP − xR) − yP,
all mod p.
P is held in two quantum registers of 256 qubits (xP and yP, little-endian), Q in two classical registers of 256 bits. At the end the quantum registers must hold R = P + Q, Q must be unchanged, every other qubit must be back at 0 and no sign may be left on the state: |P〉|0〉 → |P + Q〉|0〉. Q is an input at run time. Each verification draws new pairs (P, Q) with both points varying, so a circuit built for one fixed offset fails.
The promised inputs are D = {(P, Q): P and Q finite points of the curve, xP ≠ xQ, xR ≠ xQ}, the
generic case of the chord formula. There is no point at infinity, no doubling and no inverse pair, and P = −2Q is excluded (it gives
xR = xQ). This is the same promise as the offset instances of ecdlp-pointadd, at 256 bits, with Q read from
classical bits instead of being fixed in the circuit. The instance is secp256k1-generic-classical-v1.
Submission file
A JSON object with exactly two keys: {"format": "qecc-opsz-v1", "payload": "<base64 of ops.bin>"}. The file may be at most
64 MiB. The payload is canonical RFC 4648 base64 (standard alphabet, = padding, no line breaks) and decodes to at most 48 MiB.
ops.bin is the 8 bytes QECCOPSZ, the number of records N as an unsigned 64-bit little-endian integer
(1 ≤ N ≤ 227 = 134,217,728), then exactly one xz stream (decoded with Python's standard lzma module and a 128 MiB memory
limit, which every preset 0 to 9 fits; use LZMA2, optionally after a delta filter, as the baseline does with a delta filter of
distance 56, one record, before LZMA2. Other filters (BCJ, ARM64, RISC-V) decode only where the local liblzma supports them,
so a local check and the server may disagree on such a file) holding exactly N records of 56 bytes and nothing after it. A record is u32 kind,
u32 zero, then six u64 fields: q_control2, q_control1, q_target, c_target,
c_condition, r_target, all little-endian; an unused field holds 264 − 1. The record layout and the operation numbers
are those of the ECDSA.fail export (Layr-Labs/ecdsafail-challenge, src/circuit.rs
and src/bin/build_circuit.rs); the compression differs (xz here, Zstandard there), so an ECDSA.fail ops.bin is converted by
decompressing its frame and compressing the same records with xz behind the same 16-byte header, for example
(head -c 16 ops.bin; tail -c +17 ops.bin | zstd -dc | xz -9c) > ops_xz.bin, then base64 -w0 ops_xz.bin for the payload.
The converted file must still follow the rules below. In particular, R here asserts that its qubit is already 0 (the ECDSA.fail evaluator treats R
as a reset), HMR and R may not carry conditions, DEBUG_PRINT is rejected, and the four registers are declared before the first gate; a converter may
renumber registers, qubits and bits and move the metadata to the front.
| kind | name | fields that must be set (others unused) | effect when enabled |
|---|---|---|---|
| 0 | NEG | (optional c_condition) | phase bit φ ⊕= 1 |
| 1 | REGISTER | r_target | declares register r (metadata) |
| 2 | APPEND_TO_REGISTER | r_target and one of q_target, c_target | adds the next bit of register r (metadata) |
| 3, 4, 5 | BIT_INVERT, BIT_STORE0, BIT_STORE1 | c_target (optional c_condition) | c ⊕= 1, c = 0, c = 1 |
| 6, 7 | X, Z | q_target (optional c_condition) | q ⊕= 1; φ ⊕= q |
| 8, 9, 10 | CX, CZ, SWAP | q_control1, q_target (optional c_condition) | t ⊕= c; φ ⊕= c·t; exchange |
| 11 | R | q_target | asserts the qubit is 0 (a nonzero value on any trial rejects) |
| 12 | HMR | q_target, c_target | X measurement and reset: draws r, c = r, φ ⊕= r·q, q = 0 |
| 13, 14 | CCX, CCZ | q_control2, q_control1, q_target (optional c_condition) | t ⊕= c1c2; φ ⊕= c1c2t |
| 15, 16 | PUSH_CONDITION, POP_CONDITION | c_condition; nothing | push the mask and AND it with the bit's current value; pop (both always executed, also inside a block that is off) |
A record is enabled when the condition mask and its own c_condition bit (if set) are both 1. Every other kind, including 17
(DEBUG_PRINT), is rejected. Quantum slots and classical bits are numbered below 8,192, and the qubits of one record must be distinct.
- All REGISTER and APPEND_TO_REGISTER records come first. Registers 0 (
target_x) and 1 (target_y) get exactly 256 distinct quantum slots each, registers 2 (offset_x) and 3 (offset_y) exactly 256 distinct classical bits each; each register is declared once, before its first member, and the two quantum (and the two classical) registers do not overlap. No other register may be declared, so dirty workspace cannot be declared as output. The k-th member of a register is its bit k. - Every quantum slot outside registers 0 and 1 is workspace and starts at 0; every classical bit outside registers 2 and 3 starts at 0 and may end with any value (measurement outcomes, classical logic).
- HMR and R act on workspace only, carry no
c_conditionand stand outside every condition block. An ECDSA.fail circuit with a conditioned HMR is rewritten with an unconditional HMR on a qubit that is 0 in the disabled branch. - The offset bits are read-only: no BIT_* record and no HMR may write them.
- PUSH and POP nest properly, at most 64 deep, and every block is closed. At most 224 HMR records.
Validation
The verifier first checks every rule above in one streaming pass. Then the server draws a fresh 256-bit seed from the operating system (after the file is stored, so a file cannot be tuned to its test set) and derives two SHAKE256 streams from it:
- Points: candidate i (i = 0, 1, 2, ...) is
SHAKE256(b"qarena/secp256k1-pointadd/v1/point" + seed + i as 8 bytes little-endian), 33 bytes; x is the first 32 bytes read little-endian, rejected if x ≥ p; y = h(p+1)/4 with h = x3 + 7, rejected unless y2 = h; the low bit of byte 33 picks y or p − y. The next accepted point is P, the one after it Q; the pair is kept when it lies in D, otherwise both are dropped and two new points are drawn, until 9,024 pairs are kept. - Measurements: the j-th HMR record of the file (j from 0) uses
SHAKE256(b"qarena/secp256k1-pointadd/v1/measure" + seed + j as 8 bytes little-endian), 1,128 bytes read little-endian; bit k is the outcome on trial k.
All 9,024 trials are simulated at once in a second streaming pass, each with its own bits and its own phase bit φ. The file is accepted only if on
every trial P + Q is in registers 0 and 1, Q is unchanged, every workspace qubit is 0, every R met a 0, and φ = 0. A sign that does not depend on
the input still fails (this is stricter than ecdlp-pointadd, which allows one). A failing run reports the trial, P, Q, the expected sum and the seed; the
seed replays the run exactly (QARENA_SECP_SEED=<hex> with the bundled verifier). An exhausted CPU budget returns error, never a score.
Sampling checks only some of the inputs. If a circuit fails on a fraction f of the promised inputs (with their measurement outcomes), it passes one verification with probability (1 − f)9,024:
| Failing fraction f | Passes one verification | Expected submissions until a pass |
|---|---|---|
| 1 × 10−3 | 1.2 × 10−4 | 8,338 |
| 5 × 10−4 | 0.011 | 91 |
| 3.3 × 10−4 | 0.050 | 20 |
| 1 × 10−4 | 0.41 | 2.5 |
| 1 × 10−5 | 0.91 | 1.1 |
A circuit that is wrong on fewer than about 1 input in 10,000 will usually pass; such circuits are legal entries. For example, an inversion loop of the Kaliski type needs between about 322 and 408 rounds on random inputs (QArena's review measured 300,000 of them); stopping it after 400 of its 512 rounds is wrong on about 4 × 10−5 of the inputs and passes with probability 0.70. After a pass, the one-sided 95 % upper bound on the failing fraction is 1 − 0.051/9,024 = 3.32 × 10−4. That is a bound on the rate of failing trials, not a probability that the circuit is correct, not a statement about every input or every measurement branch, and not a guarantee for a complete Shor computation.
Each account may submit 3 files per UTC day to this problem, and at most 5 in any 7 days. Records are re-run with fresh seeds; a failing trial is an exact counterexample that anyone can replay from its published seed, and it removes the record. A circuit with f = 5 × 10−4 survives one re-run with probability 0.011. The page of a public record shows the total number of trials passed: its own run plus every passed re-run, with their seeds.
Scoring
Score = W × NT, lower is better. NT is the number of CCX and CCZ records in the file, each counted once whether it carries a condition or not. W = 1 + the largest quantum slot number used anywhere in the file, so unused numbers below it still count. X, Z, CX, CZ, SWAP, NEG, HMR, R, the classical operations and the condition records are free. Ties go to the earlier submission.
The report also gives the sampled average number of enabled Toffoli records per trial and W times that average, as exact fractions. This column is not ranked: it depends on the seed when Toffoli records carry conditions, and it is the closest figure to the ECDSA.fail score (which rounds the average and multiplies by the qubit count).
Baseline and reference scores
| Circuit | Qubits W | Toffoli | W × Toffoli | Source |
|---|---|---|---|---|
| QArena baseline (exact construction) | 2,052 | 3,810,220 | 7,818,571,440 | this board |
| ECDSA.fail initial repository circuit | 2,715 | 3,942,753 | 10,704,574,395 | README and results.tsv (unchecked by QArena) |
| Google, low-qubit variant | 1,175 | about 2,700,000 | about 3.17 × 109 | ECDSA.fail README (unchecked by QArena) |
| Google, low-gate variant | 1,425 | about 2,100,000 | about 2.99 × 109 | ECDSA.fail README (unchecked by QArena) |
The outside figures come from the ECDSA.fail repository and are context only: their evaluator draws 9,024 inputs from a hash of the circuit file (points kG, with only xP ≠ xQ excluded), treats R as a reset that also flips the phase with a random bit when the qubit is 1 (so a dirty R fails about half of its shots there), allows conditioned HMR and rounds the average Toffoli count. No ECDSA.fail circuit or code is used here.
The baseline is ours (site/tools/secp_circuits.py). It follows the two-division affine layout of Roetteler, Naehrig, Svore and Lauter
(arXiv:1706.06752), as in DistinctEllipticCurvePointAddition of the Microsoft
QuantumEllipticCurves library (MIT): x ← x − xQ, y ← y − yQ; a division turns (x, y) into (x, λ);
x ← x + 3xQ − λ2 = xQ − xR; the same division run backwards turns λ into
λx = yR + yQ; two more modular steps finish. The division is a binary extended Euclid on (u, v) = (x, p) with 2n − 1 = 511 rounds and
coefficients kept modulo p, started from y instead of 1 so it yields y/x directly; its two history bits per round depend on x alone and are erased by
running the integer part backwards. From round 256 on, u and v have fewer than 256 bits, and each round's history bits sit in two of their qubits that
are known to be 0 from then on, so only 512 history qubits are new. Adders and comparators use temporary logical ANDs removed by an X measurement and a CZ conditioned on the outcome
(Gidney, arXiv:1709.06648). Constants such as p enter the carry chains directly, also when one qubit
controls them, so they need no scratch register. λ2 is computed as an integer by schoolbook squaring, reduced with
2256 ≡ 232 + 977 (mod p) and one conditional subtraction of p, subtracted from x and then uncomputed.
The square-and-subtract borrows the y register, which is 0 between the two divisions. The file has 33,061,374 records (3,153,840 HMR), and its
payload is 10.5 MB. The generator takes any odd prime, and the same generator is exact on every
input and every measurement branch for 31 primes from 3 to 16,381: all pairs of curve points for each of them (64.1 million pairs at 8,191 and
273.9 million at 16,381), and also all P in the plane with Q on the curve for the 23 primes up to 257 (15.7 million inputs at p = 251, 16.8 million at p = 257).
Application
Adding a classical point to a quantum point is the inner step of Shor's algorithm for elliptic-curve discrete logarithms, the attack that a large fault-tolerant quantum computer would run against secp256k1 signatures. Published resource estimates count the Toffoli gates and qubits of this step, so their product is a common figure of merit. The board ranks one generic addition. It says nothing about a complete attack, which also needs controlled or windowed additions, the exceptional cases and many repetitions. Three limits of the figure: with a windowed lookup Q takes 512 more qubits and every offset-conditioned CX becomes a Toffoli (the baseline has 2,560 such records, so its score carries over); NT counts every Toffoli in full, including those inside measurement-conditioned blocks that run on about half of the branches; and a sign error on a fraction f of the inputs costs about 4f in fidelity.
Where verification runs
Verifications of this board run on the first lane of this list that is up and has room: CU Boulder's Alpine, then NCAR Derecho, then RunPod. A lane that is down, full or slow passes the file to the next one automatically, with the same verifier version; the limits of one verification are 1,800 s of CPU, 2,820 s of wall time and 2,048 MB of memory on CU Boulder's Alpine, NCAR Derecho and RunPod (2 times the board's own CPU and wall time, because their processors are slower); the result goes to QArena only.
Current records
| Instance | Baseline | Record (qubits × Toffoli) | Reference score | Record holder | Status |
|---|---|---|---|---|---|
| secp256k1, classical Q at run time Hot
9,024 sampled trials per verification (statistical); 256-bit registers; generic additions (x_P ≠ x_Q, x_R ≠ x_Q) |
7,818,571,440 QArena's run | 7,818,571,440 | – No comparable outside score: ECDSA.fail figures use other tests and round the average (see the statement). Google Quantum AI's 2,992,500,000 (arXiv:2603.28846, low-gate variant: at most 1,425 qubits x at most 2,100,000 CCX and CCZ executed per test on average over the file's own 9,024 tests) is not run on QArena and cannot be: for responsible disclosure the circuit is withheld: the paper gives only its SHA-256 hash and a Groth16 zero-knowledge proof, the Zenodo dataset 10.5281/zenodo.19597130 (CC-BY-4.0) holds the prover, the verifier and example adders but not the circuit, and the paper names only the circuit class (classical reversible gates, X-basis measurement-based uncomputation with phase fix-ups, windowed arithmetic), which is no construction to rebuild. It is also in another unit: this board counts every CCX and CCZ record once, whether its condition fires or not, while 2,100,000 bounds the average number executed, and the proof bounds the file's records only by 17,000,000 operations in all, ECDSA.fail repository README (initial circuit 2,715 qubits × 3,942,753 Toffoli) |
qarena-baseline (QArena's run)(QArena) | Baseline not beaten |
The baseline of an instance is its published result where there is one (the hot instance's famous result, a cited published reference, or a published result or method on its leaderboard), else QArena's own run. Reference scores come from cited papers or derived constructions.
Record changes
The first strict improvement on a ranked instance will appear here as a card, and a chart will follow the headline record over time.
Headline record now:
- secp256k1 addition, secp256k1, classical Q at run time: 7,818,571,440 qubits × Toffoli (STATISTICAL VERIFICATION — 9,024 sampled input/measurement trials; not a proof of coherent equivalence.) by QArena baseline
Outside competitions (links only)
Other groups run these three competitions on the same arithmetic. A point-addition record is not a claim to have implemented or costed a complete cryptographic attack. QArena does not host their entries and holds no copy of their circuits, proofs or leaderboards, and none of their results is a QArena result. The only code of theirs that QArena runs is the ECDSA.fail evaluator, on files submitted to QArena's own ECDSA.fail board; those results are QArena results, not ECDSA.fail's. Sources were read as text on 2026-11-17 (UTC). A figure below is the upstream repository's own, kept at its pinned commit and not checked by QArena.
| Competition | Pinned source and rights | Contract status and reported figures | Links |
|---|---|---|---|
| ECDSA.fail point addition (Rust) External record — link only Secp256k1 point addition, scored by average Toffolis per shot times peak qubits; lower is better. Contestants export a circuit file (ops.bin) that the competition's Rust evaluator samples. | Layr-Labs/ecdsafail-challenge commit 9b27c639bb9daf9a8ae90ee0f55e296071e27efacommitted 2026-11-13; read 2026-11-17 (UTC) No LICENSE file at this commit (a request for the root LICENSE returns 404). The repository has a NOTICE (CC BY 4.0, three files from the zkp_ecc project: src/circuit.rs, src/sim.rs, src/weierstrass_elliptic_curve.rs). MIT applies to the original files by the ECDSA.fail site terms only (effective October 7, 2026), not by a file in the repository. The terms reserve the hosted platform and leaderboard. | No status marking The README at this commit carries no draft or provisional marking. No result is shown here; what ECDSA.fail publishes is an Upstream-published result, not verified by QArena; not ranked. The repository contains no ops.bin, and its results.tsv has seven rows, all at 2,715 qubits. ECDSA.fail's leaderboard stays a link; exported files submitted to QArena are scored on QArena's own ECDSA.fail track. | |
| ECDSA.fail Lean: verified controlled point addition Upstream reported — not reproduced by QArena A Lean 4 proof that a circuit maps an input point R on secp256k1 to R + C when its control bit is set, for every public point C, every input point and every measurement record, with all other wires back at zero. QArena would rank by certified qubits times Toffolis; lower is better. The results hold in the repository's signed-basis, fixed-measurement-record model, not for quantum channels or hardware. | Layr-Labs/ecdsafail-lean commit 338d3a47e510447c4625649c56942c4d39fc0a61committed 2026-11-15; read 2026-11-17 (UTC) Apache-2.0 (LICENSE). Two more license files sit in ECDSAAdd/Math/Divsteps: LICENSE-safegcd-bounds (MIT, Blockstream 2021) and LICENSE-uncompute (Apache-2.0). Mathlib and other dependencies keep their own licenses. The NOTICE says the co-publication terms with Eigen Labs are to be finalized. | Draft The organizer limits are “Not yet fixed” in docs/CHALLENGE.md at this commit. Shipped baselines in the repository's own table (certified upper bounds, taken from docs/CHALLENGE.md, not run by QArena): Skywalk (normalized): 1,899 qubits × 2,217,386 Toffolis = 4,210,816,014 ValueWalk (normalized): 3,134 qubits × 6,286,806 Toffolis = 19,702,850,004 Qubits × Toffolis is the table's own Q×T column. The hosted leaderboard on Yukon is a link only. | |
| ShorECDLP: verified key recovery Upstream reported — not reproduced by QArena A Lean 4 proof that a program recovers the key d of a public point Q = d·G on secp256k1 with probability at least 99% for every nonzero Q, in the repository's abstract cost model. QArena would rank by certified qubits times T-model cost; the repository lists them as separate metrics; lower is better. The T-model charges seven for a CCX and one for each phase rotation; rotation synthesis and its error are not modelled, so it is not a QArena qubit-day. | Layr-Labs/shor-ecdlp-lean commit 0395f6e230b32e1856ce89d39894e44191c60f37committed 2026-11-10; read 2026-11-17 (UTC) Apache-2.0 (LICENSE). The NOTICE says the collaboration terms with Eigen Labs remain to be finalized. | Provisional The limits on gate slots (4·10^15) and measurements (47,471,340,504) are marked “(provisional)” in docs/CHALLENGE.md at this commit. The classical candidate-check allowance is 56·(2^49+2), and there are 983,040 coefficient rows. Shipped Naive baseline, certified through the judge according to the repository (not run by QArena). The repository lists the two factors; the product is QArena's multiplication: Naive: 206,624 qubits × 8,918,039,383,771,648 T-model = 1,842,680,969,632,432,996,352 The product is above 2^64. The record posted on the Yukon page is a link only; QArena does not copy it. |
Verification labels
These are the labels for results on secp256k1 point addition, on QArena and in the outside competitions above. Each says what was checked and by whom, and a label never moves to another board. A listing without a QArena label has no QArena result.
| Label | Meaning | Applies to |
|---|---|---|
| QArena verified — exact finite-domain check | A completed ecdlp verification. | ecdlp |
| QArena verified — statistical, 9,024 trials | A completed secp run; its seed and verifier version are available. | secp |
| QArena verified — frozen resource model | A completed resest calculation; the rigorous or heuristic qualification of the algorithm is shown separately. | resest |
| QArena reproduced — upstream Rust judge, statistical | A completed local ECDSA.fail evaluation: the competition's evaluator, unchanged, on the tests it draws from the file, 128 tests from a class of inputs the competition's initial circuit gets wrong, and a second pass of the same simulator on random and class tests drawn from a seed QArena picks after the file is stored. | ecdfail |
| QArena reproduced — upstream Lean judge | Completed protected kernel checking; the proof-model scope of the track is shown with it. | no result yet |
| Upstream reported — not reproduced by QArena | A licensed upstream result record kept without local verification. | ecdfaillean, shorecdlp |
| External record — link only | No licensed local record or artifact mirror. | ecdfail |
Upstream notices
The two Lean repositories ship these NOTICE files with their Apache-2.0 licenses; both leave publication terms open. They are reproduced here word for word.
Layr-Labs/ecdsafail-lean
ECDSAAdd Copyright 2026 Runzhou Tao, Anirudh and ECDSAAdd contributors The mathematical declarations in ECDSAAdd/Math are adapted from VerifiedQC/ShorECDLP, commit 15d2a336743304e069f8a8a468c6ab1da334577b. Original project: https://github.com/VerifiedQC/ShorECDLP See docs/PROVENANCE.md for the extraction scope and changes. Apache License 2.0 was selected for this repository, including this requested extraction, by Runzhou Tao on 2026-09-08 in the project channel. VerifiedQC/ShorECDLP has since added an Apache 2.0 LICENSE (main 334359d, 2026-10-26). The Framework and arithmetic circuit proofs were written for ECDSAAdd. Mathlib and other external dependencies retain their own licenses and are not redistributed here. The controlled point-addition challenge format is co-developed with Eigen Labs (co-publication terms to be finalized).
File NOTICE at commit 338d3a47e510447c4625649c56942c4d39fc0a61 (git blob 7567c4595738925a188e592bee468e84e1c96380).
Layr-Labs/shor-ecdlp-lean
ShorECDLP Copyright 2026 Runzhou Tao and Anirudh Licensed under the Apache License, Version 2.0 (see LICENSE). The 2607.13816 submission formalizes the construction of arXiv:2607.13816; please cite that paper when using it. Prepared for proposed publication with Eigen Labs; collaboration terms remain to be finalized.
File NOTICE at commit 0395f6e230b32e1856ce89d39894e44191c60f37 (git blob 86f2226c61bd8c80bcea1ad338a32b4d50cfeb7b).