The Difference Between Encoding, Encryption and Hashing.
By: Aditya Shukla
Tags: Encoding, Encryption, Hashing, Web Development, Cryptography

Encryption:

One can not imagine the internet without Encryption. The Internet would have been a way less secure place without it. The Data on the internet is kept confidential and secure using Encryption. Encryption makes the data unreadable and difficult to decode for an attacker and prevents it to be stolen.

Encryption makes use of “Cryptographic Keys”. Using the key, the data is Encrypted at the sender’s end and using the same or different key, the data is Decrypted at the receiver's end. Based on the type of the Key being used for encrypting/decrypting the information, Encryption is classified into two categories:

- Symmetric Key Encryption

- Asymmetric Key Encryption

Let’s look into these two types of Encryption techniques:

Symmetric Key:

The Symmetric Key Cryptography approach is straight forward. Before sending out the data over to the receiver, the sender uses a Private key to cipher the data. This Private Key is known only to the Sender and the Receiver. So, once the receiver gets the encrypted data, he or she uses the sender’s same private key to decrypt it. Since the sender and the receiver uses the same key, this is known as “Symmetric Key” cryptography.

Source: medium.com/@manassav

Yes, there are plenty of benefit of using this technique for encryption, for instance, the simplicity of this system provides a logistical advantage as it requires less computing power. Also, just by increasing the length of the key can easily help in scaling up the security level of the system. But the problem of using this technique is already visible to us. How is the receiver going to know what is the secret key using which the data was encrypted at the first place? For him to know the key, the sender has to send the Key as well. Got the problem? Yes!! The sender has to transmit the key to the receiver as well, and if it is done over an unsecured connection, there is a high chance that they key can be intercepted by any attacker.

2. Asymmetric Key:

To counter the problems of using Symmetric Key Cryptography technique, the Asymmetric Key Cryptography technique is used. It is a relatively new technique compared to the previous one. As you can guess from the name itself, this technique involves two different keys. One key is used for encrypting the data, which is known as the Public Key, and is known virtually everyone on the internet. The other key is used for decrypting the data, which is known as the Private Key, and is known only to the receiver and it must be kept discreet. Therefor the use of two distinct keys, makes the system more secure and it becomes way too difficult for an attacker to crack it.

The Public and Private keys are real Keys to a lock. These are basically two very large Prime Numbers that are mathematically related to one another. I.e. Whatever is encrypted by the Public Key, can only be decrypted by the related Private Key.

One can not simply guess the Private key based on knowing the Public Key.

Some well known Algorithms for Asymmetric Key Cryptography are:

RSA, DSS (Digital Signature Standard), Elliptic-Curve Cryptography, etc.