git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Luc Herren <jlh@gmx.ch>
To: Thomas Rast <trast@student.ethz.ch>,
	martin f krafft <madduck@madduck.net>,
	git discussion list <git@vger.kernel.org>
Subject: Re: Git commit hash clash prevention
Date: Thu, 02 Oct 2008 13:08:48 +0200	[thread overview]
Message-ID: <48E4ABC0.80100@gmx.ch> (raw)
In-Reply-To: <200810021118.15313.trast@student.ethz.ch>

Hello list!

Thomas Rast wrote:
>   However, the expected number of objects needed to get a collision is
>   on the order of 2**80 (http://en.wikipedia.org/wiki/Birthday_attack),
>   and since there are (very roughly) 2**25 seconds in a year and 2**34
>   years in the age of the universe, that still leaves you with 2**21
>   ages of the universe to go.

In case it's interesting to someone, I once calculated (and wrote
down) the math for the following scenario:

  - 10 billion humans are programming
  - They *each* produce 5000 git objects every day
  - They all push to the same huge repository
  - They keep this up for 50 years

With those highly exagerated assumptions, the probability of
getting a hash collision in that huge git object database is
6e-13.  Provided I got the math right.

So, mathematically speaking you have to say "yes, it *is*
possible".  But math aside it's perfectly correct to say "no, it
won't happen, ever".  (Speaking about the *accidental* case.)

jlh

  reply	other threads:[~2008-10-02 11:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02  8:53 Git commit hash clash prevention martin f krafft
2008-10-02  9:18 ` Thomas Rast
2008-10-02 11:08   ` Jean-Luc Herren [this message]
2008-10-02 10:07 ` Johannes Schindelin
2008-10-02 14:00 ` Jakub Narebski
2008-10-02 15:39   ` Johannes Schindelin
2008-10-02 16:04 ` Stephan Beyer

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=48E4ABC0.80100@gmx.ch \
    --to=jlh@gmx.ch \
    --cc=git@vger.kernel.org \
    --cc=madduck@madduck.net \
    --cc=trast@student.ethz.ch \
    /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).