All of lore.kernel.org
 help / color / mirror / Atom feed
* How safe are signed git tags? Only as safe as SHA-1 or somehow safer?
@ 2014-11-16 15:31 Patrick Schleizer
  2014-11-17 21:26 ` Jeff King
  0 siblings, 1 reply; 22+ messages in thread
From: Patrick Schleizer @ 2014-11-16 15:31 UTC (permalink / raw)
  To: git, whonix-devel; +Cc: mikegerwitz

Hi!

How safe are signed git tags? Especially because git uses SHA-1. There
is contradictory information around.

So if one verifies a git tag (`git tag -v tagname`), then `checksout`s
the tag, and checks that `git status` reports no untracked/modified
files, without further manually auditing the code, how secure is this
actually? Is it only as safe as SHA-1?

Let's assume an adversary, that is capable of producing SHA-1 collisions.

Linus Torvalds said: [1]

> Git uses SHA-1 not for security

And goes on.

> The security parts are elsewhere

Could you please elaborate on this? Where are the security parts? Can
you please briefly explain how these work? Where can I read more about this?

Wikipedia says. [2]

> Nonetheless, without second preimage resistance [3] of SHA-1 signed
commits and tags would no longer secure the state of the repository as
they only sign the root of a Merkle tree [4].

Which contradicts what Linus Torvalds said. What does that mean for
security? Which statement is true?

> "The source control management system Git uses SHA-1 not for security
but for ensuring that the data has not changed due to accidental
corruption. Linus Torvalds has said, "If you have disk corruption, if
you have DRAM corruption, if you have any kind of problems at all, Git
will notice them. It's not a question of if, it's a guarantee. You can
have people who try to be malicious. They won't succeed. [...] Nobody
has been able to break SHA-1, but the point is the SHA-1, as far as Git
is concerned, isn't even a security feature. It's purely a consistency
check. The security parts are elsewhere, so a lot of people assume that
since Git uses SHA-1 and SHA-1 is used for cryptographically secure
stuff, they think that, OK, it's a huge security feature. It has nothing
at all to do with security, it's just the best hash you can get. [...] I
guarantee you, if you put your data in Git, you can trust the fact that
five years later, after it was converted from your hard disk to DVD to
whatever new technology and you copied it along, five years later you
can verify that the data you get back out is the exact same data you put
in. [...] One of the reasons I care is for the kernel, we had a break in
on one of the BitKeeper sites where people tried to corrupt the kernel
source code repositories." [6]

If (!) I understand Mike Gerwitz ([...] GNU [...]) 's opinion, his
opinion is, that for best security each and every commit should be
signed for best possible git verification security.

See also:

- Mike Gerwitz's "A Git Horror Story: Repository Integrity With Signed
Commits" [7]

- Verbose reply by Mike Gerwitz to my question. [8]

- Similar question on security stackexchange. [9] Quote: "Nevertheless,
If somebody managed to find a way how to find SHA1 collisions easily,
then git would have much bigger problem."

Cheers,
Patrick

[1] https://www.youtube.com/watch?v=4XpnKHJAok8&t=56m20s
[2] https://en.wikipedia.org/wiki/SHA-1#Data_integrity
[3] https://en.wikipedia.org/wiki/Second_preimage_resistance
[4] https://en.wikipedia.org/wiki/Merkle_tree
[5] https://www.youtube.com/watch?v=4XpnKHJAok8&t=56m20s
[6] https://en.wikipedia.org/wiki/SHA-1#Data_integrity
[7] http://mikegerwitz.com/papers/git-horror-story
[8] https://www.whonix.org/forum/index.php/topic,538.msg4278.html#msg4278
[9]
https://security.stackexchange.com/questions/67920/how-safe-are-signed-git-tags-only-as-safe-as-sha-1-or-somehow-safer

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: How safe are signed git tags? Only as safe as SHA-1 or somehow safer?
@ 2014-11-24  0:52 bancfc
  0 siblings, 0 replies; 22+ messages in thread
From: bancfc @ 2014-11-24  0:52 UTC (permalink / raw)
  To: git

Hi, I wanted to chime in on the topic of SHA1 weaknesses and breaks. The 
problem is idea that SHA1 breaks are theoretical and will only  be 
relevant in a decade or two.

I think its a telling sign when even companies like Google [1] and 
Microsoft [2] who collaborate with spy agencies are moving away from 
SHA1 in verifying browser certs and the estimates by reputable 
cryptographers already put us in the realm of feasible breaks at this 
time, with the bar going lower with every passing year [3]. In three 
years common cyber criminals will be able to crack it using moderate 
sized computer clusters or by renting some AWS cycles.

Please reconsider the urgency of moving away from SHA1 for security 
functions in Git.


References:

[1] 
http://thenextweb.com/google/2014/09/05/google-will-start-sunsetting-sha-1-cryptographic-hash-algorithm-chrome-month-finish-q1-2015/

[2] https://www.schneier.com/blog/archives/2013/11/microsoft_retir.html 
(Schneier on Security: Microsoft Retiring SHA-1 in 2016)

[3] https://www.schneier.com/blog/archives/2012/10/when_will_we_se.html 
(When Will We See Collisions for SHA-1?)

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

end of thread, other threads:[~2014-11-25 17:23 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-16 15:31 How safe are signed git tags? Only as safe as SHA-1 or somehow safer? Patrick Schleizer
2014-11-17 21:26 ` Jeff King
2014-11-21 23:01   ` Patrick Schleizer
2014-11-21 23:32     ` Jason Pyeron
2014-11-22 19:48       ` Jeff King
2014-11-22 19:43     ` Jeff King
2014-11-25 12:59     ` Fedor Brunner
2014-11-24  1:23   ` Duy Nguyen
2014-11-24 10:15     ` Michael J Gruber
2014-11-24 11:44       ` Duy Nguyen
2014-11-25 10:41         ` Duy Nguyen
2014-11-24 15:51       ` Jeff King
2014-11-24 18:14   ` Nico Williams
2014-11-25  1:16     ` Duy Nguyen
2014-11-25  1:23       ` Jonathan Nieder
2014-11-25  1:52         ` Duy Nguyen
2014-11-25  3:40           ` Stefan Beller
2014-11-25  3:47           ` Jeff King
2014-11-25 10:55             ` Duy Nguyen
2014-11-25 17:23             ` Junio C Hamano
2014-11-25 11:07       ` brian m. carlson
2014-11-24  0:52 bancfc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.