The Quantum Threat to Bitcoin: How Your Cryptocurrency Could be Stolen in Under 10 Minutes
This series has been explaining the principles of quantum computing and its potential impact on bitcoin. The first part delved into the physics behind quantum computing, while this piece focuses on the target: how bitcoin's encryption works, why a quantum algorithm can break it, and the implications of Google's recent paper. To understand the threat, it's essential to grasp how bitcoin's security is built and where the weakness lies. Bitcoin uses elliptic curve cryptography, which relies on a one-way map. Each wallet has a private key, a secret number, and a public key derived from the private key through a mathematical operation. The public key can be shared without compromising security, as classical computers cannot reverse the math. However, a quantum algorithm known as Shor's algorithm can break this encryption. Shor's algorithm solves the discrete logarithm problem efficiently, which would take a classical computer an impractically long time to solve. The algorithm works by finding the period of a function, which is a problem that quantum computers are well-suited to solve. By using superposition, entanglement, and interference, the algorithm can find the private key, effectively breaking the encryption. The reason bitcoin remains secure today is that running Shor's algorithm requires a quantum computer with a large number of stable qubits. Google's recent paper reduced the estimated number of qubits required, making the threat more feasible. The paper introduced a practical attack scenario, which changes how to think about the threat. The parts of Shor's algorithm that depend on the elliptic curve's fixed parameters 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 appears, the machine only needs to finish the second half of the calculation, which Google estimates takes about nine minutes. This creates a narrow window 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. While this is alarming, 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.