List of hash functions

From Wikipedia, the free encyclopedia

This is a list of hash functions, including cyclic redundancy checks, checksum functions, and cryptographic hash functions.

Contents

[edit] Cyclic redundancy checks

Name Length Type
Adler-32 32 bits sum
bsd 16 bits CRC
checksum 32 bits CRC
crc16 16 bits CRC
crc32 32 bits CRC
crc32 mpeg2 32 bits CRC
crc64 64 bits CRC
fletcher-4 4 bits sum
fletcher-8 8 bits sum
fletcher-16 16 bits sum
UNIX V checksum 16 bits CRC

Adler-32 is often classified as a CRC, but it uses a different algorithm. For more details, see the Adler-32 article.

[edit] Checksums

Main article: Checksums
Name Length Type
sum8 8 bits sum
sum16 16 bits sum
sum24 24 bits sum
sum32 32 bits sum
xor8 8 bits sum
Luhn algorithm 4 bits sum

[edit] Non-cryptographic hash functions

[edit] Cryptographic hash functions

Name Length Type
elf64 64 bits hash
HAVAL 128 to 256 bits hash
MD2 128 bits hash
MD4 128 bits hash
MD5 128 bits hash
Radio GatĂșn Arbitrarily long hash
RIPEMD-64 64 bits hash
RIPEMD-160 160 bits hash
RIPEMD-320 320 bits hash
SHA1 160 bits hash
SHA256 256 bits hash
SHA384 384 bits hash
SHA512 512 bits hash
Tiger 192 bits hash
WHIRLPOOL 512 bits hash

[edit] Computational costs of CRCs vs Hashes

A benchmark of hashes from the free Crypto++ library follows.

Hash algorithm Relative cost
Adler-32 1.00
CRC-32 3.66
MD5 3.62
RIPEMD-256 5.89
SHA-1 6.04
SHA-256 11.56
SHA-512 9.45
Tiger 4.31
Whirlpool 16.14

There is considerable variation in these numbers depending on CPU type and memory usage. MD4 is considerably slower on big-endian processors than little-endian, whereas CRCs are endian agnostic. CRC algorithms also readily scale in speed with additional memory. CRC32 with 4kb of tables runs in approximately 44% of the time that CRC32 does with 1kb of tables. Most hashes can also have their code unrolled to improve speed at expense of code size, but the effects are less dramatic.