4 ms·
`Sparse` generated 50643 16-bit values, hashed them, and found 2 collisions in the high 32 bits of the output This test has a 3.6% chance of producing two or m
by CodesInChaos 5y ago
`Sparse` generated 50643 16-bit values, hashed them, and found 2 collisions in the high 32 bits of the output
This test has a 3.6% chance of producing two or more collisions. https://www.wolframalpha.com/input/?i=probability+x%3E%3D2+poisson+mu%3D0.5*50643%5E2%2F2%5E32 https://www.wolframalpha.com/input/?i=probability+x%3E%3D2+p...
Considering the number of tests and hash functions, the failed tests will simply be noise. The default config should use a much higher significance threshold, testing for a number of seeds and looking at the combined statistics would be one way of achieving that.
> The MD5 row shows no failure; only the function that truncates to the low 32 bit has failures.
Truncated MD5 should behave like an ideal 32-bit hash function.
> it's a bit like the PRNG wars: you can always come up with a test that makes a function look bad, but a ton of failure is definitely a bad sign.
For a CSPRNG you shouldn't be able to come up with any test that'll fail more often that you'd statistically expect from truly random numbers (averaging over random enough random seeds).