News for hackers. Stuff that matters.
Re:A New Algorithm for Controlled Randomness by ryacko on Sunday September 01, 2019 @01:02AM (#20850550)
It all comes down to generating deterministic permutations instead of purely random numbers, since the intent is to avoid bad luck.

The most common permutation used is the AES S-Box, commonly available through various ISA extensions. There are many ways to generate permutations though, and it wouldn’t require a large complex algorithm to avoid a 1 in 10 chance event happening three times in a row or generating the entire permutation to be stored in memory.

Re:A New Algorithm for Controlled Randomness by HelloNurse on Sunday September 01, 2019 @12:50PM (#20853228)
S-boxes compute fixed permutations of the bits in a small fixed length buffer, which is entirely inappropriate for accurately picking random permutations of a variable and usually large number of choices.
Re:A New Algorithm for Controlled Randomness by ryacko on Sunday September 01, 2019 @05:26PM (#20855024)
For a RNG, the maximum run length of same values would be the period length divided by the output size (in general).

The blog post is horrifying, it feeds the output of the Mersenne Twister into another function to reduce the run length of seemingly biased outcomes. I think to generate a single value the whole CPU’s cache is cleared from the size and complexity of the code. The AES S-box, with the seed XORed before and after, would still be a better solution (especially since the probably of certain runs of similar values should be somewhat low).

The theory behind LCGs is a lot simpler, and using a suitably small prime, I think, one could have an appropriately short period without excessive predictability.