3 ms·
Those are PRNGs, not hash functions.
by ot 5y ago
Those are PRNGs, not hash functions.
- cjensen 5y agoOk but why not use a PRNG for a hash function using the value as the seed? It will scramble the bits nicely.
- stolen_biscuit 5y agoI'm not a cryptographer or even that into crypto, but maybe PRNGs would produce collisions much more often than hashes?
- astrobe_ 5y agoNor am I, but I don't think that's the problem. It seems to me is that if you want to do that, you would use the value as a seed to set the internal state of the PRNG and then call the PRNG just once to get the hash value. But in order to do that, you would have to derive the seed from the data in an appropriate way, which is basically the same exercise as defining a general hash function (i.e. projecting a data of arbitrary length into a set of values of fixed length). So it looks like you are back to square one, more or less.
- ot 5y agoPRNGs are not good mixers because they're not designed to be. - A PRNG takes a pseudo-random state and produces another pseudo-random state - A mixer takes possibly correlated inputs and must produce outputs as uncorrelated as possible. I've actually experimented with using xorshift variants as mixers and they fail the basic statistical tests.