From: Bill Zaumen <bill.zaumen@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, pclouds@gmail.com
Subject: Re: Suggestion on hashing
Date: Fri, 02 Dec 2011 17:50:21 -0800 [thread overview]
Message-ID: <1322877021.1729.118.camel@yos> (raw)
In-Reply-To: <20111202175444.GB24093@sigill.intra.peff.net>
On Fri, 2011-12-02 at 12:54 -0500, Jeff King wrote:
> On Fri, Dec 02, 2011 at 12:08:39AM -0800, Bill Zaumen wrote:
> I think your code is solving the wrong problem (or solving the right
> problem in a half-way manner). The only things that make sense to me
> are:
>
> 1. Do nothing. SHA-1 is probably not broken yet, even by the NSA, and
> even if it is, an attack is extremely expensive to mount. This may
> change in the future, of course, but it will probably stay
> expensive for a while.
>
> 2. Decouple the object identifier and digest roles, but insert the
> digest into newly created objects, so it can be part of the
> signature chain. I described such a scheme in one of my replies to
> you. It has some complexities, but has the bonus that we can build
> directly on older history, preserving its sha1s.
>
> 3. Replace SHA-1 with a more secure algorithm.
Suppose I make the digest pluggable, something I intended to do
eventually anyway? Then you just use the existing SHA-1 as an
object identifier and the new digest in a signature chain? What I
did was essentially to compute the new digest (using a CRC as the
trivial case) whenever an object's SHA-1 hash is computed, plus
using the new digest for low-cost collision checks.
Then you have everything needed to experiment with your second option.
I got the impression that Nguyen had some interest in that, but could
be mistaken.
The use is simple: if you have the SHA-1 hash of an object, you call
a function, currently named "has_sha1_file_crc" and it returns true if
a CRC is available, writing the hash into the buffer supplied as its
second argument. You can do whatever you like with it. If you want
a digest of digests, you just traverse a commit's tree, and call
has_sha1_file_crc whenever you want to look up a digest. So, the API
is actually very simple if you just use the patch to quickly look up
the digest associated with a SHA-1 ID - everything else it does happens
automatically.
next prev parent reply other threads:[~2011-12-03 1:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1322813319.4340.109.camel@yos>
2011-12-02 14:22 ` Suggestion on hashing Nguyen Thai Ngoc Duy
2011-12-02 18:09 ` Jeff King
2011-12-03 0:48 ` Bill Zaumen
2011-12-06 1:56 ` Chris West (Faux)
2011-12-06 3:47 ` Bill Zaumen
2011-12-06 4:46 ` Nguyen Thai Ngoc Duy
2011-12-06 6:02 ` Bill Zaumen
2011-12-06 6:23 ` Nguyen Thai Ngoc Duy
2011-12-07 1:44 ` Bill Zaumen
2011-12-02 17:54 ` Jeff King
2011-12-03 1:50 ` Bill Zaumen [this message]
2011-12-03 15:08 ` Jeff King
2011-12-03 15:34 ` Philip Oakley
2011-12-03 21:21 ` Bill Zaumen
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=1322877021.1729.118.camel@yos \
--to=bill.zaumen@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=peff@peff.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).