Regarding performance, SipHash is essentially as fast as Python's randomized hash, and quite faster for long inputs (>16 bytes), cf. http://bench.cr.yp.to/results-auth.html#amd64-sandy .
Regarding performance, SipHash is essentially as fast as Python's randomized hash, and quite faster for long inputs (>16 bytes), cf. http://bench.cr.yp.to/results-auth.html#amd64-sandy .
I don't know anything about Python's hash function, all of those benchmarks are still an order of magnitude slower than CityHash (for example), which peaks at 0.16 cycles/byte.
I would be interested to see SipHash put through SMHasher, which is the most comprehensive hash function test suite I know of: http://code.google.com/p/smhasher/
Of course, it passes SMHasher with 10 score -- it's a cryptographic PRF.
Are you referring to the "Advanced hash flooding" section of the paper, or am I missing this in another place? That analysis appears to rely on the hash function being highly linear/periodic (ie. you can always add "l" to get back the same hash value). I don't think that City, Spooky, or Murmur are nearly this linear. For example, City is based on CRC32 (ie. polynomial division).
Don't get me wrong, I'm impressed that SipHash is so fast for a cryptographic hash. But modern non-cryptographic hash functions are so fast (especially when they're CPU-accelerated, like City is on Intel thanks to the CRC32 instruction) that I don't think SipHash can claim to be the obvious choice for all hash tables.
I am interested to know though if the random seed + City/Spooky/Murmur approach really does have practical hash flooding attacks.
Edit: wait, I'm mistaken -- these are not independent of seed.
This is really impressive work.
$ time ./citycollisions 1000000 > /dev/null
real 0m0.904s
user 0m0.439s
sys 0m0.008s
$ ./citycollisions 3
128-bit key 741b848b0065aec04bb25b26ca2c3e9
CityHash64( 8e69324ad2a005ff2148534148202020, 16 ) = d3290c3d600b8add
CityHash64( 7ae31886221136ba2148534148202021, 16 ) = d3290c3d600b8add
CityHash64( a9a6b9c6888e94ff2148534148202022, 16 ) = d3290c3d600b8add
$ ./citycollisions 3
128-bit key 5e2a23015c89da98172fbcb77ad98468
CityHash64( 8e69324ad2a005ff2148534148202020, 16 ) = 59d0b041b16594b
CityHash64( 7ae31886221136ba2148534148202021, 16 ) = 59d0b041b16594b
CityHash64( a9a6b9c6888e94ff2148534148202022, 16 ) = 59d0b041b16594b