If you are reading this article, you are certainly interested in the topic of cryptocurrencies such as Bitcoin (BTC) or Ethereum (ETH). In this connection, we want to ask you a question: have you ever wondered why the word “cryptocurrencies” contains the term “crypto”? Of course, it comes from another well-known word – “cryptography”. So what does cryptography and cryptocurrencies have in common? Read on to find out!
Are cryptocurrencies secure?
Cryptocurrencies operate on blockchain technology. This means that in order to make a transaction, such as sending a certain amount of money to a certain recipient, you need to register it on a publicly accessible blockchain. This transaction is authenticated by your electronic signature. This signature is a guarantee of the security of the transaction in question – it proves that the transaction was sent by a verified sender, and thus that it has not been forged. What makes it special and unique? The digital signature is created using a hash algorithm and asymmetric encryption. At this point, we move seamlessly into the concept of cryptography.
How does hashing and asymmetric encryption work?
Cryptography is a scientific discipline that explains how to transmit information while protecting it from unauthorised access. In other words, cryptography teaches how to encrypt messages. One way to encrypt information is through hashing, while another is through asymmetric encryption. In this paragraph, we will explain both of these concepts.
Let’s start with hashing using the example of the most popular cryptocurrency today, Bitcoin (BTC). Hashing involves applying an algorithm that irreversibly converts input data into unique output data. Bitcoin uses the SHA256 algorithm, which converts the input data into 256 binary digits, or combinations of zeros and ones.
The next concept we will explain is asymmetric encryption. Each cryptocurrency wallet is equipped with two keys: a public key and a private key. When you transfer funds to another user, your transaction is encrypted asymmetrically with the public key. Only the user who has the private key corresponding to the public key can decrypt it. This is what asymmetric encryption is all about. Let’s try to trace the whole process using a simple example.
Karolina would like to send 5 Bitcoins (BTC) to Paul. The message sent by Karolina contains the following information: input and output data, a link to previous transactions and an encrypted message with an electronic signature. Paul, on receiving the transaction, needs to authenticate it. He therefore performs two actions. First, he decrypts Karolina’s electronic signature using her public key. Paul possesses the first hash. Then, Paul uses a hash algorithm on the message coming from Karolina. In this way, he obtains the second hash. If the two hashes are the same, the transaction is authenticated. This way Paul knows that the 5 Bitcoins were really sent to him by Karolina and that no one interfered with the message she sent.