list of random number generators

{{Short description|none}}

{{use dmy dates|date=February 2025}}

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.

style="text-align: center;" class="wikitable sortable"

!rowspan=1|Generator

!rowspan=1|Date

!rowspan=1|First proponents

!rowspan=1|References

!rowspan=1|Notes

{{rh}}|Middle-square method

|1946

|J. von Neumann

|Some of von Neumann's 1949 papers were printed only in 1951. John von Neumann, “Various techniques used in connection with random digits,” in A.S. Householder, G.E. Forsythe, and H.H. Germond, eds., Monte Carlo Method, National Bureau of Standards Applied Mathematics Series, vol. 12 (Washington, D.C.: U.S. Government Printing Office, 1951): pp. 36–38.

|In its original form, it is of poor quality and of historical interest only.

{{rh}}|Lehmer generator

|1951

|D. H. Lehmer

|{{Cite journal|last=Lehmer|first=Derrick H.|date=1951|title=Mathematical methods in large-scale computing units|journal=Proceedings of 2nd Symposium on Large-Scale Digital Calculating Machinery|pages=141–146}}

|One of the very earliest and most influential designs.

{{rh}}|Linear congruential generator (LCG)

|1958

|W. E. Thomson; A. Rotenberg

|{{Cite journal|last=Thomson|first=W. E.|date=1958|title=A Modified Congruence Method of Generating Pseudo-random Numbers|journal=The Computer Journal|volume=1|issue=2|pages=83|doi=10.1093/comjnl/1.2.83|doi-access=free}}{{Cite journal|last=Rotenberg|first=A.|date=1960|title=A New Pseudo-Random Number Generator|journal=Journal of the ACM|volume=7|issue=1|pages=75–77|doi=10.1145/321008.321019|s2cid=16770825 |doi-access=free}}

|A generalisation of the Lehmer generator and historically the most influential and studied generator.

{{rh}}|Lagged Fibonacci generator (LFG)

|1958

|G. J. Mitchell and D. P. Moore

|D. E. Knuth, The Art of Computer Programming, Vol. 2 Seminumerical Algorithms, 3rd ed., Addison Wesley Longman (1998); See pag. 27.

|

{{rh}}|Linear-feedback shift register (LFSR)

|1965

|R. C. Tausworthe

