Re: [PATCH v7 6/6] siphash: implement HalfSipHash1-3 for hash tables

2016-12-21 Thread Andi Kleen
> 64-bit x86_64: > [0.509409] test_siphash: SipHash2-4 cycles: 4049181 > [0.510650] test_siphash: SipHash1-3 cycles: 2512884 > [0.512205] test_siphash: HalfSipHash1-3 cycles: 3429920 > [0.512904] test_siphash:JenkinsHash cycles: 978267 I'm not sure what these numbers

[PATCH v7 6/6] siphash: implement HalfSipHash1-3 for hash tables

2016-12-21 Thread Jason A. Donenfeld
HalfSipHash, or hsiphash, is a shortened version of SipHash, which generates 32-bit outputs using a weaker 64-bit key. It has *much* lower security margins, and shouldn't be used for anything too sensitive, but it could be used as a hashtable key function replacement, if the output is never