Best Answer
A pseudorandom number generator (PRNG) is an algorithm for generating, called the PRNG's state. Although sequences that are closer to truly random can be generated using hardware random number generators, pseudorandom numbers are important in practice for simulations (e.g., of physical systems with the Monte Carlo method), and are central in the practice of cryptography. Common classes of these algorithms are linear congruential generators, Lagged Fibonacci generators, linear feedback shift registers and generalised feedback shift registers. Recent instances of pseudorandom algorithms include Blum Blum Shub, Fortuna, and the Mersenne twister.
Careful mathematical analysis is required to have any confidence a PRNG generates numbers that are sufficiently 'random' to suit the intended use. Robert R. Coveyou of Oak Ridge National Laboratory once titled an article, 'The generation of random numbers is too important to be left to chance.'[1] As John von Neumann joked, 'Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin.'[2]
Contents [hide]
1 Periodicity
2 Problems with deterministic generators
3 Early approaches
4 Mersenne twister
5 Cryptographically secure pseudorandom number generators
6 BSI evaluation criteria
7 Non-uniform generators
8 See also
9 Notes
10 References
11 External links
[edit] Periodicity
A PRNG can be started from an arbitrary starting state, using a seed state. It will always produce the same sequence thereafter when initialized with that state. The maximum length of the sequence before it begins to repeat is determined by the size of the state, measured in bits. However, since the length of the maximum period potentially doubles with each bit of 'state' added, it is easy to build PRNGs with periods long enough for many practical applications.
If a PRNG's internal state contains n bits, its period can be no longer than 2n results. For some PRNGs the period length can be calculated without walking through the whole period. Linear Feedback Shift Registers (LFSRs) are usually chosen to have periods of exactly 2nAsˆ’1. Linear congruential generators have periods that can be calculated by factoring.[citation needed] Mixes (no restrictions) have periods of about 2n/2 on average, usually after walking through a nonrepeating starting sequence. Mixes that are reversible (permutations) have periods of about 2nAsˆ’1 on average, and the period will always include the original internal state (e.g. [1]). Although PRNGs will repeat their results after they reach the end of their period, a repeated result does not imply that the end of the period has been reached, since its internal state may be larger than its output; this is particularly obvious with PRNGs with a 1-bit output.
Most pseudorandom generator algorithms produce sequences which are uniformly distributed by any of several tests. It is an open question, and one central to the theory and practice of cryptography, whether there is any way to distinguish the output of a high-quality PRNG from a truly random sequence without knowing the algorithm(s) used and the state with which it was initialized. The security of most cryptographic algorithms and protocols using PRNGs is based on the assumption that it is infeasible to distinguish use of a suitable PRNG from use of a truly random sequence. The simplest examples of this dependency are stream ciphers, which (most often) work by exclusive or-ing the plaintext of a message with the output of a PRNG, producing ciphertext. The design of cryptographically adequate PRNGs is extremely difficult, because they must meet additional criteria (see below). The size of its period is an important factor in the cryptographic suitability of a PRNG, but not the only one.
[edit] Problems with deterministic generators
In practice, the output from many common PRNGs exhibit artifacts which cause them to fail statistical pattern detection tests. These include, but are certainly not limited to:
Shorter than expected periods for some seed states (such seed states may be called 'weak' in this context);
Lack of uniformity of distribution;
Correlation of successive values;
Poor dimensional distribution of the output sequence;
The distances between where certain values occur are distributed differently from those in a random sequence distribution.
Defects exhibited by flawed PRNGs range from unnoticeable (and unknown) to the absurdly obvious. An example was the RANDU random number algorithm used for decades on mainframe computers. It was seriously flawed, but its inadequacy went undetected for a very long time. In many fields, much research work of that period which relied on random selection or on Monte Carlo a sequence of numbers that numbers. The sequence is not truly completely determined by a relatively approximates the properties of random random in that it is small set of initial values style simulations, or in other wa
Visit Stack Overflow
Reverse - 96 days ago - 4 Answers