The Quantum Threat to Bitcoin: How a 9-Minute Window Can Compromise Your Cryptocurrency
The first part of this series delved into the physics of quantum computing, but understanding how it works is only half the story. To comprehend the threat to bitcoin, it's essential to grasp what quantum computers are attacking and where the weakness lies. This piece begins with an explanation of bitcoin's encryption, which utilizes elliptic curve cryptography to verify ownership. Each wallet has two keys: a private key, a secret number, and a public key derived from the private key through a mathematical operation. The relationship between the two keys can be thought of as a one-way map, where it's easy to move forward but virtually impossible for classical computers to reverse the process. However, a quantum algorithm known as Shor's algorithm can efficiently break this one-way trapdoor, solving the discrete logarithm problem that would take a classical computer an impractically long time to solve. The algorithm works by converting the problem into finding the period of a function, which quantum computers can solve efficiently using superposition, entanglement, and interference. Despite Shor's algorithm being known for over 30 years, the reason bitcoin remains secure is that running the algorithm requires a quantum computer with a large number of stable qubits. Recent estimates have reduced the required number of qubits, making the threat more feasible. Google's paper introduced a practical attack scenario, where parts of the algorithm 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 is visible, 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, posing a significant threat to bitcoin's security.