List of hash functions explained

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

Cyclic redundancy checks

See main article: Cyclic redundancy check.

NameLengthType
cksum (Unix)32 bitsCRC with length appended
CRC-88 bitsCRC
CRC-1616 bitsCRC
CRC-3232 bitsCRC
CRC-6464 bitsCRC

Adler-32 is often mistaken for a CRC, but it is not: it is a checksum.

Checksums

See main article: Checksum.

NameLengthType
BSD checksum (Unix)16 bitssum with circular rotation
SYSV checksum (Unix)16 bitssum with circular rotation
sum88 bitssum
Internet Checksum16 bitssum (ones' complement)
sum2424 bitssum
sum3232 bitssum
fletcher-44 bitssum
fletcher-88 bitssum
fletcher-1616 bitssum
fletcher-3232 bitssum
Adler-3232 bitssum
xor88 bitssum
Luhn algorithm1 decimal digitsum
Verhoeff algorithm1 decimal digitsum
Damm algorithm1 decimal digit Quasigroup operation

Universal hash function families

See main article: Universal hashing.

NameLengthType
Rabin fingerprintvariablemultiply
tabulation hashingvariableXOR
universal one-way hash function
Zobrist hashingvariableXOR

Non-cryptographic hash functions

See main article: Non-cryptographic hash function.

NameLengthType
Pearson hashing8 bits (or more)XOR/table
Paul Hsieh's SuperFastHash[1] 32 bits
BuzhashvariableXOR/table
Fowler–Noll–Vo hash function
(FNV Hash)
32, 64, 128, 256,
512, or 1024 bits
xor/product or
product/XOR
Jenkins hash function32 or 64 bitsXOR/addition
Bernstein's hash djb2[2] 32 or 64 bitsshift/add or mult/add
or shift/add/xor or mult/xor
PJW hash / Elf Hash32 or 64 bitsadd,shift,xor
MurmurHash32, 64, or 128 bitsproduct/rotation
Fast-Hash[3] 32 or 64 bitsxorshift operations
SpookyHash32, 64, or 128 bitssee Jenkins hash function
CityHash32, 64, 128, or 256 bits
FarmHash32, 64 or 128 bits
MetroHash64 or 128 bits
numeric hash (nhash)[4] variabledivision/modulo
xxHash32, 64 or 128 bitsproduct/rotation
t1ha (Fast Positive Hash)[5] 64 or 128 bitsproduct/rotation/XOR/add
GxHash32, 64 or 128 bitsAES block cipher
pHash[6] fixed or variablesee Perceptual hashing
dhash[7] 128 bitssee Perceptual hashing
SDBM [8] 32 or 64 bitsmult/add or shift/add
also used in GNU AWK
OSDB hash[9] 64 bitsadd
komihash64 bitsproduct/split/add/XOR

Keyed cryptographic hash functions

See main article: Message authentication code.

NameTag LengthType
BLAKE2keyed hash function (prefix-MAC)
BLAKE3256 bitskeyed hash function (supplied IV)
HMAC
KMACarbitrarybased on Keccak
MD6512 bitsMerkle tree NLFSR
One-key MAC (OMAC; CMAC)
PMAC (cryptography)
Poly1305-AES128 bitsnonce-based
SipHash32, 64 or 128 bitsnon-collision-resistant PRF
HighwayHash64, 128 or 256 bitsnon-collision-resistant PRF
UMAC
VMAC

Unkeyed cryptographic hash functions

See main article: Cryptographic hash function.

See also: Comparison of cryptographic hash functions.

NameLengthType
BLAKE-256256 bitsHAIFA structure[10]
BLAKE-512512 bitsHAIFA structure
BLAKE2sup to 256 bitsHAIFA structure
BLAKE2bup to 512 bitsHAIFA structure
BLAKE2XarbitraryHAIFA structure, extendable-output functions (XOFs) design[11]
BLAKE3arbitraryMerkle tree
ECOH224 to 512 bitshash
FSB160 to 512 bitshash
GOST256 bitshash
Grøstlup to 512 bitshash
HAS-160160 bitshash
HAVAL128 to 256 bitshash
JH224 to 512 bitshash
LSH[12] 256 to 512 bitswide-pipe Merkle–Damgård construction
MD2128 bitshash
MD4128 bitshash
MD5128 bitsMerkle–Damgård construction
MD6up to 512 bitsMerkle tree NLFSR (it is also a keyed hash function)
RadioGatúnarbitraryideal mangling function
RIPEMD128 bitshash
RIPEMD-128128 bitshash
RIPEMD-160160 bitshash
RIPEMD-256256 bitshash
RIPEMD-320320 bitshash
SHA-1160 bitsMerkle–Damgård construction
SHA-224224 bitsMerkle–Damgård construction
SHA-256256 bitsMerkle–Damgård construction
SHA-384384 bitsMerkle–Damgård construction
SHA-512512 bitsMerkle–Damgård construction
SHA-3 (subset of Keccak)arbitrarysponge function
SkeinarbitraryUnique Block Iteration
Snefru128 or 256 bitshash
Spectral Hash512 bitswide-pipe Merkle–Damgård construction
Streebog256 or 512 bitsMerkle–Damgård construction
SWIFFT512 bitshash
Tiger192 bitsMerkle–Damgård construction
Whirlpool512 bitshash

See also

Notes and References

  1. Web site: Hash functions. www.azillionmonkeys.com. 2015-06-10.
  2. Web site: Hash functions . www.cse.yorku.ca. 2020-06-16.
  3. Web site: fast-hash on Github. Zilong Tan. GitHub. 31 December 2021.
  4. Perl code at top half of page, English text at bottom half
  5. Web site: t1ha on Github. Leonid Yuriev. GitHub. 25 January 2022.
  6. Web site: pHash.org: Home of pHash, the open source perceptual hash library . pHash.org . 2020-06-16.
  7. Web site: dhash . PyPI . 2017-08-23 . 2020-06-16.
  8. Web site: original SDBM source code . github mirror repository . 2020-10-30.
  9. Web site: HashSourceCodes . OpenSubtitles.org . 2022-08-08.
  10. . 20 July 2007 . A Framework for Iterative Hash Functions – HAIFA . Cryptology ePrint Archive .
  11. Web site: Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O’Hearn, and Christian Winnerlein . 3 December 2016 . BLAKE2X .
  12. Book: Dong-Chan . Kim . Deukjo . Hong . Jung-Keun . Lee . Woo-Hwan . Kim and . Daesung . Kwon . Information Security and Cryptology - ICISC 2014 . LSH: A New Fast Secure Hash Function Family . Lecture Notes in Computer Science . https://pdfs.semanticscholar.org/567d/09feb818cc156d2b1e8def1b4bfff63f8e91.pdf . https://web.archive.org/web/20181008061603/https://pdfs.semanticscholar.org/567d/09feb818cc156d2b1e8def1b4bfff63f8e91.pdf . dead . 2018-10-08 . 2016 . 8949 . 286–313 . 10.1007/978-3-319-15943-0_18 . 978-3-319-15942-3 . 35700807 .