SipHash is a very fast PRG for short inputs developed by J. P. Aumasson and D. J. Bernstein, competitive in speed with MurmurHash, but with the security benefits of cryptographically strong hash functions, i.e. finding collisions is a major undertaking even if the IV can be guessed, or if computing digests for the set of all IVs. Thus, it can be an ideal choice for a hash table hash function, and provides significantly better protection against collision attacks than a non-collision resistant hash function using a random IV. It is also extremely simple. The entire implementation: https://131002.net/siphash/siphash24.c Most notably, Perl, the first by far to adopt any kind of hash function randomization (in the early 90s, when the attack was first described) have switched to SipHash in their 64-bit implementation. iant suggested I file this ticket as I was commenting on the now-closed https://code.google.com/p/go/issues/detail?id=2630. I plan to make a sample implementation and provide benchmarks to back this up. I don't think this is terribly urgent, but that it would be a better long-term solution. It might even be faster than FNV in some cases where collisions were common since Sip has better distribution.
Read full article from Issue 4604 - go - runtime: switch to a fast, collision-resistant hash function - The Go Programming Language - Google Project Hosting
No comments:
Post a Comment