Encoding Vs Encryption Vs Hashing

Sebastian Louis
3 min readSep 13, 2018

--

Sometimes people, even with IT background get confused over Encoding, Encryption and Hashing. Let’s have a quick look at these things.

Encoding

As you know, computers only understand machine language which is nothing but bits and bytes. It doesn’t understand the text, image, audio or video you play with it. So we have to convert the data (text, audio, video, images etc.) into a form which computers can understand. Encoding is the process of converting data from one form to another so that it can be properly consumed by a different type of system. Encoding does not guarantee the secrecy of the information. It ensure that the information is properly transferred. Another point to be noted that, it does not require any sort of KEY to perform the process.

So In short, encoding is the process of transforming or converting data in order to transfer the data between different systems like sending email between two computers. Reverse process of encoding is called decoding.

Example : ASCII, Unicode ( different formats like UTF-8, UTF-16, GB18030), URL Encoding, Base64.

Encryption

Encryption is also a process of transforming data from one form to another. But the primary objective or goal is to keep the information secret. That means encryption guarantees the secrecy of the information. Unlike encoding Encryption requires a KEY to covert the data. Reverse process of encryption is called decryption.

Example: Triple DES, AES, Blowfish, Twofish, RSA

Hashing

Hashing is the process of generating an arbitrary value from a set of data using some complex mathematical function. Hashing’s primary goal is to ensure the integrity of the data. Which means it would be easy to detect whether somebody has altered the contents of the data. As mentioned before, hashing generates an arbitrary value form the data. The major rules of hashing is given below

1. The same input will always produce the same output.

2. Multiple disparate inputs should not produce the same output.

3. It should not be possible to go from the output to the input. That means like encoding or encryption you cannot convert the hash data back to original value

4. Any modification of a given input should result in drastic change to the hash.

For example, you can create a hash value from the entire content of Bible. If someone changes a word in the bible will produce a different hash value. Hashing algorithms are the backbone of block chain technology.

Examples: SHA-1, SHA-2, SHA-3, MD5, SHA-256 etc.

--

--

Sebastian Louis

Programmer | Engineering Lead | Technologist | Cinephile