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

The first part of this series delved into the physics of quantum computing, but understanding how it works is not enough to grasp its potential to steal bitcoin. To comprehend this threat, it's essential to know how bitcoin's security is built and where its weaknesses lie. This piece begins by examining bitcoin's encryption, which relies on elliptic curve cryptography to verify ownership. Each wallet has a private key, a secret 256-digit binary number, and a public key derived from it using a mathematical operation on the secp256k1 curve. This process is akin to a one-way map, where starting from a known location, taking a certain number of steps defined by the curve's math leads to a public key. While moving forward is straightforward, reversing the process is virtually impossible for classical computers, making it the foundation of bitcoin's security model. However, the discovery of Shor's algorithm by mathematician Peter Shor in 1994 introduced a quantum approach that can efficiently break this encryption. Shor's algorithm solves the discrete logarithm problem by converting it into finding the period of a function, which quantum computers can do rapidly by representing all possible values simultaneously and applying a quantum operation called the Fourier transform. This process allows the algorithm to find the private key, given the public key and the generator point, thereby unlocking the bitcoin. The reason bitcoin remains secure today is that running Shor's algorithm requires a quantum computer with a sufficient number of stable qubits, which has been beyond current capabilities. Yet, a recent paper by Google's Quantum AI division significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000, bringing the threat closer to reality. The team designed quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve, requiring approximately 1,200 to 1,450 logical qubits and millions of Toffoli gates. Because qubits lose their quantum state constantly, maintaining coherence through the calculation demands hundreds of redundant qubits. The introduction of a practical attack scenario by Google's paper changes the perspective on the threat, suggesting that parts of Shor's algorithm can be precomputed, leaving the quantum computer in a primed state. Once a target public key appears, the machine only needs to finish the second half of the calculation, which Google estimates takes about nine minutes. This timeline is alarming because it fits within bitcoin's average block confirmation time, giving an attacker a roughly 41% chance of deriving a private key and submitting a competing transaction before the original transaction confirms. The bigger concern, however, is the approximately 6.9 million bitcoin already exposed on the blockchain, vulnerable to an 'at-rest' attack that does not require racing against the clock. In practice, this means a significant portion of bitcoin is at risk once a sufficiently powerful quantum computer is built, highlighting the urgent need for quantum-resistant cryptographic solutions.