Comparison of cryptographic hash functions

{{short description|Tables comparing general and technical information for common hashes}}

The following tables compare general and technical information for a number of cryptographic hash functions. See the individual functions' articles for further information. This article is not all-inclusive or necessarily up-to-date. An overview of hash function security/cryptanalysis can be found at hash function security summary.

General information

Basic general information about the cryptographic hash functions: year, designer, references, etc.

class="wikitable sortable" style="text-align: center"
Function

! Year

! Designer

! Derived from

! Reference

BLAKE

| 2008

| Jean-Philippe Aumasson
Luca Henzen
Willi Meier
Raphael C.-W. Phan

| ChaCha20

| [https://131002.net/blake/ Website]
[https://web.archive.org/web/20201001184633/http://131002.net/blake/blake.pdf Specification]

BLAKE2

| 2012

| Jean-Philippe Aumasson
Samuel Neves
Zooko Wilcox-O'Hearn
Christian Winnerlein

| BLAKE

| [https://blake2.net/ Website]
[https://blake2.net/blake2.pdf Specification]
{{IETF RFC|7693}}

BLAKE3

| 2020

| Jack O'Connor
Jean-Philippe Aumasson
Samuel Neves
Zooko Wilcox-O'Hearn

| BLAKE2

| [https://github.com/BLAKE3-team/BLAKE3 Website]
[https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf Specification]

GOST R 34.11-94

| 1994

| FAPSI and VNIIstandart

| GOST 28147-89

| {{IETF RFC|5831}}

HAVAL

| 1992

| Yuliang Zheng
Josef Pieprzyk
Jennifer Seberry

|

| [https://web.archive.org/web/20150111210116/http://labs.calyptix.com/haval.php Website]
[https://web.archive.org/web/20140411060613/http://labs.calyptix.com/files/haval-paper.pdf Specification]

KangarooTwelve

| 2016

| Guido Bertoni
Joan Daemen
Michaël Peeters
Gilles Van Assche

| Keccak

| [https://keccak.team/kangarootwelve.html Website]
[https://keccak.team/files/KangarooTwelve.pdf Specification]

MD2

| 1989

| rowspan="4" | Ronald Rivest

|

| {{IETF RFC|1319}}

MD4

| 1990

|

| {{IETF RFC|1320}}

MD5

| 1992

| MD4

| {{IETF RFC|1321}}

MD6

| 2008

|

| [https://groups.csail.mit.edu/cis/md6/ Website]
[https://groups.csail.mit.edu/cis/md6/docs/2009-04-15-md6-report.pdf Specification]

RIPEMD

| 1992

| The RIPE Consortium{{cite conference|first1=Hans|last1=Dobbertin|author-link1=Hans Dobbertin|first2=Antoon|last2=Bosselaers|first3=Bart|last3=Preneel|author-link3=Bart Preneel|title=RIPEMD-160: A strengthened version of RIPEMD|conference=Fast Software Encryption. Third International Workshop|location=Cambridge, UK|date=21–23 February 1996|pages=71–82|url=https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf|doi=10.1007/3-540-60865-6_44|doi-access=free}}

| MD4

|

RIPEMD-128
RIPEMD-256
RIPEMD-160
RIPEMD-320

| 1996

| Hans Dobbertin
Antoon Bosselaers
Bart Preneel

| RIPEMD

| [https://homes.esat.kuleuven.be/~bosselae/ripemd160.html Website]
[https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf Specification]

SHA-0

| 1993

| rowspan="4"|NSA

|

| [https://web.archive.org/web/20090130063617/http://w2.eff.org/Privacy/Digital_signature/?f=fips_sha_shs.info.txt SHA-0]

SHA-1

| 1995

| SHA-0

| rowspan="3" | [https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf Specification]

SHA-256
SHA-384
SHA-512

| 2002

| rowspan="2"|

SHA-224

| 2004

SHA-3 (Keccak)

| 2008

| Guido Bertoni
Joan Daemen
Michaël Peeters
Gilles Van Assche

| RadioGatún

| [https://keccak.team/ Website]
[https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf Specification]

Streebog

| 2012

| FSB, InfoTeCS JSC

|

| {{IETF RFC|6986}}

Tiger

| 1995

| Ross Anderson
Eli Biham

|

| [https://www.cs.technion.ac.il/~biham/Reports/Tiger/ Website]
[https://www.cs.technion.ac.il/~biham/Reports/Tiger/tiger/node3.html Specification]

Whirlpool

| 2004

| Vincent Rijmen
Paulo Barreto

|

| [https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html Website]

Parameters

class="wikitable sortable" style="text-align: center"
data-sort-type=text | Algorithm

! data-sort-type=number | Output size (bits)

! data-sort-type=number | Internal state size{{notetag|The internal state here means the "internal hash sum" after each compression of a data block. Most hash algorithms also internally use some additional variables such as length of the data compressed so far since that is needed for the length padding in the end. See the Merkle–Damgård construction for details.}}

! data-sort-type=number | Block size

! data-sort-type=number | Length size

! data-sort-type=number | Word size

! data-sort-type=number | Rounds

BLAKE2b

| 512

| 512

| 1024

| 128{{notetag|The size of BLAKE2b's message length counter is 128-bit, but it counts message length in bytes, not in bits like the other hash functions in the comparison. It can hence handle eight times longer messages than a 128-bit length size would suggest (one byte equaling eight bits). A length size of 131-bit is the comparable length size (8 \times 2^{128} = 2^{131}).}}

| 64

| 12

BLAKE2s

| 256

| 256

| 512

| 64{{notetag|The size of BLAKE2s's message length counter is 64-bit, but it counts message length in bytes, not in bits like the other hash functions in the comparison. It can hence handle eight times longer messages than a 64-bit length size would suggest (one byte equaling eight bits). A length size of 67-bit is the comparable length size (8 \times 2^{64} = 2^{67}).}}

| 32

| 10

BLAKE3

| Unlimited{{notetag|It's technically 264 bytes which equals 267 bitshttps://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf page 8}}

| 256{{notetag|The full BLAKE3 incremental state includes a chaining value stack up to 1728 bytes in size. However, the compression function itself does not access this stack. A smaller stack can also be used if the maximum input length is restricted.}}

| 512

| 64

| 32

| 7

GOST

| 256

| 256

| 256

| 256

| 32

| 32

HAVAL

| 256/224/192/160/128

| 256

| 1024

| 64

| 32

| 3/4/5

MD2

| 128

| 384

| 128

| –

| 32

| 18

MD4

| 128

| 128

| 512

| 64

| 32

| 3

MD5

| 128

| 128

| 512

| 64

| 32

| 64

PANAMA

| 256

| 8736

| 256

| –

| 32

| –

RadioGatún

| Unlimited{{notetag|RadioGatún is an extendable-output function which means it has an output of unlimited size. The official test vectors are 256-bit hashes. RadioGatún claims to have the security level of a cryptographic sponge function 19 words in size, which means the 32-bit version has the security of a 304-bit hash when looking at preimage attacks, but the security of a 608-bit hash when looking at collision attacks. The 64-bit version, likewise, has the security of a 608-bit or 1216-bit hash. For the purposes of determining how vulnerable RadioGatún is to length extension attacks, only two words of its 58-word state are output between hash compression operations.}}

| 58 words

| 19 words{{notetag|RadioGatún is not a Merkle–Damgård construction and, as such, does not have a block size. Its belt is 39 words in size; its mill, which is the closest thing RadioGatún has to a "block", is 19 words in size.}}

| –

| 1–64{{notetag|Only the 32-bit and 64-bit versions of RadioGatún have official test vectors}}

| 18{{notetag|The 18 blank rounds are only applied once in RadioGatún, between the end of the input mapping stage and before the generation of output bits}}

RIPEMD

| 128

| 128

| 512

| 64

| 32

| 48

RIPEMD-128, -256

| 128/256

| 128/256

| 512

| 64

| 32

| 64

RIPEMD-160

| 160

| 160

| 512

| 64

| 32

| 80

RIPEMD-320

| 320

| 320

| 512

| 64

| 32

| 80

SHA-0

| 160

| 160

| 512

| 64

| 32

| 80

SHA-1

| 160

| 160

| 512

| 64

| 32

| 80

SHA-224, -256

| 224/256

| 256

| 512

| 64

| 32

| 64

SHA-384, -512, -512/224, -512/256

| 384/512/224/256

| 512

| 1024

| 128

| 64

| 80

SHA-3

| 224/256/384/512{{notetag|Although the underlying algorithm Keccak has arbitrary hash lengths, the NIST specified 224, 256, 384 and 512 bits output as valid modes for SHA-3.}}

| 1600

| 1600 - 2*bits

| –{{notetag|Implementation dependent; as per section 7, second paragraph from the bottom of page 22, of FIPS PUB 202.}}

| 64

| 24

SHA3-224

| 224

| 1600

| 1152

| –

| 64

| 24

SHA3-256

| 256

| 1600

| 1088

| –

| 64

| 24

SHA3-384

| 384

| 1600

| 832

| –

| 64

| 24

SHA3-512

| 512

| 1600

| 576

| –

| 64

| 24

Tiger(2)-192/160/128

| 192/160/128

| 192

| 512

| 64

| 64

| 24

Whirlpool

| 512

| 512

| 512

| 256

| 8

| 10

=Notes=

{{notefoot}}

Compression function

The following tables compare technical information for compression functions of cryptographic hash functions. The information comes from the specifications, please refer to them for more details.

class="wikitable" style="text-align: center"
rowspan="2" | Function

! colspan="6" | Size (bits){{notetag|The omitted multiplicands are word sizes.}}

! rowspan="2" | Words ×
Passes =
Rounds{{notetag|Some authors interchange passes and rounds.}}

! rowspan="2" | Operations{{notetag|A: addition, subtraction; B: bitwise operation; L: lookup table; S: shift, rotation.}}

! rowspan="2" | Endian{{notetag|It refers to byte endianness only. If the operations consist of bitwise operations and lookup tables only, the endianness is irrelevant.}}

Word

! Digest

! Chaining
values
{{notetag|The size of message digest equals to the size of chaining values usually. In truncated versions of certain cryptographic hash functions such as SHA-384, the former is less than the latter.}}

! Computation
values{{notetag|The size of chaining values equals to the size of computation values usually. In certain cryptographic hash functions such as RIPEMD-160, the former is less than the latter because RIPEMD-160 use two sets of parallel computation values and then combine into a single set of chaining values.}}

! Block

! Length
{{notetag|The maximum input size {{=}} 2length size − 1 bits. For example, the maximum input size of SHA-1 {{=}} 264 − 1 bits.}}

GOST R 34.11-94

| 32

| colspan="3" | {{nowrap|×8 {{=}} 256}}

| {{nowrap|×8 {{=}} 256}}

| 32

| 4

| A B L S

| Little

HAVAL-3-128

| rowspan="15" | 32

| {{nowrap|×4 {{=}} 128}}

| colspan="2" rowspan="15" | {{nowrap|×8 {{=}} 256}}

| rowspan="15" | {{nowrap|×32 {{=}} 1,024}}

| rowspan="15" | 64

| rowspan="5" | {{nowrap|32 × 3 {{=}} 96}}

| rowspan="15" | A B S

| rowspan="15" | Little

HAVAL-3-160

| {{nowrap|×5 {{=}} 160}}

HAVAL-3-192

| {{nowrap|×6 {{=}} 192}}

HAVAL-3-224

| {{nowrap|×7 {{=}} 224}}

HAVAL-3-256

| {{nowrap|×8 {{=}} 256}}

HAVAL-4-128

| {{nowrap|×4 {{=}} 128}}

| rowspan="5" | {{nowrap|32 × 4 {{=}} 128}}

HAVAL-4-160

| {{nowrap|×5 {{=}} 160}}

HAVAL-4-192

| {{nowrap|×6 {{=}} 192}}

HAVAL-4-224

| {{nowrap|×7 {{=}} 224}}

HAVAL-4-256

| {{nowrap|×8 {{=}} 256}}

HAVAL-5-128

| {{nowrap|×4 {{=}} 128}}

| rowspan="5" | {{nowrap|32 × 5 {{=}} 160}}

HAVAL-5-160

| {{nowrap|×5 {{=}} 160}}

HAVAL-5-192

| {{nowrap|×6 {{=}} 192}}

HAVAL-5-224

| {{nowrap|×7 {{=}} 224}}

HAVAL-5-256

| {{nowrap|×8 {{=}} 256}}

MD2

| 8

| {{nowrap|×16 {{=}} 128}}

| {{nowrap|×32 {{=}} 256}}

| {{nowrap|×48 {{=}} 384}}

| {{nowrap|×16 {{=}} 128}}

| None

| {{nowrap|48 × 18 {{=}} 864}}

| B

| N/A

MD4

| rowspan="2" | 32

| colspan="3" rowspan="2"| {{nowrap|×4 {{=}} 128}}

| rowspan="2" | {{nowrap|×16 {{=}} 512}}

| rowspan="2" | 64

| {{nowrap|16 × 3 {{=}} 48}}

| rowspan="2" | A B S

| rowspan="2" | Little

MD5

| {{nowrap|16 × 4 {{=}} 64}}

RIPEMD

| rowspan="5" | 32

| colspan="2" rowspan="2" | {{nowrap|×4 {{=}} 128}}

| rowspan="3" | {{nowrap|×8 {{=}} 256}}

| rowspan="5" | {{nowrap|×16 {{=}} 512}}

| rowspan="5" | 64

| {{nowrap|16 × 3 {{=}} 48}}

| rowspan="5" | A B S

| rowspan="5" | Little

RIPEMD-128

| rowspan="2" | {{nowrap|16 × 4 {{=}} 64}}

RIPEMD-256

| colspan="2" | {{nowrap|×8 {{=}} 256}}

RIPEMD-160

| colspan="2" | {{nowrap|×5 {{=}} 160}}

| rowspan="2" | {{nowrap|×10 {{=}} 320}}

| rowspan="2" | {{nowrap|16 × 5 {{=}} 80}}

RIPEMD-320

| colspan="2" | {{nowrap|×10 {{=}} 320}}

SHA-0

| rowspan="4" | 32

| colspan="3" rowspan="2" | {{nowrap|×5 {{=}} 160}}

| rowspan="4" | {{nowrap|×16 {{=}} 512}}

| rowspan="4" | 64

| rowspan="2" | {{nowrap|16 × 5 {{=}} 80}}

| rowspan="6" | A B S

| rowspan="6" | Big

SHA-1
SHA-256

| {{nowrap|×8 {{=}} 256}}

| colspan="2" rowspan="2" | {{nowrap|×8 {{=}} 256}}

| rowspan="2" | {{nowrap|16 × 4 {{=}} 64}}

SHA-224

| {{nowrap|×7 {{=}} 224}}

SHA-512

| rowspan="2" | 64

| {{nowrap|×8 {{=}} 512}}

| colspan="2" rowspan="2" | {{nowrap|×8 {{=}} 512}}

| rowspan="2" | {{nowrap|×16 {{=}} 1024}}

| rowspan="2" | 128

| rowspan="2" | {{nowrap|16 × 5 {{=}} 80}}

SHA-384

| {{nowrap|×6 {{=}} 384}}

Tiger-192

| rowspan="3" | 64

| {{nowrap|×3 {{=}} 192}}

| colspan="2" rowspan="3" | {{nowrap|×3 {{=}} 192}}

| rowspan="3" | {{nowrap|×8 {{=}} 512}}

| rowspan="3" | 64

| rowspan="3" | {{nowrap|8 × 3 {{=}} 24}}

| rowspan="3" | A B L S

| rowspan="3" | Not Specified

Tiger-160

| ×2.5=160

Tiger-128

| {{nowrap|×2 {{=}} 128}}

rowspan="2" | Function

! Word

! Digest

! Chaining
values

! Computation
values

! Block

! Length

! rowspan="2" | Words ×
Passes =
Rounds

! rowspan="2" | Operations

! rowspan="2" | Endian

colspan="6" | Size (bits)

= Notes =

{{notefoot}}

See also

References

{{Reflist}}