Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
List of hash functions
List article

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

Cyclic redundancy checks

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

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 digitQuasigroup operation

Universal hash function families

Main article: Universal hashing

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

Non-cryptographic hash functions

Main article: Non-cryptographic hash function

NameLengthType
Pearson hashing8 bits (or more)XOR/table
Paul Hsieh's SuperFastHash132 bits
BuzhashvariableXOR/table
Fowler–Noll–Vo hash function(FNV Hash)32, 64, 128, 256, 512, or 1024 bitsxor/product or product/XOR
Jenkins hash function32 or 64 bitsXOR/addition
Bernstein's hash djb2232 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-Hash332 or 64 bitsxorshift operations
SpookyHash32, 64, or 128 bitssee Jenkins hash function
CityHash432, 64, 128, or 256 bits
FarmHash532, 64 or 128 bits
MetroHash664 or 128 bits
numeric hash (nhash)7variabledivision/modulo
xxHash832, 64 or 128 bitsproduct/rotation
t1ha (Fast Positive Hash)964 or 128 bitsproduct/rotation/XOR/add
GxHash1032, 64 or 128 bitsAES block cipher
pHash11fixed or variablesee Perceptual hashing
dhash12128 bitssee Perceptual hashing
SDBM 131432 or 64 bitsmult/add or shift/add also used in GNU AWK
OSDB hash1564 bitsadd
komihash1664 bitsproduct/split/add/XOR

Keyed cryptographic hash functions

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
HighwayHash1764, 128 or 256 bitsnon-collision-resistant PRF
UMAC
VMAC

Unkeyed cryptographic hash functions

Main article: Cryptographic hash function

See also: Comparison of cryptographic hash functions

NameLengthType
BLAKE-256256 bitsHAIFA structure18
BLAKE-512512 bitsHAIFA structure19
BLAKE2sup to 256 bitsHAIFA structure20
BLAKE2bup to 512 bitsHAIFA structure21
BLAKE2XarbitraryHAIFA structure,22 extendable-output functions (XOFs) design23
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
LSH24256 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

References

  1. "Hash functions". www.azillionmonkeys.com. Retrieved 2015-06-10. http://www.azillionmonkeys.com/qed/hash.html

  2. "Hash functions". www.cse.yorku.ca. Retrieved 2020-06-16. http://www.cse.yorku.ca/~oz/hash.html

  3. Zilong Tan (31 December 2021). "fast-hash on Github". GitHub. https://github.com/ZilongTan/fast-hash

  4. cityhash on GitHub https://github.com/google/cityhash

  5. farmhash on GitHub https://github.com/google/farmhash

  6. MetroHash on GitHub https://github.com/jandrewrogers/MetroHash

  7. Perl code at top half of page, English text at bottom half Archived 2016-03-04 at the Wayback Machine http://cpansearch.perl.org/src/MOOLI/Algorithm-Nhash-0.002/lib/Algorithm/Nhash.pm

  8. xxHash on GitHub https://github.com/Cyan4973/xxHash

  9. Leonid Yuriev (25 January 2022). "t1ha on Github". GitHub. https://github.com/leo-yuriev/t1ha

  10. gxhash on GitHub https://github.com/ogxd/gxhash

  11. "pHash.org: Home of pHash, the open source perceptual hash library". pHash.org. Retrieved 2020-06-16. http://www.phash.org/

  12. "dhash". PyPI. 2017-08-23. Retrieved 2020-06-16. https://pypi.org/project/dhash/

  13. "Hash functions". www.cse.yorku.ca. Retrieved 2020-06-16. http://www.cse.yorku.ca/~oz/hash.html

  14. "original SDBM source code". github mirror repository. Retrieved 2020-10-30. https://github.com/davidar/sdbm/blob/29d5ed2b5297e51125ee45f6efc5541851aab0fb/hash.c#L18-L47

  15. "HashSourceCodes". OpenSubtitles. Retrieved 2022-08-08. https://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes

  16. komihash on GitHub https://github.com/avaneev/komihash

  17. highwayhash on GitHub https://github.com/google/highwayhash

  18. Eli Biham and Orr Dunkelman (20 July 2007). "A Framework for Iterative Hash Functions – HAIFA". Cryptology ePrint Archive. /wiki/Eli_Biham

  19. Eli Biham and Orr Dunkelman (20 July 2007). "A Framework for Iterative Hash Functions – HAIFA". Cryptology ePrint Archive. /wiki/Eli_Biham

  20. Eli Biham and Orr Dunkelman (20 July 2007). "A Framework for Iterative Hash Functions – HAIFA". Cryptology ePrint Archive. /wiki/Eli_Biham

  21. Eli Biham and Orr Dunkelman (20 July 2007). "A Framework for Iterative Hash Functions – HAIFA". Cryptology ePrint Archive. /wiki/Eli_Biham

  22. Eli Biham and Orr Dunkelman (20 July 2007). "A Framework for Iterative Hash Functions – HAIFA". Cryptology ePrint Archive. /wiki/Eli_Biham

  23. 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) https://blake2.net/blake2x.pdf

  24. 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. 978-3-319-15942-3