smhasher
smhasher copied to clipboard
Hash function quality and speed tests
In https://github.com/rurban/smhasher/issues/75 , it's pointed out that Pippip_Yurii can cross page boundaries into unowned memory, and a warning is added for it. I think it'd be good if this warning...
Could be some padding artefact, leading to excessive collisions. So far avoid rmd and sha2 for hashing like the plague. The logs for testing all the bad seeds excess 500MB,...
https://github.com/cbreeden/fxhash (yeah, it's Rust, but at some point there will anyway be a need to test other Rust hashes as they seem to be quite unique)
Dear rurban: This is a simple function to benchmark hash functions on random length data (0-31 bytes, turnable) without a PRNG. Because hash function itself serves as a PRNG. This...
From my experience, the average of all measured biases is an important metric when comparing hash function (at a given bit-size, of course), it's a very useful test that reflects...
So far we didn't list the known exploit schemes. But since I started evaluating and listing Bad Seeds #99, we could as well list all known exploits, e.g. BadKeys which...
In `Diff` Test, we have an excepted collision count: https://github.com/rurban/smhasher/blob/d428f2f6a427e86b41b1bbbcdefc3e03aff28576/DifferentialTest.h#L141 But this variable seems do not affect the testing result: https://github.com/rurban/smhasher/blob/d428f2f6a427e86b41b1bbbcdefc3e03aff28576/DifferentialTest.h#L44 and the last group collisions are also skipped for...
``` bool NullTest ( struct HashInfo *info ){ pfHash hash = info->hash; unsigned long long h0, h1; hash(NULL, 0, 0, &h0); hash(NULL, 0, 1, &h1); printf("nullkey_seed0\t%llu\nnullkey_seed1\t%llu\n%s\n", h0, h1, h0==h1?"FAIL":(h0==0||h1==1?"Imperfect":"PASS")); return...
There's still the myth of secure hash table functions around, esp. from the SipHash folks, as you can see at https://github.com/google/highwayhash/issues/28 So add tests to prove them otherwise. * brute-force...
This test evaluates hash function's use as a checksum, how well it can detect 1-bit alterations in a rather big message. This test is probably similar to Diff test, but...