Comment by thrance
4 days ago
You should look into the HyperLogLog algorithm, where fair hash "randomness" is required for the algorithm to work. There are use cases where the pseudo-randomness of hashes is useful, is what I'm trying to say.
4 days ago
You should look into the HyperLogLog algorithm, where fair hash "randomness" is required for the algorithm to work. There are use cases where the pseudo-randomness of hashes is useful, is what I'm trying to say.
This is why you should NEVER trust software developers to make security decisions unless certified to do so. True randomness is challenging to achieve, because computers are inherently predictable. Pseudo-randomness is an intended process to intentionally achieve randomness in spite of this high predictability, often through use of physical or electromagnetic criteria outside the computing machine.
Hash algorithms are none of that. They are not pseudo-randomness merely because a software developer merely wishes them to be so. Hash algorithms are intentionally designed to achieve high reproducibility in that a given set of input should always result in the same hash sequence as output. That intended reproducibility is by definition not random.
You don't understand what pseudo-randomness means. Virtually all PRNGs, even many CSPRNGs, have a way to initialize the algorithm with a seed, and its outputs are fully predictable based on that seed. Choosing a truly random seed, such as one produced by RNG hardware, will lead to a usefully random sequence - but the algorithm is still fully deterministic based on that seed.
>True randomness is challenging to achieve, because computers are inherently predictable
Most modern CPUs now contain a true RNG. They usually use some combination of a metastable latch, or thermal randomness through some kind of analog amplification. Bit strings from this are passed into a pseudorandom number generator to amplify the amount of random data generated.
There probably attacks on this too but it's much harder.
More accurately, the CPU RNG instruction is generally considered untrusted by itself and the only reason it's used is that kernel RNGs are CSPRNGS based on cryptographic hashes (which is what the CS refers to - cryptographically secure) where mixing in a corrupted bit stream along with uncompromised bit streams still results in an uncompromised bit stream out. No one uses the CPU RNG instruction directly (both for security & also secondary perf reasons)
1 reply →