The Quantum Threat to Bitcoin: How a Quantum Computer Can Compromise Your Cryptocurrency in Under 10 Minutes
The first part of this series delved into the fundamentals of quantum computing, explaining how these machines differ from classical computers and harness the unique properties of quantum mechanics. However, understanding the inner workings of a quantum computer does not directly reveal how it could be exploited to steal bitcoin. To grasp this, one must comprehend what a quantum computer attacks and how the security of bitcoin is established, as well as identify the specific vulnerability. This piece begins by examining bitcoin's encryption method, known as elliptic curve cryptography, which is used to verify ownership. 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. The relationship between the private and public keys can be thought of as a one-way function, where it's straightforward to generate a public key from a private key but virtually impossible for a classical computer to reverse the process. This one-way function is the cornerstone of bitcoin's security model, enabling the creation of digital signatures that prove ownership without revealing the private key. A significant threat to this security model emerged with the discovery of Shor's algorithm, a quantum algorithm capable of efficiently solving the elliptic curve discrete logarithm problem, which underpins the security of bitcoin's encryption. Shor's algorithm leverages the principles of quantum mechanics, including superposition, entanglement, and interference, to find the period of a function related to the elliptic curve, thereby unraveling the private key. The practical implementation of Shor's algorithm against bitcoin's specific elliptic curve has been a subject of research, with a recent paper by Google's Quantum AI division, in collaboration with other researchers, presenting quantum circuits that could potentially break bitcoin's encryption. These circuits require fewer qubits than previously estimated, roughly 1,200 to 1,450 logical qubits, and can perform the necessary calculations in a significantly reduced timeframe, introducing a new attack scenario. The paper introduced the concept of precomputing parts of Shor's algorithm that depend on the elliptic curve's fixed parameters, allowing a quantum computer to be 'primed' and ready to attack as soon as a target public key is broadcast. This leads to a 'nine-minute window' for an attacker to derive a private key and submit a competing transaction, given that the second half of the calculation can be completed in about nine minutes, which is close to bitcoin's average block confirmation time. While the immediate threat is still theoretical, requiring a quantum computer that does not yet exist, the long-term implications are significant, especially for the approximately 6.9 million bitcoin that have had their public keys exposed on the blockchain, making them vulnerable to an 'at-rest' attack. The race to develop quantum-resistant cryptography and the strategies to protect existing and future bitcoin transactions will be crucial in the face of emerging quantum technologies.