Cryptography

Hash functions

A hash function takes a block of data (often a string) of any length and returns a fixed-length hash value  (string). The data to be encoded is called the “message,” and the hash value is called the message digest or digest. – more on wiki

A hash function must have 4 main properties:

> it is easy to compute the hash value for any given message.
> it is infeasible to generate the message from a given hash.
> it is infeasible to modify a message without changing the hash.
> it is infeasible to find two different messages with the same hash.

Where do we use hash functions:

> To verify the integrity of a file or a message.
> Identify a file.
> Encrypt passwords stored in a database.
> Generate pseudo-random bits of data
> ..

Popular & Secure Hash Functions:

RIPEMD-128/256

Designers: Leuven, Belgium, Hans Dobbertin, Antoon Bosselaers, Bart Preneel
First Published: 1996
Output Size: 128/256
Block Size: 512
Length Size: 64
Word Size: 32
Rounds: 5

SHA-256/224 (SHA-2)

Designers: NSA
First Published: 2001
Output Size: 256/224
Block Size: 512
Length Size: 64
Word Size: 32
Rounds: 64

WHIRLPOOL

Designers: Vincent Rijmen, Paulo S. L. M., Barreto
First Published: 2000
Output Size: 512
Block Size: 512
Length Size: 256
Word Size: 8
Rounds: 10