[OpenAFS-devel] prdb format extension for extended authentication names

Simon Wilkinson simonxwilkinson@gmail.com
Sat, 18 May 2013 13:46:41 +0100


On 18 May 2013, at 00:32, Benjamin Kaduk wrote:
>=20
> Consulting Knuth, it sounds like the state of the art is a pretty old =
solution -- for a multiword/multicharacter key, u

There's actually been quite a lot of work done on hashing of arbitrary =
length binary objects. OpenAFS has an implementation of Bob Jenkin's =
"lookup3" hash in the opr library (the jhash.h header). There's also =
SpookyHash (also from Bob Jenkins), which is significantly faster than =
lookup3, but requires a 64bit processor, and Google's CityHash.

Across the tree, I've been moving OpenAFS towards using jhash for =
hashing. However, there are some challenges about using this for ubik =
databases. In particular, the current code doesn't attempt to cater for =
endianness. I suspect you will get different answers for jhash2 on big =
and little endian processors. Fixing this shouldn't be that complex - =
the original lookup3.c code does the right thing, it's just a case of =
adapting that for OpenAFS.

So, I'd encourage you towards doing that, rather than developing yet =
another hash algorithm.

Cheers,

Simon.