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.
Basic general information about the cryptographic hash functions: year, designer, references, etc.
Algorithm | Output size (bits) | Internal state size [note 1] | Block size | Length size | Word size | Rounds |
---|---|---|---|---|---|---|
BLAKE2b | 512 | 512 | 1024 | 128 [note 2] | 64 | 12 |
BLAKE2s | 256 | 256 | 512 | 64 [note 3] | 32 | 10 |
BLAKE3 | Unlimited [note 4] | 256 [note 5] | 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 [note 6] | 58 words | 19 words [note 7] | – | 1–64 [note 8] | 18 [note 9] |
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 [note 10] | 1600 | 1600 - 2*bits | – [note 11] | 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 |
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) [note 1] | Words × Passes = Rounds [note 2] | Operations [note 3] | Endian [note 4] | |||||
---|---|---|---|---|---|---|---|---|---|
Word | Digest | Chaining values [note 5] | Computation values [note 6] | Block | Length [note 7] | ||||
GOST R 34.11-94 | 32 | ×8 = 256 | ×8 = 256 | 32 | 4 | A B L S | Little | ||
HAVAL-3-128 | 32 | ×4 = 128 | ×8 = 256 | ×32 = 1,024 | 64 | 32 × 3 = 96 | A B S | Little | |
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 |
MD4 | 32 | ×4 = 128 | ×16 = 512 | 64 | 16 × 3 = 48 | A B S | Little | ||
MD5 | 16 × 4 = 64 | ||||||||
RIPEMD | 32 | ×4 = 128 | ×8 = 256 | ×16 = 512 | 64 | 16 × 3 = 48 | A B S | Little | |
RIPEMD-128 | 16 × 4 = 64 | ||||||||
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 | |||||||||
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-160 | ×2.5=160 | ||||||||
Tiger-128 | ×2 = 128 | ||||||||
Function | Word | Digest | Chaining values | Computation values | Block | Length | Words × Passes = Rounds | Operations | Endian |
Size (bits) |
In cryptography, an HMAC is a specific type of message authentication code (MAC) involving a cryptographic hash function and a secret cryptographic key. As with any MAC, it may be used to simultaneously verify both the data integrity and authenticity of a message. An HMAC is a type of keyed hash function that can also be used in a key derivation scheme or a key stretching scheme.
The MD5 message-digest algorithm is a widely used hash function producing a 128-bit hash value. MD5 was designed by Ronald Rivest in 1991 to replace an earlier hash function MD4, and was specified in 1992 as RFC 1321.
RIPEMD is a family of cryptographic hash functions developed in 1992 and 1996. There are five functions in the family: RIPEMD, RIPEMD-128, RIPEMD-160, RIPEMD-256, and RIPEMD-320, of which RIPEMD-160 is the most common.
In cryptography, SHA-1 is a hash function which takes an input and produces a 160-bit (20-byte) hash value known as a message digest – typically rendered as 40 hexadecimal digits. It was designed by the United States National Security Agency, and is a U.S. Federal Information Processing Standard. The algorithm has been cryptographically broken but is still widely used.
A cryptographic hash function (CHF) is a hash algorithm that has special properties desirable for a cryptographic application:
In cryptography, Tiger is a cryptographic hash function designed by Ross Anderson and Eli Biham in 1995 for efficiency on 64-bit platforms. The size of a Tiger hash value is 192 bits. Truncated versions can be used for compatibility with protocols assuming a particular hash size. Unlike the SHA-2 family, no distinguishing initialization values are defined; they are simply prefixes of the full Tiger/192 hash value.
The MD4 Message-Digest Algorithm is a cryptographic hash function developed by Ronald Rivest in 1990. The digest length is 128 bits. The algorithm has influenced later designs, such as the MD5, SHA-1 and RIPEMD algorithms. The initialism "MD" stands for "Message Digest".
HAVAL is a cryptographic hash function. Unlike MD5, but like most modern cryptographic hash functions, HAVAL can produce hashes of different lengths – 128 bits, 160 bits, 192 bits, 224 bits, and 256 bits. HAVAL also allows users to specify the number of rounds to be used to generate the hash. HAVAL was broken in 2004.
SHA-2 is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and first published in 2001. They are built using the Merkle–Damgård construction, from a one-way compression function itself built using the Davies–Meyer structure from a specialized block cipher.
In cryptography, a Lamport signature or Lamport one-time signature scheme is a method for constructing a digital signature. Lamport signatures can be built from any cryptographically secure one-way function; usually a cryptographic hash function is used.
In cryptography, a one-way compression function is a function that transforms two fixed-length inputs into a fixed-length output. The transformation is "one-way", meaning that it is difficult given a particular output to compute inputs which compress to that output. One-way compression functions are not related to conventional data compression algorithms, which instead can be inverted exactly or approximately to the original data.
In cryptography, the Merkle–Damgård construction or Merkle–Damgård hash function is a method of building collision-resistant cryptographic hash functions from collision-resistant one-way compression functions. This construction was used in the design of many popular hash algorithms such as MD5, SHA-1 and SHA-2.
RadioGatún is a cryptographic hash primitive created by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche. It was first publicly presented at the NIST Second Cryptographic Hash Workshop, held in Santa Barbara, California, on August 24–25, 2006, as part of the NIST hash function competition. The same team that developed RadioGatún went on to make considerable revisions to this cryptographic primitive, leading to the Keccak SHA-3 algorithm.
SHA-3 is the latest member of the Secure Hash Algorithm family of standards, released by NIST on August 5, 2015. Although part of the same series of standards, SHA-3 is internally different from the MD5-like structure of SHA-1 and SHA-2.
The following outline is provided as an overview of and topical guide to cryptography:
In cryptography, the fast syndrome-based hash functions (FSB) are a family of cryptographic hash functions introduced in 2003 by Daniel Augot, Matthieu Finiasz, and Nicolas Sendrier. Unlike most other cryptographic hash functions in use today, FSB can to a certain extent be proven to be secure. More exactly, it can be proven that breaking FSB is at least as difficult as solving a certain NP-complete problem known as regular syndrome decoding so FSB is provably secure. Though it is not known whether NP-complete problems are solvable in polynomial time, it is often assumed that they are not.
This article summarizes publicly known attacks against cryptographic hash functions. Note that not all entries may be up to date. For a summary of other hash function parameters, see comparison of cryptographic hash functions.
BLAKE is a cryptographic hash function based on Daniel J. Bernstein's ChaCha stream cipher, but a permuted copy of the input block, XORed with round constants, is added before each ChaCha round. Like SHA-2, there are two variants differing in the word size. ChaCha operates on a 4×4 array of words. BLAKE repeatedly combines an 8-word hash value with 16 message words, truncating the ChaCha result to obtain the next hash value. BLAKE-256 and BLAKE-224 use 32-bit words and produce digest sizes of 256 bits and 224 bits, respectively, while BLAKE-512 and BLAKE-384 use 64-bit words and produce digest sizes of 512 bits and 384 bits, respectively.
In cryptography and computer security, a length extension attack is a type of attack where an attacker can use Hash(message1) and the length of message1 to calculate Hash(message1 ‖ message2) for an attacker-controlled message2, without needing to know the content of message1. This is problematic when the hash is used as a message authentication code with construction Hash(secret ‖ message), and message and the length of secret is known, because an attacker can include extra information at the end of the message and produce a valid hash without knowing the secret. Algorithms like MD5, SHA-1 and most of SHA-2 that are based on the Merkle–Damgård construction are susceptible to this kind of attack. Truncated versions of SHA-2, including SHA-384 and SHA-512/256 are not susceptible, nor is the SHA-3 algorithm. HMAC also uses a different construction and so is not vulnerable to length extension attacks. Lastly, just performing Hash(message ‖ secret) is enough to not be affected.
Streebog is a cryptographic hash function defined in the Russian national standard GOST R 34.11-2012 Information Technology – Cryptographic Information Security – Hash Function. It was created to replace an obsolete GOST hash function defined in the old standard GOST R 34.11-94, and as an asymmetric reply to SHA-3 competition by the US National Institute of Standards and Technology. The function is also described in RFC 6986 and one out of hash functions in ISO/IEC 10118-3:2018.