vendredi 24 août 2018

Combining PRNG and 'true' random, fast and (perhaps) dumb way

Take fast PRNG like xoroshiro or xorshift and 'true' entropy based generator like /dev/random.

Seed PRNG with 'true' random, but also get a single number from 'true' random and use it to XOR all results from PRNG to produce final output.

Then, replace this number once a while (e.g. after 10000 random numbers are generated).

Perhaps this is naive, but I would hope this should improve some aspects of PRNG like period size and predictability with negligible impact on speed. What am I getting wrong?




Aucun commentaire:

Enregistrer un commentaire