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.