# List of random number generators

Random number generators are important in many kinds of technical applications, including physics, engineering or mathematical computer studies (e.g., Monte Carlo simulations), cryptography and gambling (on game servers).
This list includes many common types, regardless of quality or applicability to a given use case.

## Pseudorandom number generators (PRNGs)

The following algorithms are pseudorandom number generators.
| Generator | Date | First proponents | Notes |
| Middle-square method | 1946 | J. von Neumann | In its original form, it is of poor quality and of historical interest only. |
| Lehmer generator | 1951 | D. H. Lehmer | One of the very earliest and most influential designs. |
| Linear congruential generator (LCG) | 1958 | W. E. Thomson; A. Rotenberg | A generalisation of the Lehmer generator and historically the most influential and studied generator. |
| Lagged Fibonacci generator (LFG) | 1958 | G. J. Mitchell and D. P. Moore | |
| Linear-feedback shift register (LFSR) | 1965 | R. C. Tausworthe | A hugely influential design. Also called Tausworthe generators. |
| Wichmann–Hill generator | 1982 | B. A. Wichmann and D. I. Hill | A combination of three small LCGs, suited to 16-bit CPUs. Widely used in many programs, e.g. it is used in Excel 2003 and later versions for the Excel function RAND and it was the default generator in the language Python up to version 2.2. |
| Rule 30 | 1983 | S. Wolfram | Based on cellular automata. |
| Inversive congruential generator (ICG) | 1986 | J. Eichenauer and J. Lehn | |
| Blum Blum Shub | 1986 | M. Blum, L. Blum and M. Shub | Blum-Blum-Shub is a PRNG algorithm that is considered cryptographically secure. Its base is based on prime numbers. |
| Park-Miller generator | 1988 | S. K. Park and K. W. Miller | A specific implementation of a Lehmer generator, widely used because it is included in C++ as the function minstd_rand0 from C++11 onwards. |
| ACORN generator | 1989 (discovered 1984) | R. S. Wikramaratna | The Additive Congruential Random Number generator. Simple to implement, fast, but not widely known. With appropriate initialisations, passes all current empirical test suites, and is formally proven to converge. Easy to extend for arbitrary period length and improved statistical performance over higher dimensions and with higher precision. |
| MIXMAX generator | 1991 | G. K. Savvidy and N. G. Ter-Arutyunyan-Savvidy | It is a member of the class of matrix linear congruential generator, a generalisation of LCG. The rationale behind the MIXMAX family of generators relies on results from ergodic theory and classical mechanics. |
| Add-with-carry (AWC) | 1991 | G. Marsaglia and A. Zaman | A modification of Lagged-Fibonacci generators. |
| Subtract-with-borrow (SWB) | 1991 | G. Marsaglia and A. Zaman | A modification of Lagged-Fibonacci generators. A SWB generator is the basis for the RANLUX generator, widely used e.g. for particle physics simulations. |
| Maximally periodic reciprocals | 1992 | R. A. J. Matthews | A method with roots in number theory, although never used in practical applications. |
| KISS | 1993 | G. Marsaglia | Prototypical example of a combination generator. |
| Multiply-with-carry (MWC) | 1994 | G. Marsaglia; C. Koç | |
| Complementary-multiply-with-carry (CMWC) | 1997 | R. Couture and P. L’Ecuyer | |
| Mersenne Twister (MT) | 1998 | M. Matsumoto and T. Nishimura | Closely related with LFSRs. In its MT19937 implementation is probably the most commonly used modern PRNG. Default generator in R and the Python language starting from version 2.3. |
| Xorshift | 2003 | G. Marsaglia | It is a very fast sub-type of LFSR generators. Marsaglia also suggested as an improvement the xorwow generator, in which the output of a xorshift generator is added with a Weyl sequence. The xorwow generator is the default generator in the CURAND library of the nVidia CUDA application programming interface for graphics processing units. |
| Well equidistributed long-period linear (WELL) | 2006 | F. Panneton, P. L'Ecuyer and M. Matsumoto | A LFSR closely related with Mersenne Twister, aiming at remedying some of its shortcomings. |
| A small noncryptographic PRNG (JSF) | 2007 | Bob Jenkins | |
| Small Fast Chaotic PRNG (SFC) | 2010 | Chris Doty-Humphrey | |
| Advanced Randomization System (ARS) | 2011 | J. Salmon, M. Moraes, R. Dror and D. Shaw | A simplified version of the AES block cipher, leading to very fast performance on systems supporting the AES-NI. |
| Threefry | 2011 | J. Salmon, M. Moraes, R. Dror and D. Shaw | A simplified version of the Threefish block cipher, suitable for GPU implementations. |
| Philox | 2011 | J. Salmon, M. Moraes, R. Dror and D. Shaw | A simplification and modification of the block cipher Threefish with the addition of an S-box. |
| WELLDOC | 2013 | L. Balkova, M. Bucci, A. de Luca, J. Hladky, S. Puzynina | Aperiodic pseudorandom number generators based on infinite words technique. |
| SplitMix | 2014 | G. L. Steele, D. Lea and C. H. Flood | Based upon the final mixing function of MurmurHash3. Included in Java Development Kit 8 and above. |
| Permuted Congruential Generator (PCG) | 2014 | M. E. O'Neill | A modification of LCG. |
| Random Cycle Bit Generator (RCB) | 2016 | R. Cookman | RCB is described as a bit pattern generator made to overcome some of the shortcomings with Mersenne Twister and short periods/bit length restriction of shift/modulo generators. |
| Middle-Square Weyl Sequence RNG (see also middle-square method) | 2017 | B. Widynski | A variation on John von Neumann's original middle-square method, this generator may be the fastest RNG that passes all the statistical tests. |
| xorshiftr+ | 2018 | U. C. Çabuk, Ö. Aydın, and G. Dalkılıç | A modification of xorshift+. Significantly faster than the predecessor and passes all tests in the BigCrush suite. |
| Xoroshiro128+ | 2018 | D. Blackman, S. Vigna | A modification of Marsaglia's Xorshift generators, one of the fastest generators on modern 64-bit CPUs. Related generators include xoroshiro128**, xoshiro256+ and xoshiro256**. |
| 64-bit MELG (MELG-64) | 2018 | S. Harase, T. Kimoto | An implementation of 64-bit maximally equidistributed F$_2$-linear generators with Mersenne prime period. |
| Squares RNG | 2020 | B. Widynski | A counter-based version of Middle-Square Weyl Sequence RNG. Similar to Philox in design but significantly faster. |
| Collatz-Weyl Generators | 2023 | Tomasz R. Działa | A class of chaotic counter-based generators applying a broad class of non-invertible generalized Collatz mappings and Weyl sequences, enabling the generation of multiple independent streams. Leveraging 128-bit arithmetic allows for a highly efficient implementation, especially on modern 64-bit architectures. |

