5 ms·
Malicious SHA-1 (2014)
- omoikane 2y agoThis seems like a precursor to the Shattered attack: https://news.ycombinator.com/item?id=13713480 https://news.ycombinator.com/item?id=13713480 - Announcing the first SHA-1 collision (2017-02-23) Ange Albertini is listed as an author in both articles.
- smaudet 2y agoSeems like a reminder to me... Also, I wonder how the security of cryptosystems relates to a combined approach, i.e. if you cut the message and hash smaller parts with multiple algorithms (SHA-1+SHA-256) how much more infeasible you can make the "attack" here. So you can have a global hash that is checked 3 times (so not much of a hamper but better than nothing, if you theorize there are 1000x faster than birthday problem attacks on each hash), to serve as a sort of "quick check", and a deeper hash when you split a 10 GB file into say, 10 MB chunks, and so gain back a 1000x order-of complexity (at a minimum) to compute. For streams where order of bits matters, I speculate this may be even more difficult to attack, since each attacked hash is now constrained by the data that will fill each prior and next chunks, if not the whole set of chunks (so perhaps 1 million or greater difficulty?)
- bawolff 2y agoI'm not sure if i understand what you are saying correctly, but generally hashing the same data with multiple different Merkle–Damgård hash functions is not anywhere as secure as you might naively expect.
- afiori 2y agoI am indeed curious about this: consider an hash function built like H(m) = H0( H1(m) + H2(m) + ... + Hn(m)) where + is string concatenation and H0,...,Hn are mostly good hash function. I would expect H to be as good as the best of H0,...,Hn on almost every metric; at worst being limited by the block size of H0. That is you would need to badly break all of them to break H. Honestly I would also guess that even if H_i = HMAC(md5, i, m) you would get a decent H (except for the small block size. So maybe something even more nested like H(m) = H_00( H_01(m) + H_02(m) + ... + H_0p(m)) + H_10( H_11(m) + H_12(m) + ... + H_1p(m)) ... + H_q( H_q1(m) + H_q2(m) + ... + H_qp(m)) where H_ij(m) = HMAC(md5,i*(p+1)+j,m).
- Genbox 2y agoYou are making two assumptions here: 1. More hash functions equals more security (hash encapsulation) 2. The attacker wants to know the content of 'm' H0(H1(m)) has the security of just H0. Hashes are not made to protect the content of m, but instead made to test the integrity of m. As such, a flaw in H0 will break the security guarantee, no matter how secure H1 is. Practically, H0(H1(m)) is the same as H0(m), as m is just "some data," and the result of H1 can be seen as "some data". If your construction is H0(m0) + H1(m1) where m0, m1 are both halves of m, then the overall security is reduced to the weakest hash function. For example, a length extension attack in the weakest hash function breaks the overall integrity of the construction.
- purkka 2y ago> H0(H1(m)) has the security of just H0. Hashes are not made to protect the content of m, but instead made to test the integrity of m. As such, a flaw in H0 will break the security guarantee, no matter how secure H1 is. But this isn't true for all flaws. For example, even with the collision attacks against SHA-1, I don't think they're even remotely close to enabling a collision for SHA-1(some_other_hash(M)). Similarly, HMAC-SHA-1 is still considered secure, as it's effectively SHA-1-X(SHA-1-Y(M)), where SHA-1-X and SHA-1-Y are just SHA-1 with different starting states. So there's some value to be found in nesting hashes. [1]: https://en.wikipedia.org/wiki/HMAC#Definition https://en.wikipedia.org/wiki/HMAC#Definition
- Genbox 2y agoWe are saying the same thing. H0 is SHA-1 in your example. The strength of an HMAC depends on the strength of the hash function; however, since it uses two derived keys, the outer hash protects the inner hash (using the same hash function), which in turn provides protection against length extension attacks. The case I was making, is that weakhash(stronghash(m)) has the security of weakhash, no matter how strong stronghash is.
- purkka 2y ago
- hannob 2y agoNot really. While both relate to SHA-1, those are two quite different issues. The Shattered attack was an actual demonstration of a long-known weakness in SHA-1 that allows creating practical collisions. This one is more an exploration of the question whether a malicious actor can create a standard that looks good, but is actually weak. Those questions got quite a bit of attention in that time due to the Snowden leaks, and the realization that this actually happened at least in one case (Dual EC DRBG, which, technically, was already known before Snowden, but only got major attention afterwards).
- consumerx 2y agofolks holding BTC should get wet hands, lol. it sounds a bit like Crypto AG, probably nothing, keep on moving.