Most modern operating systems have a cryptographically secure pseudo random number generator .
For example, Windows has a CryptGenRandom . You can access the same stream from .NET using the RNGCryptoServiceProvider class. From C ++, you can access the same stream using the Microsoft C ++ rand_s library function. From Python, it is accessible using the urandom function (see bottom of the linked page) in the os module.
Unlike conventional PRNGs, CSPRNGs are designed to conduct rigorous randomness statistical tests. They are also designed to seriously attack a serious attack, even when their initial or neglected state becomes available to an attacker.
The term "pseudo-random" used by cryptographers can be misleading to a non-technical reader. CSPRNG extends the set of random values known as a seed into a longer sequence of numbers. This sequence is reproducible with respect to the seed, but for any good CSPRNG, a slight change in the seed gives a completely different sequence. Therefore, while at least a portion of the seeds has been selected through an adequately random process, the attacker cannot predict the sequence obtained - even if the attacker can influence the rest of the seed.
Numerous important systems, ranging from military communications to encryption that protects almost all online transactions, rely on functionally equivalent security between “cryptographically secure pseudorandom” and “random”.
EDIT . If you are fortunate enough to work with an Intel Ivy Bridge processor, now you have another very interesting alternative .
Roadwarrior
source share