Hash function security summary
Publicly known attacks against cryptographic hash functions
title: "Hash function security summary" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["cryptographic-hash-functions", "broken-hash-functions", "cryptography-lists-and-comparisons"] description: "Publicly known attacks against cryptographic hash functions" topic_path: "technology/cryptography" source: "https://en.wikipedia.org/wiki/Hash_function_security_summary" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Publicly known attacks against cryptographic hash functions ::
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.
Table color key
Common hash functions
Collision resistance
Main article: Collision attack
::data[format=table]
| Hash function | Security claim | Best attack | Publish date | Comment |
|---|---|---|---|---|
| MD5 | 264 | 218 time | 2013-03-25 | This attack takes seconds on a regular PC. Two-block collisions in 218, single-block collisions in 241. |
| SHA-1 | 280 | 261.2 | 2020-01-08 | Paper by Gaëtan Leurent and Thomas Peyrin |
| SHA256 | 2128 | 31 of 64 rounds (265.5) | 2013-05-28 | Two-block collision. |
| SHA512 | 2256 | 24 of 80 rounds (232.5) | 2008-11-25 | author1=Somitra Kumar Sanadhya |
| SHA-3 | Up to 2512 | 6 of 24 rounds (250) | 2017 | Paper. |
| BLAKE2s | 2128 | 2.5 of 10 rounds (2112) | 2009-05-26 | author1=LI Ji |
| BLAKE2b | 2256 | 2.5 of 12 rounds (2224) | 2009-05-26 | Paper. |
| :: |
Chosen prefix collision attack
::data[format=table]
| Hash function | Security claim | Best attack | Publish date | Comment |
|---|---|---|---|---|
| MD5 | 264 | 239 | 2009-06-16 | This attack takes hours on a regular PC. |
| SHA-1 | 280 | 263.4 | 2020-01-08 | author1=Gaëtan Leurent |
| SHA256 | 2128 | |||
| SHA512 | 2256 | |||
| SHA-3 | Up to 2512 | |||
| BLAKE2s | 2128 | |||
| BLAKE2b | 2256 | |||
| :: |
Preimage resistance
Main article: Preimage attack
::data[format=table]
| Hash function | Security claim | Best attack | Publish date | Comment |
|---|---|---|---|---|
| MD5 | 2128 | 2123.4 | 2009-04-27 | Paper. |
| SHA-1 | 2160 | 45 of 80 rounds | 2008-08-17 | Paper. |
| SHA256 | 2256 | 43 of 64 rounds (2254.9 time, 26 memory) | 2009-12-10 | author1=Kazumaro Aoki |
| SHA512 | 2512 | 46 of 80 rounds (2511.5 time, 26 memory) | 2008-11-25 | Paper, updated version. |
| SHA-3 | Up to 2512 | |||
| BLAKE2s | 2256 | 2.5 of 10 rounds (2241) | 2009-05-26 | Paper. |
| BLAKE2b | 2512 | 2.5 of 12 rounds (2481) | 2009-05-26 | Paper. |
| :: |
Length extension
Main article: Length extension attack
- Vulnerable: MD5, SHA1, SHA256, SHA512
- Not vulnerable: SHA384, SHA-3, BLAKE2
Less-common hash functions
Collision resistance
::data[format=table]
| Hash function | Security claim | Best attack | Publish date | Comment |
|---|---|---|---|---|
| GOST | 2128 | 2105 | 2008-08-18 | author=Florian Mendel |
| HAVAL-128 | 264 | 27 | 2004-08-17 | author=Xiaoyun Wang |
| MD2 | 264 | 263.3 time, 252 memory | 2009 | Slightly less computationally expensive than a birthday attack, but for practical purposes, memory requirements make it more expensive. |
| MD4 | 264 | 3 operations | 2007-03-22 | Finding collisions almost as fast as verifying them. |
| PANAMA | 2128 | 26 | 2007-04-04 | Paper, improvement of an earlier theoretical attack from 2001. |
| RIPEMD (original) | 264 | 218 time | 2004-08-17 | author=Xiaoyun Wang |
| RadioGatún | Up to 2608 | 2704 | 2008-12-04 | For a word size w between 1-64 bits, the hash provides a security claim of 29.5w. The attack can find a collision in 211w time. |
| RIPEMD-160 | 280 | 48 of 80 rounds (251 time) | 2006 | Paper. |
| SHA-0 | 280 | 233.6 time | 2008-02-11 | Two-block collisions using boomerang attack. Attack takes estimated 1 hour on an average PC. |
| Streebog | 2256 | 9.5 rounds of 12 (2176 time, 2128 memory) | 2013-09-10 | Rebound attack. |
| Whirlpool | 2256 | 4.5 of 10 rounds (2120 time) | 2009-02-24 | Rebound attack. |
| :: |
Preimage resistance
::data[format=table]
| Hash function | Security claim | Best attack | Publish date | Comment |
|---|---|---|---|---|
| GOST | 2256 | 2192 | 2008-08-18 | Paper. |
| MD2 | 2128 | 273 time, 273 memory | 2008 | Paper. |
| MD4 | 2128 | 2102 time, 233 memory | 2008-02-10 | Paper. |
| RIPEMD (original) | 2128 | 35 of 48 rounds | 2011 | Paper. |
| RIPEMD-128 | 2128 | 35 of 64 rounds | ||
| RIPEMD-160 | 2160 | 31 of 80 rounds | ||
| Streebog | 2512 | 2266 time, 2259 data | 2014-08-29 | The paper presents two second-preimage attacks with variable data requirements. |
| Tiger | 2192 | 2188.8 time, 28 memory | 2010-12-06 | Paper. |
| :: |
Attacks on hashed passwords
Main article: Password cracking
Hashes described here are designed for fast computation and have roughly similar speeds. Because most users typically choose short passwords formed in predictable ways, passwords can often be recovered from their hashed value if a fast hash is used. Searches on the order of 100 billion tests per second are possible with high-end graphics processors.{{cite web | url=https://arstechnica.com/information-technology/2012/12/25-gpu-cluster-cracks-every-standard-windows-password-in-6-hours/ | title=25-GPU cluster cracks every standard Windows password in | date=2012-12-10 | first=Dan | last=Goodin | publisher=Ars Technica | access-date=2020-11-23}} Special hashes called key derivation functions have been created to slow brute force searches. These include pbkdf2, bcrypt, scrypt, argon2, and balloon.
References
References
- (25 March 2013). "Fast Collision Attack on MD5". IACR Cryptol. ePrint Arch..
- Florian Mendel. (2013-05-28). "Improving Local Collisions: New Attacks on Reduced SHA-256".
- (2008-11-25). "New Collision Attacks against Up to 24-Step SHA-2".
- L. Song, G. Liao and J. Guo, Non-Full Sbox Linearization: Applications to Collision Attacks on Round-Reduced Keccak, CRYPTO, 2017
- (2009-05-26). "Attacks on Round-Reduced BLAKE". IACR Cryptol. ePrint Arch..
- (2012-07-12). "Chosen-prefix Collisions for MD5 and Applications". International Journal of Applied Cryptography.
- (2020-01-08). "SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust". USENIX Association.
- (2009-04-27). "Finding Preimages in Full MD5 Faster Than Exhaustive Search".
- (2008-08-17). "Preimages for Reduced SHA-0 and SHA-1".
- (2009-12-10). "Preimages for Step-Reduced SHA-2".
- (2008-11-25). "Preimage Attacks on 41-Step SHA-256 and 46-Step SHA-512". IACR Cryptol. ePrint Arch..
- Florian Mendel. (2008-08-18). "Cryptanalysis of the GOST Hash Function".
- Xiaoyun Wang. (2004-08-17). "Collisions for Hash Functions MD4, MD5, HAVAL-128 and RIPEMD". Cryptology ePrint Archive.
- Xiaoyun Wang. (October 2005). "An attack on hash function HAVAL-128". Science in China Series F: Information Sciences.
- (January 2010). "Cryptanalysis of MD2". Journal of Cryptology.
- Yu Sasaki. (2007-03-22). "Improved Collision Attacks on MD4 and MD5". IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences.
- Joan Daemen. (2007-04-04). "Producing Collisions for Panama, Instantaneously".
- Vincent Rijmen. (2001). "Producing Collisions for PANAMA".
- Xiaoyun Wang. (2005-05-23). "Cryptanalysis of the Hash Functions MD4 and RIPEMD".
- RadioGatún is a family of 64 different hash functions. The security level and best attack in the chart are for the 64-bit version. The 32-bit version of RadioGatún has a claimed security level of 2304 and the best claimed attack takes 2352 work.
- (2008-12-04). "Cryptanalysis of RadioGatun".
- Florian Mendel. (2006). "On the Collision Resistance of RIPEMD-160".
- (2008-02-11). "Collisions on SHA-0 in One Hour".
- Zongyue Wang. (2013-09-10). "Cryptanalysis of GOST R hash function". Information Processing Letters.
- Florian Mendel. (2009-02-24). "The Rebound Attack: Cryptanalysis of Reduced Whirlpool and Grøstl".
- Søren S. Thomsen. (2008). "An improved preimage attack on MD2". Cryptology ePrint Archive.
- Gaëtan Leurent. (2008-02-10). "MD4 is Not One-Way".
- Chiaki Ohtahara. (2011). "Preimage Attacks on Step-Reduced RIPEMD-128 and RIPEMD-160".
- Jian Guo. (2014-08-29). "The Usage of Counter Revisited: Second-Preimage Attack on New Russian Standardized Hash Function".
- Jian Guo. (2010-12-06). "Advanced Meet-in-the-Middle Preimage Attacks: First Results on Full Tiger, and Improved Results on MD4 and SHA-2".
- "ECRYPT Benchmarking of Cryptographic Hashes".
- (January 3, 2020). "Mind-blowing GPU performance". Improsec.
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::