The Quantum Threat to Bitcoin: How a Powerful Computer Can Steal Your Coins in Under 10 Minutes
This series began by exploring the fundamental principles of quantum computing. However, understanding the inner workings of a quantum computer doesn't reveal how it can be used to compromise bitcoin's security. To grasp this, it's essential to comprehend what a quantum computer is attacking and where the vulnerabilities lie. This article delves into bitcoin's encryption, the potential weaknesses, and the nine-minute window identified by Google's recent research. Bitcoin relies on elliptic curve cryptography to verify ownership. Each wallet has a private key, a secret 256-digit binary number, and a public key derived from the private key using a mathematical operation on the 'secp256k1' curve. The relationship between the private and public keys can be thought of as a one-way map, where it's easy to calculate the public key from the private key but virtually impossible for classical computers to reverse the process. This one-way function is the foundation of bitcoin's security model. A quantum algorithm, known as Shor's algorithm, can efficiently break this one-way function. Discovered in 1994, Shor's algorithm solves the elliptic curve discrete logarithm problem, which would take a classical computer longer than the age of the universe to solve. The algorithm works by converting the problem into finding the period of a function, which is a task well-suited to quantum computers. Quantum computers can represent all possible inputs simultaneously and apply the function to them at once, thanks to the principles of superposition, entanglement, and interference. Although Shor's algorithm has been known for over 30 years, it requires a quantum computer with a large number of stable qubits to execute. Recent research by Google reduced the estimated number of qubits needed from millions to fewer than 500,000. The study also introduced a practical attack scenario, where a quantum computer can precompute parts of the algorithm and then quickly derive a private key when a target public key appears. This 'mempool attack' gives the attacker a 41% chance of succeeding within the nine-minute window before a transaction is confirmed. Moreover, approximately 6.9 million bitcoin are vulnerable to an 'at-rest' attack, as their public keys have already been exposed on the blockchain.