The Quantum Threat to Bitcoin: How Your Cryptocurrency Could be Stolen in Under 10 Minutes
The first part of this series explored the principles of quantum computing, but understanding how it works is only half the story. To grasp how a quantum computer could be used to steal bitcoin, it's essential to know what it's attacking and where the vulnerability lies. This piece begins with an examination of bitcoin's encryption system, which relies on elliptic curve cryptography to verify ownership. Every bitcoin wallet has a pair of keys: a private key, which is a secret 256-digit binary number, and a public key, derived from the private key through a mathematical operation on the secp256k1 curve. This process can be thought of as a one-way map, where starting from a known point on the curve, taking a series of steps defined by the curve's mathematics leads to a public key. While moving forward in this map is straightforward, reversing the process to find the private key from the public key is virtually impossible for classical computers due to the elliptic curve discrete logarithm problem. However, in 1994, mathematician Peter Shor discovered a quantum algorithm that can efficiently solve this problem, thereby breaking the encryption. Shor's algorithm exploits the properties of quantum mechanics, including superposition, entanglement, and interference, to find the period of a function related to the elliptic curve, which in turn reveals the private key. Although Shor's algorithm has been known for over 30 years, its application has been hindered by the requirement for a large number of stable qubits to maintain coherence throughout the calculation. A recent paper by Google's Quantum AI division, in collaboration with researchers from the Ethereum Foundation and Stanford, has significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000. The team designed quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve, requiring approximately 1,200 to 1,450 logical qubits and tens of millions of Toffoli gates. The practical implication of this research is a potential 'nine-minute window' for a quantum attack. If a quantum computer can precompute parts of Shor's algorithm related to the elliptic curve's fixed parameters, it can sit in a primed state, waiting for a target public key to appear. Once a public key is broadcast or exposed on the blockchain, the quantum computer only needs to finish the second half of the calculation, which Google estimates takes about nine minutes. This timeframe is critical because it coincides with bitcoin's average block confirmation time, giving an attacker a roughly 41% chance of deriving a private key and submitting a competing transaction before the original transaction confirms. The more significant concern, however, is the approximately 6.9 million bitcoin (about one-third of the total supply) that are already vulnerable to an 'at-rest' attack because their public keys have been permanently exposed on the blockchain. These coins can be targeted without any time constraint, as the attacker can take as long as needed to compute the private key.