Show HN: Discohash – Fast Hash
github.com
Show HN: Discohash – Fast Hash
1–10 of 44 posts
Re: Show HN: Discohash – Fast Hash
#2 mix(const int A)
{
const int B = A+1;
ds[A] *= P;
ds[A] = rot(ds[A], 23);
ds[A] *= Q;
ds[B] ^= ds[A];
ds[B] *= P;
ds[B] = rot(ds[B], 23);
ds[B] *= Q;
}
with P and Q prime.Re: Show HN: Discohash – Fast Hash
#3Simple hash, 128-bit mixing function is just: mix(const int A) { const int B = A+1; ds[A] *= P; ds[A] = rot(ds[A], 23); ds[A] *= Q; ds[B] ^= ds[A]; ds[B] *= P; ds[B] = rot(ds[B], 23); ds[B] *= Q; } with P and Q prime.
Just because it's 128-bit doesn't make it cryptographically secure.
Re: Show HN: Discohash – Fast Hash
#4There's not even an attempt at a preliminary cryptanalysis anywhere as far as I can tell. I'd advise staying far away from this for cryptography, especially if it considers a 128-bit digest size reasonable for anything but a message authentication code.
Re: Show HN: Discohash – Fast Hash
#5Re: Show HN: Discohash – Fast Hash
#6I am always interested when these get attention, but I don't know enough about the implications to switch over from just using SHA.
Re: Show HN: Discohash – Fast Hash
#7Hash function families with a similar target usecase include: cityhash, falkhash, farmhash, FNV, meowhash, metrohash, murmur, t1ha, wyhash, xxh.
The SMHasher suite tests hash functions for speed, distribution, bias, and collisions. This function ranks well in those tests.
Re: Show HN: Discohash – Fast Hash
#8Should I use this as an everyday hash function (for non-security purposes)? I am always interested when these get attention, but I don't know enough about the implications to switch over from just using SHA.
Re: Show HN: Discohash – Fast Hash
#9This is a hash designed for non-cryptographic use, like in hash tables or bloom filters. You can tell by their small output size, which greatly reduces the cost of a brute-force collision search. It's also in the linked readme. Hash function families with a similar target usecase include: cityhash, falkhash, farmhash, FNV, meowhash, metrohash, murmur, t1ha, wyhash, xxh. The SMHasher suite tests hash functions for spe…
It is really simple and works with unaligned data.
But it is not doing well in benchmarks. I wonder if I should use another one
Re: Show HN: Discohash – Fast Hash
#10HN discussion: https://news.ycombinator.com/item?id=17659672