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

Part 1 of this series explored the fundamental principles of quantum computing. However, understanding how a quantum computer functions does not necessarily reveal how it can be utilized to steal bitcoin. To grasp this, it is essential to comprehend what a quantum computer is attacking, the nature of bitcoin's security, and the precise location of its vulnerability. This piece commences with an examination of bitcoin's encryption, progressing to the nine-minute window required to breach it, as identified by Google's recent quantum computing paper. Bitcoin employs a system known as elliptic curve cryptography to verify ownership. Each wallet possesses two keys: a private key, which is a secret number, and a public key derived from the private key through a mathematical operation on the specific curve called 'secp256k1'. This can be thought of as a one-way map, where starting from a known location on the curve, taking a private number of steps in a pattern defined by the curve's math leads to a public key. Anyone can verify the endpoint, but determining the number of steps taken to get there is effectively impossible for classical computers. This one-way trapdoor is the foundation of bitcoin's security model. The private key serves as proof of ownership, while the public key is safe to share because classical computers cannot reverse the math. When sending bitcoin, the wallet uses the private key to create a digital signature, a mathematical proof that the secret number is known without revealing it. In 1994, mathematician Peter Shor discovered a quantum algorithm that breaks this trapdoor. Shor's algorithm efficiently solves the discrete logarithm problem, which would take a classical computer longer than the universe has existed. The algorithm converts the problem into finding the period of a function, which is what quantum computers are designed for. By putting the input register into a superposition, representing all possible values simultaneously, and applying the function to all of them at once, the algorithm can find the period. This period unravels the math of the discrete logarithm problem, revealing the private key. The attack utilizes all three quantum properties: superposition evaluates the function on every possible input, entanglement links the input and output, and interference filters the noise until only the answer remains. Although Shor's algorithm has been known for over 30 years, running it requires a quantum computer with a large enough number of stable qubits. Google's paper reduced the estimated number of qubits required from millions to fewer than 500,000. The team designed two quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve, using approximately 1,200 and 1,450 logical qubits, respectively. Because qubits lose their quantum state constantly, hundreds of redundant qubits are needed to maintain a single reliable logical qubit. Google's paper introduced a practical attack scenario, where parts of Shor's algorithm can be precomputed, allowing the quantum computer to sit in a primed state, waiting for a target public key to appear. The moment a target public key is visible, the machine only needs to finish the second half of the calculation, which Google estimates takes about nine minutes. This creates a 'mempool attack' scenario, where a quantum attacker has roughly nine minutes to derive a private key and submit a competing transaction. The math gives the attacker a roughly 41% chance of finishing before the original transaction confirms. However, the bigger concern is the 6.9 million bitcoin sitting in wallets where the public key has already been permanently exposed on the blockchain, making them vulnerable to an 'at-rest' attack that requires no race against the clock.