Hashed or Encrypted- How Do You Like Your Data Protected
Perhaps, the two important things most people want when sending or receiving data on the internet, right now, are privacy and security.
We want to let the people we are sending these data to know that they are being sent from us, and not from anyone else.
We also want our data to be well received exactly the same way we sent them, without anyone tampering or making modifications to them, along the way.
You might wonder why you would need to protect your data or messages when, after all, it is probably still going to get to the receiver at fast speed, leaving no time for any form of attack in between.
But it might surprise you to learn that hackers, and all other types of cyber criminals there are out there, can easily intercept your data or messages without you even knowing it.
And so, you would need some sort of protection or shield to escort your messages, en route to their location.
So, how exactly can this be done?
Well, either by hashing or encryption. And although, they might come off as concepts from the same pod, they are very different from each other.
Now, let’s unravel what those differences are by beginning with hashing.
Imagine you wanted to cook Jollof rice for your family. You have all the ingredients spread out on the counter in front of you. Your rice, tomatoes, your pepper, and so on.
Your ingredients here are like plaintext in the cryptographic world. When you entangle these ingredients in the process of mixing and cooking, you’re feeding them into an algorithm. This algorithm then produces a delicious Jollof meal.
Now, your family members who want to eat this rice can only go as far as guessing what and what you added to make it taste the way it is now, or rather, your “secret ingredient”, but they can’t necessarily revert it back to its initial phase to see it.
Your rice here has now been converted to a hashed format.
Hashing protects the integrity of your data, and this whole process comes down to the responsibility of the Hash algorithm. The algorithm creates a string of special numbers from your data (ingredients), or the texts in your messages, rather.
Hashing is quite relevant in situations where you might want to compare an entered value with a stored value, without necessarily opening the original content to read it.
For example, hashes take ordinary passwords and turn them into garbled up texts for storage, so that cybercriminals like hackers, who want access to your database, are then forced to decipher the now hashed values, in order to read them and find out what the real password is.
So basically, hashes slow down cyber attackers.
Which brings us down to what Encryption is. Encryption is what should keep your data or messages secure and strictly confidential by transforming them into a highly unreadable format, so that no hacker or cyber criminal can steal it or control it, or even just read it without permission.
Encryption of data is done through the help of cryptographic keys. Your messages have to first be encrypted before they are finally sent to a receiver, which in turn, the receiver has to decrypt, in order to gain access to the information within.
Decryption is basically the conversion of the encrypted data back to its original form, or back to a readable or plaintext format. This allows the receiver to be able to read the message intended for him or her.
For example, you might notice the tidbit of information in any WhatsApp conversation tab that says your messages are protected by end-to-end encryption, and not even WhatsApp itself can read what you send.
So if you were to send “Let’s not invite Seyi to the hangout because she’s lousy” to Tina, you can be rest assured that your little gossip session is surrounded by confidentiality.
And if anyone were to intercept your messages, all they would see are incorrigible entanglements of codes, and not the real text you sent.
Encryption can be grouped into two popular types; symmetric and asymmetric encryption.
The symmetric encryption is one where data is encrypted and decrypted using one single cryptographic key.
This means that the key that is being used for encryption is also going to be used for decryption.
While in asymmetric encryption, there are two separate keys in use, one for encryption and one for decryption (the public key and the private key).
This article should explain it better.
The Major Difference Between Encryption and Hashing.
Hashing is a one-way encryption method. This means that once data, or your plaintext, is converted into a hashed format, it is almost impossible to use any form of key to decode the information.
The receiver, or the receiving server, doesn’t necessarily have to decrypt it to read it or understand it. This is why password protection often recruits the help of hashing.
Any attacker cannot recreate a hashed password, and even if they somehow gained access to the hashed version, they would only just be staring at weirdly jumbled up codes and not the real password itself.
Encryption is quite the same. Like hashing, encryption makes use of algorithms to create foolproof codes to hide sensitive data, but it differs where it also allows for multi-party access because the converted file format can always be reconverted to plaintext by anyone with the right key. This is, however, not possible with hashing.
Once a file is hashed, it cannot be reconverted. This is because a server receiving the password only needs to compare the numerical figures generated from the hashed password with what it has in its database to authenticate it.
In conclusion, the essence of encryption is to safely deliver data to its destination, in the process, ensuring confidentiality, while the goal of hashing is to verify and authenticate data, thereby protecting its integrity.