News for hackers. Stuff that matters.
Re:The first chosen-prefix collision for SHA-1 by wyday on Tuesday January 07, 2020 @11:13AM (#21981323)
>> "Hard to justify going to the trouble of encrypting your backup."

Huh? If you're "encrypting" using SHA, I've got some bad news about those backups of yours.

Re:The first chosen-prefix collision for SHA-1 by harikb on Tuesday January 07, 2020 @11:23AM (#21981403)
I think GP was taking about the general nature of “previously assumed to be unbreakable” methods being broken. Not sure if he has implying using a checksum also for encryption
Re:The first chosen-prefix collision for SHA-1 by PeterisP on Tuesday January 07, 2020 @11:30AM (#21981476)
What do you mean by "previously assumed to be unbreakable" ? SHA-1 has been known to be unsafe for a dozen years, we just went from "assumed to be breakable" to "yep, definitely breakable, here's how one exact attack will work".
Re:The first chosen-prefix collision for SHA-1 by rakoo on Tuesday January 07, 2020 @02:30PM (#21983754)
But backups have existed for more than a dozen years. And its replacements today, SHA-256 and SHA-3 will also be broken if you wait long enough.
Re:The first chosen-prefix collision for SHA-1 by jessaustin on Tuesday January 07, 2020 @05:06PM (#21985554)
I can see why backups might be needed for a dozen years, and I can see why encrypted backups might be needed, but outside plainly fake requirements like those of "national security" why would encrypted backups be needed for a dozen years? Aren't we throwing everything sensitive away after seven years? After that isn't it mostly about preserving history? Even things like balance sheets that might be sensitive today will be too out-of-date to be sensitive a dozen years from now.
Re:The first chosen-prefix collision for SHA-1 by rakoo on Thursday January 09, 2020 @08:47AM (#22001088)
The obvious counter-example is my library, however old my photos or music or videos are I'd like to keep them for as long as possible, and because they're private I'd like to keep them in an encrypted form
Re:The first chosen-prefix collision for SHA-1 by LadyCailin on Tuesday January 07, 2020 @11:15AM (#21981336)
If you use SHA-256 to encrypt your backup, then I just need to steal your backup and wait 20 years, until that is cracked, and then I can decrypt your backup, even though today you’re using the “correct” encryption.
Re:The first chosen-prefix collision for SHA-1 by riquito on Tuesday January 07, 2020 @11:20AM (#21981379)
The GP was likely hinting at SHA1 being an hashing function, non an encryption function, so just applying sha* wouldn't produce a working backup
Re:The first chosen-prefix collision for SHA-1 by SAI_Peregrinus on Tuesday January 07, 2020 @02:07PM (#21983434)
To be excessively pedantic you can encrypt securely (but slowly for the SHA series) with a hash function of sufficient capacity by running the hash function in CTR mode. You turn it into a stream cipher. Ideally you also MAC the ciphertext, nonce, and other associated data. That's is pretty easy with such a hash function (either use HMAC or a MAC mode of the hash function if supported).

Salsa20 & ChaCha20 cores are hash functions (though not collision-resistant compression functions since it's not needed for their design goal and would be slower) run in CTR mode.[1]

[1] https://cr.yp.to/salsa20.html

Re:The first chosen-prefix collision for SHA-1 by caspper69 on Tuesday January 07, 2020 @03:55PM (#21984715)
> To be excessively pedantic

This is the best, most delicious, type of pedantry friend!

Re:The first chosen-prefix collision for SHA-1 by smichel17 on Wednesday January 08, 2020 @12:07AM (#21988533)
You're the best kind of pedantry friend!

(Just some more pedantry, friend.)

Re:The first chosen-prefix collision for SHA-1 by caspper69 on Wednesday January 08, 2020 @06:36AM (#21990490)
Ok man, now that's just over the top.

/s

Re:The first chosen-prefix collision for SHA-1 by gpm on Tuesday January 07, 2020 @12:06PM (#21981899)
It probably will if your data is less than 128 bytes, and you're willing to wait a few decades to decrypt it.
Re:The first chosen-prefix collision for SHA-1 by ksangeelee on Tuesday January 07, 2020 @12:15PM (#21981989)
You might be able to find bytes that result in your hash, but they probably won't be the same bytes you 'backed up'.
Re:The first chosen-prefix collision for SHA-1 by gpm on Tuesday January 07, 2020 @12:18PM (#21982025)
If the data is shorter than the hash shouldn't it be the same data I backed up with reasonably high probability?
Re:The first chosen-prefix collision for SHA-1 by dorgo on Tuesday January 07, 2020 @03:15PM (#21984301)
I guess you get (infinite?) many results which all have the same hash and one (or more) of them will be shorter than the hash.
Re:The first chosen-prefix collision for SHA-1 by pathseeker on Tuesday January 07, 2020 @01:17PM (#21982790)
Re:The first chosen-prefix collision for SHA-1 by monktastic1 on Tuesday January 07, 2020 @01:39PM (#21983068)
Can you explain the relevance? If I put N items randomly into >> N buckets the chance of there being a second item in a particular bucket is small (as opposed to there merely being a bucket with two items, as in the birthday "paradox").
Re:The first chosen-prefix collision for SHA-1 by DuskStar on Tuesday January 07, 2020 @01:42PM (#21983110)
That doesn't apply here, since the birthday paradox is about the existence of a collision, not that any particular sequence collides.

Most people in the room will still have unique birthdays even if one pair share theirs.

Re:The first chosen-prefix collision for SHA-1 by im3w1l on Tuesday January 07, 2020 @02:10PM (#21983468)
As an aside, sha-1 is smaller than 128 bytes.

From my numerical experiments (I hope I didn't mess up...) using the random oracle model, the probability that a given key is collision-free is 99.6% if the input is one byte shorter than hash, 1/e if input is same size as hash and 6.6e-112 if the input is one byte longer than hash.

And this holds basically irrespective of key size.

Re:The first chosen-prefix collision for SHA-1 by jodrellblank on Tuesday January 07, 2020 @02:04PM (#21983397)
If you're planning to brute-force count through 2^(128x8) possible bit inputs, it will be quite a few decades indeed. And you'll need a few spare solar systems to annihilate to get enough energy to drive your counting engine through that many states.

https://security.stackexchange.com/a/6149/1427

Re:The first chosen-prefix collision for SHA-1 by gpm on Tuesday January 07, 2020 @03:20PM (#21984347)
The idea is to wait for a preimage attack on sha, not brute force it.
Re:The first chosen-prefix collision for SHA-1 by tambourine_man on Tuesday January 07, 2020 @11:17AM (#21981346)
I'm refering to not being able to rely on encryption in the long term.
Re:The first chosen-prefix collision for SHA-1 by vbrandl on Tuesday January 07, 2020 @11:44AM (#21981632)
Hashing is a separate problem from encryption. There is no proof that one way functions (the idea behind hashing) even exist (by proving this, you would actually prove P!=NP, IIRC). Encryption has a slightly better track record of being broken. AES still holds its promise and is also secure against quantum computing (you might want longer keys, but that's it).

And if you want really, provably unbreakable encryption, there is still OTP. But then you'd need a key, that is as long as the data you want to encrypt.

Re:The first chosen-prefix collision for SHA-1 by blattimwind on Tuesday January 07, 2020 @12:44PM (#21982362)
The best known attack against AES reduces attack complexity by about two bits over brute force. Given the history of block ciphers, the idea that AES might not be broken in this life time is not uncommon.