"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: fix path meta-data used for packing
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 20 May 2022 10:28:34 +0200

Download raw body.

Thread
On Fri, May 20, 2022 at 10:17:49AM +0200, Omar Polo wrote:
> > +	m->path_hash = murmurhash2(path, strlen(path), 0xd70af26a);
> 
> reusing the same seed on every run is to be deterministic and produce the
> same pack at every run?  What are the disadvantages with, say, using a
> random seed freshly generated at every run?
> 
> (a quick grep shows that we're always using hardcoded seeds for
> murmurhash2 also in other cases too so this is not an issue, just a
> question)

Yes, we should probably be using a unique arc4random() seed per run.
The SipHash24 API encourages this as well.

We can fix this later.