## Cryptographic algorithms

Cipher algorithms and cryptographic hashes can be used as very high-quality pseudorandom number generators. However, generally they are considerably slower (typically by a factor 2–10) than fast, non-cryptographic random number generators.
These include:
* Stream ciphers. Popular choices are Salsa20 or ChaCha (often with the number of rounds reduced to 8 for speed), ISAAC, HC-128 and RC4.
* Block ciphers in counter mode. Common choices are AES (which is very fast on systems supporting it in hardware), TwoFish, Serpent and Camellia.
* Cryptographic hash functions
A few cryptographically secure pseudorandom number generators do not rely on cipher algorithms but try to link mathematically the difficulty of distinguishing their output from a `true' random stream to a computationally difficult problem. These approaches are theoretically important but are too slow to be practical in most applications. They include:
* Blum–Micali algorithm (1984)
* Blum Blum Shub (1986)
* Naor–Reingold pseudorandom function (1997)

## Random number generators that use external entropy

These approaches combine a pseudo-random number generator (often in the form of a block or stream cipher) with an external source of randomness (e.g., mouse movements, delay between keyboard presses etc.).
* /dev/random – Unix-like systems
* CryptGenRandom – Microsoft Windows
* Fortuna
* RDRAND instructions (called Intel Secure Key by Intel), available in Intel x86 CPUs since 2012. They use the AES generator built into the CPU, reseeding it periodically.
* True Random Number Generator using Corona Discharge.
* Yarrow
* RANDOM.org