The Quantum Threat to Bitcoin: How Your Cryptocurrency Could Be Stolen in Under 10 Minutes
The first part of this series delved into the principles of quantum computing, but understanding how it works is not enough to comprehend its potential to steal bitcoin. To grasp this, one needs to know what quantum computers are attacking and where the weakness lies in bitcoin's security. This piece begins with an examination of bitcoin's encryption, explaining how it works and why a quantum algorithm can break it, as well as the significance of Google's recent quantum computing paper. 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 process is akin to a one-way map, where starting from a known point, taking a certain number of steps defined by the curve's math leads to the public key. While going forward is straightforward, reversing the process is virtually impossible for classical computers. However, in 1994, mathematician Peter Shor discovered a quantum algorithm that efficiently solves this problem. Shor's algorithm converts the task of finding the private key into a problem of finding the period of a function. Quantum computers are particularly adept at this due to their ability to exist in multiple states simultaneously, apply functions to all possible inputs at once, and filter out incorrect answers through quantum operations like the Fourier transform. The attack relies on three key quantum properties: superposition, entanglement, and interference. Despite Shor's algorithm being known for over 30 years, its implementation has been hindered by the requirement for a large number of stable qubits. Recent research by Google has significantly reduced the estimated number of qubits needed, from millions to fewer than 500,000. This reduction comes with the introduction of a practical attack scenario that changes the perspective on the quantum threat. Parts of Shor's algorithm can be precomputed, allowing a quantum computer to sit in a primed state, ready to finish the calculation once a target public key appears. Google estimates this second half of the calculation takes approximately nine minutes, which is alarming given bitcoin's average block confirmation time of 10 minutes. This creates a window of opportunity for a quantum attacker to derive a private key and submit a competing transaction. The bigger concern is the vast amount of bitcoin already exposed and vulnerable to an 'at-rest' attack, which does not require racing against the clock. A quantum computer can turn a public key into a private key, controlling the associated coins. For coins transacted since the Taproot upgrade, the public key is already visible, making them susceptible to attack. Understanding the practical implications of this vulnerability and how the hardware is closing the gap is crucial for the future of bitcoin security.