The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Cryptocurrency in Under 10 Minutes
The previous installment of this series delved into the fundamentals of quantum computing, but understanding how it works is only half the battle. To grasp the true threat that quantum computers pose to bitcoin, it's essential to comprehend what they're targeting and how they can exploit the cryptocurrency's security vulnerabilities. This piece will examine the inner workings of bitcoin's encryption, why a quantum algorithm can break it, and the implications of Google's recent research on the timeline of this threat. Bitcoin relies on a system called elliptic curve cryptography to verify ownership. Each wallet has a pair of keys: a private key, which is a secret 256-digit binary number, and a public key, which is derived from the private key using a mathematical operation on a specific curve called secp256k1. This process can be thought of as a one-way map, where it's easy to calculate the public key from the private key but virtually impossible for classical computers to do the reverse. The security of bitcoin is based on this one-way trapdoor, where the private key proves ownership and the public key can be safely shared without compromising the private key. However, a quantum algorithm known as Shor's algorithm can break this trapdoor by efficiently solving the elliptic curve discrete logarithm problem. This algorithm works by converting the problem into finding the period of a function, which is a task that quantum computers are well-suited for. By using the principles of superposition, entanglement, and interference, Shor's algorithm can find the period and subsequently the private key, thereby compromising the security of bitcoin. The good news is that running Shor's algorithm requires a quantum computer with a large number of stable qubits, which has been beyond reach until now. Recent research by Google has reduced the estimated number of qubits required to fewer than 500,000, making the threat more pressing. The team designed two quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve, which can be used to launch an attack. The parts of Shor's algorithm that depend on the elliptic curve's fixed parameters 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 around nine minutes. This creates a narrow window of opportunity for a quantum attacker to derive a private key and submit a competing transaction, potentially redirecting funds. The average block confirmation time for bitcoin is 10 minutes, giving the attacker a roughly 41% chance of succeeding. While this 'mempool attack' is alarming, it requires a quantum computer that does not yet exist. A more significant concern is the 6.9 million bitcoin that are already vulnerable to an 'at-rest' attack, where the public key has been permanently exposed on the blockchain. These coins can be compromised by a quantum computer running Shor's algorithm without any time constraint, making them a prime target for potential attackers.