The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Cryptocurrency

The first part of this series explored the principles of quantum computing, but understanding its potential to compromise bitcoin security requires knowledge of the target - how bitcoin's encryption works and where its vulnerabilities lie. Bitcoin utilizes elliptic curve cryptography, a system that involves a private key, which is a secret number, and a public key derived from it through a mathematical operation on a specific curve known as 'secp256k1'. This process 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, but figuring out the number of steps taken (the private key) is virtually impossible for classical computers. However, a quantum algorithm discovered by Peter Shor in 1994, known as Shor's algorithm, can efficiently solve this problem by finding the period of a function related to the elliptic curve, leveraging quantum properties such as superposition, entanglement, and interference. Despite Shor's algorithm being known for over 30 years, its application has been hindered by the requirement for a quantum computer with a large number of stable qubits. Recent research by Google, in collaboration with Ethereum Foundation and Stanford cryptographer Dan Boneh, has significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000, making the threat more tangible. The study designed quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve, with one circuit requiring approximately 1,200 logical qubits and another needing about 1,450 logical qubits. The introduction of a practical attack scenario changes the perspective on the threat, suggesting that parts of the algorithm can be precomputed, allowing a quantum computer to be in a primed state, ready to finish the calculation once a target public key appears. This leads to a 'nine-minute window' for a potential attack, where if a user broadcasts a transaction with their public key visible, an attacker has roughly nine minutes to derive the private key and submit a competing transaction. Furthermore, approximately 6.9 million bitcoin, or one-third of the total supply, are vulnerable to an 'at-rest' attack because their public keys have been permanently exposed on the blockchain, presenting a significant concern as quantum computing technology advances.