Hash Function
Hash Function
Hash Function
Hash Function is a function that has a huge role in making a System Secure as
it converts normal data given to it as an irregular value of fixed length.
We can imagine it to be a Shaker in our homes. When we put data into this
function it outputs an irregular value. The Irregular value it outputs is known
as “Hash Value”.
Hash Values are simply numbers but are often written in Hexadecimal.
Computers manage values as Binary. The hash value is also data and is often
managed in Binary.
Hash Function
Data integrity: Hash functions are useful for ensuring the integrity of data, as any
changes to the data will result in a different hash value. This property makes hash
functions a valuable tool for detecting data tampering or corruption.
Message authentication: Hash functions are useful for verifying the authenticity of
messages, as any changes to the message will result in a different hash value. This
property makes hash functions a valuable tool for verifying the source of a message and
detecting message tampering.
Password storage: Hash functions are useful for storing passwords in a secure manner.
Hashing the password ensures that the original password cannot be recovered from the
hash value, making it more difficult for attackers to access user accounts.
Fast computation: Hash functions are designed to be fast to compute, making them
useful for a variety of applications where efficiency is important.
Disadvantages:
Both MD5 stands for Message Digest and SHA1 stands for Secure Hash
Algorithm square measure the hashing algorithms wherever The speed of MD5
is fast in comparison of SHA1’s speed.
However, SHA1 provides more security than MD5. The construct behind these
hashing algorithms is that these square measure accustomed generate a novel
digital fingerprint of knowledge or message that is understood as a hash or
digest.
MD5 and SHA1
S.NO MD5 SHA1
MD5 can have 128 bits length of message Whereas SHA1 can have 160 bits
2.
digest. length of message digest.
The speed of MD5 is fast in comparison While the speed of SHA1 is slow in
3.
of SHA1’s speed. comparison of MD5’s speed.