{"id":1224,"date":"2026-11-08T08:07:17","date_gmt":"2026-11-08T07:07:17","guid":{"rendered":"https:\/\/hadamard.com\/c\/is-sha-1-broken-collisions-explained\/"},"modified":"2026-11-08T08:07:17","modified_gmt":"2026-11-08T07:07:17","slug":"is-sha-1-broken-collisions-explained","status":"publish","type":"post","link":"https:\/\/hadamard.com\/c\/is-sha-1-broken-collisions-explained\/","title":{"rendered":"Is SHA-1 Broken? From 2^69 on Paper to a $45,000 Collision"},"content":{"rendered":"<p>Yes, SHA-1 is broken: its collision resistance has failed in practice. Researchers made the first real full SHA-1 collision in 2017. By 2020, a chosen-prefix collision, the more dangerous kind, was estimated to cost about $45,000 in rented GPU time.<\/p>\n<p>So if you&#8217;re asking whether SHA-1 is broken, the precise answer is that it no longer guarantees two different inputs won&#8217;t share a hash. All the attacks below are collision attacks. Below is how the cost dropped from a theoretical result to something you can buy, where SHA-1 still shows up (Git, PGP, DNSSEC), and what NIST&#8217;s 2030 deadline means for anyone still using it.<\/p>\n<h2>Is SHA-1 broken? What &#8220;broken&#8221; actually means<\/h2>\n<p>A cryptographic hash function turns any input into a short, fixed-length digest. One of its main promises is <strong>collision resistance<\/strong>: finding two different inputs with the same digest should be infeasible. Signatures, certificates and content-addressed storage all depend on it. When you sign a hash, you are in effect signing every input that produces that hash.<\/p>\n<h3>Why 2<sup>80<\/sup> was the bar<\/h3>\n<p>SHA-1 produces a 160-bit digest. The birthday paradox means a generic collision search takes roughly the square root of the output space, not the whole space. For a 160-bit output that&#8217;s about 2<sup>80<\/sup> operations. Brute force can never do better than that, so cryptographers call a hash &#8220;broken&#8221; for collisions once someone finds a method that&#8217;s clearly cheaper than 2<sup>80<\/sup>.<\/p>\n<p>That definition matters, because &#8220;broken&#8221; doesn&#8217;t mean &#8220;anyone can reverse it.&#8221; It means the security margin the design promised is gone, and attacks only get cheaper over time.<\/p>\n<h2>2005: Wang, Yin and Yu cut the cost to 2<sup>69<\/sup><\/h2>\n<p>The first serious break came in February 2005. On February 15, Bruce Schneier <a href=\"https:\/\/www.schneier.com\/blog\/archives\/2005\/02\/sha1_broken.html\" target=\"_blank\" rel=\"noopener\">reported on his blog<\/a> that Xiaoyun Wang, Yiqun Lisa Yin and Hongbo Yu, &#8220;mostly from Shandong University in China,&#8221; had found a way to produce full SHA-1 collisions in about 2<sup>69<\/sup> operations, compared with 2<sup>80<\/sup> for brute force.<\/p>\n<p>That is 2<sup>11<\/sup>, or about 2,048 times less work. The same research gave about 2<sup>39<\/sup> operations for SHA-0 and 2<sup>33<\/sup> for a 58-round version of SHA-1. Schneier&#8217;s headline was blunt, though he noted in the same post that the paper wasn&#8217;t generally available yet and he couldn&#8217;t confirm the attack was real. He wrote:<\/p>\n<blockquote>\n<p>&#8220;SHA-1 has been broken. Not a reduced-round version. Not a simplified version. The real thing.&#8221;<\/p>\n<\/blockquote>\n<p>Nobody actually produced a collision in 2005. 2<sup>69<\/sup> was still a huge computation at the time. But the result showed that SHA-1&#8217;s design had a structural weakness, and further improvements would only lower the cost.<\/p>\n<h2>SHAttered: the first full SHA-1 collision in 2017<\/h2>\n<p>Twelve years later, the theory became a concrete result. On February 23, 2017, CWI Amsterdam (Marc Stevens, Pierre Karpman) and Google (Elie Bursztein, Ange Albertini, Yarik Markov) <a href=\"https:\/\/security.googleblog.com\/2017\/02\/announcing-first-sha1-collision.html\" target=\"_blank\" rel=\"noopener\">announced the first SHA-1 collision<\/a> on the Google Security Blog. The attack, called SHAttered, produced two different, valid PDF files with the same SHA-1 hash.<\/p>\n<p>The compute was large but finite. The <a href=\"https:\/\/shattered.io\/\" target=\"_blank\" rel=\"noopener\">SHAttered project site<\/a> describes about nine quintillion SHA-1 computations, roughly 6,500 CPU-years plus 110 GPU-years. The accompanying paper, <a href=\"https:\/\/eprint.iacr.org\/2017\/190\" target=\"_blank\" rel=\"noopener\">&#8220;The first collision for full SHA-1&#8221;<\/a>, gives the effort as 2<sup>63.1<\/sup> calls to SHA-1&#8217;s compression function and about &#8220;100 GPU years.&#8221; It calls the attack &#8220;more than 100,000 times faster than a brute force search.&#8221;<\/p>\n<p>SHAttered was an <strong>identical-prefix<\/strong> collision. Both files start with the same content, and the attacker computes a pair of differing blocks that bring the hash states back together. That&#8217;s enough to make two documents that look different but share a hash. The attacker can&#8217;t take two arbitrary existing documents and make them collide.<\/p>\n<h2>SHA-1 chosen-prefix collisions: Shambles and the $45k attack<\/h2>\n<p>That limit fell in January 2020. Ga\u00ebtan Leurent and Thomas Peyrin published <a href=\"https:\/\/eprint.iacr.org\/2020\/014\" target=\"_blank\" rel=\"noopener\">&#8220;SHA-1 is a Shambles \u2013 First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust&#8221;<\/a>. In a <strong>chosen-prefix<\/strong> collision, the attacker picks two different starting points, such as two different names or identities, then computes suffixes that make the full messages hash to the same value.<\/p>\n<p>The paper lowered the cost of both attack types (measured on an Nvidia GTX 970):<\/p>\n<table>\n<thead>\n<tr>\n<th>Attack type<\/th>\n<th>Previous best<\/th>\n<th>Shambles (2020)<\/th>\n<th>Estimated rental cost<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identical-prefix collision<\/td>\n<td>2<sup>64.7<\/sup><\/td>\n<td>about 2<sup>61.2<\/sup><\/td>\n<td>about $11k<\/td>\n<\/tr>\n<tr>\n<td>Chosen-prefix collision<\/td>\n<td>2<sup>67.1<\/sup><\/td>\n<td>about 2<sup>63.4<\/sup><\/td>\n<td>about $45k<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The researchers then ran the computation for real: about two months on 900 Nvidia GTX 1060 GPUs, at a cost of about $75k. The <a href=\"https:\/\/sha-mbles.github.io\/\" target=\"_blank\" rel=\"noopener\">Shambles project site<\/a> also projected that a chosen-prefix collision would cost under $10k by 2025.<\/p>\n<h3>Real-world damage: forged PGP key certifications (CVE-2019-14855)<\/h3>\n<p>The researchers aimed the attack at a real system. GnuPG 1.4 used SHA-1 by default for identity certifications, the signatures that make up the PGP Web of Trust. They built two keys with different UserIDs and colliding certificates. A legitimate signature on one key could then be moved onto a forged key impersonating someone else.<\/p>\n<p>The issue is tracked as CVE-2019-14855. GnuPG 2.2.18, released November 25, 2019, fixed it by treating SHA-1 identity signatures created after 2019-01-19 as invalid. The authors also advise DNSSEC users with algorithm numbers 7 or lower to upgrade. Their general advice is short: &#8220;Remove any use of SHA-1 in your product as soon as possible.&#8221;<\/p>\n<h2>Does Git still use SHA-1?<\/h2>\n<p>Git is the best-known system that still runs on SHA-1, which uses it to name every commit, tree and file. The project responded in two stages.<\/p>\n<p>The first was a hardened implementation. According to <a href=\"https:\/\/git-scm.com\/docs\/hash-function-transition\" target=\"_blank\" rel=\"noopener\">Git&#8217;s hash function transition document<\/a>: &#8220;Git v2.13.0 and later subsequently moved to a hardened SHA-1 implementation by default, which isn&#8217;t vulnerable to the SHAttered attack, but SHA-1 is still weak.&#8221; The hardened version detects the specific patterns that collision attacks leave behind. It doesn&#8217;t make SHA-1 strong again.<\/p>\n<p>The second is a full change of hash. Git considered SHA-256, SHA-512\/256, SHA-256&#215;16, K12 and BLAKE2bp-256, and &#8220;in late 2018 the project picked SHA-256 as its successor hash.&#8221; Git needs collision and second-preimage resistance. It doesn&#8217;t need length-extension resistance, which helped narrow the choice.<\/p>\n<h3>The Git SHA-256 transition and Git 3.0<\/h3>\n<p>Git&#8217;s <a href=\"https:\/\/git-scm.com\/docs\/BreakingChanges\" target=\"_blank\" rel=\"noopener\">BreakingChanges document<\/a> states that in Git 3.0, &#8220;The default hash function for new repositories will be changed from &#8216;sha1&#8217; to &#8216;sha256&#8217;.&#8221; It notes that &#8220;SHA-1 has been deprecated by NIST in 2011&#8221;. It also lists the attacks behind the change: The SHAppening (2015), SHAttered (2017, two valid PDFs with 2<sup>63<\/sup> operations), Birthday-Near-Collision (2019) and Shambles (2020).<\/p>\n<p>There are two caveats. First, &#8220;There is no plan to deprecate the &#8216;sha1&#8217; object format at this point in time&#8221;. The wider ecosystem, including code forges, has to support SHA-256 before anything else can change. Second, &#8220;There is no planned release date for this breaking version yet.&#8221;<\/p>\n<h2>NIST SHA-1 retirement: the December 31, 2030 deadline<\/h2>\n<p>On December 15, 2022, NIST <a href=\"https:\/\/www.nist.gov\/news-events\/news\/2022\/12\/nist-retires-sha-1-cryptographic-algorithm\" target=\"_blank\" rel=\"noopener\">announced that it is retiring SHA-1<\/a>. NIST will stop using SHA-1 in its remaining protocols by December 31, 2030. It plans to publish FIPS 180-5, which removes the SHA-1 specification. The replacements are the SHA-2 and SHA-3 families.<\/p>\n<p>Some history: SHA-1 has been in use since 1995 under FIPS 180-1. It&#8217;s a modified version of SHA, the first hash function the U.S. federal government standardized, in 1993. NIST&#8217;s Chris Celi summed up the practical guidance:<\/p>\n<blockquote>\n<p>&#8220;We recommend that anyone relying on SHA-1 for security migrate to SHA-2 or SHA-3 as soon as possible.&#8221;<\/p>\n<\/blockquote>\n<p>He also spelled out the procurement consequence: &#8220;Modules that still use SHA-1 after 2030 will not be permitted for purchase by the federal government.&#8221; For vendors selling cryptographic modules into the U.S. public sector, that sets a hard date.<\/p>\n<h3>SHA-1 vs SHA-256: what to use instead<\/h3>\n<p>The answer is the same across NIST, the Shambles authors and the Git project: use SHA-2 (SHA-256 or SHA-512 variants) or SHA-3. SHA-256 is the most widely supported and is Git&#8217;s chosen successor. If you&#8217;re wondering whether SHA-256 holds up against future quantum computers, we covered that separately in <a href=\"https:\/\/hadamard.com\/c\/can-quantum-computers-break-sha-256\/\">what Grover and BHT really do to SHA-256<\/a>.<\/p>\n<h3>What to audit<\/h3>\n<ul>\n<li><strong>Signatures and certificates:<\/strong> anything that signs a SHA-1 digest is exposed to collision-based forgery. This is exactly what the PGP attack did.<\/li>\n<li><strong>PGP keys:<\/strong> move to GnuPG 2.2.18 or later, and re-certify keys with SHA-2 signatures.<\/li>\n<li><strong>DNSSEC:<\/strong> check for algorithm numbers 7 or lower, as the Shambles authors advise.<\/li>\n<li><strong>Git repositories:<\/strong> make sure you&#8217;re on a version with hardened SHA-1 (2.13.0 or later). If your tools and forge support it, consider SHA-256 for new repositories.<\/li>\n<li><strong>Checksums and deduplication:<\/strong> if an attacker can influence any of the inputs, SHA-1 can&#8217;t be trusted to tell different content apart.<\/li>\n<li><strong>Compliance:<\/strong> list every module that relies on SHA-1 before the December 31, 2030 NIST cutoff.<\/li>\n<\/ul>\n<p>To see how other cryptographic transitions are progressing, our <a href=\"https:\/\/hadamard.com\/post-quantum-tracker\/\">Post-Quantum Migration Tracker<\/a> follows standards, browsers, messengers and blockchains as they move to new primitives.<\/p>\n<p>The SHA-1 timeline also matters to us at Hadamard. We build <a href=\"https:\/\/bb84.com\/\">BB84<\/a>, a hash-based Layer 2 rollup on Ethereum. Its accounts are one-time addresses built from hash commitments, not ECDSA keys. Designs like this depend directly on the hash function underneath. SHA-1 is the clearest example of why that hash&#8217;s security has to be tracked over decades: it went from a theoretical break to an attack you can rent in about fifteen years.<\/p>\n<h2>FAQ<\/h2>\n<h3>Is SHA-1 still safe for checksums or file integrity checks?<\/h3>\n<p>Not if an attacker can choose or influence the inputs. Its collision resistance is broken, so two different files can be made to share a SHA-1 hash. NIST and the Shambles authors both recommend moving to SHA-2 or SHA-3.<\/p>\n<h3>How much does it cost to create a SHA-1 collision?<\/h3>\n<p>According to the 2020 Shambles research, about $11k in rented GPU time for an identical-prefix collision and about $45k for a chosen-prefix collision. The authors projected that a chosen-prefix collision would cost under $10k by 2025.<\/p>\n<h3>Does Git still use SHA-1, and is my repository at risk?<\/h3>\n<p>Yes. Since v2.13.0, Git has used a hardened SHA-1 implementation by default, which isn&#8217;t vulnerable to the SHAttered attack, though Git&#8217;s own documentation still calls SHA-1 weak. Git 3.0 will make SHA-256 the default for new repositories, but it has no release date yet.<\/p>\n<h3>What is the difference between an identical-prefix and a chosen-prefix collision?<\/h3>\n<p>In an identical-prefix collision, both messages share the same starting content. A chosen-prefix collision lets the attacker pick two different meaningful prefixes, such as two different PGP UserIDs, and still make them collide. That&#8217;s why Shambles was more dangerous in practice than SHAttered.<\/p>\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.schneier.com\/blog\/archives\/2005\/02\/sha1_broken.html\" target=\"_blank\" rel=\"noopener\">SHA-1 Broken<\/a> \u2013 Schneier on Security, February 15, 2005<\/li>\n<li><a href=\"https:\/\/security.googleblog.com\/2017\/02\/announcing-first-sha1-collision.html\" target=\"_blank\" rel=\"noopener\">Announcing the first SHA1 collision<\/a> \u2013 Google Security Blog, February 23, 2017<\/li>\n<li><a href=\"https:\/\/shattered.io\/\" target=\"_blank\" rel=\"noopener\">SHAttered project site<\/a> \u2013 CWI Amsterdam and Google, accessed November 8, 2026<\/li>\n<li><a href=\"https:\/\/eprint.iacr.org\/2017\/190\" target=\"_blank\" rel=\"noopener\">The first collision for full SHA-1<\/a> \u2013 Stevens, Bursztein, Karpman, Albertini, Markov, IACR ePrint 2017\/190, 2017<\/li>\n<li><a href=\"https:\/\/eprint.iacr.org\/2020\/014\" target=\"_blank\" rel=\"noopener\">SHA-1 is a Shambles \u2013 First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust<\/a> \u2013 Leurent and Peyrin, IACR ePrint 2020\/014, 2020<\/li>\n<li><a href=\"https:\/\/sha-mbles.github.io\/\" target=\"_blank\" rel=\"noopener\">SHA-1 is a Shambles project site<\/a> \u2013 Leurent and Peyrin, January 2020<\/li>\n<li><a href=\"https:\/\/www.nist.gov\/news-events\/news\/2022\/12\/nist-retires-sha-1-cryptographic-algorithm\" target=\"_blank\" rel=\"noopener\">NIST Retires SHA-1 Cryptographic Algorithm<\/a> \u2013 NIST, December 15, 2022 (updated April 8, 2026)<\/li>\n<li><a href=\"https:\/\/git-scm.com\/docs\/hash-function-transition\" target=\"_blank\" rel=\"noopener\">Git hash function transition<\/a> \u2013 Git documentation, accessed November 8, 2026<\/li>\n<li><a href=\"https:\/\/git-scm.com\/docs\/BreakingChanges\" target=\"_blank\" rel=\"noopener\">Git BreakingChanges<\/a> \u2013 Git documentation, accessed November 8, 2026<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>SHA-1 went from a theoretical break in 2005 to a real collision in 2017 and a rentable chosen-prefix attack in 2020. Here is what &#8220;broken&#8221; means, what an attack costs, and where SHA-1 still matters, from Git to NIST&#8217;s 2030 deadline.<\/p>\n","protected":false},"author":1,"featured_media":1225,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[785],"tags":[856,248,855,788,795,854],"class_list":["post-1224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-science-mathematics","tag-collision-attacks","tag-cryptography","tag-git","tag-hash-functions","tag-nist","tag-sha-1","entry"],"jetpack_featured_media_url":"https:\/\/hadamard.com\/c\/wp-content\/uploads\/2026\/11\/2026-11-08-is-sha-1-broken-collisions-explained.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/posts\/1224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/comments?post=1224"}],"version-history":[{"count":0,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/posts\/1224\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/media\/1225"}],"wp:attachment":[{"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/media?parent=1224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/categories?post=1224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hadamard.com\/c\/wp-json\/wp\/v2\/tags?post=1224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}