LWN: Comments on "Removing SHA-1 for signatures in Fedora" https://lwn.net/Articles/887832/ This is a special feed containing comments posted to the individual LWN article titled "Removing SHA-1 for signatures in Fedora". en-us Thu, 09 Oct 2025 13:26:58 +0000 Thu, 09 Oct 2025 13:26:58 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Breaks listing or upgrading SHA-1 RPMs https://lwn.net/Articles/888958/ https://lwn.net/Articles/888958/ AdamW <div class="FormattedComment"> IIRC it is possible to implement something more finely grained than just &quot;pick DEFAULT or LEGACY&quot; with the crypto-policies system, but it&#x27;s more complicated and difficult. This again is similar to SELinux, where it&#x27;s usually a much better idea to create a custom policy than just switch to permissive mode, but doing so is more than a single command so people just use the big hammer...<br> </div> Wed, 23 Mar 2022 06:41:28 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888727/ https://lwn.net/Articles/888727/ hkario <div class="FormattedComment"> There has been interfaces to perform certificate verification at a given time for decades now.<br> The thing is that basically no signature includes a trustworthy timestamp that allows you to perform verification at any other time than *now*.<br> <p> Those interfaces are used for systems that handle CAdES or PAdES, not S/MIME, SSH and TLS.<br> </div> Mon, 21 Mar 2022 19:03:27 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888630/ https://lwn.net/Articles/888630/ mathstuf <div class="FormattedComment"> <font class="QuotedText">&gt; Or to put it other way, just like certificates have expiry dates on them, so do hashes.</font><br> <p> It seems like the API for verifying signatures needs to be richer then. Allow verifying anything, but have it decorated with an &quot;expiry date&quot; kind of tag so that you can get tags like:<br> <p> <font class="QuotedText">&gt; Verified (trusted)</font><br> <font class="QuotedText">&gt; Verified (be suspicious if signed after 2022-01)</font><br> <p> Basically, it sounds like a simple boolean is just not rich enough to convey signature validity.<br> </div> Mon, 21 Mar 2022 04:56:59 +0000 Breaks listing or upgrading SHA-1 RPMs https://lwn.net/Articles/888358/ https://lwn.net/Articles/888358/ jccleaver <div class="FormattedComment"> Yeah, the RPM signature incompatibility between EL5 and EL6 was ugly, and a pain during that entire transition for people that were heavily using RPMs for configuration and deployment, with SRPMs going back and forth.<br> </div> Thu, 17 Mar 2022 23:59:22 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888210/ https://lwn.net/Articles/888210/ hkario <div class="FormattedComment"> <font class="QuotedText">&gt; Either API, which may your mail client uses, was extensible exough and it would transparently switch to SHA-512 or something… or it wasn&#x27;t flexible and you need to change source and recompile it.</font><br> <p> You&#x27;re completely missing the issue.<br> <p> The problem is not what my client creates. It&#x27;s about what my client will accept from the network. And my client was able to accept SHA-256 and SHA-512 10 years ago, the problem is that what it gets doesn&#x27;t depend on my client, it&#x27;s completely up to the sender.<br> <p> What&#x27;s changing, is the set of algorithms the underlying cryptographic library will accept when verifying the signatures. Now that set doesn&#x27;t include SHA-1, just like it didn&#x27;t include MD4 and MD5. The difference being that SHA-1 was far more widespread than MD5 so deprecating it is much more complex.<br> <p> Or to put it other way, just like certificates have expiry dates on them, so do hashes. Just because a certificate worked yesterday doesn&#x27;t mean it will work today. It just isn&#x27;t as clear-cut with hashes.<br> </div> Thu, 17 Mar 2022 11:28:23 +0000 Breaks listing or upgrading SHA-1 RPMs https://lwn.net/Articles/888188/ https://lwn.net/Articles/888188/ rwmj <p>One thing that isn't clear about this change is that it breaks listing out and upgrading installed RPMs that are using SHA-1 signatures. So it's not only a question of whether third party repos are still using SHA-1, but whether third party repos have <i>ever</i> used SHA-1 signatures and those packages could still be installed.</p> <p> The way around this is (and indeed any other SHA-1 related problem) is: </p> <pre> update-crypto-policies --set LEGACY </pre> <p> but this is a huge hammer, reducing security across the whole system. This might become the new "disable SELinux" which took years and years to overcome. I asked the developers to look again and see if we can make safer tools: </p> <a href="https://bugzilla.redhat.com/show_bug.cgi?id=2064740">https://bugzilla.redhat.com/show_bug.cgi?id=2064740</a> <p>For me the RPM / SHA-1 change particularly <a href="https://bugzilla.redhat.com/show_bug.cgi?id=2064182">affected libguestfs</a> which wants to analyze the RPMs in old guests (eg. RHEL &lt; 5). We worked around it by turning off RPM signature validation, which is (arguably) bad, but it's only for examining already installed RPMs so I guess it'll be OK. </p> Thu, 17 Mar 2022 08:32:27 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888187/ https://lwn.net/Articles/888187/ rwmj <p><i>The primary goal should be the introduction of a mechanism that makes removal of insecure cryptographic algorithms in general easier in the future in software affected by making uses and implementations easier to discover as well as making algorithms configurable where they are used and flexible where they are part of some standard.</i></p> <p> This is sort of what <a href="https://fedoraproject.org/wiki/Changes/CryptoPolicy">crypto-policies</a> does. In fact this SHA-1 change is done by changing the system crypto policy, and I don't think very much else changed if anything. </p> Thu, 17 Mar 2022 08:25:25 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888186/ https://lwn.net/Articles/888186/ nim-nim <div class="FormattedComment"> <font class="QuotedText">&gt; My other concern is that cryptography is hard and the adversaries are probably smarter than I am.</font><br> <p> They don’t need to be smarter, they just need to luck on a bug and understand its security implications. That’s what scary about defense/attack : the defender needs to perform a perfect job, the attacker just needs some luck once.<br> <p> <p> </div> Thu, 17 Mar 2022 08:24:07 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888167/ https://lwn.net/Articles/888167/ nix <div class="FormattedComment"> The reason why you can&#x27;t find any recent references to this work is that it&#x27;s done: the collision-detecting SHA-1 implementation you cite has been the default in git for years now, and the only available implementation for a year or so (it&#x27;s slower than accelerated implementations, but the actual slowdown in practical git use is a percent or two at most: insignificant).<br> </div> Wed, 16 Mar 2022 23:51:14 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888157/ https://lwn.net/Articles/888157/ NYKevin <div class="FormattedComment"> Traditionally, hashes are designed to be secure against three kinds of attack:<br> <p> 1. Preimage attacks, in which the adversary is given a digest, and wants to compute some plaintext that hashes to that digest.<br> 2. Second-preimage attacks, in which the adversary is given both a plaintext and a digest, and wants to create a different plaintext with the same digest.<br> 3. Collision attacks,in which the adversary is given nothing, and wants to create two plaintexts with the same digest.<br> <p> These properties are generally regarded as sufficient, in the sense that &quot;most&quot; (or preferably all) direct attacks against a cryptographic scheme which relies on a hashing algorithm will necessarily be reducible to one of those three attacks. That is, if you can perform attack X, for arbitrary X, then you can convert X into one of (1), (2), and (3), provided the cryptographic system is properly designed. As a consequence, if the hash function is secure against (1), (2), and (3), then it is also secure against X, for any value of X.<br> <p> The problem is, when we no longer have security against (3), we have to start worrying about other attacks that can be reduced to (3) but can&#x27;t necessarily be reduced to (1) or (2). My concern is that, if we start doing this sort of ad-hoc adjustment (&quot;add a few random bytes here, perturb a few nonce bytes there...&quot;), that does not actually recreate security against collision attacks, and therefore there may be more complicated attacks which are capable of defeating the modified scheme (e.g. a &quot;tamper-resistant collision attack&quot; which is not equivalent to a full second-preimage or preimage attack, but is instead a superset of regular collision attacks where we allow some limited modifications to the first plaintext, outside of the adversary&#x27;s control, which the adversary gets to see before they create their second plaintext).<br> <p> My other concern is that cryptography is hard and the adversaries are probably smarter than I am.<br> </div> Wed, 16 Mar 2022 22:43:04 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888155/ https://lwn.net/Articles/888155/ khim <font class="QuotedText">&gt; It doesn't matter if my mail client was compiled 10 years ago, I don't want it to trust SHA-1 signatures today because they could have been forged yesterday.</font> <p>You can not have your cake and eat it, too. Deal with it.</p> <p>Either API, which may your mail client uses, was extensible exough and it would transparently switch to SHA-512 or something… or it wasn't flexible and you need to change source and recompile it.</p> <p>There are no silver bullet or magic wand which may solve that dilemma.</p> <p>It's the same story as with Y2K change.</p> <font class="QuotedText">&gt; The other problem is that the RHEL-9 change doesn't remove SHA-1 hash, or any symbols associated with it, it forbids the combination of SHA-1 and public key cryptography.</font> <p>What does it change? Yes, it affects not the raw low-level <code>libcrypto</code>, but higher-level <code>libssl</code> (and other such libraries).</p> <p>Approach doesn't change, target does.</p> Wed, 16 Mar 2022 22:20:29 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888137/ https://lwn.net/Articles/888137/ neverpanic <div class="FormattedComment"> Working on it, stay tuned.<br> </div> Wed, 16 Mar 2022 17:49:15 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888136/ https://lwn.net/Articles/888136/ hkario <div class="FormattedComment"> That&#x27;s because the behaviour of the symbols isn&#x27;t changing to make developers lives easier.<br> It&#x27;s changing because with the exception of verifying signatures you can prove were made way, way back, you should really not trust SHA-1 signatures.<br> <p> It doesn&#x27;t matter if my mail client was compiled 10 years ago, I don&#x27;t want it to trust SHA-1 signatures today because they could have been forged yesterday.<br> <p> The other problem is that the RHEL-9 change doesn&#x27;t remove SHA-1 hash, or any symbols associated with it, it forbids the combination of SHA-1 and public key cryptography.<br> </div> Wed, 16 Mar 2022 17:48:47 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888135/ https://lwn.net/Articles/888135/ neverpanic <div class="FormattedComment"> Some work is being done to add better collision resistance to GitHub/Git despite its use of SHA-1: <a href="https://github.blog/2017-03-20-sha-1-collision-detection-on-github-com/">https://github.blog/2017-03-20-sha-1-collision-detection-...</a>. I couldn&#x27;t immediately find a reference to their work with upstream on the mailing list, but I have also not done an extensive search.<br> <p> Yes, it should also go, and it sounds like the Git developers are working on this. However, it would not be affected by this particular change, since from the OpenSSL library&#x27;s point of view, Git&#x27;s use of SHA-1 looks like a message digest only.<br> </div> Wed, 16 Mar 2022 17:24:06 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888092/ https://lwn.net/Articles/888092/ epa <div class="FormattedComment"> It sounds as though the maintainer could defeat that attack by adding some random data to the commit message before signing. Or perturb the timestamp, perhaps by cherry-picking the change into a new commit, which can then be signed. That makes life more awkward for the original contributor when merging back, but only slightly. <br> </div> Wed, 16 Mar 2022 14:27:52 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888040/ https://lwn.net/Articles/888040/ foom <div class="FormattedComment"> So, the collision issue arises when one (malicious) entity authors some content, and another (trusted) entity reads and validates the content, and then signs it using a sha1 hash.<br> <p> In that case, the trusted entity can be tricked into signing a sha1 hash created by the malicious one, with an intentional collision: one signed content which is innocent/expected, and another with the same hash -- and thus same signature -- that is malicious, and appears to have been signed.<br> <p> This seems like a completely feasible attack scenario for git. Someone contributes an innocent looking change, which gets approved by the maintainer and a signed tag for release.<br> <p> Of course, a mitigating factor is that not that many (if any) people even rely on git signatures in the first place as a way of validating content. Much more common is to fetch from a trusted host over tls, and implicitly trust the resulting content.<br> <p> And another is that git switched to a Sha1 variant which is supposedly more collision resistant, but I don&#x27;t know how safe that actually is.<br> </div> Wed, 16 Mar 2022 13:35:22 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888038/ https://lwn.net/Articles/888038/ pbonzini <div class="FormattedComment"> If you have a non-malicious commit and would like to distribute a forged commit with different contents, you would need a second preimage attack, which is a very different thing from all current practical (or almost-practical) attacks on SHA-1. All such attacks are collision attacks, and would only be usable by maintainers that are themselves malicious.<br> </div> Wed, 16 Mar 2022 12:00:32 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888036/ https://lwn.net/Articles/888036/ foom <div class="FormattedComment"> Git&#x27;s signatures are pretty-much worthless if sha1 is considered fully broken, because all that&#x27;s signed is name, email, time, message, and the sha1 hash of the commit or tree object the signature is for.<br> <p> https://git-scm.com/docs/signature-format<br> </div> Wed, 16 Mar 2022 11:49:55 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888037/ https://lwn.net/Articles/888037/ khim <p>That's self-inflicted wound: just create a separate shim libraries and use them to compile programs which misbehave with SHA1 disabled.</p> <p>Third-party apps (which you couldn't test) wouldn't be affected. And you may even do what Android does: certain other, new, libraries would be incompatible with these shims. That way developers would be forced to stop using them if they want new features.</p> Wed, 16 Mar 2022 11:30:07 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888033/ https://lwn.net/Articles/888033/ pbonzini <div class="FormattedComment"> git does not use SHA1 for signing, only as a message digest.<br> </div> Wed, 16 Mar 2022 10:17:13 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888026/ https://lwn.net/Articles/888026/ taladar <div class="FormattedComment"> Removing SHA-1 should only be a secondary goal here in my opinion. The primary goal should be the introduction of a mechanism that makes removal of insecure cryptographic algorithms in general easier in the future in software affected by making uses and implementations easier to discover as well as making algorithms configurable where they are used and flexible where they are part of some standard.<br> <p> Also, am I missing something or are they forgetting about the elephant in the room when it comes to SHA-1 use, git.<br> </div> Wed, 16 Mar 2022 09:11:12 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888014/ https://lwn.net/Articles/888014/ pabs <div class="FormattedComment"> It would be great to have a way to turn off SHA-1 on a system so that things depending on SHA-1 could be discovered and fixed.<br> </div> Wed, 16 Mar 2022 04:35:31 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/888009/ https://lwn.net/Articles/888009/ nevyn <div class="FormattedComment"> Fedora recompiles everything each release, so having a new symbol (and maybe new config. options) just to remove sha1 as a default allowed signature still affects all users using all Fedora binaries.<br> </div> Wed, 16 Mar 2022 03:08:53 +0000 Removing SHA-1 for signatures in Fedora https://lwn.net/Articles/887991/ https://lwn.net/Articles/887991/ khim <p>Can anyone explain what I'm missing?</p> <ol> <li>We have <a href="https://developers.redhat.com/blog/2019/08/01/how-the-gnu-c-library-handles-backward-compatibility">special tool</a> made just to handle that case.</li> <li>We want to get what that tool is designed to provide (programs are broken for developers, not users).</li> <li>Yet we refuse to use it, because… umm… why exactly it's not supposed to be used?</li> </ol> Tue, 15 Mar 2022 22:21:49 +0000