The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Cryptocurrency in Under 10 Minutes
The first part of this series delved into the physics behind quantum computing, explaining how it differs from traditional computing. However, understanding the mechanics of a quantum computer does not provide insight into its potential to compromise bitcoin security. To grasp this, it is essential to comprehend the target of the attack: the encryption used by bitcoin, why a quantum algorithm can break it, and the implications of Google's recent research on the timeline. This piece begins with an examination of bitcoin's encryption, working through to the nine-minute window required to break it, as identified by Google's quantum computing paper. Bitcoin utilizes a system called elliptic curve cryptography to verify ownership. Each wallet has two keys: a private key, which is a secret number, and a public key derived from the private key through a mathematical operation on the specific curve 'secp256k1'. The process can be thought of as a one-way map, where starting from a known location, taking a certain number of steps defined by the curve's math leads to the public key. Anyone can verify the endpoint, but determining the number of steps taken is virtually impossible for classical computers. This one-way trapdoor is the foundation of bitcoin's security model. The private key serves as proof of ownership, and the public key is safe to share because classical computers cannot reverse the math. When sending bitcoin, the wallet uses the private key to create a digital signature, proving knowledge of the secret number without revealing it. In 1994, mathematician Peter Shor discovered a quantum algorithm that breaks this trapdoor. Shor's algorithm efficiently solves the discrete logarithm problem, which would take a classical computer an impractically long time to solve. The algorithm works by converting the problem into finding the period of a function, which is achievable due to quantum properties. Finding this period is exactly what quantum computers are designed for, allowing them to evaluate a function on all possible inputs simultaneously and apply a quantum operation to reinforce the correct answers. The attack leverages all three quantum properties: superposition to evaluate the function on every possible input, entanglement to link the input and output, and interference to filter out noise. Despite Shor's algorithm being known for over 30 years, running it requires a quantum computer with a sufficiently large number of stable qubits. Google's recent paper reduced the estimated number of qubits needed from millions to fewer than 500,000, a roughly 20-fold reduction. The team designed quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve, using approximately 1,200 to 1,450 logical qubits. Because qubits lose their quantum state constantly, hundreds of redundant qubits are needed to maintain a single reliable logical qubit. Google's paper introduced a practical attack scenario, where parts of Shor's algorithm can be precomputed, leaving the quantum computer in a primed state. Once a target public key appears, the machine only needs to finish the second half of the calculation, which Google estimates takes about nine minutes. This creates a nine-minute window for a quantum attacker to derive a private key and submit a competing transaction. The math gives the attacker a roughly 41% chance of finishing before the original transaction confirms. This mempool attack is alarming but requires a quantum computer that does not yet exist. A greater concern is the 6.9 million bitcoin, roughly one-third of the total supply, sitting in wallets where the public key has already been exposed on the blockchain, making them vulnerable to an 'at-rest' attack that requires no race against the clock.