The Quantum Threat to Bitcoin: How a 9-Minute Window Can Compromise Your Funds
Understanding how a quantum computer works is not enough to comprehend the threat it poses to bitcoin. To grasp this, it's essential to know how bitcoin's security is built and where its weaknesses lie. This article delves into bitcoin's encryption, the role of elliptic curve cryptography, and how a quantum algorithm can break it. The security of bitcoin relies on a one-way map, where a private key is used to derive a public key through a mathematical operation on a specific curve called 'secp256k1'. This process is easy to perform in one direction but virtually impossible to reverse using classical computers. However, a quantum algorithm known as Shor's algorithm can efficiently solve the discrete logarithm problem, thereby breaking the security model. Shor's algorithm exploits the properties of quantum mechanics, including superposition, entanglement, and interference, to find the period of a function that is crucial for deriving the private key from the public key. The recent paper by Google's Quantum AI division has reduced the estimated number of qubits required to run Shor's algorithm against bitcoin's elliptic curve from millions to fewer than 500,000. This reduction, along with the introduction of a practical attack scenario, changes the perspective on the quantum threat to bitcoin. The attack scenario involves precomputing parts of Shor's algorithm that depend on the elliptic curve's fixed parameters, allowing the quantum computer to sit in a primed state and finish the calculation once a target public key appears. Google estimates that the second half of the calculation takes about nine minutes, which is close to bitcoin's average block confirmation time. This creates a narrow window for a quantum attacker to derive a private key and submit a competing transaction. The implications are alarming, with approximately 6.9 million bitcoin already exposed and vulnerable to an 'at-rest' attack that does not require racing against the clock.