On 2021-01-11 at 22:16:33, Junio C Hamano wrote: > "brian m. carlson" writes: > > > This series introduces support for verifying commits and tags signed by > > multiple algorithms. > > > > Originally, we had planned for SHA-256 tags to stuff the signature in a > > header instead of using a trailing signature, and a patch to do that was > > sent out in part 1/3. Unfortunately, for whatever reason, that patch > > didn't make it into the master branch, and so we use trailing signatures > > there. > > > > We can't change this now, because otherwise it would be ambiguous > > whether the trailing signature on a SHA-256 object was for the SHA-256 > > contents or whether the contents were a rewritten SHA-1 object with no > > SHA-256 signature at all. > > How widely are SHA-256 tags in use in the real world, though? Is it > really too late to fix that already? I don't know. I don't know of any major hosting platform that supports them, but of course many people may be using them independently on self-hosted instances. I don't think it matters one way or the other, honestly, because the functionality is the same either way, whether we always put SHA-256 in a header or whether we put the non-default algorithm in the header. Multiply signed commits and tags are still unverifiable on older versions because the older versions consider the header to be part of the payload and not something to be stripped. I just noticed this because I'm now getting to the case where we write (and sign) both SHA-1 and SHA-256 versions of commits and I thought I'd better send in a patch sooner rather than later, since there's a lot more prep work (surprise) before we get to anything interesting. -- brian m. carlson (he/him or they/them) Houston, Texas, US