Bitcoin and quantum computing are, without a doubt, two of the most disruptive technologies of our era. While Bitcoin has revolutionized the concept of digital and decentralized money, quantum computing promises to transform the way we process information, with profound implications for cryptography and the security of digital systems. Hence the importance of knowing and understanding how these two technologies interact and transform our world, but above all, knowing and understanding how crucial quantum computing is to the future of Bitcoin, the future of cryptography in general, and that of our digital security.
And quantum computing, that branch of computing that uses quantum mechanics (developed since the beginning of the 20th century) to accelerate data processing to levels never seen before, thanks to the use of qubits (a form of data representation modeled in a quantum-mechanical system) instead of traditional bits, has the potential to solve complex problems much faster than classical computers.
A situation that poses both opportunities and challenges for Bitcoin and our digital world in general. On the one hand, quantum computing could improve our entire knowledge of the Universe and the dynamics of things, including cryptographic systems, and at the same time, it gives us the key to breaking everything we have built up to now. To put it more directly: quantum computing can lead us to a computational revolution like never before seen, but at the same time it becomes a first-class threat to today's computing. A threat that can break our entire digital world, including Bitcoin itself.
But how is this possible? Why is quantum computing such a threat to Bitcoin? Is there any way to avoid this? These and other questions will be answered in this article where you will learn how quantum computing affects Bitcoin.
Bitcoin and cryptography: the foundation of its security
Before we start answering the above questions, let's clarify a few things. First, remember that Bitcoin uses a combination of cryptographic algorithms to ensure the integrity and security of its transactions. In that sense, the two most important algorithms are SHA-256 y ECDSAWe have talked a lot about both algorithms here at Bit2Me Academy. We invite you to read the articles we have developed explaining both so that you have a clearer and more extensive knowledge of them.
But, in any case, the simplest explanation for both concepts is:
SHA-256 or Secure Hash Algorithm 256-bit
This is a hashing algorithm, which is used for block mining and generating Bitcoin addresses. The basic task of this algorithm is to convert any input into a 256-bit alphanumeric string, which ensures that every transaction and block in the Bitcoin blockchain is unique and cannot be altered without changing the resulting hash. Hashes work in a very unique way, and that is that once the content is hashed, it is impossible to know the original text. For example, look at the following string and try to figure out the original hashed message:
39cdd9aeaf7888b295a46f2d151ba800f02e22a310444dc22801bb9b4ea05a49
Difficult, right? Well, that's the idea, that what has been hashed cannot be easily "decrypted" to the point where we can get to the original message. That's why we use hashes as a way to uniquely recognize data, because another characteristic of hashes is that they will always result in the same hash, as long as the data entered is the same.
This is important because SHA-256 is widely used to maintain computer security. For example, a website's SSL certificate always has a SHA-256 hash (or higher, e.g. SHA-512) so that anyone reading the certificate data can verify that the hash is correct and that, therefore, we are dealing with an original certificate and not manipulated. It is a means of data verification, and a very powerful one, which can also be used for other things depending on the algorithms we use. In Bitcoin, for example, we use it to uniquely identify blocks, allowing us to unambiguously identify them and detect whether we are dealing with an original or manipulated block.
Now, do you want to know what the hash message above contains? Keep reading, later we will show you what the “secret” message is.
ECDSA (Elliptic Curve Digital Signature Algorithm)
The second algorithm that is part of Bitcoin's security is the ECDSA signature algorithm. This is used for the generation and verification of digital signatures. In other words, we are dealing with an algorithm that allows Bitcoin users to sign transactions securely, ensuring that only the owner of the corresponding private key can authorize a transaction.
In Bitcoin, for example, each Bitcoin address (e.g. 31s2uanwVDXWkHxpgzhBMKUcQetchTUFzL) has its origin in an ECDSA private key. We call it private because this key is only known (and should only be known) by the owner and creator of that address. This private key is used to unlock the use of the BTC that is within that address, so knowing or controlling the private key allows anyone to spend the BTC associated with that address.
But ECDSA doesn't just have a private key, it also has a public key. This is a key that we can safely share with others, so that other people can send us encrypted data (using the public key that we provide). Think of this public key as an envelope where you can put data and once you seal the envelope, the data you have placed is encrypted in such a way that no one else can read it. That way, only you know the data and messages entered, and the owner/generator of that public key will be able to unlock the message by providing the corresponding private key. As for the rest, no matter what they do, they will never be able to know the message.
Exactly what happens with a Bitcoin address and the wallet that controls it. The wallet is the software that allows us to generate the ECDSA private key and the (infinite) public keys derived from that private key. So you can share your private keys or Bitcoin addresses (which are hashed with SHA-256) without worries, nobody can take your BTC from you, because only you have the private key in your wallet. Now you understand the importance of protecting cryptocurrency wallets, as well as how ECDSA and SHA-256 help us secure Bitcoin.
Security is never perfect
However, the security of this dual system has a weak point. ECDSA works because we used very advanced mathematics in its design using elliptic curves associated with the discrete logarithm problem.
Simply put, ECDSA is secure because the math problem is very complex. If we use the problem with known data, we generate the answer very quickly. But breaking down the obtained answer to find the initial data is “impossible.” And we say “impossible” because even using all the computers and supercomputers in the world, it would take thousands to millions of years to find the correct answer. In short, the computing we use today cannot give us an answer in a humanly achievable period of time.
However, here's the trick: current binary computing can't, but quantum computing can. And this is possible thanks to: Shor's Attack, one of the most well-known quantum algorithms that could put Bitcoin’s security at risk. Developed by mathematician Peter Shor in 1994, this algorithm can factor large numbers and solve the discrete logarithm problem in polynomial time, making it capable of breaking cryptographic algorithms such as ECDSA. This means that a sufficiently advanced quantum computer could derive private keys from public keys, compromising the security of Bitcoin transactions.
How fast? Well, the most recent data on this topic indicate that A quantum computer with 13 million qubits can crack a public Bitcoin address (P2PK type) in 24 hours. It's a lot, but remember that we've gone from lasting millions of years with binary computing, to just 24 hours with quantum computing. From unattainable to achievable in one day, an unprecedented change.
Bitcoin is not the only one in danger
However, the Bitcoin problem would seem like child's play if we understand the problem in its full magnitude. Why? Because ECDSA is not only used by Bitcoin, practically all current communication that you make on the Internet uses ECDSA as a basis to create a secure communication channel. For example, you connect to your bank on the Internet and for this you use an SSL certificate that encrypts your connection between your computer and the bank. Thus, no one can read the data that the bank sends you from its servers, you can rest assured, your information is totally private, between the bank and your PC.
But with a quantum computer, it would only take a hacker 24 hours (or less) to crack the bank's certificate, and from then on, he would be able to listen to any communication the bank makes with its customers over the Internet. Your banking data would be at the mercy of hackers and no one would notice it until it's too late. If that's bad enough, it makes the problem worse: all digital communication would be compromised, nothing would be safe. Now you understand the true and real danger of quantum computing, not only for Bitcoin but for our entire digital life.
Where are we now with quantum computing?
Knowing all this now you might be wondering Where are we with quantum computing and its threat to Bitcoin? By now you've probably heard a lot about Google's new quantum chip: Willow.
Google Willow is certainly a great advance, but not for the reasons that many media outlets that reported the news made out to be. And that is because, Google Willow's real breakthrough is related to handling quantum error correction (QEC) within the chip.
QEC is a complex problem, one that has had researchers working for a long time to solve, as errors in binary computing are problematic, but correctable – in fact, we are very good at it. But in quantum computing, an error is a complete headache. An error in a quantum computer can mean a cascade of errors that increase logarithmically, invalidating any computation performed on them.
In fact, it was not until 1996 that one of the first QEC systems good enough to enable functional quantum computing was designed. The work was done by Robert Calderbank, Peter Shor and Andrew Steane and was named CSS (after the initials of its creators). CSS and its respective evolutions have been the basis of many current quantum computers, but an error margin of up to 30%, with the possibility of increasing as the computer runs for longer or has more qubits, is unacceptable and limits the evolution of the system.
Google's work on Willow radically changes this, and reduces the error margins, but not only that, as more qubits are added to the system, error correction improves and the failure rate is reduced even further. The result? With its 105 qubits, Willow has a margin of error of 0,143% per computing cycle. This has allowed Google to keep Willow running for almost an hour straight without any serious failures. Let's compare, Willow can run for an hour straight, while Sycamore (the version before Willow) could only run for a maximum of 10 continuous minutes without crashes.
This is the current state of quantum computing, not counting, of course, other associated technical problems and challenges. And even with Willow, there is still a long way to go before Bitcoin and our digital world are at real risk.
Potential impact of quantum computing on Bitcoin
Despite this, it is clear at this point that the very real possibility of a quantum computer cracking Bitcoin's private keys poses serious risks to the security of the cryptocurrency and its users. If the private keys are compromised, the funds associated with those keys could be stolen, which could lead to a massive loss of trust in the system. After all, Bitcoin's security relies on users' trust in the sanctity of their transactions. If users begin to doubt the security of their funds due to the quantum threat, this could lead to a drop in the price of Bitcoin and a decrease in its adoption.
However, all is not lost. If we recall the introduction to this article, we talked about Bitcoin having two algorithms that form the basis of its security: SHA-256 and ECDSA. We know that ECDSA is vulnerable to quantum computing, but is SHA-256 vulnerable? The short answer is: quantum computing has the possibility of breaking SHA-256, but the problem is much more complex than ECDSA.
In quantum computing, there is an algorithm called: Grover's algorithm, created by Lov Grover in 1996. This algorithm makes it possible to break SHA-256 with quantum computing, but its application is much more complex than Shor's algorithm, to the point where a computer with 13 million qubits (the same one that could crack a Bitcoin address in 24 hours), could take years to find the correct answer.
So finding the answer to the hash 39cdd9aeaf7888b295a46f2d151ba800f02e22a310444dc22801bb9b4ea05a49 could take a quantum computer a long time, long enough to take measures to more effectively protect Bitcoin and its users. By the way, the message in the hash is: «Cogito ergo sum – Rene Descartes«. You can try it on a online hashing website and verify that this is indeed the original phrase.
But the greatest hope for Bitcoin and its users lies in a reality we see all the time: In Bitcoin, we have long since stopped using pure ECDSA public keys to send transactions. Instead, Bitcoin addresses (e.g. 31s2uanwVDXWkHxpgzhBMKUcQetchTUFzL) use the ECDSA public key and then put it through a transformation process that uses algorithms like SHA-256 and Base58 to synthesize and protect the actual public key. That is, the example address 31s2uanwVDXWkHxpgzhBMKUcQetchTUFzL, is a protected simplification of the actual ECDSA public key, and some of that protection is provided by SHA-256, which effectively protects the address from quantum computing attacks, or at least makes them much harder to carry out.
Other possible responses to the threat
The above already gives us a clear breathing space: quantum computing is not the end of Bitcoin, at least not for a long time. But even with its arrival and evolution, there are other ways to protect ourselves. For example, Bitcoin can be updated to use encryption and digital signature algorithms that are resistant to quantum computing. For example, it can be updated to use zk-SNARKs or zk-STARKs systems that are more resistant. It can also use lattice-based technologies such as Module-Lattice-Based Digital Signature Algorithm (ML-DSA) that are resistant to quantum computing. Another example is Dilithium, a Lattice-based system, which is considered the first post-quantum secure system, to the point that it is part of the United States security standards (NIST).
To sum up, quantum computing represents both an opportunity and a challenge for Bitcoin. Although the quantum threat poses serious risks to the security of the system, the Bitcoin community is taking steps to mitigate it by researching and implementing new cryptographic algorithms. Bitcoin's ability to adapt to the quantum threat will be crucial to its future and its continuity as a decentralized digital currency. The resilience and adaptability of the Bitcoin ecosystem in the face of technological advances demonstrates its potential to remain a disruptive force in the world of finance and technology.
Get started on Bit2Me and jump into the world of cryptocurrencies with a head start. Register easily and get €15 FREE on your first purchase with this link. Don't wait any longer to join the crypto revolution! Join Now