The Quantum Threat to Bitcoin: How Your Cryptocurrency Could Be Stolen in Under 10 Minutes
The first part of this series delved into the physics behind quantum computing, explaining how it differs from classical computing. However, understanding the inner workings of a quantum computer doesn't necessarily reveal how it can be used to steal bitcoin. To grasp this, one must comprehend what a quantum computer is attacking, how bitcoin's security is established, and where the weakness lies. This article begins by examining bitcoin's encryption, working through to the nine-minute window identified by Google's recent quantum computing paper, in which a quantum computer can potentially break bitcoin's security. Bitcoin utilizes a system called elliptic curve cryptography to verify ownership. Each wallet has two keys: a private key, which is a secret number, and a public key derived from the private key through a mathematical operation. This can be thought of as a one-way map, where starting from a known location, taking a certain number of steps defined by the curve's math leads to a public key. Anyone can verify the public key, but no classical computer can figure out the private key. This one-way trapdoor is the foundation of bitcoin's security model. However, in 1994, mathematician Peter Shor discovered a quantum algorithm that can break 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 and uses quantum properties to find this period. Once the period is known, the private key can be derived, allowing a bad actor to steal bitcoin. The reason bitcoin still works today is that running Shor's algorithm requires a quantum computer with a large number of stable qubits. Google's paper reduced the estimated number of qubits needed from millions to fewer than 500,000. The team designed quantum circuits that implement Shor's algorithm against bitcoin's specific elliptic curve, using approximately 1,200 logical qubits and 90 million Toffoli gates. Because qubits lose their quantum state, 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, and the quantum computer can 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 window of opportunity for a quantum attacker 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 exposed on the blockchain, making them vulnerable to an 'at-rest' attack that requires no race against the clock.