{{Short description|none}} This is a list of hash functions, including cyclic redundancy checks, checksum functions, and cryptographic hash functions.

{{Incomplete list|date=February 2024}}

==Cyclic redundancy checks== {{Main|Cyclic redundancy check}}

{| class="wikitable sortable mw-collapsible" !Name !Length !Type |- |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== {{Main|Checksum}}

{| class="wikitable sortable mw-collapsible" |- !Name !Length !Type |- |BSD checksum (Unix) |16 bits |sum with circular rotation |- |SYSV checksum (Unix) |16 bits |sum with circular rotation |- |sum8 |8 bits |sum |- |Internet Checksum |16 bits |sum (ones' complement) |- |sum24 |24 bits |sum |- |sum32 |32 bits |sum |- |fletcher-4 |4 bits |sum |- |fletcher-8 |8 bits |sum |- |fletcher-16 |16 bits |sum |- |fletcher-32 |32 bits |sum |- |Adler-32 |32 bits |sum |- | xor8 |8 bits |sum |- |Luhn algorithm |1 decimal digit |sum |- |Verhoeff algorithm |1 decimal digit |sum |- |Damm algorithm |1 decimal digit |Quasigroup operation |- |}

==Universal hash function families== {{Main | Universal hashing}}

{| class="wikitable sortable mw-collapsible" |- !Name !Length !Type |- |Rabin fingerprint | variable | multiply |- |tabulation hashing | variable | XOR |- |universal one-way hash function | | |- |Zobrist hashing | variable | XOR |- |}

==Non-cryptographic hash functions== {{main|Non-cryptographic hash function}} {| class="wikitable sortable mw-collapsible" |- !Name !Length !Type |- |Pearson hashing |8 bits (or more) |XOR/table |- |Paul Hsieh's SuperFastHash<ref>{{Cite web|title = Hash functions|url = https://www.azillionmonkeys.com/qed/hash.html|website = www.azillionmonkeys.com|access-date = 2015-06-10}}</ref> |32 bits | |- |Buzhash |variable |XOR/table |- |Fowler–Noll–Vo hash function<br>(FNV hash) |32, 64, 128, 256,<br> 512, or 1024 bits |xor/product or <br> product/XOR |- |Jenkins hash function |32 or 64 bits | XOR/addition |- |Bernstein's hash ''djb2''<ref name="Hash functions">{{cite web |url=http://www.cse.yorku.ca/~oz/hash.html |title= Hash functions |website= www.cse.yorku.ca|access-date=2020-06-16}}</ref> |32 or 64 bits | shift/add or mult/add <br> or shift/add/xor or mult/xor |- |PJW hash / ELF hash |32 or 64 bits | add,shift,xor |- |MurmurHash |32, 64, or 128 bits |product/rotation |- |Fast-Hash<ref name="fasthash_github">{{cite web | url=https://github.com/ZilongTan/fast-hash | title=fast-hash on Github | author=Zilong Tan| website=GitHub | date=31 December 2021 }}</ref> |32 or 64 bits | xorshift operations |- |SpookyHash |32, 64, or 128 bits |see Jenkins hash function |- |CityHash<ref>{{GitHub|google/cityhash}}</ref> |32, 64, 128, or 256 bits | |- |FarmHash<ref>{{GitHub|google/farmhash}}</ref> |32, 64 or 128 bits | |- |MetroHash<ref>{{GitHub|jandrewrogers/MetroHash}}</ref> |64 or 128 bits | |- |numeric hash (nhash)<ref>''[https://cpansearch.perl.org/src/MOOLI/Algorithm-Nhash-0.002/lib/Algorithm/Nhash.pm Perl code at top half of page, English text at bottom half] {{Webarchive|url=https://web.archive.org/web/20160304185318/http://cpansearch.perl.org/src/MOOLI/Algorithm-Nhash-0.002/lib/Algorithm/Nhash.pm |date=2016-03-04 }}''</ref> |variable |division/modulo |- |xxHash<ref>{{GitHub|Cyan4973/xxHash}}</ref> |32, 64 or 128 bits |product/rotation |- |t1ha (Fast Positive Hash)<ref name="t1ha_github">{{cite web | url=https://github.com/leo-yuriev/t1ha | title=t1ha on Github | author=Leonid Yuriev| website=GitHub | date=25 January 2022 }}</ref> |64 or 128 bits |product/rotation/XOR/add |- |GxHash<ref>{{GitHub|ogxd/gxhash}}</ref> |32, 64 or 128 bits |AES block cipher |- |pHash<ref name="pHash.org">{{cite web | title=pHash.org: Home of pHash, the open source perceptual hash library | website=pHash.org | url=http://www.phash.org/ | access-date=2020-06-16}}</ref> |fixed or variable |see Perceptual hashing |- |dhash<ref>{{cite web | title=dhash | website=PyPI | date=2017-08-23 | url=https://pypi.org/project/dhash/ | access-date=2020-06-16}}</ref> |128 bits |see Perceptual hashing |- |SDBM<ref name="Hash functions"/><ref>{{cite web |url=https://github.com/davidar/sdbm/blob/29d5ed2b5297e51125ee45f6efc5541851aab0fb/hash.c#L18-L47 |title=original SDBM source code |website=github mirror repository |access-date=2020-10-30}}</ref> |32 or 64 bits |mult/add or shift/add <br> also used in GNU AWK |- | OSDB hash<ref>{{cite web |url=https://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes |title=HashSourceCodes |website= OpenSubtitles |access-date=2022-08-08}}</ref> |64 bits |add |- |komihash<ref>{{GitHub|avaneev/komihash}}</ref> |64 bits |product/split/add/XOR |}

==Keyed cryptographic hash functions== {{Main | Message authentication code }}

{| class="wikitable sortable mw-collapsible" |- !Name !Tag Length !Type |- |BLAKE2 | |keyed hash function (prefix-MAC) |- |BLAKE3 |256 bits |keyed hash function (supplied IV) |- |HMAC | | |- |KMAC |arbitrary |based 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 bits |nonce-based |- |SipHash |32, 64 or 128 bits |non-collision-resistant PRF |- |HighwayHash<ref>{{GitHub|google/highwayhash}}</ref> |64, 128 or 256 bits |non-collision-resistant PRF |- |UMAC | | |- |VMAC | | |- |}

==Unkeyed cryptographic hash functions== {{Main|Cryptographic hash function}} {{See also | Comparison of cryptographic hash functions}}

{| class="wikitable sortable mw-collapsible" |- !Name !Length !Type |- |BLAKE-256 |256 bits |HAIFA structure<ref name=haifa>{{cite journal |author=Eli Biham and Orr Dunkelman |date=20 July 2007 |title=A Framework for Iterative Hash Functions – HAIFA |journal=Cryptology ePrint Archive |url=http://eprint.iacr.org/2007/278 }}</ref> |- |BLAKE-512 |512 bits |HAIFA structure<ref name=haifa /> |- |BLAKE2s |up to 256 bits |HAIFA structure<ref name=haifa /> |- |BLAKE2b |up to 512 bits |HAIFA structure<ref name=haifa /> |- |BLAKE2X |arbitrary |HAIFA structure,<ref name=haifa /> extendable-output functions (XOFs) design<ref name=BLAKE2X>{{cite web |last1=Aumasson |first1=Jean-Philippe |last2=Neves |first2=Samuel |last3=Wilcox-O’Hearn |first3=Zooko |last4=Winnerlein |first4=Christian |date=3 December 2016 |title=BLAKE2X |url=https://blake2.net/blake2x.pdf }}</ref> |- |BLAKE3 |arbitrary |Merkle tree |- |ECOH |224 to 512 bits |hash |- |FSB |160 to 512 bits |hash |- |GOST |256 bits |hash |- |Grøstl |up to 512 bits |hash |- |HAS-160 |160 bits |hash |- |HAVAL |128 to 256 bits |hash |- |JH |224 to 512 bits |hash |- |LSH<ref name=lsw>{{cite book | first1=Dong-Chan | last1=Kim | first2=Deukjo | last2=Hong | first3=Jung-Keun | last3=Lee | first4=Woo-Hwan | last4=Kim and | first5=Daesung | last5=Kwon | title=Information Security and Cryptology - ICISC 2014 |chapter=LSH: A New Fast Secure Hash Function Family | series=Lecture Notes in Computer Science | chapter-url=https://pdfs.semanticscholar.org/567d/09feb818cc156d2b1e8def1b4bfff63f8e91.pdf | archive-url=https://web.archive.org/web/20181008061603/https://pdfs.semanticscholar.org/567d/09feb818cc156d2b1e8def1b4bfff63f8e91.pdf | url-status=dead | archive-date=2018-10-08 | year=2016 | volume=8949 | pages=286–313 | doi=10.1007/978-3-319-15943-0_18 | isbn=978-3-319-15942-3 | s2cid=35700807 }}</ref> |256 to 512 bits |wide-pipe Merkle–Damgård construction |- |MD2 |128 bits |hash |- |MD4 |128 bits |hash |- |MD5 |128 bits | Merkle–Damgård construction |- |MD6 |up to 512 bits |Merkle tree NLFSR (it is also a keyed hash function) |- |RadioGatún |arbitrary |ideal mangling function |- |RIPEMD |128 bits |hash |- |RIPEMD-128 |128 bits |hash |- |RIPEMD-160 |160 bits |hash |- |RIPEMD-256 |256 bits |hash |- |RIPEMD-320 |320 bits |hash |- |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 bits |hash |- |Spectral Hash |512 bits |wide-pipe Merkle–Damgård construction |- |Streebog |256 or 512 bits |Merkle–Damgård construction |- |SWIFFT |512 bits |hash |- |Tiger |192 bits |Merkle–Damgård construction |- |Whirlpool |512 bits |hash |- |}

==See also== *Hash function security summary *Secure Hash Algorithms *NIST hash function competition *Key derivation functions (category)

==References== {{Reflist}}

{{DEFAULTSORT:Hash functions}} *List Category:Checksum algorithms Category:Cryptography lists and comparisons