Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding sha-1 collision weakness

According to various sources, attacks looking for sha-1 collisions have been improved to 2^52 operations:

http://www.secureworks.com/research/blog/index.php/2009/6/3/sha-1-collision-attacks-now-252/

What I'd like to know is the implication of these discoveries on systems that are not under attack. Meaning if I hash random data, what are the statistical odds of a collision? Said another way, does the recent research indicate that a brute-force birthday attack has a higher chance of finding collisions that originally proposed?

Some writeups, like the one above, say that obtaining a SHA-1 collision via brute force would require 2^80 operations. Most sources say that 2^80 is a theoretical number (I assume because no hash function is really distributed perfectly even over its digest space).

So are any of the announced sha1 collision weaknesses in the fundamental hash distribution? Or are the increased odds of collision only the result of guided mathematical attacks?

I realize that in the end it is just a game of odds, and that their is an infinitesimally small change that your first and second messages will result in a collision. I also realize that even 2^52 is a really big number, but I still want to understand the implications for a system not under attack. So please don't answer with "don't worry about it".

like image 472
schickb Avatar asked Jul 18 '09 15:07

schickb


People also ask

What is the SHA-1 weakness?

SHA-1 (Secure Hash Algorithm) is a cryptographic hash function produces 160-bit hash value, and it's considered weak. It's quite interesting to know – there are 93 % of a website is vulnerable to SHA1 on the Internet.

How serious is a SHA-1 collision?

UPDATE--SHA-1, the 25-year-old hash function designed by the NSA and considered unsafe for most uses for the last 15 years, has now been “fully and practically broken” by a team that has developed a chosen-prefix collision for it.

Why does SHA-1 have collisions?

Collisions necessarily exist, since SHA-1 accepts many more distinct messages as input that it can produce distinct outputs (SHA-1 may eat any string of bits up to 2^64 bits, but outputs only 160 bits; thus, at least one output value must pop up several times).

Can SHA-1 be decrypted?

SHA1 (and other SHA hashes) are not ciphers. They do not encrypt anything, and it is not possible to “decrypt” anything in any way.


1 Answers

Well good hash functions are resistant to 3 different types of attacks (as the article states).

The most important resistance in a practical sense is 2nd pre-image resistance. This basically means given a message M1 and Hash(M1)=H1, it is hard to find a M2 such that Hash(M2)=H1.

If someone found a way to do that efficiently, that would be bad. Further, a preimage attack is not susceptible to the birthday paradox, since message M1 is fixed for us.

This is not a pre-image or second pre-image attack, merely a collision finding attack. To answer your question, No a brute force attack does NOT have a higher chance of finding collisions. What this means is that the naive brute force method, combined with the researchers methods result in finding collisions after 2^52. A standard brute force attack still takes 2^80.

like image 156
mox1 Avatar answered Sep 21 '22 02:09

mox1