The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Cryptocurrency in Under 10 Minutes
Part one of this series explored the fundamental principles of quantum computing, revealing how it differs from classical computing. However, understanding how quantum computers work is only half the story; the real concern is how they can be used to compromise bitcoin's security. This piece will examine the target of a quantum attack: the encryption that safeguards bitcoin transactions, and how a quantum algorithm can potentially break it. We will also discuss the recent developments outlined in Google's paper and their impact on the timeline for a potential attack. Bitcoin relies on elliptic curve cryptography to verify ownership. Each wallet has a pair of keys: a private key, which is a secret 256-bit 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 the private key is used to generate the public key, but it is virtually impossible for a classical computer to reverse the process and determine the private key from the public key. The security of bitcoin is rooted in this one-way function, which makes it extremely difficult for an attacker to deduce the private key. However, in 1994, mathematician Peter Shor discovered a quantum algorithm that can efficiently solve the elliptic curve discrete logarithm problem, thus breaking the encryption. Shor's algorithm takes advantage of quantum properties such as superposition, entanglement, and interference to find the period of a function related to the elliptic curve. This period is crucial in unraveling the discrete logarithm problem and obtaining the private key. The algorithm's power lies in its ability to evaluate the function for all possible inputs simultaneously, thanks to quantum superposition, and then use the Fourier transform to reinforce the correct answers while canceling out the incorrect ones. Although Shor's algorithm has been known for over 30 years, its implementation has been hindered by the need for a large number of stable qubits to maintain coherence throughout the calculation. Recent estimates suggested that millions of physical qubits would be required, but Google's paper has reduced this number to fewer than 500,000, a roughly 20-fold reduction. The team designed two quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve, one using approximately 1,200 logical qubits and the other using approximately 1,450 logical qubits. The introduction of a practical attack scenario has significant implications for how we think about the quantum threat to bitcoin. 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, ready to finish the calculation once a target public key appears. Google estimates that the second half of the calculation takes around nine minutes, which is alarmingly close to bitcoin's average block confirmation time of 10 minutes. This means that if a user broadcasts a transaction and their public key is visible in the mempool, a quantum attacker has roughly nine minutes to derive the private key and submit a competing transaction that redirects funds. The math gives the attacker a roughly 41% chance of succeeding before the original transaction confirms. Furthermore, approximately 6.9 million bitcoin, or roughly one-third of the total supply, are sitting in wallets where the public key has already been permanently exposed on the blockchain, making them vulnerable to an 'at-rest' attack that requires no race against the clock.