9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] SHA-1 collision and venti
Date: Mon, 27 Feb 2017 12:14:08 -0800	[thread overview]
Message-ID: <20170227201408.13B5C124AEA5@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Mon, 27 Feb 2017 19:02:29 GMT." <CAOw7k5iEapc=5_XT64BX=hrO-kxP_Ywew5On0ZqioaNYssH1Ag@mail.gmail.com>

On Mon, 27 Feb 2017 19:02:29 GMT Charles Forsyth <charles.forsyth@gmail.com> wrote:
> On 27 February 2017 at 18:30, Charles Forsyth <charles.forsyth@gmail.com>
> wrote:
>
> > that's a separate argument that venti would never work for you, regardless
> > of the hash algorithm used.

> since venti returns the resulting score from each write, and it knows
> whether there's been a collision,
> it appears it could return a modified score (having ensured that is now
> unique, "and the next judge said that's a very shaggy dog")

Consider what can happens you want to consolidate two venti
archives into another one. Each source venti has a different
file with the same hash. When you discover in the destination
venti that they collide, it is too late to return a modified
score -- you have to find and fix all pointer blocks that
refer to this block as well.

In theory the  chance of a random collion with SHA1 may be
1 in 2^80 but we have existing files that collide (unlike the
hypothetical argument of someone wanting to store 10^21 byte
size files -- but if they can produce it, we can store it!).
Your argument is that since venti is readonly, existing data
in it is not vulnerable but not everyone stores their archives
on readonly medium.  Another argument would be that almost
always venti is privately used and unlikely to be accessible
to the badguys.  Yet another argument is that hardly anyone
uses venti so why even bother. These are behavior patterns
that are true today but why limit its usefulness?

Just as we move archived data we care about to more modern
media (as we no longer have easy access to floppies, 9track
tapes, 1.4" streamer tape etc.), and update our crypto keys,
since they too have limited shelf-life, we can replace the use
of SHA1.  This is a fixable problem.  [It is much much worse
for git given the amount of s/w that relies on it. I think
it is a matter of time before someone comes up with a
collision between two different types of git objects (such as
a blob and a tree) but we'll let Linus worry about it :-)]

The solution is to convert from sha1 to blake2b or something
strong and be prepared to move the data again in 10-20 years.



  parent reply	other threads:[~2017-02-27 20:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-26 17:25 Bakul Shah
2017-02-26 17:30 ` Jules Merit
2017-02-26 18:29   ` Charles Forsyth
2017-02-26 18:16 ` Charles Forsyth
2017-02-26 18:25   ` Charles Forsyth
2017-02-26 19:46     ` Bakul Shah
2017-02-26 21:02       ` Kim Shrier
2017-02-27 15:46         ` Dave MacFarlane
2017-02-27 16:47           ` Charles Forsyth
2017-02-27 17:07             ` Charles Forsyth
2017-02-27 17:28               ` Bakul Shah
2017-02-27 18:14                 ` hiro
2017-02-27 18:20                   ` Bakul Shah
2017-02-27 18:30                 ` Charles Forsyth
2017-02-27 19:02                   ` Charles Forsyth
2017-02-27 20:05                     ` cinap_lenrek
2017-02-27 20:14                     ` Bakul Shah [this message]
2017-02-27 21:12                       ` Riddler
2017-02-27 22:20                         ` Charles Forsyth
2017-03-01 12:21                           ` erik quanstrom
2017-03-01 12:35                             ` David du Colombier
2017-02-27 19:34                 ` Skip Tavakkolian
2017-02-26 18:48   ` Bakul Shah
2017-02-26 19:57     ` Charles Forsyth
2017-02-26 20:06       ` Jadon Bennett
2017-02-26 20:16       ` Bakul Shah
2017-02-28 15:47 Darren Wise

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=20170227201408.13B5C124AEA5@mail.bitblocks.com \
    --to=bakul@bitblocks.com \
    --cc=9fans@9fans.net \
    /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).