Shor's Algorithm Explained
Discovered by mathematician Peter Shor in 1994, Shor's algorithm is the quantum algorithm that makes quantum computers a threat to cryptography. It solves two mathematical problems exponentially faster than any classical algorithm: integer factorization (breaking RSA) and the discrete logarithm problem (breaking ECDSA, including Bitcoin's secp256k1).
How It Breaks Bitcoin Specifically
Bitcoin uses the Elliptic Curve Digital Signature Algorithm (ECDSA) on the secp256k1 curve. When you create a Bitcoin wallet, you generate a private key (random 256-bit number) and derive a public key through elliptic curve multiplication. This one-way function is the foundation of Bitcoin security — you can derive a public key from a private key, but not the reverse. At least, not classically.
Shor's algorithm reverses this. Given a public key, it solves the elliptic curve discrete logarithm problem (ECDLP) to find the private key. On a quantum computer with approximately 4,000 logical qubits, this can be done in hours.
The Attack Vector
- Every Bitcoin transaction broadcasts the sender's public key to the network
- This public key is stored permanently on the blockchain
- A quantum attacker runs Shor's algorithm on the public key
- The private key is derived
- The attacker signs transactions transferring all funds
Why Bitcoin Cannot Easily Fix This
Replacing ECDSA requires a Bitcoin hard fork — a protocol-level change requiring near-universal consensus. Bitcoin's governance is famously conservative (the block size debate lasted years). A cryptographic migration would be far more contentious and complex. Every wallet would need to migrate to new key types.
BMIC's Approach
BMIC avoids this problem entirely by implementing CRYSTALS-Kyber lattice-based encryption from launch. Shor's algorithm cannot solve the Module Learning With Errors problem that Kyber is based on. Combined with ERC-4337 smart accounts, BMIC provides Shor-resistant security without waiting for any base-layer protocol change.