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 underlying quantum computing, but understanding how it works is only half the story. To grasp how a quantum computer can be used to steal bitcoin, it's essential to comprehend what it's attacking - namely, the encryption that secures bitcoin transactions. This piece will explain bitcoin's encryption, why a quantum algorithm can break it, and the significance of Google's recent paper, which has altered the timeline for this threat. Bitcoin relies on 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 a specific curve. This process is akin to a one-way map, where starting from a known location, taking a certain number of steps defined by the curve's math leads to a public key. While it's easy to go forward, reversing the process is virtually impossible for classical computers. The security of bitcoin hinges on this one-way trapdoor, with the private key serving as proof of ownership and the public key being safe to share because classical computers cannot reverse the math. However, a quantum algorithm discovered by mathematician Peter Shor in 1994 can efficiently solve the discrete logarithm problem, breaking the trapdoor. Shor's algorithm works by converting the problem into finding the period of a function, which is then solved using quantum properties. The algorithm requires a quantum computer with a large number of stable qubits to maintain coherence throughout the calculation. Recent research by Google has reduced the estimated number of qubits needed from millions to fewer than 500,000, making the threat more feasible. 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 and millions of Toffoli gates. Because qubits lose their quantum state constantly, 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, allowing the quantum computer to sit in a primed state, waiting for a target public key to appear. Once a public key is visible, the machine only needs to finish the second half of the calculation, which Google estimates takes about nine minutes. This creates a window of opportunity for a quantum attacker to derive a private key and submit a competing transaction, with a roughly 41% chance of succeeding before the original transaction confirms. The bigger concern is the 6.9 million bitcoin already exposed on the blockchain, vulnerable to an 'at-rest' attack that requires no race against the clock. A quantum computer running Shor's algorithm can turn a bitcoin public key into the private key that controls the coins, potentially allowing for the theft of these exposed funds.