Cryptography Simply Explained
What is Cryptography?
Cryptography is the art of secret writing by encrypting sensitive information using codes and algorithms.
The main goal of cryptography is to make sensitive data not readable by third parties. Only the sender and receiver can read or understand that data.
In cryptography, crypt means “hidden” and graphy stands for “writing” which shows the cryptography meaning as hidden writing.
Types of Cryptography
Symmetric Key Cryptography
In symmetric key cryptography, There is only one secret key is used for encryption and decryption of the message.
By using this secret key the algorithms convert the original message into the fixed length of bits known as a block cipher.
The same secret key which is used by the sender to encrypt the message is transferred to the receiver through a secure channel, then after receiving the secret key successfully, the receiver can decrypt the message by using this secret key.
It gives rise to the key distribution problem due to sender has to send the secret key to the receiver through the secure channel.
Asymmetric Key Cryptography
In Asymmetric key cryptography, there are two different keys used for encryption and decryption of the message.
These two different keys are named as the public key and the private key. Here the public key is known to everyone but the private key is only owned by the receiver.
The public key is used to encrypt the message by the sender and the private key is used to decrypt the message which is only owned by the receiver. So no other person can decrypt that message, not even the sender.
This type of cryptography is widely used in the cryptocurrency world and even bitcoin concept has used this type of cryptography technique.
It is used in the transmission of email files, social media communication, in the remote server connections and the “https” protocol used it to secure information on web communication.
Hashing is the one-way encryption where no secret key is used as no need for decryption.
Usually, hashing used the hash function which changed the original message into a random unreadable text string of fixed length known as a hash.
This text string of fixed length can be used to check the validity of the message that it was tampered or not by eves.
There is no way to obtain the original message from the hash string.
This technique is used in the blockchain technology as it helps to check the validity of the whole blockchain which can be verified just by comparing the single hash to the peers on the network and no need to verify the whole data of blockchain.
Functions of Cryptography
Modern cryptography is implemented by using the four primary cryptographic functions:
The Receiver can confirm the validity of the message that it was created by the original sender and not tampered with.
It is like a sender sends a message by encrypting it with his private key and the receiver can confirm that message by decrypting the message with the sender’s public key.
Example- The SSL certificate (‘https’) of the web server validates the proof of the connection of the user to the right server.
Third parties are not able to access or understand the original information or data due to the strong encryption of cryptography.
Your information or data is secured even after it leaked to the other people.
It must be ensured that data is not tampered or altered by eves during transmission or storage.
Cryptography Hashing technique is used for the data integrity check where the hash is used to ensure safe storage or transmission.
The owner or sender of information has no way to deny the ownership of that information.
The sender can never be denied that the message or data not created by him.
Like, someone promised to pay later for a product and will deny in the future that he/she didn’t promise anything. In this situation, if cryptography is used then he/she could never be denied his promise as the transaction was signed by him cryptographically.
How does Bitcoin prevent a 51% attack?
Bitcoin is designed in such a way that 51% attack seems to be not likely to occur on the bitcoin blockchain and if 51% attack performed successfully on bitcoin then it would not be profitable for an attacker.
Bitcoin Hash Rate Distribution
- Bitcoin is the only cryptocurrency having the support of enough hashing power from a large number of miners throughout the world.
- The Majority of Hash power on the bitcoin network is not controlled by a single entity and all hashing power is distributed globally in small ratios. BTC.com pool has maximum of 18.9% hash-rate. Check-in picture above.
- As bitcoin transactions are time-stamped on the blockchain and every single transaction is related to the previous transactions mathematically, which makes them irreversible and impossible to tamper with.
- Due to the very high hash rate of bitcoin blockchain attacker need to spend a lot of money to perform a 51% attack on bitcoin blockchain which is more likely to be failed.
A 51% attack would be helpful in double the spending of coins on the blockchain.
An attacker would not able to destroy the blockchain or the whole network as it is the short-term attack on blockchain.
More powerful blockchains like Bitcoin not likely to be suffering from 51% attack.
Bitcoin Hash Rate Distribution