The Quantum Threat to Bitcoin: How a Powerful 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 necessarily reveal how it can be utilized to steal bitcoin. To grasp this, one must comprehend the target of the attack: the encryption mechanism employed by bitcoin, and how a quantum algorithm can compromise it. This piece will examine bitcoin's encryption, the role of elliptic curve cryptography in securing transactions, and the recent breakthroughs that have significant implications for the security of the bitcoin network. Bitcoin's security relies on a system called elliptic curve cryptography, which enables the verification of ownership without revealing the private key. Each wallet possesses a pair of 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 relationship between the private and public keys can be thought of as a one-way map, where it is straightforward to generate the public key from the private key but virtually impossible for classical computers to reverse the process. The security of bitcoin transactions is based on this one-way trapdoor, with the private key serving as proof of ownership and the public key being safe to share. When a bitcoin transaction is initiated, the wallet uses the private key to create a digital signature, providing mathematical proof that the sender knows the secret number without actually revealing it. The discovery of Shor's algorithm by mathematician Peter Shor in 1994 introduced a quantum algorithm capable of breaking this trapdoor. Shor's algorithm efficiently solves the discrete logarithm problem, which would take a classical computer an impractically long time to solve. The algorithm works by converting the problem of finding the private key into a problem of finding the period of a function, which is a task well-suited to quantum computers. Quantum computers can represent all possible values simultaneously and apply a function to all of them at once, leveraging properties such as superposition, entanglement, and interference to filter out incorrect answers and reinforce the correct one. Although Shor's algorithm has been known for over 30 years, its implementation has been hindered by the requirement for a quantum computer with a large number of stable qubits. Recent research by Google's Quantum AI division, in collaboration with Ethereum Foundation researcher Justin Drake and Stanford cryptographer Dan Boneh, has significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000. This breakthrough introduces a practical attack scenario that changes the perspective on 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, 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 approximately nine minutes. This creates a 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 in bitcoin is 10 minutes, giving the attacker a roughly 41% chance of succeeding before the original transaction confirms. While this 'mempool attack' is alarming, it requires a quantum computer that does not yet exist. A more significant concern is the approximately 6.9 million bitcoin (one-third of the total supply) sitting in wallets where the public key has already been exposed on the blockchain, making these coins vulnerable to an 'at-rest' attack that can be executed without time constraints. The implications of this vulnerability and the rapid advancements in quantum computing hardware will be explored in the next and final piece of this series.