Pseudorandom number generator Guide, Meaning , Facts, Information and Description
A pseudorandom number generator (PRNG) is an algorithm which generates a sequence of numbers, the elements of which are approximately independent of each other.The outputs of pseudorandom number generators are not truly random—they only approximate some of the properties of random numbers. John von Neumann emphasized this with the remark "Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin.1" While truly random numbers can be generated using hardware random number generators, pseudorandom numbers are a critical part of modern computing, from cryptography to the Monte Carlo method for simulating physical systems. Careful mathematical analysis is required to ensure that the generated numbers are sufficiently "random;" as Robert R. Coveyou of Oak Ridge National Laboratory once remarked, "The generation of random numbers is too important to be left to chance.2"
Most such algorithms attempt to produce samples that are uniformly distributed. Common classes of algorithms are linear congruential generators, lagged Fibonacci generators, linear feedback shift registers and generalised feedback shift registers. Recent instances of algorithms include Blum Blum Shub, Fortuna, and the Mersenne Twister.
| Table of contents |
|
2 Mersenne Twister 3 Cryptographically secure pseudorandom number generators 4 See also 5 Notes 6 References 7 External links |
Inherent nonrandomness
Because any PRNG run on a deterministic computer (contrast quantum computer) is a deterministic algorithm, its output will inevitably have certain properties that a true random sequence would not exhibit. One of these is guaranteed periodicity—it is certain that if the generator uses only a fixed amount of memory then, given a sufficient number of iterations, the generator will revisit the same internal state twice, after which it will repeat forever. A generator that isn't periodic can be designed, but its memory requirements would grow as it ran. In addition, a PRNG can be started from an arbitrary starting point, or seed state, and will always produce an identical sequence from that point on.
In practice, many PRNGs exhibit artifactss which can cause them to fail statistically significant tests. These include, but are certainly not limited to:
- Shorter than expected periods for some seed states (not full period)
- Poor dimensional distribution
- Successive values are not independent
- Some bits may be 'more random' than others
- Lack of uniformity
Mersenne Twister
The recent invention of the Mersenne Twister algorithm, by Makoto Matsumoto and Takuji Nishimura in 1997, avoids most of these problems. It has a colossal period of 219937-1 iterations, is proven to be equidistributed in 623 dimensions (for 32-bit values), and runs faster than all but the least statistically desirable generators. It is now increasingly becoming the "random number generator of choice" for statistical simulations and generative modeling.
However, it is possible to efficiently analyze the output of the Mersenne Twister and recognize the numbers as being non-random (as with the Berlekamp-Massey algorithm or an extension from it, such as the Reed-Sloane algorithm).
Cryptographically secure pseudorandom number generators
A PRNG suitable for cryptographic applications is called a cryptographically secure PRNG (CSPRNG). Its output should not only pass all statistical tests for randomness but satisfy some additional cryptographic requirements.
Some classes of CSPRNGs include the following:
- Stream ciphers, including block ciphers running in counter or output feedback mode.
- Special designs with a security proof. For example Blum Blum Shub has a strong conditional security proof, though it is slow.
- PRNGs that have been designed specifically to be cryptographically secure. One example is ISAAC, which is fast and whose security recommendations feature, among others, a very large expected cycle time.
See also
Notes
1 "Various techniques used in connection with random digits", Applied Mathematics Series, no. 12, 36-38 (1951).2 Peterson. Ivars. The Jungles of Randomness: A Mathematical Safari. Wiley, NY, 1998. (pp. 178) ISBN 0-471-16449-6
This is an Article on Pseudorandom number generator. Page Contains Information, Facts Details or Explanation Guide About Pseudorandom number generator References
External links
