## Monday, October 25, 2021

### Introduction of Hash Function | Properties of Hash Function | Characteristics of Hash Function

Introduction

In hash function H accepts a variable length block of input data called as ‘M’ and produces the fixed size hash value can be represented as h = M(H).

 Figure: Block Diagram of hash function

When hash function provides security, this is called cryptographic hash functions. Hash function protects the integrity of the message. If encryption process is applying on message with hash function, it is also providing authentication and confidentiality.

A hash function provides a property that has function applied on variable amount of data (M) and then it produces the fixed amount of output data. If any bit or bits changes in the data, then whole hash function output data will also change. Cryptographic has function is one-way function, which is practically infeasible to invert. The most popular hashing algorithm is MD5 and SHA.

Properties of hash Function

Compression: As per compression properties, output of the hash function is much smaller than the size of input.

Pre-image resistance: Pre-image resistance means difficult to find the input from given hash function output. i.e., x=H(m). So if x is given, it is difficult to message m.

Weak Collision Resistance: Given message m1, weak collision resistance means that it is difficult to produce another message m2 such that H(m1)=H(m2).  i.e, it means it is infeasible to find two different messages with the same hash value.

Strong Collision Resistance: Strong collision resistance means that is difficult to find any two different messages that hash to the same value. i.e., it means it is hard to find m1 & m2 such that same hash value H(m1) = H(m2).

Characteristics of hash Function

1. It is quick to calculate hash value (h) for any given message. i.e., x = H(m).

2. Hash function (H) can be applied to variable length of data block.

3. A small change in a message should change the hash value.

4. Hash function has one-way property; it is impossible to generate message from given hash value.

5. The hash function uses all the input data.

6. The hash function "uniformly" distributes the data across the entire set of possible hash values.

7. The hash function generates very different hash values for similar message.