0
7.5kviews
Explain cryptography hash function criteria and compare MD-5 and SHA-1.
1 Answer
1
255views

Cryptographic Hash Function

  • Cryptographic hash function takes a message of arbitrary length and creates a message digest of fixed length.
  • The cryptographic hash function h(x) criteria are as follows:

Compression: For any size of input x, the output length of y = h(x) is small. Hash functions produce a fixed size output regardless of the length of the input.

Efficiency: It must be easy to compute h(x) for any input x. the computational effort required to compute h(x) will certainly grow with the length of x, but it should not grow too fast.

One-way: Given any value y, it is computationally infeasible to find a value x such that $h(x) = y.$ It is difficult to invert the hash.

Weak collision resistance: Given x and h(x) it is infeasible to find y with $y ≠ x$ such that $h(y) = h (x).$

Strong collision resistance: It is infeasible to find y with $x ≠ y$ such that $h(x) = h(y)$.

Comparison between MD-5 and SHA-1:

Parameters MD-5 SHA-1
Message digest size Message digest 128 bits Message digest is 160 bit long.
Speed Faster because of size Slower compared to MD-5
Brutte force attack possibility Brute force attack is of the order $2^{128}$ Brute force attack is of the order $2^{160}$
Collision Difficulty in producing same digest is $2^{64}$ Difficulty in producing same message is $2^{80}$
Secure Less secure More secure
Cryptanalytic attack Vulnerable to cryptanalysis attack Non-vulnerable to cryptanalytic attack
Buffers used Four buffers of 32 bits each Five buffers of 32 bits
Format No format used Big endian format used to store values
Please log in to add an answer.