TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The first chosen-prefix collision for SHA-1

928 pointsby ynezzover 5 years ago

26 comments

nneonneoover 5 years ago
So to be clear about what this is (because the website doesn’t quite clarify): this collision lets you pick two different prefixes P1, P2, then calculates some pseudorandom data C1, C2 such that SHA1(P1+C1) = SHA1(P2+C2). The length extension property of SHA1 (and MD5) means that now SHA1(P1+C1+X) = SHA1(P2+C2+X) for any X.<p>A similar attack (which requires only a few hours on modest hardware nowadays) has been known for a long time for MD5, but this is the first time it’s been demonstrated for SHA-1.<p>The previous attack, called Shattered (<a href="https:&#x2F;&#x2F;shattered.io" rel="nofollow">https:&#x2F;&#x2F;shattered.io</a>) was a regular collision, that is, they chose a single prefix P and found different C1, C2 such that SHA1(P+C1) = SHA1(P+C2). This can also be length extended, so that SHA1(P+C1+X) = SHA1(P+C2+X). However, this attack is more limited because there is little to no control over the pseudorandom C1 and C2 (the only differing parts of the messages).<p>With a chosen prefix collision, though, things are way worse. Now you can create two documents that are arbitrarily different, pad them to the same length, and tack on some extra blocks to make them collide.<p>Luckily, the first collision should have already warned people to get off of SHA1. It’s no longer safe to use for many applications. (Note, generally for basic integrity operations it might be OK since there’s no preimage attack, but I’d still be a bit wary myself).
评论 #21984872 未加载
评论 #21984912 未加载
评论 #21985225 未加载
评论 #21988079 未加载
bjornsingover 5 years ago
&gt; We note that classical collisions and chosen-prefix collisions do not threaten all usages of SHA-1. In particular, HMAC-SHA-1 seems relatively safe, and preimage resistance (aka ability to invert the hash function) of SHA-1 remains unbroken as of today.<p>Nice to see this bit of intellectual honesty. Would be even nicer if they had explained what that means in terms of PGP keys.
评论 #21981051 未加载
评论 #21982259 未加载
tambourine_manover 5 years ago
This kind of thing always brings me down a bit. It&#x27;s not rational, but it does.<p>I mean I truly admire these folks skills, the math involved is obviously remarkable.<p>But I think the feeling is related to not being able to rely on anything in our field. Hard to justify going to the trouble of encrypting your backup. 10 years from now, it might be as good as plain text.<p>It&#x27;s not security only, nothing seems to work in the long term. Imagine an engineer receiving a call at midnight about his bridge because gravity changed during daylight saving in a leap year. That&#x27;s our field.
评论 #21982798 未加载
评论 #21981565 未加载
评论 #21983176 未加载
评论 #21981323 未加载
评论 #21982172 未加载
评论 #21981645 未加载
评论 #21982767 未加载
评论 #21981370 未加载
评论 #21982965 未加载
评论 #21981466 未加载
评论 #21982247 未加载
评论 #21987278 未加载
评论 #21986880 未加载
评论 #21984420 未加载
评论 #21981314 未加载
评论 #21983776 未加载
评论 #21984515 未加载
评论 #21984545 未加载
评论 #21983291 未加载
newscrackerover 5 years ago
General questions:<p>(edit: these are indeed general questions, not just about SHA1)<p>Has anyone else been worried about data deduplication done by storage and&#x2F;or backup systems, considering that they usually use hashes to detect data blocks that are &quot;the same&quot; (without additional metadata) and avoid storing those &quot;duplicate data blocks&quot; again? Doesn&#x27;t this seem far worse when you also consider that systems like Dropbox deduplicate data across all their users (expanding the footprint for collisions)? Are there any research papers&#x2F;articles&#x2F;investigations about this?
评论 #21982205 未加载
评论 #21982341 未加载
评论 #21982178 未加载
评论 #21982349 未加载
jlokierover 5 years ago
Just a curiosity, since people are talking about Git still using SHA-1 (despite work on SHA-256 since 2017).<p>I see that Git doesn&#x27;t actually use SHA-1 any more, it uses &quot;hardened SHA-1&quot;: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;10434326&#x2F;hash-collision-in-git&#x2F;43355918#43355918" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;10434326&#x2F;hash-collision-...</a>
评论 #21981882 未加载
评论 #21981939 未加载
mehrdadnover 5 years ago
&gt; SHA-1 has been broken for 15 years, so there is no good reason to use this hash function in modern security software.<p>Why are cryptographers always exaggerating things and so out of touch with reality? The first actual collision was like 3 years ago. It&#x27;s not like the world has been on fire in the meantime, and it&#x27;s not like SHA-1 is broken for every single possible usage even now. And why the nonsense with &quot;no good reason&quot;? Obviously performance is one significant consideration for the unbroken use cases. Do they think painting a different reality than the one we live in somehow makes their case more compelling?
评论 #21981552 未加载
评论 #21983422 未加载
评论 #21981525 未加载
评论 #21982201 未加载
评论 #21981779 未加载
评论 #21981757 未加载
评论 #21981507 未加载
评论 #21981560 未加载
评论 #21982418 未加载
评论 #21981533 未加载
whatshisfaceover 5 years ago
&gt;<i>A countermeasure has been implemented in commit edc36f5, included in GnuPG version 2.2.18 (released on the 25th of November 2019): SHA-1-based identity signatures created after 2019-01-19 are now considered invalid.</i><p>Since SHA-1 was always possible to break, and since NSA probably gets access to big computers and sophisticated techniques before researchers, why doesn&#x27;t this invalidate every SHA-1 signature ever made and not just ones from last year?
评论 #21981067 未加载
评论 #21983424 未加载
ebg13over 5 years ago
Quick question about the &quot;What should I do&quot; section. It says &quot;<i>use instead SHA-256</i>&quot;. Isn&#x27;t SHA-512 both better and faster on modern hardware?
评论 #21980223 未加载
评论 #21980210 未加载
评论 #21980243 未加载
评论 #21980236 未加载
评论 #21980171 未加载
评论 #21982021 未加载
评论 #21980206 未加载
评论 #21980463 未加载
评论 #21980234 未加载
kibwenover 5 years ago
Out of curiosity, can anyone explain in layman&#x27;s terms the differences in design that make SHA-1&#x27;s successors immune to the known attacks against SHA-1? Ultimately was this the result of an apparent flaw in SHA-1 that only became obvious in retrospect, or was it something totally unforeseeable?
评论 #21983076 未加载
评论 #21983022 未加载
0x0over 5 years ago
Q: Does this make it even more urgent for git to move to a different hash?
评论 #21980100 未加载
评论 #21980093 未加载
评论 #21980118 未加载
评论 #21980162 未加载
评论 #21980158 未加载
评论 #21986340 未加载
edwintorokover 5 years ago
&gt; security level 2 (defined as 112-bit security) in the latest release (Debian Buster); this already prevents dangerous usage of SHA-1<p>FWIW this doesn&#x27;t apply to Fedora currently, because it has a patch that re-enables SHA-1 in security level 2 in non-FIPS mode: <a href="https:&#x2F;&#x2F;src.fedoraproject.org&#x2F;rpms&#x2F;openssl&#x2F;blob&#x2F;master&#x2F;f&#x2F;openssl-1.1.1-seclevel.patch" rel="nofollow">https:&#x2F;&#x2F;src.fedoraproject.org&#x2F;rpms&#x2F;openssl&#x2F;blob&#x2F;master&#x2F;f&#x2F;ope...</a>
jVincover 5 years ago
So how would someone go about gaining more than 45k USD in profit from a single case of using the chosen-prefix collision? Not being candid here, I am honestly curious here. I&#x27;d guess that even in situations where you somehow get a signed e-mail sent off spoofing a CEO saying &quot;Please pay these guys 50k$&quot; the actual payout seems unlikely and that puts the attacker 45k in the red. But maybe there are some obvious avenues of abuse that I&#x27;m missing, or is this more a case of &quot;In a decade it will become economical to abuse this for profit&quot;?
评论 #21985294 未加载
评论 #21984688 未加载
评论 #21985052 未加载
eerrtover 5 years ago
The full paper is <a href="https:&#x2F;&#x2F;eprint.iacr.org&#x2F;2020&#x2F;014.pdf" rel="nofollow">https:&#x2F;&#x2F;eprint.iacr.org&#x2F;2020&#x2F;014.pdf</a> if anyone is interested
perl4everover 5 years ago
Let&#x27;s say that you know that someone stores documents by SHA, and silently overwrites collisions. Is there any way this would help to deceive them after being forced to give them your data? It seems like once the data is out of your control, you can&#x27;t match an existing SHA, and if you created a pair of documents that match SHAs, you can&#x27;t predict which one will be overwritten.
jwilkover 5 years ago
Link to the GnuPG commit:<p><a href="https:&#x2F;&#x2F;dev.gnupg.org&#x2F;rGedc36f59fcfc" rel="nofollow">https:&#x2F;&#x2F;dev.gnupg.org&#x2F;rGedc36f59fcfc</a>
LennyWhiteJrover 5 years ago
The root certificate authority for my company&#x27;s Active Directory is signed using a sha1 hash. What are the practical implications of this chosen collision?<p>How do I convince my IT department to update our CA to sha256?
评论 #21998252 未加载
notlukeskyover 5 years ago
&gt; Responsible Disclosure<p>We have tried to contact the authors of affected software before announcing this attack, but due to limited resources, we could not notify everyone.<p>Is there a list of affected software out there?
评论 #21989019 未加载
评论 #21981472 未加载
RcouF1uZ4gsCover 5 years ago
Does this affect Git? I believe it uses SHA-1 for commits. Is it possible to use this attack to add malicious code to a git repository without changing the hashes for the commits?
评论 #21984889 未加载
femto113over 5 years ago
While a meaningful accomplishment, suggesting the algorithm is in a &quot;shambles&quot; seems hyperbolic to me. For one thing there&#x27;s a non-trivial practical leap between formulating two colliding identities and forging an existing one, and for another this was only modestly better than a pure brute force attack. If anything I&#x27;m somewhat reassured by the idea that it still costs $40,000+ of GPU time to pull something like this off while doing the same with MD5 is feasible on a mobile phone.
nvartolomeiover 5 years ago
I assume there was a lot of work (read money) put in those collision attacks rather than it being discovered by accident. I&#x27;m wondering who is sponsoring this work and for what purpose? The argument about proving that an algorithm is broken and working on better cryptography wouldn&#x27;t suffice in this case, as issues were shown before that. Here the purpose was to make the attack cheaper?
评论 #21982150 未加载
nojaover 5 years ago
Is a collision impossible with two hashes, each using a different algorithm?
评论 #21982475 未加载
评论 #21983928 未加载
tinus_hnover 5 years ago
Are there any crypto currencies that use SHA-1 for their proof of work?
silasdavisover 5 years ago
Who paid for this?
评论 #21984436 未加载
umviover 5 years ago
Is &quot;a Shambles&quot; British or something? I&#x27;ve always heard it as &quot;in Shambles&quot;
评论 #21980449 未加载
评论 #21980510 未加载
评论 #21980604 未加载
评论 #21980662 未加载
评论 #21980588 未加载
emilfihlmanover 5 years ago
&gt;Can I try it out for myself? Since our attack on SHA-1 has pratical implications, in order to make sure proper countermeasures have been pushed we will wait for some time before releasing source code that allows to generate SHA-1 chosen-prefix collisions.<p>Sigh. Again with this idiocy. All instances where the adversary is capable of launching this attack financially mean they also have the capability to write the exploit themselves.
评论 #21981624 未加载
评论 #21980845 未加载
rustyboltover 5 years ago
&gt; By renting a GPU cluster online, the entire chosen-prefix collision attack on SHA-1 costed us about 75k USD.<p>So they just decided to try their attack and spend two years worth of salary on it?? That&#x27;s crazy.
评论 #21980498 未加载
评论 #21980455 未加载
评论 #21980475 未加载
评论 #21983153 未加载