7 ms·
Just like security in the physical world, sometimes the weakness is not that great in practice. If you watch enough lockpicking videos on YouTube you may come t
by userbinator 6y ago
Just like security in the physical world, sometimes the weakness is not that great in practice. If you watch enough lockpicking videos on YouTube you may come to the same conclusion.
Would I still trust MD5 to be a strong check against random/non-malicious corruption? Yes. Would I trust it against malicious corruption? No.
- saagarjha 6y agoI would, depending on what I was protecting. I use it every day in Git, for example, on projects where integrity is of moderate importance. Now, against a nation-state? No way.
- bawolff 6y agoAgainst nation state, that ship sailed a long time ago. We're currently in the realm of 10-20 thousand dollars to make SHA-1 collisions. That's in the realm of an individual, albeit a reasonably (but not extremely) wealthy one. In 5-10 years it may be in the realm of J. random hacker.
- entee 6y agoNaive question: how often is that collision the same number of bytes as the original?
- userbinator 6y agoI've never seen a colliding pair in a "true" hash function (not just CRC) be of differing lengths. They've always been a pair of blocks with very few differing bits, such that the differences "cancel out" in the computation and the internal state is the same regardless of which of the pair is run through it. I suspect trying to create a colliding pair with differing lengths is much more difficult, since SHA1 also includes the length as part of the calculation.
- WrtCdEvrydy 6y agoIn forensics work, MD5 is still used for checksums. It's used for consistency, not uniqueness, so it will likely be usable for years to come.
- eli 6y agoStill seems less than ideal to be able to generate a second document that hashes to the same value.
- tialaramex 6y agoYour phrasing here is unclear. Being able to construct B such that hash(B) = hash(A) for some document A is Second Pre-image and there is no viable Second Pre-image attack for SHA-1 or even MD5. What does exist is collision, where you construct documents C and C' such that hash(C) = hash(C'). This means bad guys can persuade humans (and more importantly in most cases, machines) to sign seemingly innocuous document C; and then apparently produce proof document C' was signed even though the human / machine has never seen C' and would not have signed it.
- im3w1l 6y agoCollision combined with length extension could be a neat way of attacking deduping. Basically first a prefix, then a collision block, then a suffix that is encrypted with a key derived from one of the collision blocks. If you can arrange for the deduper to find the document with the wrong key first, then it will skip over the super secret stuff.
- formerly_proven 6y agoFor deduplicated storage you really want A=B <=> H(A)=H(B) to hold for all data you are going to see, so accessible constructions for collisions should already bar an algorithm from this application.
- im3w1l 6y ago
- takeda 6y agoI'm a bit divided, on one hand I agree with you and I even used md5 for things that don't need security, but then I started thinking about it, and came to conclusion that you never how your code might be exploited in the future.