About Cryptography Hash functions

- Hash functions are extremely useful and appear in almost all information security applications.

- A hash function is a mathematical function that converts a numerical input value into another compressed numerical value. The input to the hash function is of arbitrary length but output is always of fixed length.

- Values returned by a hash function are called message digest or simply hash values.

function

Hashing algorithm

- Hashing algorithm is a cryptographic hash function. It is a mathematical algorithm that maps data of arbitrary size to a hash of a fixed size.

- Itís designed to be a one-way function, infeasible to invert. However, in time a lot of hashing algorithms are being compromised.

- This happened to md5, for example, a widely known hash function designed to be a cryptographic hash function,

which is now so easy to reverse, that we could only use it for verifying data against unintentional corruption.

Itís easy to figure out what the ideal cryptographic hash function should be like:

1. it should be fast to compute the hash value for any kind of data

2. it should be impossible to regenerate a message from its hash value (brute force attack as the only option)

3. it should avoid hash collisions, each message has its own hash.

4. every change to a message, even the smallest one, should change the hash value.

function

Even the smallest change (one letter) makes the whole hash different (SHA-1 example)