We cannot do without hash functions in almost every information security application; specifically cryptography and network security. So what is hash function and why are they relevant? It is a mathematical utility that converts a numerical entry into another compressed one. The length on the input side can be random but on the output side there has to be fixed length. A Message Digest (MD) or hash value is the value returned by a hash function.

So now we know what is hash function; how about its features? The most vital feature of a hash function is its Fixed Length Output or rather, “Hash Value”. Arbitrary length of the hash function will be converted to fixed length. Doing this is the process known as “Hashing Data”. Most of the time the hash is a bit reduced compared to the input data. By virtue of this, the hash function is often referred to as a compression function. The ‘digest’ acronym stems from the fact that it is a tinier form of a larger piece of data. Hash functions usually churn out values ranging from 160 bits to 512 bits.

The hash function’s efficiency of operation is also a key aspect. The hash function has to be very fast. It has been proven that hash functions are considerably faster than the customary symmetric encryptions.

## Hash Function Properties

In cryptography and network security, hash functions should at the every bare minimum possess some desirable properties. Pre – image resistance is one of these properties. In essence, this property dictates that the hash function should be extremely hard to reverse in terms of computation. The end result can be very visible; but the procedure with which it was arrived at should be almost impossible to decipher. It is this property that derails hackers from breaching the system even when they somehow get to the hash value. Even the luckiest hackers will still have to establish what the input was to arrive at the hash value.

Up next is the Second Pre – Image Resistance. Once an input is obtained together with its hash, you can never find a different input with a similar hash. This eliminates “accidental” hacks within cryptography and network security systems. Even hackers who somehow lay their hands on the input and the hash function cannot just substitute values and automatically decipher the key.

Collision Resistance is also a vital aspect in cryptography and network security applications. A potential hacker should not be able to get two distinct inputs of a random length resulting in the same hash. You may encounter this property in the name of collision free hash function. Due to the fixed hash length it is literally impossible for hash functions to create a collision zone of sorts. Collision is completely eliminated because a hacker cannot find two input values that share the same hash. So, what is hash function?