Square method PRNG

 Czech Entropy PRNG 1024 bit

How to improve the distribution of pseudo-random numbers generated by a software generator (PRNG). The idea is to use the "sliding square method". Everything is clear from the pictures.

The random number generator will create a very large array of pseudo-random numbers, from which we will select a number to use and look at the distribution.


Figure 1 shows that the distribution is not the best. We will create a certain number of squares in the free areas (no smaller than the specified size) and select from the generated array additional values that fall into the given squares in Figure 2 (orange dots)


Figures 3 and 4 show the resulting distribution. Next, you can use the second stage of working with smaller squares.



And so on until the distribution estimation algorithm shows the desired result of the quality of the set of numbers.

You can make an interesting generator if at the next stage you use triangles rather than squares. Select the number of points based on the area of the figure. The result is a “formulaless” distribution of numbers.

At each stage of working with squares, PRNGs with new initial conditions can be generated, which should complicate cryptanalysis.

Again, such a set of numbers can be obtained exactly the same on several devices completely independently.

 Czech Entropy PRNG 1024 bit


Popular posts from this blog

Android Photo Registrar OFLAMERON

Android Java Open Source

Czech Entropy