This article is part of Blockchain Tutorials series where you will get the introductin of cryptography concept.
We all understand till now that blockchain is immutable and information stored in that is secured.
Cryptography is a mechanism or a science to make that information secure. So cryptography is used to make the information is more secured in blockchain.
Let's take one example to understand this cryptography introduction.
Suppose we have two persons (Mark and Jennifer). Mark need to send the message to Jennifer.
If Mark is not using any cryptography then he will be able to send a message in a plain text format and the drawback is that without cryptography anyone sees the information.
So what is the issue with sharing the information in plain text because in today’s world information is very important as anyone can steal the information and misuse that. If the information is business information then that information can be used by competitors.
So cryptography is must.
It should be there whenever we share any business information or any critical information from one person to another person or from one entity to another entity.
Now with the help of cryptography the information which we are sharing between Mark and Jennifer it becomes secured.
Encryption in Cryptography
Encryption is the process to encrypt the information with the algorithm so that information is not in plain text rather it shows some junk characters.
Example when Mark send “Quote is 10 Million $” to Jennifer and after encryption you see something like “86868ghghgff8778” depends upon which algorithm you use.
Signing in Cryptography
Signing is the process to ensure that message or information from right person. In this process, sender sign the message with his/her identity and then receiver verify the identity once receive the message to make sure that message came from correct person.
Now question comes how we encrypt and sign the information in cryptography. So let’s understand that.
There is concept of Keys and there are mainly two types of keys in cryptography that helps to encrypt and sign the information.
- Public Key
- Private Key
A public key is available publicly and published by the private key owner. Anyone who would then like to send the publisher of the public key an encrypted message can do so by encrypting the message using the published public key and sending it to the holder of the private key. No one else would be able to decrypt the message because the corresponding private key is held securely by the intended recipient. Once the public key encrypted message is received, the recipient can decrypt the message using the private key.
This basically a randomly generated number that is kept secret and held privately by the users. Private key needs to be protected and no unauthorized access should be granted to that key; otherwise, the whole scheme of public key cryptography will be jeopardized as this is the key that is used to decrypt messages.
You can also check blockchain interview questions.