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

The first part of this series delved into the fundamentals of quantum computing, explaining how it differs from classical computing. However, understanding the inner workings of a quantum computer doesn't reveal how it can be utilized to steal bitcoin. To grasp this, one must comprehend what a quantum computer is attacking, the security framework of bitcoin, and where its vulnerabilities lie. This piece begins by examining bitcoin's encryption, walking through the process of how a quantum algorithm can break it, and discussing the nine-minute window identified by Google's recent quantum computing paper. Bitcoin employs elliptic curve cryptography to verify ownership, using a private key and a public key derived from it through a mathematical operation on the secp256k1 curve. This process can be thought of as a one-way map, where starting from a known point, taking a certain number of steps leads to a public key, but reversing this process is virtually impossible for classical computers. The security of bitcoin relies on this one-way function, with the private key serving as proof of ownership and the public key being safe to share. When sending bitcoin, the wallet uses the private key to create a digital signature, proving knowledge of the secret number without revealing it. However, Shor's algorithm, discovered in 1994, can break this encryption using a quantum computer. It solves the discrete logarithm problem efficiently, which would take a classical computer an impractically long time. The algorithm works by converting the problem into finding the period of a function, which is then solved using quantum properties such as superposition, entanglement, and interference. Despite Shor's algorithm being known for over 30 years, implementing it has been beyond reach due to the requirement for a large number of stable qubits. Google's recent paper reduced the estimated number of qubits needed from millions to fewer than 500,000, a 20-fold reduction. 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. Because qubits lose their quantum state, hundreds of redundant qubits are needed to maintain a single reliable logical qubit, with most of the quantum computer existing to catch and correct its own mistakes. 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. Once a 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 window of opportunity for a quantum attacker to derive a private key and submit a competing transaction, potentially redirecting funds. The average block confirmation time in bitcoin is 10 minutes, giving the attacker a roughly 41% chance of succeeding before the original transaction confirms. This attack scenario is alarming but requires a quantum computer that does not yet exist. A more significant concern is the 6.9 million bitcoin, roughly one-third of the total supply, that are vulnerable to an 'at-rest' attack because their public keys have already been exposed on the blockchain. These coins can be targeted without racing against the clock, as the attacker can take as long as needed to derive the private key. The implications of this vulnerability and the pace at which quantum computing hardware is advancing will be discussed in the next part of this series.