git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Commit SHA1 == SHA1 checksum?
@ 2022-02-05  1:19 Gamblin, Todd
  2022-02-06  0:22 ` Philip Oakley
  0 siblings, 1 reply; 19+ messages in thread
From: Gamblin, Todd @ 2022-02-05  1:19 UTC (permalink / raw)
  To: git@vger.kernel.org

Apologies if this has been asked before, but the closest thing I could find was this thread:

	http://public-inbox.org/git/Pine.LNX.4.62.0504160519330.21837@qynat.qvtvafvgr.pbz/

That thread devolved into a discussion of the security of different hashes and didn’t answer my question.

I want to know when and where git *guarantees* that the snapshot I have checked out has the checksum that git says it does, or if it does at all.

The use case for this is for package managers. I work on Spack (http://github.com/spack/spack if you’re curious) and we download sources from tarballs and git repos (like many similar tools).  For tarballs we require a sha256, and we use it to verify the tarball after download.

For git repos, we would like to require a commit sha1, provided that it’s basically as secure as downloading a tarball and checking it against a known sha1.  So, if I `git clone` something, is the commit sha1 actually verified?

Thanks,
-Todd


PS: I know that sha1 has been declared “risky” by NIST and that folks should move away from it, and please be assured that we’re using sha256’s everywhere else.  Here I really just want to know whether cloning a git repo at a particular commit is as secure as downloading a tarball and checking it against a sha1, not whether or not sha1 is secure.



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-02-08  6:24 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-05  1:19 Commit SHA1 == SHA1 checksum? Gamblin, Todd
2022-02-06  0:22 ` Philip Oakley
2022-02-06  9:00   ` Gamblin, Todd
2022-02-06 10:23     ` Johannes Sixt
2022-02-06 10:15   ` Junio C Hamano
2022-02-06 19:25     ` Philip Oakley
2022-02-06 20:02       ` Junio C Hamano
2022-02-06 21:33         ` Philip Oakley
2022-02-07  8:15           ` Gamblin, Todd
2022-02-07 13:15             ` Konstantin Ryabitsev
2022-02-07 21:08               ` Gamblin, Todd
2022-02-07 13:32         ` Konstantin Ryabitsev
2022-02-07 20:57           ` Junio C Hamano
2022-02-07 21:34             ` Konstantin Ryabitsev
2022-02-07 22:29               ` Gamblin, Todd
2022-02-07 22:46                 ` Konstantin Ryabitsev
2022-02-08  6:23                   ` Gamblin, Todd
2022-02-07 22:49               ` Junio C Hamano
2022-02-07 23:02                 ` Konstantin Ryabitsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).