3 ms·
SHA1 isn't broken for hashes.
by upofadown 7y ago
SHA1 isn't broken for hashes.
- mlyle 7y agoSHA1 is vulnerable to preimage attacks in reduced round variants. The findings keep steadily improving. https://en.wikipedia.org/wiki/Preimage_attack https://en.wikipedia.org/wiki/Preimage_attack This means if a storage system just uses SHA1 to detect duplication, you can abuse the ability to create a collision to possibly do bad things to the storage system.
- knorker 7y agoYes, but for the specific concerns listed it should not be a problem. That is, if you upload to dropbox and check the sha1 when it comes back, yes you did get the same data back. And your data can't be stolen by a hash-to-data oracle either, unless the evil attacker constructed your secret data for you. So it depends on your threat model. Yes there are practical concerns, but not the ones listed.
- mlyle 7y agoI disagree. Deduplicating filesystems often depend on hash equivalency meaning data equivalency. They may or may not have modes to validate all data before deduplication, but these suck for performance and are often turned off. E.g. I make two things that hash to the same thing. One is a contract where I'm obligated to pay back a loan. Another is some meaningless document. I give them to a counterparty who puts them in their filesystem, which later scrubs and deduplicates data. Since they hash the same, the filesystem removes the contract and leaves my meaningless document (or never bothers to store the contract because it already exists, if deduping online, etc). Note that this is a chosen prefix collision, which is much more demanding (and more useful!) than finding a collision in general. And this leaves aside that SHA1 is looking increasingly vulnerable to preimage attacks which further broaden the attack scenarios.
- perl4ever 7y agoThe filesystem removes a document, but you can't expect it will be the right one more than 50% of the time.
- mlyle 7y agoAn attacker may be able to control the way it happens. It may be repeatable to always remove the first or the last. If it's online dedup, it'll always be the last. Or the attacker can provide many copies of the document you want to still have a copy of, and one copy in the middle of the one that should be vanished.
- im3w1l 7y agoThis doesn't sound crazy farfetched. I bet a lot of people have files in their dropbox that were created by someone else.
- upofadown 7y ago>SHA1 is vulnerable to preimage attacks. From your linked article: >All currently known practical or almost-practical attacks on MD5 and SHA-1 are collision attacks. In general, a collision attack is easier to mount than a preimage attack, as it is not restricted by any set value (any two values can be used to collide).
- fanf2 7y agoSHA-1 (and SHA-256 and many other hash functions) are subject to length extension, which is how the 2017 shattered attack works: find a pair of short prefixes that work as PDF headers and that have colliding hashes; then append a common suffix such that the different headers display different parts of the suffixes. Once the collision has been found you can easily make your own colliding PDFs - https://alf.nu/SHA1 https://alf.nu/SHA1 This breaks anything that dedups on just the SHA-1 hashes of raw files
- Thorrez 7y agoWhat does "for hashes" mean? For a hash table? Of course it's fine for a hash table (but probably too slow). Hash tables don't need collision resistance. If you need collision resistance then SHA-1 is broken.