The Quantum Threat to Bitcoin: How Your Coins Can Be Stolen in Under 10 Minutes
The first part of this series delved into the physics behind quantum computing, but understanding how it works is only half the battle. To grasp the threat it poses to Bitcoin, one must comprehend what it is attacking - the encryption that secures Bitcoin transactions. This piece will explore how Bitcoin's security is built, where its weaknesses lie, and the recent developments that have brought the threat of quantum computing closer to reality. Bitcoin utilizes a system known as 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. This operation can be thought of as a one-way map, where starting from a known point, taking a certain number of steps defined by the curve's math leads to a public key. Anyone can verify the public key, but reversing the process to find the private key is virtually impossible for classical computers. However, a quantum algorithm known as Shor's algorithm can efficiently solve this problem, breaking the encryption. Shor's algorithm works by converting the problem of finding the private key into finding the period of a function, which is a task well-suited for quantum computers. By applying the function to all possible inputs simultaneously and then using a quantum operation called the Fourier transform, the algorithm can find the correct period, and from it, the private key. This process leverages the principles of superposition, entanglement, and interference. Despite Shor's algorithm being known for over 30 years, its application has been hindered by the requirement for a large number of stable qubits. Recent research by Google has significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000, making the threat more feasible. The study designed quantum circuits that can implement Shor's algorithm against Bitcoin's specific elliptic curve, using approximately 1,200 to 1,450 logical qubits. Because qubits are prone to losing their quantum state, a large number of physical qubits are needed to maintain a smaller number of reliable logical qubits. Google's research introduced a practical attack scenario where parts of the calculation can be precomputed, waiting for a target public key to appear. Once a public key is visible, the quantum computer only needs to finish the second half of the calculation, which Google estimates takes about nine minutes. This timeframe is alarming because it is close to Bitcoin's average block confirmation time of 10 minutes, giving an attacker a roughly 41% chance of succeeding in redirecting funds before the original transaction confirms. The bigger concern is the large number of Bitcoins (approximately 6.9 million) that are already vulnerable due to their public keys being exposed on the blockchain. These coins are at risk of being stolen by a quantum computer running Shor's algorithm without the need for a race against the clock. The implications of this threat and how it affects the security of Bitcoin transactions will be explored further in the next piece.