In this post, I would like to explain the fundamental concepts of cryptography used in blockchain technology. we hear a lot about hashing functions, private keys, and cryptographic linking. These are extremely important concepts to understand if you want to get the full picture of the blockchain. Remember that blockchain is a technical subject that has applications in the real world. In order to make informed investment decisions, It’s important to spend the time to understand technical topics.
First of all, what’s a hash function? a hash function is a mathematic function with a particular property. It’s a one-way function. meaning if you have an input you can compute the output using the function but the reverse is impossible. Having an output, you cannot figure out what the input of the function is. Another property of the function is the uniqueness of the output. It’s a one to one relationship between the input and the output.
Even if I use an input in a singular, a hash function can accept multiple inputs and produces one output. It’s like a digital signature of the inputs. An input can be any data, a file, a video or a list of transactions.
To accept and use a hash function, this one should be tested for many years and challenged by many experts to try to break without success. It’s extremely difficult to create a good hash function so you should always use the tested standardized ones out there.
Thinking about the properties of a hash function, you can imagine what kind of application this function could have. Any application where it should be very easy to verify something having the input. But extremely difficult to reconstruct the input from the output. The only way to solve the hash function is to try every single input until you find the right one given the output. Keep that in mind, it will make more sense when I will talk about bitcoin.
Private/Public Key Cryptography
Public and private keys are concepts widely used in cryptography for different purposes. They can be used to transfer data securely or in case of bitcoin to sign transactions. As their names say, the private key cannot be shared with anyone. And the public key can be shared publicly and it’s related to the private key.
To send data securely, a sender must use the public key of the receiver to encrypt the data. And the receiver uses his private key to decrypt. Only the private key of the receiver can decrypt the data since it’s his public that has been used to encrypt it.
To sign transactions. the owner uses his private key. The public key is used to receive tokens on the blockchain since it’s related to addresses. And it can, of course, be shared publicly.
The following drawing explains these two use cases simply:
Cryptography is the basis of the blockchain. it is the synonym of security in computerized systems especially when there is no central authority. Cryptography is what guarantees the immutability of the blockchain. Understanding these concepts is crucial in order to grasp the full meaning of the blockchain revolution.