hash function security summary
{{short description|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
{{See also|Security level}}
{{legend|#f9f9f9|No attack successfully demonstrated — attack only breaks a reduced version of the hash or requires more work than the claimed security level of the hash}}
{{legend|#ffff90|Attack demonstrated in theory — attack breaks all rounds and has lower complexity than security claim}}
{{legend|#ff9090|Attack demonstrated in practice — complexity is low enough to be actually used}}
Common hash functions
=Collision resistance=
{{main|Collision attack}}
class="wikitable" border="1" |
Hash function
! Security claim ! Best attack ! Publish date ! Comment |
---|
style="background: #ff9090; color: black"
| 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.{{cite journal |author1=Tao Xie |author2=Fanbao Liu |author3=Dengguo Feng |date=25 March 2013 |title=Fast Collision Attack on MD5 |url=https://eprint.iacr.org/2013/170 |journal=IACR Cryptol. ePrint Arch. }} |
style="background: #ff9090; color: black"
| SHA-1 | 280 | 261.2 | 2020-01-08 |
SHA256
| 2128 | 31 of 64 rounds (265.5) | 2013-05-28 |
SHA512
| 2256 | 24 of 80 rounds (232.5) | 2008-11-25 |
SHA-3
| Up to 2512 | 6 of 24 rounds (250) | 2017 |
BLAKE2s
| 2128 | 2.5 of 10 rounds (2112) | 2009-05-26 |
BLAKE2b
| 2256 | 2.5 of 12 rounds (2224) | 2009-05-26 |
=Chosen prefix collision attack=
=Preimage resistance=
{{main|Preimage attack}}
class="wikitable" border="1" |
Hash function
! Security claim ! Best attack ! Publish date ! Comment |
---|
style="background: #ffff90; color: black"
| MD5 | 2128 | 2123.4 | 2009-04-27 |
SHA-1
| 2160 | 45 of 80 rounds | 2008-08-17 |
SHA256
| 2256 | 43 of 64 rounds (2254.9 time, 26 memory) | 2009-12-10 |
SHA512
| 2512 | 46 of 80 rounds (2511.5 time, 26 memory) | 2008-11-25 | Paper,{{cite journal |author1=Yu Sasaki |author2=Lei Wang |author3=Kazumaro Aoki |date=2008-11-25 |title=Preimage Attacks on 41-Step SHA-256 and 46-Step SHA-512 |url=https://eprint.iacr.org/2009/479|journal=IACR Cryptol. ePrint Arch. }} updated version. |
SHA-3
| Up to 2512 | | | |
BLAKE2s
| 2256 | 2.5 of 10 rounds (2241) | 2009-05-26 |
BLAKE2b
| 2512 | 2.5 of 12 rounds (2481) | 2009-05-26 |
=Length extension=
{{main|Length extension attack}}
- Vulnerable: MD5, SHA1, SHA256, SHA512
- Not vulnerable: SHA384, SHA-3, BLAKE2
Less-common hash functions
=Collision resistance=
=Preimage resistance=
class="wikitable" border="1" |
Hash function
! Security claim ! Best attack ! Publish date ! Comment |
---|
style="background: #ffff90; color: black"
| GOST | 2256 | 2192 | 2008-08-18 |
style="background: #ffff90; color: black"
| MD2 | 2128 | 273 time, 273 memory | 2008 |
style="background: #ffff90; color: black"
| MD4 | 2128 | 2102 time, 233 memory | 2008-02-10 |
RIPEMD (original)
| 2128 | 35 of 48 rounds | rowspan=3 | 2011 |
RIPEMD-128
| 2128 | 35 of 64 rounds |
RIPEMD-160
| 2160 | 31 of 80 rounds |
style="background: #ffff90; color: black"
| Streebog | 2512 | 2266 time, 2259 data | 2014-08-29 | The paper presents two second-preimage attacks with variable data requirements.{{cite conference |author=Jian Guo |author2=Jérémy Jean |author3=Gaëtan Leurent |author4=Thomas Peyrin |author5=Lei Wang |date=2014-08-29 |title=The Usage of Counter Revisited: Second-Preimage Attack on New Russian Standardized Hash Function |conference=SAC 2014 |url=https://eprint.iacr.org/2014/675 }} |
style="background: #ffff90; color: black"
| Tiger | 2192 | 2188.8 time, 28 memory | 2010-12-06 |
Attacks on hashed passwords
{{main|Password cracking}}
Hashes described here are designed for fast computation and have roughly similar speeds.{{cite web|url=https://bench.cr.yp.to/results-hash.html |title=ECRYPT Benchmarking of Cryptographic Hashes|access-date=November 23, 2020}} 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://improsec.com/tech-blog/mind-blowing-gpu-performance|title=Mind-blowing GPU performance|publisher=Improsec|date=January 3, 2020}}{{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 <6 hours
| 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.
See also
References
{{reflist}}
External links
- 2010 summary of attacks against Tiger, MD4 and SHA-2: {{cite conference |author=Jian Guo |author2=San Ling |author3=Christian Rechberger |author4=Huaxiong Wang |date=2010-12-06 |title=Advanced Meet-in-the-Middle Preimage Attacks: First Results on Full Tiger, and Improved Results on MD4 and SHA-2 |conference=Asiacrypt 2010 |page=3 |url=https://eprint.iacr.org/2010/016 }}
{{cryptography navbox | hash}}