Chaitanya Reddy

tech, philosophy and cooking

27 Jul 2021

How Bitcoin Can Provide Stimulus To Quantum Computing Development

The impact of quantum computing on bitcoin became a topic of interest in cryptocurrency communities. In this article, let’s focus solely on how quantum computing could endanger bitcoin’s security, and also how it can act as a stimulus to quantum computing development. Before jumping in, let’s briefly discuss the paradigms: Classical Computing, Quantum Computing, and Bitcoin.

Classical Computer: A classical computer uses zeros and ones to perform calculations. It uses transistors, which can be either on or off, just like a light switch.

Quantum Computer: A quantum computer uses something called qubits, instead of transistors. Qubits have a special property called superposition, by which they can be both one and zero at the same time. This allows a quantum computer to explore several probabilities at the same time.

Bitcoin: Bitcoin is a decentralized digital payment system, based on cryptographic technologies. Bitcoins can be sent from wallet to wallet on its peer-to-peer network and verified by network nodes before recording the transaction on its decentralized, distributed and public ledger called the blockchain.

Bitcoin is based on asymmetric key (or public key) cryptography, which consists of two keys: a private key and a public key. The private key will only be known by the wallet owner, whereas the public key will be shared when bitcoins are spent. The bitcoins owners will sign their transactions using private keys, and everyone else can verify the authenticity of these transactions using the public key. Bitcoin uses Elliptic Curve Digital Signature Algorithm (ECDSA), along with SHA-256 and RIPEMD-160, for security.

To be able to better gauge the impact of quantum computing, let’s understand the creation and working of bitcoin wallets, in detail. Firstly, an ECDSA private key and the respective public key are generated from a seed phrase. The public key will be hashed using SHA-256. The result of SHA-256 hashing will be hashed again using RIPEMD-160. Then, a version byte at the front and a checksum at the end will be added to the RIPEMD-160 hash. Finally, this byte string will be converted to a base58 string using Base58Check Encoding, for human readability. This final base58 string acts as a wallet address, which can be shared to receive bitcoins.

The impact of quantum computing on bitcoin’s security

The current ECDSA asymmetric encryption used by bitcoin is vulnerable to quantum computing. Once we know the public key of the wallet, it can be run through Shor’s quantum algorithm to get the private key by computing discrete logarithms. If the wallet has never performed any transactions and the public key is not revealed, it takes a much more powerful quantum computer to break both RIPEMD-160 and SHA-256 to decode the public key from the wallet address, with Grover’s quantum algorithm that exists today. Once quantum computers take up, we might find a better quantum algorithm to break these with less powerful quantum computers.

How bitcoin might fix this

As this issue is already being taken seriously today, as soon as the developments in quantum computing speed up, bitcoin protocol might undergo a fork, to replace the quantum vulnerable ECDSA encryption with quantum-safe encryption. As this change won’t affect the decentralization or other fundamentals, it shouldn’t be controversial and could result in a soft fork.

The stimulus for accelerated development of quantum computing

Once the bitcoin protocol is updated, bitcoins must be moved from old wallets to new wallets, created with quantum-safe encryption algorithms. All the bitcoin holders, who have access to their wallets will move to new wallets before the powerful enough quantum computers are built. At the time of writing this article, 18.7 million bitcoins are mined, of which an estimated 3.7 million bitcoins are in wallets, whose private keys are lost by their owners. Which are currently valued at 141 billion USD. Once all the accessible bitcoins are transferred to new wallets by respective owners, these 3.7 million bitcoins will be up for grabs by whoever will be first to build the powerful quantum computer to run slightly modified Shor’s quantum algorithm to break ECDSA encryption, which is the basis of all the bitcoin wallets that exist today. According to a research note published by Cane Island Alternative Advisors, 4% of available bitcoins are lost every year, which will add up to the stimulus over the years.

On the contrary, if such a colossal amount of bitcoins end up with a single party, it might destabilize the price of bitcoin. In a worst-case scenario, multiple hard forks are also a possibility, when the community couldn’t agree on single replacement encryption, which can sabotage the bitcoin’s stability. All other cryptocurrencies that exist today might have a similar impact from advancements in quantum computing.