Cryptography Hash Function

2. Cryptography Hash Function

A cryptographic hash function is a deterministic algorithm that produces a fixed length block of bits from a variable length input message. The output is usually called has or digest. The most famous hash function is MD5, MD4, SHA1, and SHA2.

Properties of hash functions:

  • Preimage resistance It should be infeasible to find a message that has a given hash

  • Second preimage resistance Given an input message, it should be infeasible to find another message with the same hash

  • Collision resistance It should be infeasible to find two different messages with the same hash

Almost all cryptographic hashes and ciphers have what is called an Avalanche effect. This means that a single bit changed in that message will cause a vast change in the final input.

Last updated