News for hackers. Stuff that matters.
Re:Lessons from the History of Attacks on Secure Hash Functions by zackmorris on Saturday February 25, 2017 @02:22PM (#13733256)
From what I understand, the Feb 23rd SHA-1 attack was possible because they figured out how to get the internal state (160 bits or 5 words of 32 bits) to match from two separate pieces of data. After that, additional data could be appended to the first two pieces as long as it was identical.

The internal state would play back the same sequence from there on, just like two random number generators starting from the same seed.

Here is a comparison of internal state sizes:

https://en.wikipedia.org/wiki/SHA-0#Comparison_of_SHA_functi...

SHA-256 is susceptible to this same flaw, it would just take longer because it has about about 128 bits of security instead of less than 80 for SHA-1. It looks like only SHA-3 really "gets it" with a 1600 bit state size.

After all of the effort put into making highly pseudo-random hash functions, it's a wonder that the state size was only the size of the hash. By comparison, Mersenne Twister's state size is 19937 bits (624 words of 32 bits minus 31 bits):

http://www.quadibloc.com/crypto/co4814.htm

Does anyone know why hash algorithms keep using such small state sizes, leaving us vulnerable to this same issue?

Re:Lessons from the History of Attacks on Secure Hash Functions by sebcat on Saturday February 25, 2017 @03:20PM (#13733617)
128 bits are 2^48 (~2.81*10^14) times larger than 80 bits (80 bits is the brute force, and SHAttered was less than that), and comparing SHA-2 to a Mersenne Twister is just picking two numbers and saying "this one is less than that one" without context.

EDIT: "The computational effort spent on our attack is estimated to be equivalent to 2^63.1 SHA-1 calls" [1] Comparing that to 2^128 (birthday paradox SHA-256) is... It doesn't apply.

[1] http://shattered.it/static/shattered.pdf

Re:Lessons from the History of Attacks on Secure Hash Functions by meta_AU on Saturday February 25, 2017 @06:46PM (#13734634)
A 1:1 state to input ratio is just the optimal performance value (more input than state lowers secury, and the other way lowers efficiency). SHA-3 still has that ratio, it just supports consuming more bytes at a time. Increasing this size too much reduces efficiency for small input sizes.

SHA-512/256 is in a pretty good spot, as the internal state is twice the recommended hash security size, and the output is equal to the recommended size (256bit for "128bit security level). Common tree hash constructions will want to take 2 inputs and reduce to 1 output, which is the exact ratio for SHA-512/256.

Re:Lessons from the History of Attacks on Secure Hash Functions by magila on Saturday February 25, 2017 @07:31PM (#13734835)
What you really care about for tree hashes is the block size to output ratio. SHA-512/256 has a 1024 bit block size so it is less optimal than SHA-256, which has a 512 bit block size, for tree hashes. This is assuming you don't need any extra data in the internal nodes.
Re:Lessons from the History of Attacks on Secure Hash Functions by ribasushi on Sunday February 26, 2017 @05:40AM (#13736607)
Could you expand on this comment and/or provide links to relevant reading?

Much appreciated!

Re:Lessons from the History of Attacks on Secure Hash Functions by ctz on Saturday February 25, 2017 @04:07PM (#13733825)
> Does anyone know why hash algorithms keep using such small state sizes, leaving us vulnerable to this same issue?

Because small internal state is not actually the issue. SHA-1 was broken with 2^63 work, not 2^80 work. That discrepancy is why SHA-1 was deemed broken back in 2005, not because people regularly do 2^80 work.

Re:Lessons from the History of Attacks on Secure Hash Functions by jstrom on Saturday February 25, 2017 @03:07PM (#13733551)
I can't speak specifically to SHA-1/2, but typically the criteria for the standards takes into account lower-end hardware that must be able to execute the algorithms with limited memory and processing (especially embedded systems).

For example, smart cards and terminals for the payments/banking industry. These algorithms came out in the 90's when you often had 8-bit processors and very little memory to work with.

Re:Lessons from the History of Attacks on Secure Hash Functions by wyager on Saturday February 25, 2017 @05:39PM (#13734289)
This is a consequence of the Merkle–Damgård construction. It has little to do with the state size.

SHA-3 uses a different construction, and so is immune to this particular type of extension attack.

Re:Lessons from the History of Attacks on Secure Hash Functions by wyager on Sunday February 26, 2017 @01:31AM (#13735994)
I thought about this more and realized I was wrong. Sponge construction doesn't help in this case. It's too late to edit.
Re:Lessons from the History of Attacks on Secure Hash Functions by benchaney on Saturday February 25, 2017 @03:44PM (#13733717)
This issue only means that once you find a collision, you kind find more collisions by extending it. Generally speaking it is expected that once a collision is found in a hash function it has already been mostly phased out, so this flaw is not seen as particularly important.