The Quantum Threat to Bitcoin: How a Quantum Computer Can Steal Your Cryptocurrency in Under 10 Minutes
The first part of this series explored the fundamental principles of quantum computing. However, understanding the inner workings of a quantum computer does not provide insight into how it can be utilized to steal bitcoin. To grasp this, it is essential to comprehend what a quantum computer is attacking, the nature of bitcoin's security, and the specific vulnerability it exploits. This piece begins by examining bitcoin's encryption and proceeds to discuss the nine-minute window required to break it, as identified in Google's recent quantum computing paper. Bitcoin employs 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 'secp256k1' curve. The process can be thought of as a one-way map, where starting from a known location on the curve, taking a private number of steps leads to a public key. Anyone can verify the public key, but determining the private key is virtually impossible for classical computers. This one-way function is the foundation of bitcoin's security model. When sending bitcoin, the wallet uses the private key to create a digital signature, proving ownership without revealing the secret number. In 1994, mathematician Peter Shor discovered a quantum algorithm that can break this one-way function. Shor's algorithm efficiently solves the discrete logarithm problem by converting it into a problem of finding the period of a function. This is achievable due to the properties of quantum computers, which can represent all possible values simultaneously and apply a function to them at once. The algorithm uses superposition, entanglement, and interference to find the period, from which the private key can be derived. The reason bitcoin remains secure today is that running Shor's algorithm requires a quantum computer with a large number of stable qubits. However, Google's recent paper reduced the estimated number of qubits required from millions to fewer than 500,000. The team designed quantum circuits that implement Shor's algorithm against bitcoin's 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, allowing the quantum computer to sit in a primed state, waiting for a target public key to appear. Once a target 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 'mempool attack' where an attacker has roughly nine minutes to derive a private key and submit a competing transaction. The math gives the attacker a roughly 41% chance of succeeding before the original transaction confirms. A more significant concern is the 6.9 million bitcoin already exposed on the blockchain, vulnerable to an 'at-rest' attack that requires no time constraint. A quantum computer running Shor's algorithm can turn a bitcoin public key into the private key that controls the coins, posing a significant threat to the security of these exposed coins.