git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Commit SHA1 == SHA1 checksum?

From
GTGamblin, Todd <gamblin2@llnl.gov>
Date
Feb 8, 2022, 06:23 UTC
Message-ID
<BE3E3354-F2F4-47D7-8DA7-27ABCD3A5E90@llnl.gov>
In-Reply-To
<20220207224654.aju3rmxcrhapi4d2@meerkat.local>
Show 31 quoted lines
> On Feb 7, 2022, at 2:46 PM, Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> 
> On Mon, Feb 07, 2022 at 10:29:37PM +0000, Gamblin, Todd wrote:
>>> 2. packagers would be able to perform cryptographic verification without
>>>  needing to track any extra sources like corresponding .sig files; they
>>>  would just need to add a build-time dependency on git (plus whatever it
>>>  calls for cryptographic verification, such as gnupg or openssh)
>> 
>> This is a cool idea, but tar/gzip/etc. are vulnerable to input attacks (or
>> at least there have been CVEs in the past), so this does not eliminate the
>> need to verify a downloaded .tar or .tar.gz file independently.  You can
>> verify the contents of the tar, but to do that you have to expand it, and to
>> do that you’re still passing untrusted input to tar.
> 
> That's not really different from what git does when it clones a remote
> repository to run "git verify-tag". It still accepts untrusted input from the
> remote server, performs a lot of compression/decompression operations, etc, so
> this is not introducing anything that git isn't already required to do.
> 
> I know there's a lot to be said about the simplicity of just computing a
> signature over file bytes, but there are features you end up sacrificing, such
> as ability to provide a single signature for multiple compression types,
> adding a better compression algorithm in the future, or simply recompressing
> with better flags in a long background process.
> 
> My goal is to improve the current situation where we're actually doing pretty
> good for signed in-git objects, but none of that is carried over to packaging
> systems. The only effort I know in that area is sigstore, but it requires
> quite a bit of work to properly use on the part of the project maintainer,
> whereas it would be great to be able to say "just do git tag -s and the
> packaging systems will be able to use that.”
I agree this would be really nice.  If the tarball (or whatever) created could also be signed, so that it could be trusted regardless of the particular server you fetch it from, it might work as a nice packaging format.  Maybe you could have a signed header with the hash of the tarball that’s produced?  You wouldn’t really need a signed tag in that case.
Our use for this would be to host these signed git archives (.gar files?) on mirrors — which we may or may not trust.  If I can get around the hostile tarball issue I’d be super excited about the idea.
-Todd
Previous: Konstantin RyabitsevNext: Junio C Hamano
Message 17 of 19 in “Commit SHA1 == SHA1 checksum?”
  1. Gamblin, ToddFeb 5, 2022
  2. Philip OakleyFeb 6, 2022
  3. Gamblin, ToddFeb 6, 2022
  4. Johannes SixtFeb 6, 2022
  5. Junio C HamanoFeb 6, 2022
  6. Philip OakleyFeb 6, 2022
  7. Junio C HamanoFeb 6, 2022
  8. Philip OakleyFeb 6, 2022
  9. Gamblin, ToddFeb 7, 2022
  10. Konstantin RyabitsevFeb 7, 2022
  11. Gamblin, ToddFeb 7, 2022
  12. Konstantin RyabitsevFeb 7, 2022
  13. Junio C HamanoFeb 7, 2022
  14. Konstantin RyabitsevFeb 7, 2022
  15. Gamblin, ToddFeb 7, 2022
  16. Konstantin RyabitsevFeb 7, 2022
  17. Gamblin, ToddFeb 8, 2022
  18. Junio C HamanoFeb 7, 2022
  19. Konstantin RyabitsevFeb 7, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.