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 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 and where the vulnerability lies. This piece begins by examining bitcoin's encryption method, known as elliptic curve cryptography, which relies on a one-way map. Every bitcoin wallet has a private key, a secret number, and a public key derived from the private key through a mathematical operation on the 'secp256k1' curve. The process can be thought of as taking a certain number of steps from a known starting point on the curve, with the number of steps being the private key, and the endpoint being the public key. Anyone can verify the endpoint, but figuring out the number of steps taken is virtually impossible for classical computers due to the elliptic curve discrete logarithm problem. This problem is so complex that even the best classical algorithms would take longer than the age of the universe to solve for a 256-bit curve. However, in 1994, mathematician Peter Shor discovered a quantum algorithm that can efficiently solve this problem, thereby breaking the encryption. Shor's algorithm works by converting the problem into finding the period of a function related to the elliptic curve, which is a task well-suited to quantum computers due to their ability to process multiple inputs simultaneously through superposition and to filter out incorrect answers through interference. The algorithm requires a quantum computer with a large number of stable qubits to maintain coherence throughout the calculation. Recently, Google's Quantum AI division, along with contributions from other researchers, has significantly reduced the estimated number of qubits needed to run Shor's algorithm against bitcoin's elliptic curve, from millions to fewer than 500,000. This reduction makes the threat more tangible. The team designed quantum circuits that can implement Shor's algorithm with approximately 1,200 to 1,450 logical qubits, which translates to a much larger number of physical qubits due to the need for redundancy to maintain quantum state. The practical implication of this work is not just the reduced qubit count but also the introduction of a realistic attack scenario. Parts of Shor's algorithm can be precomputed for bitcoin's elliptic curve parameters, allowing a quantum computer to be 'primed' and ready to finish the calculation once a target public key is identified. Google estimates that finishing the calculation takes about nine minutes, which is alarmingly close to bitcoin's average block confirmation time of 10 minutes. This timing creates a 'mempool attack' window where an attacker could derive a private key and submit a competing transaction to redirect funds. The attacker has a roughly 41% chance of succeeding before the original transaction confirms. Moreover, approximately 6.9 million bitcoin, or one-third of the total supply, are in wallets where the public key has been permanently exposed on the blockchain, making them vulnerable to an 'at-rest' attack that doesn't require racing against the clock. The implications of these findings and the pace at which hardware is advancing will be explored in the next part of this series.