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 CRC
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
UNIX V checksum 16 bits CRC

[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

[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
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

Checksum Algorithm Relative Cost
32-bit Adler 1.00
32-bit CRC (IEEE) 1.46
64-bit CRC (ISO) 2.23
128-bit CRC 2.29
128-bit MD4 4.48
128-bit MD5 4.51

Note that 128-bit MD4 is 1.96 times as expensive as 128-bit CRC.

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.