The security of operation of many cryptographic applications relies on the unpredictability of certain quantities generated every time they are used. The examples include secret keys for symmetric encryption algorithms, the parameters of the RSA and auxiliary quantities for digital signature generation.
A simple and widely used class is linear congruential generators (LCG), which can be defined as follows:
The first 10 pseudorandom integers it will produce from the seed 1 by repeated evaluation would be:
On a large scale, the numbers produced do look as if they were uniformly distributed and random, even though they were computed using a deterministic algorithm:
The parameters Multiplier, Increment and Modulus used in SeedRandom above are those of an infamous generator, RANDU, considered one of weakest ever designed.
When its outputs are taken as triplets {xn-1, xn, xn+1} (the previous output, the current one and the next one), it can be clearly seen that these points only fall into several planes, which cannot be considered random:
High quality of underlying sources of pseudorandomness is crucial for cryptographic features of Wolfram Language, such as GenerateSymmetricKey, GenerateAsymmetricKeyPair and GenerateDerivedKey. These functions use cryptographically secure pseudo random generator (CSPRNG) provided by OpenSSL to fetch cryptographically strong random bytes: