Answer the question
In order to leave comments, you need to log in
The adequacy of the pseudo-random number generator?
Hello Khabravchan!
Just the other day, I wondered what arithmetic algorithm to use for a pseudo-random number generator (hereinafter - PRNG). Due to the fact that the AVR ATmega8 does not have a normally working PRNG, as well as a strong desire to study this topic in more depth, I ask you for help.
Please, tell me the out-of-the-box tests for determining the proximity of PRNG to random numbers. Also, if you are interested in this topic, in the near future I plan to write an article for Habr, and if you think that some aspect deserves attention, feel free to write!
Attached is a comic on the subject.
Answer the question
In order to leave comments, you need to log in
out-of-the-box tests for determining the proximity of GPSL to random numbers
Take one of the ready-made generators and don't reinvent the wheel. When implementing PRNG, it is very easy to make mistakes that are not noticeable at first glance.
Take, for example, from [1] the implementation of mt19937 and forget.
[1] llvm.org/viewvc/llvm-project/libcxx/trunk/include/random?view=markup
2nd volume of The Art of Programming by Donald Knuth
There the first half of the book about Random Numbers
Exhaustive calculations on the subject
Judging by the "cryptography" tag, are you going to use PRNG to generate some cryptographic key? Then you still need to think about ensuring that there is enough entropy.
And the generator, for example, is done like this: Xn=X_{n-1}*C+1 where C is some number. Additionally - a cyclic shift by 13 bits, for example.
There was already a similar question , maybe you will find something interesting for yourself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question