- Toshendra Kumar Sharma
- December 06, 2018
The tech world is a rapidly evolving landscape where the most cutting edge technology of today can become obsolete almost overnight. Keeping that in mind, we must ask the question of what emerging tech has the potential to disrupt blockchains. By doing so, we can plan for those changes and use the information to design even more resistant blockchains. Blockchains rely on symmetric as well as asymmetric cryptography to function. Asymmetric cryptography, also referred to as crucial public cryptography relies on a pair of keys for encryption. It is susceptible to quantum attacks from computers of the future. Let’s take a look at how quantum computers can pose a threat to blockchains and what changes can prevent that threat.
Public Key Cryptography and Shor’s Algorithm
Blockchains such as Bitcoin rely on public key cryptography for generating public and private keys used in signing and verifying signatures. Bitcoin private keys are generated using the product of two very large prime numbers. This is where the security for RSA encryption is used, in Secure Socket Layer (SSL) for web security. The fact that it’s straightforward to go from large prime numbers to their products, however, it is very difficult to go the other way. In fact, with the computers of today, it would take 2256 steps to break symmetric cryptographic algorithms like SHA-256. Public keys are then generated from private keys by applying Elliptical Curve Cryptography to them. This is an irreversible operation which means, given the outcome (public key) and the generator point, there is no way to calculate the input (private key). The addresses are then generated from public keys, by hashing the public key twice (first with SHA256, then with RIPEMD160). This creates a public key hash, which is then encoded with Base58Check to get the bitcoin address.
The process to generate irreversible public keys described above is safe from current classical computers because of the sheer number of steps it would take to guess a private key successfully. That is because present-day computers rely only on 0’s and 1’s to make binary decisions which are then combined to do complex computations. On the other hand, quantum computers rely on the uncertainty within the atoms to significantly increase the efficiency of calculations and therefore aren’t limited by binary computational states. This allows quantum computers to speed up some calculations by more than a million times. One of such applications for quantum computers is employing Shor’s algorithm for the factorization of large prime numbers. The process of prime factorization described above which takes 2256 to solve using present-day computers can be reduced to a mere 1283 steps using Shor’s algorithm. Breaking asymmetric cryptography would, therefore, open up Bitcoin to all kinds of malicious spend attacks. The threat to symmetric cryptography that is used in hashing the keys is less pronounced with the decrease in step being equal to half that is from the current 2256 steps to 2128 steps.
Are Blockchains Future Proof?
The proliferation of quantum computers will pose not only a threat to blockchains but also almost every other form of web encryption currently employed. The good thing is that Bitcoin’s modular designs allow both of its cryptographic elements to be upgraded as needed. The algorithms for hashing and signing are both being researched to make them quantum computing resistant. Experts in the cybersecurity community believe that the current standards of cryptography have at least a good 20 years before they’re made obsolete by quantum computers. At the same time, projects such as the Quantum Resistant Ledger have been designed from the ground up keeping the threat of quantum computing in mind. QRL ensures protection against quantum computing in the future by employing a much more complicated process for generating private keys using hash-based cryptography as opposed to prime factorization. The Bitcoin community has also considered switching to a similar way of generating keys and is actively evaluating alternatives. As for the mining portion of Bitcoin, Proof of Work can easily be upgraded to a combination of different hashing algorithms which use a time divided allocation of hashing to CryptoKnight and Proof of Work.