List of random number generators


Random number generators are important in many kinds of technical applications, including physics, engineering or mathematical computer studies, cryptography and gambling.
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.
GeneratorDateFirst proponentsReferencesNotes
Middle-square method1946J. von NeumannIn its original form, it is of poor quality and of historical interest only.
Lehmer generator1951D. H. LehmerOne of the earliest and most influential designs.
Linear congruential generator 1958W. E. Thomson; A. RotenbergA generalisation of the Lehmer generator. Historically, the most influential and studied generator.
Lagged Fibonacci generator 1958G. J. Mitchell and D. P. Moore
Linear-feedback shift register 1965R. C. TauswortheA hugely influential design. Also called Tausworthe generators.
Wichmann–Hill generator1982B. A. Wichmann and D. I. HillA combination of three small LCGs, suited to 16-bit CPUs. Widely used in many programs, e.g. it is used in at least Excel 2003 and 2007 for the Excel function RAND and it was the default generator in the language Python up to version 2.2.
Rule 301983S. WolframBased on cellular automata.
Inversive congruential generator 1986J. Eichenauer and J. Lehn
Blum Blum Shub1986M. Blum, L. Blum and M. ShubBlum-Blum-Shub is a PRNG algorithm that is considered cryptographically secure. It is based on prime numbers.
Park-Miller generator1988S. K. Park and K. W. MillerA specific implementation of a Lehmer generator, widely used because it is included in C++ as the function minstd_rand0 from C++11 onwards.
ACORN generator1989 R. S. WikramaratnaThe 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 generator1991G. K. Savvidy and N. G. Ter-Arutyunyan-SavvidyIt is a member of the class of matrix linear congruential generators, a generalisation of LCGs. The conceptual framework behind the MIXMAX family of generators relies on results from ergodic theory and classical mechanics.
Add-with-carry 1991G. Marsaglia and A. ZamanA modification of Lagged-Fibonacci generators.
Subtract-with-borrow 1991G. Marsaglia and A. ZamanA 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 reciprocals1992R. A. J. MatthewsA method with roots in number theory. Never used in practical applications.
KISS1993G. MarsagliaPrototypical example of a combination generator.
Multiply-with-carry 1994G. Marsaglia; C. Koç
Complementary-multiply-with-carry 1997R. Couture and P. L’Ecuyer
Mersenne Twister 1998M. Matsumoto and T. NishimuraClosely related with LFSRs. Its MT19937 implementation is probably the most commonly used modern PRNG. Default generator in R and the Python language starting from version 2.3.
Xorshift2003G. MarsagliaA sub-type of LFSR generators designed to be efficiently implemented in software. 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 2006F. Panneton, P. L'Ecuyer and M. MatsumotoA LFSR closely related with Mersenne Twister, aiming at remedying some of its shortcomings.
A small noncryptographic PRNG 2007Bob Jenkins
Small Fast Chaotic PRNG 2010Chris Doty-Humphrey
Advanced Randomization System (ARS)2011J. Salmon, M. Moraes, R. Dror and D. ShawA simplified version of the AES block cipher, leading to very fast performance on systems supporting the AES-NI.
Threefry2011J. Salmon, M. Moraes, R. Dror and D. ShawA simplified version of the Threefish block cipher, suitable for GPU implementations.
Philox2011J. Salmon, M. Moraes, R. Dror and D. ShawA simplification and modification of the block cipher Threefish with the addition of an S-box.
WELLDOC2013L. Balkova, M. Bucci, A. de Luca, J. Hladky, S. PuzyninaA set of periodic pseudorandom number generators based on infinite words.
SplitMix2014G. L. Steele, D. Lea and C. H. FloodBased upon the final mixing function of MurmurHash3. Included in Java Development Kit 8 and above.
Permuted Congruential Generator 2014M. E. O'NeillA modification of LCG.
Random Cycle Bit Generator 2016R. CookmanRCB is described as a bit pattern generator made to overcome some of the shortcomings of the Mersenne Twister and the short periods of shift/modulo generators.
Middle-Square Weyl Sequence RNG 2017B. WidynskiA variation on John von Neumann's original middle-square method.
xorshiftr+2018U. C. Çabuk, Ö. Aydın, and G. DalkılıçA modification of xorshift+. Significantly faster than its predecessor and passes all tests in the BigCrush suite.
Xoroshiro128+2018D. Blackman, S. VignaA modification of Marsaglia's Xorshift generators. One of the fastest generators on modern 64-bit CPUs. Related generators include xoroshiro128**, xoshiro256+ and xoshiro256**.
LXM2021G. L. Steele, S. VignaComposite generators combining two pseudorandom sub-generators and a mixing function. Several of these generator are implemented as part of Java 17.
64-bit MELG 2018S. Harase, T. KimotoAn implementation of 64-bit maximally equidistributed F2-linear generators with a Mersenne prime period.
Squares RNG2020B. WidynskiA counter-based version of Middle-Square Weyl Sequence RNG. Similar to Philox in design but significantly faster.
Collatz-Weyl Generators2023Tomasz R. DziałaA 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 than fast, non-cryptographic random number generators.
These include:
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:

Random number generators that use external entropy

These approaches combine a pseudo-random number generator with an external source of randomness./dev/randomUnix-like systems