Hacker News new | ask | show | jobs
by aleksv 2124 days ago
PRVHASH can be also used as a very efficient general-purpose PRNG with an external entropy source injections (like how the /dev/urandom works on Unix): the 64-bit hash value can be used as a pseudo-random number, spliced into 8 output bytes each round: this was tested, and works well when 8-bit true entropy injections are done inbetween 8 to 2048 generated random bytes (delay is also obtained via entropy source). An example generator is implemented in the prvrng.h file: simply call the prvrng_test64() function. The prvrng_test32() implements the same technique, but with 32-bit hashes, for comparison purposes.

prvrng_gen64()-based generator passes PractRand 8 TB threshold, without or with only a few "unusual" evaluations. Which suggests it's the first working universal TRNG in the world. This claim requires a lot more evaluations from independent researchers.