The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Cryptocurrency in Under 10 Minutes

The first part of this series delved into the principles of quantum computing, a technology that leverages the unique properties of quantum mechanics to perform calculations exponentially faster than classical computers. However, understanding the inner workings of a quantum computer is only half the story; the real concern lies in its potential application to compromise the security of cryptocurrencies like bitcoin. This piece will dissect the mechanics of bitcoin's encryption, how a quantum algorithm can break it, and the alarming implications of Google's recent research on the timeline of this threat. Bitcoin's security is rooted in a complex system known as elliptic curve cryptography, which relies on a one-way function to protect transactions. Each wallet has 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 a specific curve. This process can be envisioned as a one-way map, where starting from a known point, taking a certain number of steps leads to a public key, but reversing this process to find the private key is virtually impossible for classical computers. The security of bitcoin hinges on this principle, as the private key serves as proof of ownership, while the public key can be shared without risking the security of the wallet. The advent of quantum computing, however, poses a significant threat to this model. In 1994, mathematician Peter Shor discovered an algorithm that could efficiently solve the discrete logarithm problem on which bitcoin's security is based, using the principles of quantum mechanics. Shor's algorithm exploits the unique properties of quantum computers, such as superposition, entanglement, and interference, to find the period of a function related to the elliptic curve, which in turn reveals the private key. Despite the potential of Shor's algorithm, its implementation has been hindered by the requirement for a large number of stable qubits, which has been beyond current technological capabilities. Recent research by Google, in collaboration with other experts, has reduced the estimated number of qubits needed to attack bitcoin's encryption, making the threat more tangible. The study introduced a practical attack scenario where parts of the calculation can be precomputed, leaving the quantum computer in a state ready to finalize the attack once a target public key is identified. This scenario, known as the 'mempool attack,' gives the attacker approximately nine minutes to derive the private key and submit a competing transaction, a timeframe that is alarmingly close to bitcoin's average block confirmation time. Furthermore, the research highlights a more significant concern: the vulnerability of coins in wallets where the public key has already been exposed on the blockchain, totaling around 6.9 million bitcoin. These coins are susceptible to an 'at-rest' attack, which can be executed without any time constraint. The implications of these findings are profound, indicating that the security of a substantial portion of the bitcoin supply is at risk once a sufficiently powerful quantum computer is built. The race to develop such a computer and the potential countermeasures to protect bitcoin and other cryptocurrencies will be the focus of the next and final piece in this series.