[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Re: RFC: Fake IDs
From: |
Nathaniel Smith |
Subject: |
Re: [Monotone-devel] Re: RFC: Fake IDs |
Date: |
Tue, 18 Jul 2006 18:23:01 -0700 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
On Tue, Jul 18, 2006 at 05:24:08PM -0700, Graydon Hoare wrote:
> Zack Weinberg wrote:
> >There are a small number of places that need a fake ID of some variety
> >(ignoring all the unit tests, which use 'em heavily) and we currently
> >just pick a "random" 160-bit number. I need to add a few more of
> >these, so I thought it would be a good idea to have a principled way
> >of generating them. The implementation I've picked is to have
> >vocab.hh provide a fake_id() function/macro that hashes __FILE__ and
> >__LINE__.
>
> Eh.. I'd prefer to turn those cases where we pick fake IDs to actually
> loop, checking the db for a collision. It feels weird to be hard-coding
> collision conditions into the binary, however unlikely.
If we don't trust SHA1, why are we using it at all? :-)
If we hash some text, and then compare it to another equal-length
bitstring... the collision probability is not affected by whether that
other bitstrings was generated by pounding on the keyboard or by SHA1
of some other text. Am I missing something in this analysis?
-- Nathaniel
--
"...these, like all words, have single, decontextualized meanings: everyone
knows what each of these words means, everyone knows what constitutes an
instance of each of their referents. Language is fixed. Meaning is
certain. Santa Claus comes down the chimney at midnight on December 24."
-- The Language War, Robin Lakoff
- [Monotone-devel] RFC: Fake IDs, Zack Weinberg, 2006/07/18
- [Monotone-devel] Re: RFC: Fake IDs, Graydon Hoare, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Zack Weinberg, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Jack Lloyd, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs,
Nathaniel Smith <=
- Re: [Monotone-devel] Re: RFC: Fake IDs, Zack Weinberg, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Jack Lloyd, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Ethan Blanton, 2006/07/18
- Re: [Monotone-devel] Re: RFC: Fake IDs, Jack Lloyd, 2006/07/19
- Re: [Monotone-devel] Re: RFC: Fake IDs, Nathaniel Smith, 2006/07/19
- Re: [Monotone-devel] Re: RFC: Fake IDs, Zack Weinberg, 2006/07/19
- [Monotone-devel] Re: RFC: Fake IDs, Graydon Hoare, 2006/07/19
- Re: [Monotone-devel] Re: RFC: Fake IDs, Daniel Carosone, 2006/07/19
- Re: [Monotone-devel] Re: RFC: Fake IDs, Daniel Carosone, 2006/07/19
- Re: [Monotone-devel] Re: RFC: Fake IDs, Jack Lloyd, 2006/07/19