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, distinguishing it from classical computing. However, understanding the inner workings of a quantum computer is only half the story; the other half involves grasping what it can attack and how. This piece focuses on bitcoin's security framework, the role of elliptic curve cryptography, and the vulnerability introduced by quantum algorithms. Bitcoin utilizes a system known as elliptic curve cryptography to verify ownership. Each wallet contains two keys: a private key, which is a secret 256-digit binary 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 starting from a known point, taking a certain number of steps leads to a public key, but reversing the process to find the private key is virtually impossible for classical computers. The security of bitcoin hinges on this one-way function, where the private key proves ownership, and the public key, being safe to share, is used to create digital signatures when sending bitcoin. However, the discovery of Shor's algorithm by mathematician Peter Shor in 1994 revealed a quantum approach that can efficiently solve the discrete logarithm problem, thereby breaking the encryption. Shor's algorithm exploits the properties of quantum mechanics, 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. Although Shor's algorithm has been known for over 30 years, its implementation has been hindered by the requirement for a large number of stable qubits. Recent research by Google, in collaboration with the Ethereum Foundation and Stanford University, 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 can run Shor's algorithm against bitcoin's specific elliptic curve, requiring approximately 1,200 to 1,450 logical qubits. Given the fragile nature of qubits, which constantly lose their quantum state, a substantial number of physical qubits are needed to maintain a smaller number of reliable logical qubits. The introduction of a practical attack scenario by Google's research changes the perspective on the quantum threat. It suggests that parts of the calculation can be precomputed, allowing a quantum computer to be in a primed state, ready to finish the calculation once a target public key is identified. This could enable an attack within approximately nine minutes, a timeframe that coincides with bitcoin's average block confirmation time. If a user broadcasts a transaction, making their public key visible, an attacker has about nine minutes to derive the private key and intercept the transaction. For the roughly 6.9 million bitcoin with public keys already exposed on the blockchain, the risk is even more pronounced, as an attacker can take as much time as needed to compute the private key. The implications of this research and the steps that can be taken to mitigate such risks will be explored in the next part of this series.