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 physics behind quantum computing, but understanding how it works is only half the story. To grasp the threat it poses to bitcoin, we need to examine what it's attacking - bitcoin's encryption - and where its weaknesses lie. This piece begins with an explanation of bitcoin's encryption system, which relies on elliptic curve cryptography to verify ownership. Every bitcoin wallet has a private key, a secret number, and a public key derived from it through a mathematical operation on the secp256k1 curve. This process is like a one-way map, where starting from a known point, taking a certain number of steps defined by the curve's math leads to a public key. However, reversing this process - determining the private key from the public key - is virtually impossible for classical computers due to the elliptic curve discrete logarithm problem. It's estimated that solving this problem for a 256-bit curve would take longer than the universe has existed. But quantum computers change this landscape. In 1994, mathematician Peter Shor discovered an algorithm that can efficiently solve the discrete logarithm problem, leveraging quantum properties like superposition, entanglement, and interference. This algorithm converts the problem into finding the period of a function, which quantum computers can solve rapidly. The period is found by applying the function to all possible inputs simultaneously (thanks to superposition) and then using the Fourier transform to reinforce correct answers and cancel out wrong ones. Once the period is known, the private key can be derived almost immediately. The critical aspect of Shor's algorithm is that it can break the one-way trapdoor that secures bitcoin transactions. However, running this algorithm requires a quantum computer with a large number of stable qubits, which has been out of reach. Google's recent paper significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000, by designing quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve. The paper introduced a practical attack scenario where parts of the algorithm can be precomputed, leaving the quantum computer in a primed state, waiting for a target public key. Once a 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's close to bitcoin's average block confirmation time of 10 minutes, 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 is the 6.9 million bitcoin already exposed on the blockchain, vulnerable to an 'at-rest' attack that doesn't require racing against the clock. A quantum computer can turn a public key into a private key, controlling the coins. For coins transacted since Taproot, the public key is visible, and for older addresses, it becomes visible upon spending, leaving a nine-minute window before an attacker can catch up.