The Quantum Threat to Bitcoin: How Your Cryptocurrency Could Be Stolen in Under 10 Minutes
The first part of this series explored the principles of quantum computing, but understanding how it works is only half the story. To grasp how a quantum computer can be used to steal bitcoin, it's essential to comprehend what it's attacking - namely, bitcoin's security framework, which relies on elliptic curve cryptography. Every bitcoin wallet has a pair of keys: a private key, kept secret, and a public key, derived from the private key through a mathematical operation on the 'secp256k1' curve. This operation is akin to a one-way map, where starting from a known point and taking a certain number of steps leads to the public key, but reversing this process to find the private key is virtually impossible for classical computers. However, a quantum algorithm discovered by Peter Shor in 1994 can solve this problem efficiently, leveraging the principles of superposition, entanglement, and interference. By converting the problem into finding the period of a function, Shor's algorithm can find the private key, given the public key and the generator point. The recent paper by Google's Quantum AI division, in collaboration with researchers from the Ethereum Foundation and Stanford, has significantly reduced the estimated number of qubits required to run Shor's algorithm against bitcoin's elliptic curve, from millions to fewer than 500,000. They designed quantum circuits that implement Shor's algorithm, one requiring approximately 1,200 logical qubits and the other 1,450, each capable of breaking bitcoin's encryption. The team also introduced a practical attack scenario where parts of the algorithm can be precomputed, waiting for a target public key to appear. Once a public key is visible, the quantum computer only needs about nine minutes to derive the private key, which is roughly the time it takes for a bitcoin transaction to be confirmed. This creates a 'mempool attack' window where an attacker has a 41% chance of succeeding before the original transaction is confirmed. Moreover, approximately 6.9 million bitcoin are already vulnerable to an 'at-rest' attack because their public keys have been exposed on the blockchain. These findings underscore the growing urgency for bitcoin to adapt to the looming threat of quantum computing.