Elliptic-Curve Discrete Log
Given a public key \(Q\) on secp256k1, can anyone recover the private key \(d\)? Every Bitcoin signature depends on the answer being no.
Bitcoin's coins are guarded by one hard math problem. A large enough quantum computer would make that problem easy. This page goes through the cryptography behind the worry, which parts break, which parts hold, and what a quantum-resistant Bitcoin would need.
Experimental · Not financial adviceGreyed and slashed: broken by a large quantum computer.
Given a public key \(Q\) on secp256k1, can anyone recover the private key \(d\)? Every Bitcoin signature depends on the answer being no.
Can a quantum computer find the hidden period of a group operation in polynomial time and recover \(d\) from \(Q\)?
Does a quadratic speedup on unstructured search threaten SHA-256 mining or address hashes?
2128 work is still out of reach
Can we sign using nothing but a hash function, so security rests only on preimage resistance? (SLH-DSA / SPHINCS+, FIPS 205)
Given a matrix \(A\) and a noisy product \(t\), is it hard to recover the short secret \(s\)? (ML-DSA / Dilithium, FIPS 204)
Is it hard to find the short polynomials \(f, g\) behind a public key \(h\)? (FN-DSA / Falcon)
Can Bitcoin soft-fork in a post-quantum output type before Q-Day, and what happens to coins nobody moves?
Toy-sized versions of the real algorithms, computed in your browser.
The points of \(y^2 = x^3 + 7 \bmod 97\): Bitcoin's secp256k1 equation on a tiny field. The generator walks \(G, 2G, 3G, \dots\) Pick a secret and watch brute force find it.
Shor turns factoring into finding the period \(r\) of \(a^x \bmod N\). A quantum computer finds \(r\) with the quantum Fourier transform. Here it's simulated classically, which only works because \(N\) is tiny.
16 candidates, one is correct. Each round flips the marked amplitude, then reflects everything about the mean. After \(\approx\tfrac{\pi}{4}\sqrt{N}\) rounds the answer stands out.
Shor's algorithm needs a public key to attack. Most Bitcoin addresses show only a hash of the public key, and the key itself appears on-chain once the coins are spent. Whether coins are at risk therefore depends on whether their public key has ever been revealed.
| Output type | Public key on-chain? | Quantum status |
|---|---|---|
| P2PK (early 2009–10 coins) | Always | Exposed |
| P2TR (Taproot) | Always (tweaked key) | Exposed |
| P2PKH / P2WPKH (reused address) | After first spend | Exposed |
| P2PKH / P2WPKH (never spent from) | No — hash only | Protected until spent |
| Any transaction in the mempool | Yes, briefly | Race window |
Today's quantum computers have hundreds to low thousands of noisy physical qubits. Breaking secp256k1 needs millions of them running fault-tolerant error correction.
Resource estimates keep falling as algorithms and error correction improve. That is why NIST finalized its first post-quantum signature standards in 2024 and why Bitcoin developers are debating migration now.
Alongside this explainer, a token was launched on Meteora as a class experiment. The question it tests: how does a strong technical story affect a market, even when everyone is told it is only a story?