List of hash functions

Last updated

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

Contents

Cyclic redundancy checks

NameLengthType
cksum (Unix) 32 bits CRC with length appended
CRC-8 8 bits CRC
CRC-16 16 bits CRC
CRC-32 32 bits CRC
CRC-64 64 bits CRC

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

Checksums

NameLengthType
BSD checksum (Unix) 16 bitssum with circular rotation
SYSV checksum (Unix) 16 bitssum with circular rotation
sum88 bitssum
Internet Checksum 16 bitssum (ones' complement)
sum2424 bitssum
sum3232 bitssum
fletcher-4 4 bitssum
fletcher-8 8 bitssum
fletcher-16 16 bitssum
fletcher-32 32 bitssum
Adler-32 32 bitssum
xor8 8 bitssum
Luhn algorithm 1 decimal digitsum
Verhoeff algorithm 1 decimal digitsum
Damm algorithm 1 decimal digit Quasigroup operation

Universal hash function families

NameLengthType
Rabin fingerprint variablemultiply
tabulation hashing variableXOR
universal one-way hash function
Zobrist hashing variableXOR

Non-cryptographic hash functions

NameLengthType
Pearson hashing 8 bits (or more)XOR/table
Paul Hsieh's SuperFastHash [1] 32 bits
Buzhash variableXOR/table
Fowler–Noll–Vo hash function
(FNV Hash)
32, 64, 128, 256,
512, or 1024 bits
xor/product or
product/XOR
Jenkins hash function 32 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 Hash 32 or 64 bitsadd,shift,xor
MurmurHash 32, 64, or 128 bitsproduct/rotation
Fast-Hash [3] 32 or 64 bits xorshift operations
SpookyHash32, 64, or 128 bitssee Jenkins hash function
CityHash [4] 32, 64, 128, or 256 bits
FarmHash [5] 32, 64 or 128 bits
MetroHash [6] 64 or 128 bits
numeric hash (nhash) [7] variabledivision/modulo
xxHash [8] 32, 64 or 128 bitsproduct/rotation
t1ha (Fast Positive Hash) [9] 64 or 128 bitsproduct/rotation/XOR/add
GxHash [10] 32, 64 or 128 bitsAES block cipher
pHash [11] fixed or variablesee Perceptual hashing
dhash [12] 128 bitssee Perceptual hashing
SDBM [2] [13] 32 or 64 bitsmult/add or shift/add
also used in GNU AWK
OSDB hash [14] 64 bitsadd
komihash [15] 64 bitsproduct/split/add/XOR

Keyed cryptographic hash functions

NameTag LengthType
BLAKE2 keyed hash function (prefix-MAC)
BLAKE3 256 bitskeyed hash function (supplied IV)
HMAC
KMAC arbitrarybased on Keccak
MD6 up to 512 bits Merkle tree NLFSR (it is also an unkeyed hash function)
One-key MAC (OMAC; CMAC)
PMAC (cryptography)
Poly1305-AES 128 bitsnonce-based
SipHash 32, 64 or 128 bitsnon-collision-resistant PRF
HighwayHash [16] 64, 128 or 256 bitsnon-collision-resistant PRF
UMAC
VMAC

Unkeyed cryptographic hash functions

NameLengthType
BLAKE-256 256 bitsHAIFA structure [17]
BLAKE-512 512 bitsHAIFA structure [17]
BLAKE2s up to 256 bitsHAIFA structure [17]
BLAKE2b up to 512 bitsHAIFA structure [17]
BLAKE2X arbitraryHAIFA structure, [17] extendable-output functions (XOFs) design [18]
BLAKE3 arbitrary Merkle tree
ECOH 224 to 512 bitshash
FSB 160 to 512 bitshash
GOST 256 bitshash
Grøstl up to 512 bitshash
HAS-160 160 bitshash
HAVAL 128 to 256 bitshash
JH 224 to 512 bitshash
LSH [19] 256 to 512 bitswide-pipe Merkle–Damgård construction
MD2 128 bitshash
MD4 128 bitshash
MD5 128 bits Merkle–Damgård construction
MD6 up to 512 bits Merkle tree NLFSR (it is also a keyed hash function)
RadioGatún arbitraryideal mangling function
RIPEMD 128 bitshash
RIPEMD-128 128 bitshash
RIPEMD-160 160 bitshash
RIPEMD-256 256 bitshash
RIPEMD-320 320 bitshash
SHA-1 160 bits Merkle–Damgård construction
SHA-224 224 bits Merkle–Damgård construction
SHA-256 256 bits Merkle–Damgård construction
SHA-384 384 bits Merkle–Damgård construction
SHA-512 512 bits Merkle–Damgård construction
SHA-3 (subset of Keccak)arbitrary sponge function
Skein arbitrary Unique Block Iteration
Snefru 128 or 256 bitshash
Spectral Hash 512 bitswide-pipe Merkle–Damgård construction
Streebog 256 or 512 bits Merkle–Damgård construction
SWIFFT 512 bitshash
Tiger 192 bits Merkle–Damgård construction
Whirlpool 512 bitshash

See also

References

  1. "Hash functions". www.azillionmonkeys.com. Retrieved 2015-06-10.
  2. 1 2 "Hash functions". www.cse.yorku.ca. Retrieved 2020-06-16.
  3. Zilong Tan (31 December 2021). "fast-hash on Github". GitHub .
  4. cityhash on GitHub
  5. farmhash on GitHub
  6. MetroHash on GitHub
  7. Perl code at top half of page, English text at bottom half Archived 2016-03-04 at the Wayback Machine
  8. xxHash on GitHub
  9. Leonid Yuriev (25 January 2022). "t1ha on Github". GitHub .
  10. gxhash on GitHub
  11. "pHash.org: Home of pHash, the open source perceptual hash library". pHash.org. Retrieved 2020-06-16.
  12. "dhash". PyPI. 2017-08-23. Retrieved 2020-06-16.
  13. "original SDBM source code". github mirror repository. Retrieved 2020-10-30.
  14. "HashSourceCodes". OpenSubtitles . Retrieved 2022-08-08.
  15. komihash on GitHub
  16. highwayhash on GitHub
  17. 1 2 3 4 5 Eli Biham and Orr Dunkelman (20 July 2007). "A Framework for Iterative Hash Functions – HAIFA". Cryptology ePrint Archive.
  18. Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O’Hearn, and Christian Winnerlein (3 December 2016). "BLAKE2X" (PDF).{{cite web}}: CS1 maint: multiple names: authors list (link)
  19. Kim, Dong-Chan; Hong, Deukjo; Lee, Jung-Keun; Kim and, Woo-Hwan; Kwon, Daesung (2016). "LSH: A New Fast Secure Hash Function Family" (PDF). Information Security and Cryptology - ICISC 2014. Lecture Notes in Computer Science. Vol. 8949. pp. 286–313. doi:10.1007/978-3-319-15943-0_18. ISBN   978-3-319-15942-3. S2CID   35700807. Archived from the original (PDF) on 2018-10-08.