Comparison of cryptographic hash functions
Appearance
The following tables compare general and technical information for a number of cryptographic hash functions.[1] 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.
Notes
- ^ It refers to the first official description of the algorithm, not designed date.
Parameters
Algorithm | Output size (bits) | Internal state size[p 1] | Block size | Length size | Word size | Rounds |
---|---|---|---|---|---|---|
BLAKE2b | 512 | 1024 | 512 | – | 64 | 12 |
BLAKE2s | 256 | 512 | 256 | – | 32 | 10 |
GOST | 256 | 256 | 256 | 256 | 32 | 32 |
HAVAL | 256/224/192/160/128 | 256 | 1,024 | 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 | 8,736 | 256 | – | 32 | – |
RadioGatún | Unlimited[p 2] | 58 words | 19 words[p 3] | – | 1–64[p 4] | 18[p 5] |
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 | 40 | 80 |
SHA-224, SHA-256 | 224/256 | 256 | 512 | 64 | 56 | 64 |
SHA-384, SHA-512, SHA-512/224, SHA-512/256 | 384/512/224/256 | 512 | 1,024 | 128 | 64 | 80 |
SHA-3 | 224/256/384/512[p 6] | 1600 | 1600-2*bits | – | 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
- ^ 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.
- ^ 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.
- ^ 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.
- ^ Only the 32-bit and 64-bit versions of RadioGatún have official test vectors
- ^ The 18 rounds are only applied once in RadioGatún, between the input mapping stage and the generation of output bits
- ^ 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.
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.
Function | Size (bits)[cf 1] | Words × Passes = Rounds[cf 2] |
Operations[cf 3] | Endian[cf 4] | Specification | |||||
---|---|---|---|---|---|---|---|---|---|---|
Word | Digest | Chaining values[cf 5] |
Computation values[cf 6] |
Block | Length [cf 7] | |||||
GOST R 34.11-94 | 32 | ×8 = 256 | ×8 = 256 | 32 | 4 | A B L S | Little | RFC 5831 | ||
HAVAL-3-128 | 32 | ×4 = 128 | ×8 = 256 | ×32 = 1,024 | 64 | 32 × 3 = 96 | A B S | Little | HAVAL | |
HAVAL-3-160 | ×5 = 160 | |||||||||
HAVAL-3-192 | ×6 = 192 | |||||||||
HAVAL-3-224 | ×7 = 224 | |||||||||
HAVAL-3-256 | ×8 = 256 | |||||||||
HAVAL-4-128 | ×4 = 128 | 32 × 4 = 128 | ||||||||
HAVAL-4-160 | ×5 = 160 | |||||||||
HAVAL-4-192 | ×6 = 192 | |||||||||
HAVAL-4-224 | ×7 = 224 | |||||||||
HAVAL-4-256 | ×8 = 256 | |||||||||
HAVAL-5-128 | ×4 = 128 | 32 × 5 = 160 | ||||||||
HAVAL-5-160 | ×5 = 160 | |||||||||
HAVAL-5-192 | ×6 = 192 | |||||||||
HAVAL-5-224 | ×7 = 224 | |||||||||
HAVAL-5-256 | ×8 = 256 | |||||||||
MD2 | 8 | ×16 = 128 | ×32 = 256 | ×48 = 384 | ×16 = 128 | None | 48 × 18 = 864 | B | N/A | RFC 1319 |
MD4 | 32 | ×4 = 128 | ×16 = 512 | 64 | 16 × 3 = 48 | A B S | Little | RFC 1320 | ||
MD5 | 16 × 4 = 64 | RFC 1321 | ||||||||
RIPEMD | 32 | ×4 = 128 | ×8 = 256 | ×16 = 512 | 64 | 16 × 3 = 48 | A B S | Little | ||
RIPEMD-128 | 16 × 4 = 64 | RIPEMD-160[4] | ||||||||
RIPEMD-256 | ×8 = 256 | |||||||||
RIPEMD-160 | ×5 = 160 | ×10 = 320 | 16 × 5 = 80 | |||||||
RIPEMD-320 | ×10 = 320 | |||||||||
SHA-0 | 32 | ×5 = 160 | ×16 = 512 | 64 | 16 × 5 = 80 | A B S | Big | |||
SHA-1 | FIPS 180-3 | |||||||||
SHA-256 | ×8 = 256 | ×8 = 256 | 16 × 4 = 64 | |||||||
SHA-224 | ×7 = 224 | |||||||||
SHA-512 | 64 | ×8 = 512 | ×8 = 512 | ×16 = 1024 | 128 | 16 × 5 = 80 | ||||
SHA-384 | ×6 = 384 | |||||||||
Tiger-192 | 64 | ×3 = 192 | ×3 = 192 | ×8 = 512 | 64 | 8 × 3 = 24 | A B L S | Not Specified | Tiger | |
Tiger-160 | ×2.5=160 | |||||||||
Tiger-128 | ×2 = 128 |
Notes
- ^ The omitted multiplicands are word sizes.
- ^ Some authors interchange passes and rounds.
- ^ A: addition, subtraction; B: bitwise operation; L: lookup table; S: shift, rotation.
- ^ It refers to byte endianness only. If the operations consist of bitwise operations and lookup tables only, the endianness is irrelevant.
- ^ 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.
- ^ 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.
- ^ The maximum input size = 2length size − 1 bits. For example, the maximum input size of SHA-1 = 264 − 1 bits.
See also
References
- ^ See the individual functions' articles for further information. This article is not all-inclusive or necessarily up-to-date.
- ^ Bertoni, Guido; Daemen, Joan; Peeters, Michael; Assche, Gilles Van, Kangaroo Twelve main document (PDF)
- ^ Bertoni, Guido; Daemen, Joan; Peeters, Michael; Assche, Gilles Van (Oct 2008), Keccak sponge function family main document (PDF), 1.0, retrieved 2013-07-30
- ^ Dobbertin, Hans; Bosselaers, Antoon; Preneel, Bart (1996-04-18), RIPEMD-160: A Strengthened Version of RIPEMD (PDF), archived from the original (PDF) on 2015-07-29, retrieved 2010-02-16
{{citation}}
:|archive-date=
/|archive-url=
timestamp mismatch; 2010-02-16 suggested (help); Unknown parameter|deadurl=
ignored (|url-status=
suggested) (help)
External links
- The Hash Function Lounge – A list of hash functions and known attacks, by Paulo Barreto
- The eHash Main Page – A wiki for cryptographic hash functions
- The NIST Hash Competition Main Page – The competition to become SHA-3