|{{Cite journal|last=Tausworthe|first=R. C.|date=1965|title=Random Numbers Generated by Linear Recurrence Modulo Two|url=https://www.ams.org/journals/mcom/1965-19-090/S0025-5718-1965-0184406-1/S0025-5718-1965-0184406-1.pdf|journal=Mathematics of Computation|volume=19|issue=90|pages=201–209|doi=10.1090/S0025-5718-1965-0184406-1|doi-access=free}}

|A hugely influential design. Also called Tausworthe generators.

{{rh}}|Wichmann–Hill generator

|1982

|B. A. Wichmann and D. I. Hill

|{{Cite journal|last1=Wichmann|first1=Brian A.|last2=Hill|first2=David I.|date=1982|title=Algorithm AS 183: An Efficient and Portable Pseudo-Random Number Generator|journal=Journal of the Royal Statistical Society. Series C (Applied Statistics)|volume=31|issue=2|pages=188–190|doi=10.2307/2347988|jstor=2347988}}

|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{{Cite web|url=https://support.microsoft.com/en-us/help/828795/description-of-the-rand-function-in-excel|title=Microsoft Support - Description of the RAND function in Excel|date=Apr 17, 2018}} and it was the default generator in the language Python up to version 2.2.{{Cite web|url=https://docs.python.org/2/library/random.html|title=Documentation » The Python Standard Library » 9. Numeric and Mathematical Modules » 9.6. random — Generate pseudo-random numbers}}

{{rh}}|Rule 30

|1983

|S. Wolfram

|{{cite journal|author = Wolfram, S.|title = Statistical mechanics of cellular automata|journal = Rev. Mod. Phys.|volume = 55|pages = 601–644|year = 1983|doi = 10.1103/RevModPhys.55.601|bibcode=1983RvMP...55..601W|issue = 3}}

|Based on cellular automata.

{{rh}}|Inversive congruential generator (ICG)

|1986

|J. Eichenauer and J. Lehn

|{{Cite journal|last1=Eichenauer|first1=Jürgen|last2=Lehn|first2=Jürgen|date=1986|title=A nonlinear congruential pseudorandom number generator.|journal=Statistische Hefte|volume=27|pages=315–326|doi=10.1007/BF02932576|s2cid=122052399 }}

|

{{rh}}|Blum Blum Shub

|1986

|M. Blum, L. Blum and M. Shub

|{{Cite journal |last1=Blum |first1=L. |last2=Blum |first2=M. |last3=Shub |first3=M. |date=1986-05-01 |title=A Simple Unpredictable Pseudo-Random Number Generator |url=https://epubs.siam.org/doi/10.1137/0215025 |journal=SIAM Journal on Computing |volume=15 |issue=2 |pages=364–383 |doi=10.1137/0215025 |issn=0097-5397|url-access=subscription }}

|Blum-Blum-Shub is a PRNG algorithm that is considered cryptographically secure. Its base is based on prime numbers.

{{rh}}|Park-Miller generator

|1988

|S. K. Park and K. W. Miller

|{{Cite journal|last1=Park|first1=Stephen K.|last2=Miller|first2=Keith W.|date=1988|title=Random Number Generators: Good Ones Are Hard To Find|url=http://www.firstpr.com.au/dsp/rand31/p1192-park.pdf|journal=Communications of the ACM|volume=31|issue=10|pages=1192–1201|doi=10.1145/63039.63042|s2cid=207575300 }}

|A specific implementation of a Lehmer generator, widely used because it is included in C++ as the function minstd_rand0 from C++11 onwards.{{cite web |url=https://en.cppreference.com/w/cpp/numeric/random |title=Pseudo-random number generation |website=cppreference.com |access-date=14 November 2021}}

{{rh}}|ACORN generator

|1989 (discovered 1984)

|R. S. Wikramaratna

|{{Cite journal|last=Wikramaratna|first=R. S.|date=1989|title=ACORN — A new method for generating sequences of uniformly distributed Pseudo-random Numbers|journal=Journal of Computational Physics|volume=83|issue=1|pages=16–31|doi=10.1016/0021-9991(89)90221-0|bibcode=1989JCoPh..83...16W}}Wikramaratna, R.S. Theoretical and empirical convergence results for additive congruential random number generators, Journal of Computational and Applied Mathematics (2009), {{doi|10.1016/j.cam.2009.10.015}}

|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.

{{rh}}|MIXMAX generator

|1991

|G. K. Savvidy and N. G. Ter-Arutyunyan-Savvidy

|{{cite journal |doi=10.1016/0021-9991(91)90015-D|title=On the Monte Carlo simulation of physical systems|journal=Journal of Computational Physics|volume=97|issue=2|pages=566|year=1991|last1=Savvidy|first1=G.K|last2=Ter-Arutyunyan-Savvidy|first2=N.G|bibcode=1991JCoPh..97..566S}}

|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.

{{rh}}|Add-with-carry (AWC)

|1991

|G. Marsaglia and A. Zaman

|{{Cite journal|last1=George|first1=Marsaglia|last2=Zaman|first2=Arif|date=1991|title=A new class of random number generators|url=https://projecteuclid.org/download/pdf_1/euclid.aoap/1177005878|journal=Annals of Applied Probability|volume=1|issue=3|pages=462–480|doi=10.1214/aoap/1177005878|doi-access=free}}

|A modification of Lagged-Fibonacci generators.

{{rh}}|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,{{Cite journal|last=Martin|first=Lüscher|date=1994|title=A portable high-quality random number generator for lattice field theory simulations|journal=Computer Physics Communications|volume= 79| issue = 1|pages=100–110|doi=10.1016/0010-4655(94)90232-1|arxiv=hep-lat/9309020|bibcode=1994CoPhC..79..100L|s2cid=17608961 }} widely used e.g. for particle physics simulations.

{{rh}}|Maximally periodic reciprocals

|1992

|R. A. J. Matthews

|{{Cite journal|last=Matthews|first=Robert A. J.|date=1992|title=Maximally periodic reciprocals|url=https://www.researchgate.net/publication/266728416|journal=Bull. Inst. Math. Appl.|volume=28|pages=147–148}}

|A method with roots in number theory, although never used in practical applications.

{{rh}}|KISS

|1993

|G. Marsaglia

|{{Cite journal|last1=Marsaglia|first1=George|last2=Zaman|first2=Arif|date=1993|title=The KISS generator|journal=Technical Report, Department of Statistics, Florida State University, Tallahassee, FL, USA}}

|Prototypical example of a combination generator.

{{rh}}|Multiply-with-carry (MWC)

|1994

|G. Marsaglia; C. Koç

|Post by George Marsaglia on the newsgroup sci.stat.math dated 1 August 2018 with title '[https://groups.google.com/forum/#!searchin/sci.stat.math/Yet$20another$20rng%7Csort:date/sci.stat.math/p7aLW3TsJys/QGb1kti6kN0J Yet another RNG]'.{{Cite journal|last=Koç|first=Cemal|date=1995|title=Recurring-with-Carry Sequences|journal=Journal of Applied Probability|volume= 32|issue=4|pages=966–971|jstor=3215210|doi=10.2307/3215210|s2cid=123798320 }}

|

{{rh}}|Complementary-multiply-with-carry (CMWC)

|1997

|R. Couture and P. L’Ecuyer

|{{Cite journal|last1=Couture|first1=Raymond|last2=L'Ecuyer|first2=Pierre|date=1997|title=Distribution properties of multiply-with-carry random number generators|url=https://www.ams.org/journals/mcom/1997-66-218/S0025-5718-97-00827-2/S0025-5718-97-00827-2.pdf|journal=Mathematics of Computation|volume=66 Number. 218|issue=218|pages=591–607|doi=10.1090/S0025-5718-97-00827-2|bibcode=1997MaCom..66..591C|doi-access=free}}

|

{{rh}}|Mersenne Twister (MT)

|1998

|M. Matsumoto and T. Nishimura

|{{Cite journal|last1=Matsumoto|first1=M.|last2=Nishimura|first2=T.|date=1998|title=MersenneTwister: A623-dimensionally Equidistributed Uniform Pseudo-Random Number Generator|journal=ACM Transactions on Modeling and Computer Simulation|volume=8|issue=1|pages=3–30|doi=10.1145/272991.272995|citeseerx=10.1.1.215.1141|s2cid=3332028 }}

|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.

{{rh}}|Xorshift

|2003

|G. Marsaglia

|{{cite journal

| first=George | last=Marsaglia | author-link=George Marsaglia

| title=Xorshift RNGs

| journal=Journal of Statistical Software

| volume=8 | issue=14

| date=July 2003

| doi=10.18637/jss.v008.i14| doi-access=free

}}

|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.

{{rh}}|Well equidistributed long-period linear (WELL)

|2006

|F. Panneton, P. L'Ecuyer and M. Matsumoto

|{{Cite journal| doi = 10.1145/1132973.1132974| title = Improved long-period generators based on linear recurrences modulo 2| journal = ACM Transactions on Mathematical Software| volume = 32| number = 1| pages = 1–16| date = March 2006| last1 = Panneton | first1 = François O. | last2 = l'Ecuyer | first2 = Pierre | last3 = Matsumoto | first3 = Pierre | url = http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng.pdf| citeseerx = 10.1.1.73.5499| s2cid = 7368302}}

|A LFSR closely related with Mersenne Twister, aiming at remedying some of its shortcomings.

{{rh}}|A small noncryptographic PRNG (JSF)

|2007

|Bob Jenkins

|{{Cite web|url=http://burtleburtle.net/bob/rand/smallprng.html|title=A small noncryptographic PRNG|last=Jenkins|first=Bob|date=2009}}

|

{{rh}}|Small Fast Chaotic PRNG (SFC)

|2010

|Chris Doty-Humphrey

|{{Cite web |title=RNG_engines.txt |url=https://pracrand.sourceforge.net/RNG_engines.txt |last=Doty-Humphrey |first=Chris |url-status=live |archive-url=https://web.archive.org/web/20241217212817/https://pracrand.sourceforge.net/RNG_engines.txt |archive-date=2024-12-17 |access-date=2025-02-13 |website=Practically Random}}{{Cite web |title=SFC64 Small Fast Chaotic PRNG |url=https://numpy.org/doc/2.2/reference/random/bit_generators/sfc64.html |url-status=live |archive-url=https://web.archive.org/web/20250213181906/https://numpy.org/doc/2.2/reference/random/bit_generators/sfc64.html |archive-date=2025-02-13 |access-date=2025-02-13 |website=NumPy v2.2 Manual}}

|

{{rh}}|Advanced Randomization System (ARS)

|2011

|J. Salmon, M. Moraes, R. Dror and D. Shaw

|{{Cite conference|title = Parallel random numbers: as easy as 1, 2, 3|last1 = Salmon|first1 = John|date = 2011|book-title = Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis, Article No. 16|doi = 10.1145/2063384.2063405|last2 = Moraes|first2 = Mark|last3 = Dror|first3 = Ron|last4 = Shaw|first4 = David}}

|A simplified version of the AES block cipher, leading to very fast performance on systems supporting the AES-NI.

{{rh}}|Threefry

|2011

|J. Salmon, M. Moraes, R. Dror and D. Shaw

|

|A simplified version of the Threefish block cipher, suitable for GPU implementations.

{{rh}}|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.

{{rh}}|WELLDOC

|2013

|L. Balkova, M. Bucci, A. de Luca, J. Hladky, S. Puzynina

|{{Cite journal |last1=Balkova |first1=Lubomira |last2=Bucci |first2=Michelangelo |last3=De Luca |first3=Alessandro |last4=Hladky |first4=Jiri |last5=Puzynina |first5=Svetlana |date=September 2016 |title=Aperiodic pseudorandom number generators based on infinite words |journal=Theoretical Computer Science |volume=647 |pages=85–100 |doi=10.1016/j.tcs.2016.07.042|arxiv=1311.6002 |s2cid=2175443 }}

|Aperiodic pseudorandom number generators based on infinite words technique.

{{rh}}|SplitMix

|2014

|G. L. Steele, D. Lea and C. H. Flood

|{{Cite journal|last1=Steele|first1=Guy L. Jr.|last2=Lea|first2=Doug|last3=Flood|first3=Christine H.|date=2014|title=Fast splittable pseudorandom number generators|url=http://gee.cs.oswego.edu/dl/papers/oopsla14.pdf|journal=OOPSLA '14 Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications}}

|Based upon the final mixing function of MurmurHash3. Included in Java Development Kit 8 and above.

{{rh}}|Permuted Congruential Generator (PCG)

|2014

|M. E. O'Neill

|{{Cite journal|last=O'Neill|first=Melissa E.|date=2014|title=PCG: A Family of Simple Fast Space-Efficient Statistically Good Algorithms for Random Number Generation|url=http://www.pcg-random.org/pdf/hmc-cs-2014-0905.pdf|journal=Technical Report}}

|A modification of LCG.

{{rh}}|Random Cycle Bit Generator (RCB)

|2016

|R. Cookman

|{{Cite journal|last=Cookman|first=Richard|date=2016|title=random cycle bit generator (rcb_generator)|url=https://github.com/ceorron/cycle-bit-random-number-generator|journal=Technical Report}}

|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.

{{rh}}|Middle-Square Weyl Sequence RNG (see also middle-square method)

|2017

|B. Widynski

|{{cite arXiv |last=Widynski |first=Bernard|eprint=1704.00358 |title=Middle-Square Weyl Sequence RNG|class=cs.CR |year=2017 }}{{cite book | title = Random Numbers and Computers | last = Kneusel | first = Ron | publisher = Springer | year = 2018 | edition = 1 | pages = 13–14 | isbn = 9783319776972 |url=https://books.google.com/books?id=7ZJUDwAAQBAJ}}

|A variation on John von Neumann's original middle-square method, this generator may be the fastest RNG that passes all the statistical tests.

{{rh}}|xorshiftr+

|2018

|U. C. Çabuk, Ö. Aydın, and G. Dalkılıç

|{{Cite journal |last=Çabuk |first=Umut Can |last2=Aydin |first2=Ömer |last3=Dalkiliç |first3=Gökhan |date=2017 |title=A random number generator for lightweight authentication protocols: xorshiftR+ |url=https://journals.tubitak.gov.tr/elektrik/vol25/iss6/31 |journal=Turkish Journal of Electrical Engineering & Computer Sciences |volume=25 |pages=4818–4828 |doi=10.3906/elk-1703-361|url-access=subscription }}

|A modification of xorshift+. Significantly faster than the predecessor and passes all tests in the BigCrush suite.

{{rh}}|Xoroshiro128+

|2018

|D. Blackman, S. Vigna

|{{cite arXiv |last1=Blackman |first1=David |last2=Vigna|first2=Sebastiano|eprint=1805.01407 |title= Scrambled Linear Pseudorandom Generators|class=cs.DS |year=2018 }}

|A modification of Marsaglia's Xorshift generators, one of the fastest generators on modern 64-bit CPUs. Related generators include xoroshiro128**, xoshiro256+ and xoshiro256**.

{{rh}}|64-bit MELG (MELG-64)

|2018

|S. Harase, T. Kimoto

|{{Cite journal|last1=Harase|first1=S.|last2=Kimoto|first2=T.|date=2018|title=Implementing 64-bit Maximally Equidistributed F2-Linear Generators with Mersenne Prime Period|journal=ACM Transactions on Mathematical Software|volume=44|issue=3|pages=30:1–30:11|doi = 10.1145/3159444|arxiv= 1505.06582|s2cid=14923086 |url=https://github.com/sharase/melg-64 }}

|An implementation of 64-bit maximally equidistributed F2-linear generators with Mersenne prime period.

{{rh}}|Squares RNG

|2020

|B. Widynski

|{{cite arXiv |last=Widynski |first=Bernard|eprint=2004.06278 |title= Squares: A Fast Counter-Based RNG|class=cs.DS |year=2020 }}

|A counter-based version of Middle-Square Weyl Sequence RNG. Similar to Philox in design but significantly faster.

{{rh}}|Collatz-Weyl Generators

|2023

|Tomasz R. Działa

|{{cite arXiv |last=Działa |first=Tomasz R. |eprint=2312.17043 |title= Collatz-Weyl Generators: High Quality and High Throughput Parameterized Pseudorandom Number Generators|class=cs.CE |year=2023 }}

|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:

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 (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/randomUnix-like systems
  • CryptGenRandomMicrosoft 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.True Random Number Generator using Corona Discharge: Indian Patent Office.

Patent Application Number: 201821026766

See also

References

{{reflist}}