## Common hash algorithms

Here are some common strong hashing algorithms:

**MD2**, developed by Ron Rivest, is a hash which relies on a random permutation of bits. The permutation is based on the digits of pi. It produces a 128 bit hash. It is believed to be secure, but is relatively inefficient to calculate compared with MD5.

**MD4**, also developed by Ron Rivest, is the root of many hash algorithms. It is an iterative block hash. It produces a 128 bit hash. It is not in common use, but many algorithms based on it are.

**SHA** (Secure Hash Algorithm, aka SHA-1) is a widely used, and is the current FIPS approved algorithm. It is similar to MD4 but with a 160 bit hash. SHA-2, a later algorithm, allows hashes of length 256, 384 and 512 (referred to as SHA256, etc).

**RIPE-MD** is also based on MD4. It increases security by running 2 versions of the algorithm in parallel, and combining the result at the end of each block. Variants produce hash codes of 128, 160, 256, 320 and 512 bits (referred to as RIPE256.

**MD5**, a strengthened version of MD4, has been popular in the past but should probably not be recommended for new systems as there are theoretical attacks against the algorithm.

**HAVAL** is a modified version of MD5. It produces hash lengths of 128, 160, 192, 224 or 256 bits.