git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Geoffrey Irving" <irving@naml.us>
To: "Daniel Barkalow" <barkalow@iabervon.org>
Cc: "Henrik Austad" <henrikau@orakel.ntnu.no>, git@vger.kernel.org
Subject: Re: About git and the use of SHA-1
Date: Tue, 29 Apr 2008 08:34:11 -0700	[thread overview]
Message-ID: <7f9d599f0804290834v23da6dfbv47b3ca9058934228@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.1.00.0804281515480.19665@iabervon.org>

On Mon, Apr 28, 2008 at 12:34 PM, Daniel Barkalow <barkalow@iabervon.org> wrote:
> On Mon, 28 Apr 2008, Henrik Austad wrote:
>
>  > Hi list!
>  >
>  > As far as I have gathered, the SHA-1-sum is used as a identifier for commits,
>  > and that is the primary reason for using sha1.  However, several places
>  > (including the google tech-talk featuring Linus himself) states that the id's
>  > are cryptographically secure.
>  >
>  > As discussed in [1], SHA-1 is not as secure as it once was (and this was in
>  > 2005), and I'm wondering - are there any plans for migrating to another
>  > hash-algorithm? I.e. SHA-2, whirlpool..
>
>  No. The cryptographic security we care about is that it's impractical to
>  come up with another set of content that hashes to the same value as a
>  given set of content. The known attacks on SHA-1 (and more broken earlier
>  hashes in the same general class) only allow the attacker to produce two
>  files that will collide. Now, it's true that this would allow somebody to
>  produce a commit where some people see the "good" blob and some people see
>  the "evil" blob, but (a) the "good" blob contains some large chunk of
>  random data, which is a major red flag by itself, and (b) all of these
>  people have to be taking data from the attacker.
>
>  If somebody gives you some source, and it's got some large random chunk in
>  it, and the behavior of the object depends on the content of this chunk,
>  and it's unspecified where this chunk comes from, you should be aware
>  that they might be able to swap this chunk for a different chunk. But such
>  a file is pretty blatantly malicious anyway.

This argument is invalid, since the use of git is not limited to
source code.  People
can and do store unreadable binary data in git, and unless you are completely
sure that no one would ever care about the security of that data in a
way that can
be attacked with a single collision, git should be secure about those as well.

For example, I just converted a 20 GB repository to git which, among
other things,
contains pdf files of my tax returns.  I have looked them over, but I
have not opened
them in a hex editor and looked them over at the binary level, and I
don't think git
should expect me to.

Incidentally, git was the only version control system I tried except
for subversion that
didn't choke on that repository.  Mercurial looked at my file renames
and expanded
the size past 45 GB before I killed it, I had to fix a several bugs in
the bazaar conversion
scripts before I realized it was just too slow, and svk turns out to
be even more like
the Antichrist than subversion itself is (mirroring N repository
copies requires an N-fold
increase in size).

Geoffrey

  parent reply	other threads:[~2008-04-29 15:35 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28 16:29 About git and the use of SHA-1 Henrik Austad
2008-04-28 19:34 ` Daniel Barkalow
2008-04-28 21:29   ` Henrik Austad
2008-04-28 22:15     ` Daniel Barkalow
2008-04-29  6:38     ` Andreas Ericsson
2008-04-29  7:09       ` Russ Dill
2008-04-29  7:21         ` Andreas Ericsson
2008-04-29 11:05           ` Sverre Rabbelier
2008-04-29 12:27             ` Andreas Ericsson
2008-04-29 13:05               ` Paolo Bonzini
2008-04-29 14:37                 ` Andreas Ericsson
2008-04-29 14:52                   ` Paolo Bonzini
2008-04-29 16:24                   ` Russ Dill
2008-04-29 12:46         ` Jurko Gospodnetić
2008-04-29 16:21           ` Russ Dill
2008-04-29 15:34   ` Geoffrey Irving [this message]
2008-04-29 16:27     ` Daniel Barkalow
2008-04-29 12:41 ` Dmitry Potapov
2008-04-29 14:41   ` Andreas Ericsson
2008-04-29 15:42     ` Nicolas Pitre
2008-04-29 15:59       ` Geoffrey Irving
2008-04-29 16:39         ` Nicolas Pitre
2008-04-29 17:48           ` Geoffrey Irving
2008-04-29 17:55             ` Nicolas Pitre
2008-04-29 18:02               ` Geoffrey Irving
2008-04-29 18:41                 ` Daniel Barkalow
2008-04-29 20:31                   ` Geoffrey Irving
2008-04-29 20:50                     ` Fredrik Skolmli
2008-04-29 21:39                       ` Geoffrey Irving
2008-04-29 21:52                         ` Fredrik Skolmli
2008-04-30  2:58                     ` Martin Langhoff
2008-04-30  5:18                       ` Geoffrey Irving
2008-04-30  5:47                         ` David Brown
2008-04-30  5:56                           ` Martin Langhoff
2008-04-29 18:17         ` Matthieu Moy
2008-04-29 18:23           ` Fredrik Skolmli
2008-04-29 15:02 ` Tom Widmer
2008-04-29 17:08 ` Tom Widmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f9d599f0804290834v23da6dfbv47b3ca9058934228@mail.gmail.com \
    --to=irving@naml.us \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=henrikau@orakel.ntnu.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).