Hope you are well folks. đź™‚

In this article, I am going to discuss about hash functions, properties of hash functions, attacks on hash functions, and which algorithm we are using to validate file content’s integrity and what are the next algorithms actively being developed to calculate hash.

Before I move further, it would be great if I tell you what are the hash functions and why on the earth they are needed !!

What is hash function ?

Hash function is an algorithms which converts input to a data which is unique to only that input and can not be reversed engineered.

More formal definition can be found here.

Now let’s try to convert this concept in mathematical expression.

Suppose input we will give to hash function is **“Let me know what is my hash”,Â **and we are representing it with constant **“M”,Â **and hash data for inputÂ **“M”** is **“9F5746A67A7FE4F15333381F00250431”.Â **Then we can write something like,

Hash(M) =Â 9F5746A67A7FE4F15333381F00250431, if M=Â

“Let me know what is my hash“

if we be more abstract and map our input and generated hash code with constants then we can do something like,

Hash(X) = H where M is the input and H is the generated hash

Basically, there are 3 properties which hash function should satisfy. IfÂ function or algorithm is satisfying these properties then and only then we can say it’s a hash function.