Fact-checked by Grok 2 weeks ago

Pseudorandom number generator

A pseudorandom number generator (PRNG) is a that accepts an initial value or as input and produces an output of numbers whose statistical properties approximate those of true s, enabling reproducible yet seemingly unpredictable results. Unlike hardware-based true random number generators that draw from physical sources, PRNGs rely on mathematical functions for efficiency in software environments, making them suitable for generating vast s without hardware dependencies. PRNGs find widespread use in computational simulations, such as methods for modeling complex systems, in software applications, and seeding cryptographic processes when augmented with . However, their deterministic nature imposes limitations, including finite periods before repetition and potential predictability if the or internal is compromised, which underscores the need for rigorous statistical testing suites to validate quality. In cryptographic contexts, specialized variants known as cryptographically secure PRNGs (CSPRNGs) incorporate additional reseeding and resistance to recovery attacks to mitigate these risks. Historical implementations, such as linear congruential generators, have revealed flaws like short cycles or detectable patterns under scrutiny, prompting ongoing advancements in generator design for enhanced unpredictability and uniformity.

Definition and Fundamentals

Mathematical Definition

A pseudorandom number generator (PRNG) is a deterministic algorithm that produces a sequence of numbers approximating the statistical properties of true random numbers, such as uniformity and independence, through iterative computation from an initial seed value. Formally, it is modeled using a finite state space S, a state transition function f: S \to S, and an output function g: S \to (0,1). Starting from an initial state s_0 (the seed), subsequent states are generated as s_n = f(s_{n-1}) for n = 1, 2, \dots, with outputs u_n = g(s_n). The sequence \{u_n\} is considered pseudorandom if it satisfies key mathematical properties: each u_n is uniformly distributed over (0,1), consecutive outputs exhibit minimal correlation (approaching independence), and the period—the smallest p such that s_{n+p} = s_n for all sufficiently large n—maximizes the cycle length, ideally equaling |S| to avoid premature repetition. These properties ensure that finite prefixes of the sequence pass empirical statistical tests, such as convergence of the empirical measure to the uniform distribution, where for any measurable set E and probability measure P (typically Lebesgue on [0,1]), the frequency \frac{1}{n} \# \{ i \leq n : u_i \in E \} approaches P(E) as n grows within the period. In cryptographic contexts, additional requirements include computational unpredictability: no efficient algorithm should predict future outputs from past ones better than chance, often formalized via indistinguishability from uniform random sequences under polynomial-time adversaries. However, non-cryptographic PRNGs prioritize efficiency and reproducibility over such security, relying solely on statistical mimicry verifiable through tests like the chi-squared for uniformity or runs tests for independence. The deterministic nature implies reproducibility from the same seed, distinguishing PRNGs from true random generators, with the seed often drawn from entropy sources to enhance apparent randomness.

Distinction from True Random Number Generators

Pseudorandom number generators (PRNGs) are deterministic algorithms that produce sequences approximating the statistical properties of random numbers, relying on an initial seed value and a fixed mathematical function to generate outputs that are reproducible given the same inputs. In contrast, true random number generators (TRNGs), also known as non-deterministic random bit generators, derive bits from physical phenomena exhibiting inherent unpredictability, such as thermal noise in electronic circuits, radioactive decay timing, or quantum events like photon arrival times. This fundamental difference arises because PRNG outputs are fully computable and predictable once the internal state and algorithm are known, whereas TRNGs incorporate entropy from chaotic or quantum processes that defy deterministic forecasting. The deterministic nature of PRNGs limits their period—the length before the sequence repeats—to the size of the generator's state space; for example, a 32-bit linear congruential generator has a maximum period of $2^{32}, after which the cycle restarts from the seed. TRNGs, however, lack such periodicity due to their dependence on external, non-repeating physical entropy sources, theoretically producing unbounded unique sequences without algorithmic repetition. While PRNGs excel in computational efficiency, enabling high-speed generation without specialized hardware—often orders of magnitude faster than TRNGs—they fail to provide genuine unpredictability, making them unsuitable for applications requiring absolute randomness, such as one-time pads in cryptography unless seeded or combined with TRNG entropy. In practice, PRNGs pass statistical tests for randomness (e.g., uniformity, independence) over short sequences but reveal their deterministic structure under exhaustive analysis or if the seed is compromised, as demonstrated in historical vulnerabilities like the predictability of early Netscape SSL random number generation from timestamp seeds. TRNGs, by sourcing from physical indeterminacy, resist such prediction but introduce challenges like slower generation rates (typically bits per second versus gigabits for PRNGs) and potential biases from environmental factors, necessitating post-processing for uniformity. Hybrid systems, where TRNGs seed PRNGs, leverage the strengths of both to balance speed, reproducibility, and security in fields like and secure key generation.

Periodicity and State Space

The state space of a pseudorandom number generator (PRNG) comprises the finite set of all possible internal states, typically represented by a fixed number of bits or values that fully determine the next output and subsequent state via a deterministic transition function f: S \to S, where S is the state space. The size of S, denoted |S|, fundamentally limits the generator's behavior, as the total number of distinct states bounds the variety of sequences producible from different initial seeds. For instance, a PRNG with a k-bit state space has at most $2^k states, ensuring that any sequence generated will repeat after at most $2^k steps due to the pigeonhole principle. Periodicity in PRNGs is characterized by the period length, the smallest positive integer p such that f^p(s) = s for some initial state s \in S, marking the point at which the sequence cycles. The period cannot exceed |S|, and the state space partitions into cycles under iteration of f, with transient states leading into these cycles; optimal designs aim for a single long cycle encompassing nearly all states to maximize unpredictability. Short periods arise from poor parameter choices or mappings that produce small cycles, rendering the generator unsuitable for applications requiring long non-repeating sequences, such as Monte Carlo simulations or cryptography. In practice, achieving the maximum period requires specific conditions on f and the modulus or parameters; for example, linear congruential generators (LCGs) attain a full period of modulus m when parameters satisfy the Hull-Dobell theorem, including c coprime to m, a-1 divisible by all prime factors of m, and a \equiv 1 \pmod{4} if m is a power of 2. Similarly, generators like exploit large state spaces (e.g., 19937 bits) to yield periods of $2^{19937} - 1, far exceeding typical computational needs while maintaining efficient state transitions. Empirical testing via tools like verifies period lengths by detecting early repetitions, underscoring that state space exhaustion, not just theoretical maxima, governs effective usability.

Historical Development

Early Mechanical and Manual Methods

Prior to the advent of electronic computers, sequences approximating uniform random numbers were generated manually or with rudimentary mechanical aids, primarily to compile tables for statistical sampling and early simulation work. In 1927, statistician assembled a table of 41,600 random digits by extracting the middle digits from serial numbers in the 1921 British census records, a method proposed by to leverage ostensibly unpredictable numerical data for randomness. This approach relied on the assumption that census enumerations lacked systematic patterns suitable for biasing statistical tests, though it produced a fixed, deterministic sequence once compiled. In 1938, Ronald A. Fisher and Frank Yates extended this practice by deriving random digits from the decimal expansions of logarithm tables, selecting every nth digit to fill their publication Statistical Tables for Biological, Agricultural and Medical Research. Logarithmic tables, computed via manual or early mechanical arithmetic (such as using slide rules or difference engines), offered expansive digit strings; Fisher and Yates chose this source believing the fractional parts mimicked uniformity, despite inherent mathematical structure in transcendental functions like logarithms potentially introducing subtle correlations undetectable at the time. These manual extractions were labor-intensive, often involving teams verifying digits by hand to minimize transcription errors, and yielded tables of around 10,000 to 20,000 entries, sufficient for agricultural and biological experiments but limited by human effort. Mechanical assistance emerged in the late 1930s with devices like the one employed by and , who in 1938-1939 generated a table of 100,000 random digits using a spinning cardboard disk divided into 10 sectors labeled 0-9, rotated at approximately 250 revolutions per minute while a flashing light intermittently illuminated a sector to record the digit. Though dependent on physical unpredictability from friction and air currents for true randomness, the device's repeatable setup and fixed digit assignment resembled deterministic machinery, and the resulting sequence was statistically tested for uniformity using before publication in the Journal of the Royal Statistical Society. Such apparatuses bridged manual tabulation and later computational generators, highlighting the era's reliance on hybrid mechanical-manual processes to scale beyond pure hand computation, yet they suffered from short "periods" (table lengths) and vulnerability to mechanical biases like uneven spin decay. These methods, while not algorithmic in the modern pseudorandom sense, provided deterministic outputs from initial conditions (e.g., starting positions in tables or device calibrations), serving as precursors to software-based by enabling reproducible sequences for verification in statistical applications. Their credibility stemmed from empirical testing against known distributions, though contemporary analysis reveals flaws like non-uniformity in log-derived digits due to underlying arithmetic progressions. By the early 1940s, demand from burgeoning underscored the need for larger, faster generation, paving the way for computational transitions.

Mid-20th Century Computational Advances

The advent of programmable electronic computers like the in 1945 facilitated the transition from mechanical or manual random number generation to algorithmic computational methods. In 1946, developed the middle-square method as part of for thermonuclear reactions on the ENIAC. This technique took an initial seed number, squared it to produce a fixed-width integer result, and extracted the central digits to form the next value in the sequence, repeating the process iteratively. On the , it generated pseudorandom digits at approximately 5,000 per second, roughly 1,800 times faster than reading from punched cards or other input media. Despite its pioneering role, von Neumann identified inherent weaknesses, such as frequent production of zero sequences and rapid entry into short cycles, limiting its practical utility for extended simulations. To address these shortcomings, Derrick Henry Lehmer introduced the linear congruential generator (LCG), also known as the Lehmer generator, around 1948 while programming the ENIAC for number-theoretic computations. The LCG updates the state via the recurrence X_{n+1} = (a X_n) \mod m, where a is a multiplier, m a modulus (often a large prime), and the output derived from scaling X_n / m to the unit interval; an additive constant c was sometimes included but Lehmer's original form omitted it for multiplicative variants. Lehmer's implementation in 1949 proceedings emphasized parameters yielding full-period cycles under the condition \gcd(a-1, m) = 1, providing longer sequences and improved uniformity over middle-square outputs. Early tests on ENIAC demonstrated its efficacy for tasks like prime sieving and Monte Carlo integration, establishing LCGs as a staple for 1950s computing despite later-recognized lattice structure artifacts in higher dimensions. These innovations stemmed from wartime and postwar demands for simulating complex probabilistic systems in physics and engineering, where true random sources were impractical for high-volume needs. Von Neumann's and Lehmer's work on the not only accelerated generation rates but also highlighted the deterministic nature of pseudorandom sequences, prompting initial empirical spectral tests to assess deviation from uniformity. By the mid-1950s, LCG variants proliferated in mainframe software for statistical analysis and operations research, though parameter selection remained ad hoc until Hull-Dobell theorem formalizations in the 1960s.

Late 20th Century to Present Innovations

In 1997, Makoto Matsumoto and Takuji Nishimura introduced the Mersenne Twister (MT19937), a generalized feedback shift register algorithm with a state size of 19937 bits and a full-period length of $2^{19937} - 1, achieving equidistribution in up to 623 dimensions. This innovation addressed limitations in earlier linear feedback shift registers by incorporating tempering functions to enhance output uniformity and low autocorrelation, making it highly effective for large-scale Monte Carlo simulations and statistical modeling where long sequences without detectable patterns are required. Its widespread adoption stemmed from superior performance in empirical tests compared to predecessors like linear congruential generators, though it requires significant state storage and is unsuitable for cryptographic use due to predictable state reconstruction from limited outputs. Subsequent developments in the early 2000s prioritized computational speed for general-purpose applications. George Marsaglia proposed in 2003, relying on simple bitwise XOR and shift operations on a linear feedback shift register state to produce sequences with periods up to $2^{128} - 1, achieving generation rates far exceeding those of on commodity hardware. These generators excel in low-latency scenarios such as procedural content generation in games but exhibit lattice structure artifacts detectable by advanced spectral tests, prompting refinements like output mixing to mitigate weaknesses. In 2006, François Panneton, Pierre L'Ecuyer, and developed the , an evolution of that improves bit-mixing through nonlinear operations, yielding better performance in dimension-based statistical tests while retaining comparable periods. More recent innovations emphasize balanced trade-offs in state size, speed, and statistical quality. In 2014, Melissa O'Neill introduced the PCG (Permuted Congruential Generator) family, which augments linear congruential generators with output permutation functions to scramble results, producing high-quality streams from minimal 64-bit state with periods exceeding $2^{64}. PCG variants pass stringent test suites like TestU01 and PractRand with fewer parameters than competitors, offering advantages in embedded systems and parallel computing due to their simplicity and resistance to initialization biases. These advances reflect ongoing refinement driven by empirical validation against expanded test batteries, including NIST's Statistical Test Suite released in 2001, prioritizing generators that avoid low-dimensional dependencies exploitable in applications like numerical integration.

Core Algorithms and Types

Linear Congruential Generators

A linear congruential generator (LCG) produces a sequence of pseudorandom numbers via the recurrence relation X_{n+1} = (a X_n + c) \mod m, where X_n is the current state, a is the multiplier, c is the increment, m is the modulus, and the initial seed X_0 determines the starting point. The output is typically the normalized value U_n = X_n / m, yielding numbers in [0, 1). The parameters a, c, and m critically influence the sequence quality; m is often chosen as $2^k or $2^k - 1 for efficient computation on binary hardware, with k = 31 or $32 common to fit in a word size. For full period m—the maximum possible, ensuring all residues appear before repetition—the Hull-Dobell theorem requires: c coprime to m; a \equiv 1 \pmod{p} for every prime p dividing m; and if $4 divides m, then a \equiv 1 \pmod{4}. Multiplicative congruential generators set c = 0, reducing to Lehmer's 1951 form X_{n+1} = a X_n \mod m, which achieves full period m under modified conditions like \gcd(X_0, m) = 1. LCGs originated in Derrick Lehmer's 1951 work on algorithmic random number generation for the ENIAC, initially multiplicative before generalization. Examples include the minimal standard LCG with m = 2^{31}, a = 16807, c = 0 (Park-Miller), used in some simulations for its balance of speed and period. GNU libc's rand() employs an LCG with m = 2^{31}, a = 1103515245, c = 12345. Despite efficiency—requiring only arithmetic operations and minimal state—LCGs exhibit weaknesses: lower bits are poorly random (e.g., least significant bit alternates predictably), sequences form visible lattice patterns in 2D plots, and predictability allows state recovery from few outputs. They fail spectral and lattice tests unless parameters are meticulously chosen, rendering them unsuitable for but adequate for non-critical simulations when period is full.

Linear Feedback Shift Registers and Recurrence-Based Methods

Linear feedback shift registers (LFSRs) generate pseudorandom bit sequences through a linear recurrence relation over the finite field GF(2). An LFSR consists of a shift register of length n, where the input bit to the register is the XOR (modulo-2 sum) of specific taps from the current state, determined by a feedback polynomial. The state evolves deterministically by shifting bits right (or left) and inserting the feedback bit, producing an output stream from the least significant bit or another position. For maximal period sequences, known as m-sequences, the feedback polynomial must be primitive modulo 2, yielding a cycle length of 2n - 1 before repetition, exhausting all non-zero states. These sequences exhibit strong pseudorandom properties, including balance (approximately equal numbers of 0s and 1s, specifically 2n-1 zeros and 2n-1 - 1 ones), equal run lengths for consecutive 0s and 1s across powers of 2 up to n, and low two-level , making them suitable for applications like built-in self-testing and spread-spectrum communications. However, LFSRs fail statistical tests for higher-order and are insecure for due to their , which allows prediction via the Berlekamp-Massey algorithm after observing 2n bits. Beyond LFSRs, recurrence-based methods encompass higher-order linear recurrences for generating pseudorandom numbers over integers or finite fields, often a prime p or large m. A general form is Xn+k = (∑i=1k ai Xn+i-1) mod m, where coefficients ai are chosen for long periods, typically approaching mk under primitivity conditions analogous to LFSRs. Multiple recursive generators (MRGs), such as those with k=2 or higher, offer periods exceeding 101000 for modest state sizes and pass rigorous tests like dieharder when parameters are selected from primitive polynomials. These methods, including lagged generators (a special case with 2w), provide efficient parallelization and are used in simulations, though they require careful parameter tuning to avoid structure artifacts detectable by tests. Implementations often combine LFSRs with nonlinear transformations or multiple registers to enhance , as pure linear recurrences suffer from short cycles or correlations if non-primitive. Hardware realizations of LFSRs achieve high speeds (e.g., gigabits per second on FPGAs) with minimal gates, roughly n flip-flops and d XORs for -d polynomials, outperforming software for bit-level generation. Despite advantages in simplicity and period length, recurrence-based PRNGs are deprecated for security-sensitive uses without , as their deterministic nature permits state reconstruction from outputs.

Counter-Based and Block Cipher Generators

Counter-based pseudorandom number generators (CBPRNGs) derive outputs directly from an incrementing value, typically via a deterministic that ensures each output is of previous ones. The internal state consists solely of the and possibly a fixed , enabling efficient generation without retaining extensive history. This design produces sequences where the nth output is g(n), with g as a mapping values to pseudorandom numbers, facilitating low memory usage and high performance in environments. Such generators excel in applications requiring reproducible streams, like simulations, due to their ability to "jump" ahead by large counter increments without sequential computation. Examples include Philox and Threefry, which employ weakened for speed while maintaining statistical quality; Philox uses a 64-bit counter-based structure inspired by block ciphers but optimized for non-cryptographic use. These avoid the pitfalls of feedback-dependent methods, such as short cycles from state collisions, by leveraging the full counter space for periodicity up to 2^counter_bits. Block cipher-based generators extend this paradigm by applying approved ciphers, such as , in modes like (CTR) to transform sequential inputs into pseudorandom outputs. In CTR mode, a fixed encrypts incrementing blocks, yielding a keystream indistinguishable from random under the cipher's assumption, provided the remains secret and counters do not repeat within the key's lifetime. This underpins cryptographically secure variants, where security relies on the cipher's resistance to distinguishing attacks. The NIST CTR_DRBG, standardized in SP 800-90A Revision 1 (published January 2015), exemplifies this approach using a in counter mode, where the counter occupies part of the input block to generate bits on demand. It incorporates reseeding with entropy sources to mitigate predictability from prolonged use without refresh, supporting security strengths up to 256 bits depending on the underlying like AES-256. Validation requires approved ciphers and adherence to , , and reseed procedures to prevent state compromise. While efficient for software implementations, analyses highlight potential vulnerabilities if functions or counters are mishandled, as explored in peer-reviewed security proofs.

Nonlinear and Advanced Deterministic Methods

Nonlinear methods in pseudorandom number generation incorporate nonlinear recurrence relations or feedback functions to mitigate limitations of linear generators, such as visible structures in distributions and susceptibility to prediction via linear algebra techniques. These approaches aim to enhance equidistribution across higher dimensions and prolong effective periods by introducing complexity that defies simple algebraic decomposition. For example, nonlinear transformations disrupt the affine subspaces that plague linear congruential generators, leading to sequences that better approximate statistical independence in empirical tests. Nonlinear congruential generators exemplify this by modifying the standard linear form with terms like multiplicative inverses or higher-degree polynomials. The inversive congruential generator, defined as z_{n+1} \equiv a z_n^{-1} + b \pmod{p} where p is prime and a, b satisfy specific conditions, achieves a maximal period of p and resists prediction algorithms that exploit linearity, as demonstrated by computational hardness results for recovering internal states from output sequences. Similarly, a nonlinear variant z_n \equiv x_{N(n)+1} \cdot x_{N(n)}^{-1} \pmod{p} over Galois fields has been analyzed to produce sequences lacking the tuple correlations of linear counterparts. These generators trade some computational efficiency for improved resistance to lattice-based attacks, with periods scaling to the modulus size under primality constraints. Nonlinear feedback shift registers (NLFSRs) extend linear feedback shift registers by using functions of greater than one for the input bit, enabling sequences with periods up to $2^L - 1 for L under primitivity conditions, though achieving full nonlinearity increases challenges. NLFSRs generate pseudorandom bits suitable for non-cryptographic simulations and, when combined with linear components, yield efficient generators passing Dieharder tests; for instance, designs with 64- to 128-bit states operate at speeds exceeding 10 GB/s on 64-bit processors while maintaining low linear complexity. Their causal dependence on multiple state bits fosters avalanche effects akin to , reducing predictability compared to linear shifts. Chaotic map discretizations represent another advanced deterministic paradigm, deriving sequences from nonlinear dynamical systems with positive Lyapunov exponents, ensuring exponential divergence from initial conditions that mimics . A 2022 construction couples functions from logistic or tent maps to produce 32-bit words passing NIST 800-22 tests with p-values above 0.01 for all subsequences, outperforming linear methods in multidimensional uniformity. These methods require careful quantization to preserve without periodicity collapse, often achieving state spaces of $2^{256} or larger via floating-point iterations modulo 1, followed by bit extraction. Hybrid approaches, such as nonlinearly coupling multiple linear generators, further amplify decorrelation; one 2012 design integrates a nonlinear oscillator with lagged linear recursions to yield sequences empirically indistinguishable from uniform in tests.

Cryptographic Variants

Design Principles for Security

A primary design principle for cryptographic pseudorandom number generators (PRNGs), also known as deterministic random bit generators (DRBGs), is computational indistinguishability: the output sequence must appear uniformly random to any computationally bounded adversary, even one that observes a portion of the outputs and knows the algorithm's structure. This requires basing the generator on one-way , such as hash functions, , or block ciphers approved under standards like , ensuring that inverting the state transition function or predicting future bits from past outputs is infeasible within polynomial time relative to the strength (typically 128, 192, or 256 bits). does not rely on algorithm secrecy but on the of the initial and the proven hardness assumptions of the underlying primitives, such as the of hashes or the of cipher outputs. Forward is essential, meaning that compromise of the internal at one point does not enable prediction of subsequent outputs generated after reseeding with fresh ; this is achieved through mechanisms like wiping or chaining outputs into new via one-way functions during reseed operations. resistance complements this by preventing of prior states or outputs from a compromised , typically enforced by designing the update function to erase information about previous states irreversibly. The must incorporate at least as much as the desired level—e.g., 256 bits for high-strength applications—and be sourced from validated providers compliant with NIST SP 800-90B, with periodic reseeding (e.g., after 2^48 bits of output or on demand) to mitigate depletion or compromise risks. size must exceed the parameter to prevent exhaustive search, often requiring at least 2n bits for n-bit to resist attacks. Additional criteria include resistance to state compromise extension attacks, where an adversary exploits partial knowledge; this demands that the generator's prediction error probability remains negligible (e.g., less than 2^{-n}) even after observing up to a fraction of the output stream. Rollback resistance ensures that an adversary cannot force reversion to a prior via malleable inputs or timing attacks, often implemented by monotonic counters or non-malleable mixing. Designs must also withstand side-channel attacks, such as timing or , by using constant-time operations and masking internal computations, as non-constant-time implementations have led to real-world breaks like the Debian OpenSSL vulnerability in , where reduced space enabled key prediction. Validation against suites like NIST SP 800-22 or confirms statistical properties, but cryptographic hinges on provable reductions to rather than empirical tests alone.

Common Cryptographic PRNG Algorithms

Hash_DRBG, HMAC_DRBG, and CTR_DRBG, as defined in NIST Special Publication 800-90A Revision 1 (published January 2012), represent the primary standardized deterministic random bit generators (DRBGs) for cryptographic applications, providing strengths up to 256 bits when instantiated with approved like SHA-256 or AES-256. These mechanisms require from an source and support reseeding to maintain forward and backward against state compromise, with instantiation, generation, and update functions designed to resist known attacks under the assumption of underlying . Hash_DRBG operates by hashing an internal state value (V) concatenated with a counter (C) using a approved for the desired security strength, such as (up to 160 bits, though deprecated for new designs) or SHA-256 (up to 256 bits); the state updates via additional hashing steps incorporating additional input if provided. It offers simplicity and efficiency in software without requiring keyed operations but may exhibit lower performance compared to block cipher-based alternatives due to hash computation overhead. HMAC_DRBG builds on the Hash_DRBG framework but uses the keyed-hash construction for state derivation and update, where the key (K) and chain value (V) are refreshed via HMAC(K, V || input), enhancing resistance to length-extension attacks inherent in Merkle-Damgård hashes. This design supports the same security strengths as Hash_DRBG and is preferred in environments needing keyed integrity, with validation vectors confirming its output unpredictability for up to 2^48 bits generated between reseeds at 256-bit strength. CTR_DRBG employs a (e.g., AES-128 or AES-256) in counter mode, encrypting an incremented counter derived from the internal state to produce keystream bits, followed by state updates via cipher feedback or block encrypt operations. It achieves high throughput, particularly with , and is commonly integrated into protocols like TLS 1.3 for and , supporting derivation functions for additional input processing to mitigate predictability risks. Security relies on the cipher's properties, with optional AES encryption of the output block for added protection against certain fault attacks. Fortuna, proposed by Niels Ferguson and in their 2003 book Practical Cryptography, divides inputs into s hashed incrementally (using SHA-256) to schedule reseeding of an AES-256-based generator, aiming for resilience against poor and pool exhaustion. Unlike NIST DRBGs, Fortuna emphasizes continuous accumulation without fixed reseed intervals, reducing risks from delayed collection, though it lacks formal and has seen limited adoption beyond early systems like certain BSD variants. ChaCha20, a 256-bit designed by in 2008, is repurposed as a PRNG by iterating over a in 512-bit blocks, yielding high-speed software generation suitable for resource-constrained devices; its use in kernel's getrandom() (since version 4.8 in 2016) demonstrates practical cryptographic viability without relying on hardware entropy. This approach benefits from ChaCha20's resistance to timing attacks and superior diffusion over Salsa20 predecessors, though it requires careful management to avoid vulnerabilities inherent to stream ciphers.

Hardware and Entropy Integration

Hardware random number generators (HRNGs) provide from physical phenomena, such as thermal in resistors, avalanche in diodes, or quantum fluctuations, to address the inherent of pseudorandom number generators (PRNGs). These sources generate true random bits with high , which are essential for seeding or reseeding cryptographic PRNGs to ensure unpredictability against adversaries who might know the algorithm or prior outputs. Without sufficient , even cryptographically designed PRNGs risk predictable sequences, as demonstrated in historical failures like the Debian of 2008, where reduced led to collisions. In deterministic random bit generators (DRBGs) as specified in Revision 1 (2015), inputs must match the strength of the , typically requiring at least 256 bits for 128-bit levels during and reseeding. The source undergoes to remove biases, followed by integration into the DRBG's internal via approved like hash or functions. For prediction resistance, fresh is periodically injected, with NIST mandating that the source provide non-repeating, high-quality bits validated against SP 800-90B tests for and uniformity. Hybrid systems combine HRNG outputs directly with PRNG expansions to balance throughput—HRNGs often output at rates below 1 Gbps—against the faster generation of pseudorandom bits. Prominent hardware implementations include 's Digital Random Number Generator (DRNG), introduced in Ivy Bridge processors in 2012, which uses on-chip thermal noise amplified and conditioned through a deterministic component compliant with NIST standards. The instruction fetches 32-, 64-, or 128-bit blocks from this module, enabling direct CPU integration for seeding system PRNGs like those in Linux's /dev/urandom. Similar capabilities exist in processors via instructions like RNDA, though empirical tests show varying rates, with Intel DRNG achieving up to 3 Gbps post-conditioning. Integration often involves mixing HRNG output with software pools to mitigate single-point failures, as recommended in system-level designs. Security analyses highlight risks in reliance, including potential supply-chain compromises or flawed , as seen in critiques of vendor-specific conditioners that may amplify subtle biases if the raw source is overestimated. validation, such as certification for modules like DRNG, requires documented sources and post-compromise recovery via reseeding, but experts caution against exclusive dependence on proprietary , advocating diversified sources to counter state-level threats evidenced in leaked documents from alleging influence on standards. Thus, robust integration demands verifiable bounds and health tests for continuous operation.

Applications and Use Cases

Non-Security Simulations and Modeling

Pseudorandom number generators (PRNGs) play a central role in non-security simulations and modeling by providing efficient, reproducible sequences that approximate independent uniform random variables, enabling statistical approximations of deterministic or processes. In methods, PRNGs facilitate , optimization, and probability estimation by generating large samples to model phenomena where analytical solutions are intractable. These applications demand PRNGs with strong statistical properties, such as and low serial , to ensure rates comparable to true , though allows for result verification through reseeding. In physics simulations, PRNGs drive techniques for sampling configurations in systems like or lattice , where they produce random trial moves or event selections. For example, simulating 128 atoms in a run may require over 1,000 PRNG calls per iteration for coordinates and selections, highlighting the need for generators with periods exceeding simulation scales to avoid artificial correlations that bias energy estimates or equilibration times. In high-energy physics, such as particle collision event generation at , PRNGs like RANLUX—employing lagged sequences with Kolmogorov-Arnold mixing—deliver 2^{-k}-mixing quality for k up to 24, ensuring precision in rare event probabilities critical for experimental validation. Medical physics toolkits like , used for and simulations, rely on PRNGs to model photon interactions and detector responses, with studies showing that choices like versus WELL affect dosimetric accuracy by up to 1-2% in variance due to lattice artifacts or period limitations. Similarly, in and modeling, PRNGs discrete-event simulations for queueing systems or optimization, where aids but requires testing against empirical distributions to mitigate underestimation of tail risks. Overall, while true random sources exist, PRNGs dominate due to their speed—often comprising 80% of computation in intensive runs—balancing quality with scalability across parallel architectures.

Gaming and Procedural Generation

In video games, pseudorandom number generators (PRNGs) enable by producing deterministic sequences that simulate , allowing algorithms to create expansive content such as terrains, levels, and assets without manual design for each instance. Developers initialize PRNGs with a —a fixed value like a user-provided or system —to ensure : the same seed always yields identical output, which supports features like shared multiplayer worlds or debug repeatability. This approach contrasts with true randomness by prioritizing computational efficiency and control, as the generated content emerges from mathematical iterations rather than sources. A prominent example is , where a 64-bit signed integer seed seeds the PRNG to drive noise functions for generating biomes, caves, and structures across infinite worlds. Released in full version on November 18, 2011, the game computes terrain heightmaps and features on demand using layered variants modulated by the PRNG sequence, enabling vast exploration without storing pre-generated data. This method, rooted in Java's built-in Random class (a ), ensures that players entering the same seed reconstruct identical environments, facilitating community sharing of notable worlds while scaling to arbitrary distances. Roguelike games, such as the original Rogue from 1980, leverage PRNGs for dungeon layouts, item distributions, and enemy behaviors, where each playthrough's procedural variance stems from advancing the generator's state during generation. Algorithms like binary space partitioning or cellular automata use PRNG outputs to place rooms, corridors, and obstacles, balancing novelty with fairness by avoiding truly unpredictable outcomes that could frustrate players. Modern roguelites extend this by combining PRNG-driven elements with hand-crafted templates, as seen in titles generating 2D levels with ASCII or tile-based representations, where the generator's period and uniformity prevent repetitive patterns over repeated runs.

Cryptographic and Security Protocols

Cryptographically secure pseudorandom number generators (CSPRNGs) form a foundational component in protocols by producing output sequences that are computationally indistinguishable from true random bits, even against adversaries who observe prior outputs or partially the generator's . This property ensures resistance to prediction attacks, which is critical for generating ephemeral values without enabling recovery or forward/backward predictability. Unlike non-cryptographic PRNGs, CSPRNGs incorporate sources and to maintain across reseeding and extended output streams. In key generation, CSPRNGs derive symmetric keys, Diffie-Hellman ephemeral parameters, and components for asymmetric schemes, ensuring keys possess full and uniformity to withstand brute-force and related-key attacks. For instance, protocols like TLS employ CSPRNGs to produce the client random and server random fields—48-byte values exchanged during handshake—to contribute to the pre-master secret and master secret derivation via pseudorandom functions (PRFs). Similarly, SSH uses CSPRNG outputs for Diffie-Hellman group elements and session keys, while IPsec's IKE protocol relies on them for initiator/responder cookies and generation to authenticate exchanges. Nonces and initialization vectors (IVs) generated by CSPRNGs prevent replay attacks and ensure in cipher modes such as GCM or ; nonces must be unique and unpredictable per session to avoid malleability exploits, while IVs randomize inputs without repetition risks. In TLS, these values underpin , with CSPRNG-derived nonces protecting against nonce-reuse vulnerabilities that could expose . 8937 recommends augmenting CSPRNGs with long-term private keys in protocols like TLS to enhance post-compromise, deriving fresh from key-based PRFs to mitigate persistent threats from seed exhaustion or failures. Beyond core handshakes, CSPRNGs support padding, challenge-response mechanisms, and generation in password-based derivation functions (e.g., ), where unpredictable salts thwart attacks. In VPN implementations using TLS or , CSPRNGs ensure secure tunnel establishment by randomizing sequence numbers and anti-replay windows, preserving confidentiality against . These applications underscore CSPRNGs' role in upholding causal chains, where initial defects propagate to systemic failures.

Evaluation Criteria and Testing

Statistical Randomness Tests

Statistical randomness tests assess whether the output of a pseudorandom number generator (PRNG) exhibits empirical properties indistinguishable from independent, uniformly distributed random bits or numbers, such as lack of bias, serial correlation, or periodic patterns. These tests operate by generating long sequences from the PRNG and computing test statistics whose distributions under true randomness are known, yielding p-values that quantify deviation probability. A PRNG is deemed to pass if p-values are consistent with uniformity on [0,1] across multiple trials, typically requiring the proportion of passes to approximate 1-α (e.g., 0.99 for α=0.01). Failure in even a small fraction of tests signals statistical flaws, though passing provides no absolute proof of randomness due to finite sample limitations and test coverage gaps. The NIST Special Publication 800-22 Revision 1a, released in 2010, defines a standardized suite of 15 tests tailored for binary sequences of at least 100 bits per test, scaled to full evaluation on 100 sequences of 1,000,000 bits. Core tests include the monobit test for bit balance (expecting ≈50% zeros/ones), runs test for streak lengths approximating a , and longest run of ones for extreme run detection. More advanced ones, like the approximate entropy test, measure compressibility as a for predictability, while the linear complexity test via Berlekamp-Massey detects short feedback polynomials indicative of weak linear structure. The suite addresses multiple testing by examining the p-value via chi-squared goodness-of-fit, flagging non-uniformity. It has been applied to validate RNGs and PRNGs in standards like , though NIST cautions it evaluates statistical rather than cryptographic security. Complementing NIST, the Diehard battery, developed by George Marsaglia and first distributed in 1995, comprises 15-18 interdependent tests probing nonlinear and higher-order dependencies in uniform [0,1) outputs convertible to bits. Notable tests include the birthday spacings test, which sorts n≈10^6 points and checks squared spacings for exponential distribution (sensitive to lattice artifacts in quasi-Monte Carlo methods), and the overlapping permutations test, assessing avoidance of short cycles in 5-bit windows. The monkey tests simulate serial byte overlaps to detect autocorrelation, while the 3D spheres test evaluates packing efficiency in random spheres to uncover clumping. Designed for exhaustive stressing with up to 10-12 GB inputs, Diehard exposed flaws in generators like RANDU, but its Fortran implementation has been superseded by Dieharder (2004 onward), which integrates NIST and adds parametric options. Marsaglia emphasized that no single test suffices; collective failure rates must align with randomness. TestU01, a library by Pierre L'Ecuyer and Richard Simard released in 2007, provides modular batteries—SmallCrush (15 tests), Crush (96), and BigCrush (160+ for 2^38 bits)—implementing classical (e.g., Knuth's , poker) and novel tests like the collision test (for birthday paradox deviations) and spectral test (for lattice discrepancies in linear generators via ). It revealed statistical weaknesses in MATLAB's rand and Java's Random, such as excessive short cycles, by scaling tests to detect dependencies up to lag 10^9. Unlike fixed suites, TestU01 allows custom RNG integration and crush-level escalation for rigor, with p-value aggregation via empirical cumulative distribution functions to mitigate multiplicity. Evaluations in the library's documentation show combined p-values following beta distributions under independence assumptions. These suites share limitations rooted in their empirical, asymptotic nature: they assume infinite independent trials but use finite sequences, risking Type II errors (missing subtle flaws), and focus on local statistics, potentially overlooking global structures like short periods or algebraic dependencies exploitable adversarially. For instance, a PRNG with known can pass all tests yet remain predictable, as tests ignore . Inter-test dependence inflates false positives unless adjusted (e.g., via ), and coverage favors uniformity over application-specific traits like spectral gaps in simulations. Studies confirm some PRNGs (e.g., certain multiply-with-carry variants) fail advanced batteries despite basic passes, underscoring that statistical validation is necessary but insufficient for cryptographic use, where distinguisher-based tests are required. No guarantees unpredictability against computational attacks, as evidenced by historical failures like the Debian vulnerability (2006-2008), where reduced entropy passed stats but enabled key prediction.

Security-Specific Assessments

Security-specific assessments for pseudorandom number generators (PRNGs) prioritize cryptographic resilience, evaluating whether outputs remain unpredictable to computationally bounded adversaries who may observe prior bits, know the algorithm, or influence inputs. These differ from statistical randomness tests by focusing on computational hardness rather than empirical frequency distributions, aiming to quantify an attacker's advantage in distinguishing PRNG output from uniform randomness or predicting future values. Security is often formalized through notions like negligible prediction probability, where the probability of guessing the next output exceeds 1/2 by at most a negligible function of the security parameter. Key models for PRNGs include basic (indistinguishability from random strings), robustness (resistance to manipulated seeds or ), and reseedability (maintaining after injection). For PRNGs with input, such as those incorporating external , models assess forward (unpredictability of future outputs post-compromise) and backward (protection of past outputs from future state revelation). The Systematization of Knowledge (SoK) on these models highlights that provable typically relies on underlying primitives' hardness, like one-way functions, with concrete bounds derived via hybrid arguments or leftover hash lemmas. Practical assessments involve targeted , such as attempting state recovery from output prefixes or exploiting reseeding flaws. For instance, analyses of input-mixing PRNGs like Linux's /dev/urandom demonstrate that under starvation, adversaries can achieve non-negligible prediction by reconstructing internal pools from observed outputs, with success probabilities scaling inversely with bits. Such evaluations employ game-based reductions to simulate attacks, measuring bits of as the of the attacker . In standardized constructions, security assessments mandate entropy estimation (e.g., lower bounds) and prediction resistance tests, where reseeding prevents backtracking even after state exposure. Dual_EC_DRBG, for example, failed such scrutiny due to embedded biases exploitable via undisclosed parameters, underscoring the need for transparent, assumption-based proofs over black-box validation. Overall, no single test guarantees security; assessments combine theoretical modeling with exhaustive attack searches, prioritizing designs with proven indistinguishability under standard cryptographic assumptions.

Empirical Performance Metrics

Empirical performance metrics for pseudorandom number generators (PRNGs) quantify computational , primarily through speed measured in throughput (e.g., gigabytes per second) or cycles per byte (cpb), alongside state size and . Non-cryptographic PRNGs prioritize high throughput for simulations, often achieving sub-nanosecond latencies per output on modern CPUs, while cryptographic PRNGs (CSPRNGs) incur higher costs for , typically in the range of 1-10 cpb on x86 processors with . Benchmarks vary by hardware, such as i7 or with AVX2/AVX512 extensions, and compiler optimizations like . For non-cryptographic use, generators like deliver sub-nanosecond generation times per 64-bit number on an i7-12700KF at 3.6 GHz, yielding throughputs over 8 GB/s without specialized instructions. In contrast, the (MT19937) operates at roughly one-fourth to one-fifth the speed of xoshiro variants due to its larger state (19937 bits) and complex tempering, limiting throughput to under 2 GB/s in similar tests. The PCG family consistently exceeds peers like and MT in Gb/s throughput across classes, with minimal state (e.g., 128-256 bits) enabling efficient parallelization. Multiply-with-carry (MWC) variants rank among the fastest, leveraging 128-bit operations for near-peak CPU utilization.
PRNG TypeExample GeneratorCycles/Byte or ThroughputHardware/Notes
Non-Cryptoxoshiro256++<1 ns per 64-bit (~>8 GB/s)Intel i7-12700KF, no SSE req.
Non-Crypto~4-5x slower than xoshiroLarge state impacts cache.
Crypto (AES-CTR)AES-128-CTR~2 cpb AES-NI, ECB-like mode.
Crypto (ChaCha)4-14 cpbSoftware on x86, no hardware accel.
CSPRNGs exhibit trade-offs: AES-CTR modes leverage AES-NI instructions for ~2 cpb in counter mode on processors, enabling multi-gigabyte per second rates for keystream generation. variants, software-friendly, require 4-14 cpb on modern x86 without dedicated , though reduced-round versions (e.g., ChaCha8) approach 1.88 cpb on older Core2 architectures and scale better across platforms. Recent lattice-based designs achieve 1.14 cpb under , prioritizing post-quantum security over legacy ciphers. These metrics underscore causal limits: deterministic transitions favor vectorized operations, but cryptographic mixing demands more cycles to resist . GPU implementations, such as xorgens-based PRNGs, further boost throughput to hundreds of GB/s for large-scale simulations.

Limitations, Issues, and Real-World Failures

Inherent Determinism and Predictability Risks

Pseudorandom number generators (PRNGs) operate as deterministic , producing identical output sequences for any given initial and subsequent inputs, a property formalized in standards like for Deterministic Random Bit Generators (DRBGs). This reproducibility facilitates testing and debugging but introduces inherent predictability risks, as an adversary with knowledge of the seed or can compute the entire offline. In cryptographic contexts, such determinism amplifies vulnerabilities when outputs are exposed, enabling reconstruction and future prediction without additional . Predictability manifests through cryptanalytic techniques, including direct attacks that distinguish PRNG outputs from true using statistical biases, input-based attacks exploiting poor , and state compromise extensions where partial observation allows backward or forward inference of the internal . For linear congruential generators (LCGs), a common PRNG type, as few as three consecutive outputs suffice to recover parameters via solving linear equations, compromising systems like early protocols or simulations. Weak , often from low-entropy sources like or IDs, exacerbates this, as attackers can brute-force or guess initials, reducing effective security to negligible levels. Real-world incidents underscore these risks. In Netscape's early SSL implementations (circa 1995), the PRNG seed combined predictable elements like and process identifiers, permitting attackers to predict session keys after on minimal traffic; and Wagner's 1996 analysis showed decryption feasible in under a minute on contemporary hardware using for state recovery. Likewise, a 2006-2008 modification erroneously purged entropy-gathering calls from the PRNG, limiting its state to PID-derived values and yielding only 2^15 distinct SSH host keys across millions of systems; disclosed on May 13, 2008, this flaw enabled widespread key collisions and impersonation, with affected certificates revocable en masse. Mitigation demands cryptographically secure PRNGs (CSPRNGs) with forward/backward properties, regular high- reseeding, and resistance to state recovery, yet precludes true unpredictability absent external , necessitating designs with sources for high-stakes use. Failures often stem from errors or underestimating attacker capabilities, as deterministic functions yield no inherent beyond the seed's strength.

Statistical Artifacts and Test Failures

Pseudorandom number generators, particularly linear congruential generators (LCGs), often produce outputs that lie on discrete points within the unit due to their recursive formula X_{n+1} = (a X_n + c) \mod m, where poor choices of parameters a, c, and m amplify visible correlations and non-uniform distributions. These lattice artifacts manifest as points clustering on parallel hyperplanes, especially in higher dimensions, leading to systematic deviations from true that invalidate assumptions in integrations or simulations requiring isotropic sampling. For instance, the spectral test quantifies quality by measuring the shortest non-zero vector in the , with low values indicating strong artifacts exploitable in error analysis. The generator, an LCG with multiplier a = 65539 and m = 2^{31}, exemplifies severe artifacts: successive triples of outputs lie on one of only 15 hyperplanes in three dimensions, creating planar correlations that produce biased results in statistical modeling and render three-dimensional visualizations as flat sheets rather than uniform clouds. Distributed by in the 1960s, RANDU failed basic uniformity tests like chi-squared and exhibited high serial correlations, contributing to erroneous conclusions in early simulations until its flaws were identified in the 1970s. Similar issues persist in underparameterized LCGs, where the for lattice structure—such as Beyer ratios—reveals predictable patterns violating independence. Empirical test failures underscore these artifacts: the 32-bit Unix rand() LCG fails collision and serial tests even in sequential usage, generating dependent sequences that variance estimates in processes. Modern generators like the 32-bit pass initial NIST and Diehard suites but fail advanced tests after approximately 256 GB of output due to detectable periodicities in higher-order dependencies. PCG64, despite cryptographic claims, fails the Lilliefors at around $10^5 samples, highlighting subtle distributional shifts. Such failures in suites like or NIST SP 800-22 indicate non-random excursions or poker tests, often traceable to underlying rather than deficits. In practice, these compel hybrid designs or reseeding to mitigate, as pure deterministic inherently limits statistical fidelity over long streams.

Documented Cryptographic Breaches and Attacks

In cryptographic applications, weaknesses in pseudorandom number generators (PRNGs) have enabled attackers to predict outputs, recover private keys, and compromise systems reliant on them for generating keys, nonces, or initialization vectors. Such failures often stem from insufficient , algorithmic flaws, or implementation errors that reduce the effective , allowing statistical or algebraic attacks. Documented cases highlight the consequences of deploying non-cryptographically secure PRNGs or mishandling sources, leading to widespread vulnerabilities. One prominent example is the algorithm, standardized by NIST in 2006 as part of SP 800-90 but later withdrawn in 2014 following revelations of a potential backdoor. The generator, based on operations, exhibited biased outputs exploitable if an attacker knows specific secret parameters embedded in the curve points P and Q; documents leaked by in 2013 indicated NSA influence in its design and procurement of it for use in products like BSAFE libraries, enabling decryption of affected TLS sessions. Analysis showed that with knowledge of a 32-byte , an attacker could predict up to 2^90 bits of output per observed block, severely undermining systems using it for . The OpenSSL vulnerability (CVE-2008-0166), disclosed on May 13, 2008, arose from a code change that inadvertently removed the process ID from the PRNG's entropy pool, drastically reducing seed variability and rendering generated numbers predictable across instances. This affected SSH host keys, SSL certificates, and signatures on Debian-based systems from versions 0.9.8c-1 to before 0.9.8g-9, enabling attackers to brute-force approximately 2^15 possible keys instead of 2^160, with over 32,000 unique DSA-1024 public keys identified as vulnerable. The issue persisted in wild exploits for years, including traffic decryption and impersonation. Implementation flaws in nonce generation for elliptic curve digital signature algorithm (ECDSA) have also proven catastrophic. In Sony's firmware, a poor PRNG led to repeated nonce reuse in ECDSA signatures starting around 2010, allowing hackers from the fail0verflow group to recover the console's 256-bit private key via the lattice-based attack described by Howgrave-Graham and in 1997; the key was publicly released on January 5, 2011, enabling unsigned code execution and full system compromise. Similarly, a 2013 flaw in Android's SecureRandom (CVE-2013-7372), affecting versions before 4.2, caused predictable randomness due to improper handling of the /dev/urandom fork in the Cryptography Architecture, compromising wallet keys and enabling theft of funds totaling thousands of dollars from affected apps.
IncidentDate DisclosedPRNG IssueImpact
2013 (Snowden leaks)Embedded trapdoor parametersPotential TLS/SSL key prediction in adopting systems
Debian OpenSSL (CVE-2008-0166)May 13, 2008Reduced entropy poolPredictable SSH/SSL keys; ~32,000 vulnerable DSA keys
Sony PS3 ECDSAJanuary 5, 2011Nonce reuse from weak PRNGPrivate key recovery; console jailbreak
Android SecureRandom (CVE-2013-7372)August 11, 2013Fork-induced predictabilityBitcoin wallet thefts via key derivation

Recent Advances and Future Directions

Machine Learning-Enhanced PRNGs

Machine learning techniques have been applied to pseudorandom number generator (PRNG) design to produce sequences exhibiting enhanced statistical , longer effective periods, or resistance to prediction through complex nonlinear mappings. These approaches typically train neural architectures on empirical distributions or statistical test objectives, aiming to approximate true while maintaining for . Unlike traditional algorithmic PRNGs, ML-enhanced variants leverage data-driven optimization to mitigate detectable patterns, though their outputs remain fully predictable given the model parameters and inputs. Generative adversarial networks (GANs) represent a prominent method, where a neural network produces candidate sequences adversarial to a discriminator trained to distinguish them from uniform random data. A 2018 study showed that a GAN could effectively train a small feed-forward neural network to generate binary sequences passing the DIEHARD , with bit streams achieving rates near ideal values. Building on this, the with gradient penalty (WGAN-GP) framework was adapted in 2023 to create a learned PRNG (LPRNG) using cosine-function-modulated inputs, enabling frequent updates to the generation period (e.g., every 10^6 outputs) to thwart reverse-engineering attacks; this variant passed subsets of the NIST Statistical but fell short of full cryptographic validation under standard parameters. Reinforcement learning (RL) offers another paradigm, framing PRNG output as a policy where an learns to select bits maximizing rewards from statistical test in an N-dimensional state space. A 2019 RL-based approach, using actor-critic methods with neural policies, generated PRNGs de novo that satisfied multiple criteria, outperforming baseline linear congruential generators in uniformity and metrics by up to 15% in empirical evaluations. Recurrent neural networks (RNNs), including LSTMs and GRUs, have also been employed for sequential generation, with a 2025 review classifying them as effective for capturing long-range dependencies in output streams, though requiring careful hyperparameter tuning to avoid to training noise. Emerging architectures and Hopfield networks further extend these capabilities, utilizing attention mechanisms or associative to model higher-order correlations and extend cycle lengths beyond 2^64 bits in some configurations. A 2025 proposal integrated transformers into PRNGs to produce sequences resilient to neural predictors, achieving pass rates above 95% on NIST tests for non-cryptographic applications. However, ML-enhanced PRNGs generally prioritize statistical quality over proven unpredictability against adaptive adversaries, as their differentiable structures enable gradient-based attacks if the architecture is exposed; no such design has yet achieved unconditional equivalent to AES-based DRBGs, per evaluations through 2025.

Post-Quantum Considerations

Classical cryptographic pseudorandom number generators (PRNGs), such as those specified in (e.g., Hash-DRBG, HMAC-DRBG, and CTR-DRBG using ), rely on symmetric primitives like and , which maintain their security against quantum adversaries. Grover's algorithm enables a quadratic speedup in brute-force searches for symmetric keys, but this threat is mitigated by doubling key lengths (e.g., from 128 to 256 bits) to preserve equivalent classical security levels, rendering these PRNGs suitable for post-quantum environments without fundamental redesign. Despite this resilience, quantum computing poses indirect risks to PRNG deployments, particularly through "" attacks where encrypted seeds or states are stored for future quantum decryption if based on vulnerable asymmetric for seeding. In response, NIST recommends using extended interfaces for AES-CTR-DRBG in evaluations to ensure compatibility with larger key sizes and hybrid schemes. Research has proposed dedicated post-quantum PRNGs leveraging quantum-resistant primitives to enhance or unpredictability beyond symmetric assumptions. Lattice-based constructions, such as those using (LWE) or Learning With Rounding (LWR), generate pseudorandom bits from hard lattice problems assumed secure against quantum attacks, offering statistical closeness to distributions while resisting known quantum algorithms. For instance, an LWR-based quantum-safe PRNG produces well-distributed sequences passing statistical tests, with reductions to the LWR problem's hardness. Evaluations of existing DRBGs under post-quantum assumptions confirm that like AES-CTR-DRBG and Hash-DRBG retain cryptographic strength, but lattice-derived alternatives may provide efficiency gains in resource-constrained quantum-era devices or integrate seamlessly with NIST's post-quantum encapsulation mechanisms (KEMs). These advances prioritize causal security models where PRNG outputs remain indistinguishable from random even if partial state leaks occur, addressing potential quantum side-channel vulnerabilities in implementations.

Integration with Hardware Entropy Sources

Pseudorandom number generators (PRNGs), especially those designed for cryptographic use such as deterministic random bit generators (DRBGs), rely on integration with entropy sources to obtain unpredictable initial seeds and subsequent reseeding inputs, mitigating the inherent that could otherwise enable prediction of output sequences. entropy sources exploit physical phenomena like thermal noise, ring oscillator jitter, or metastability in circuits to produce bits with high , which are then conditioned and fed into the PRNG's update mechanism. This approach combines the high throughput of algorithmic PRNGs with the non-determinism of true generators (TRNGs), ensuring long-term security against state compromise extensions where an attacker could predict future outputs from a known internal . Standards such as NIST SP 800-90A define DRBG constructions that mandate entropy inputs for instantiation (initial seeding with at least the security strength in bits, e.g., 256 bits for AES-256-based DRBGs) and periodic reseeding to refresh entropy depleted by output generation. Entropy sources must meet validation criteria in NIST SP 800-90B, including noise source strength estimation via tests like the histogram or entropy assessment, ensuring the provided bits have min-entropy close to the full bit length. For instance, reseeding intervals are typically set to limit output between reseeds to 2^48 bits or less, depending on the DRBG mode, to bound predictability risks. Hardware implementations often use dedicated modules, such as Intel's RdRand instruction introduced in 2012 with Ivy Bridge processors, which draws from on-chip thermal noise amplification for entropy extraction at rates up to hundreds of megabits per second. In operating systems, this integration occurs via entropy pools that aggregate hardware TRNG outputs—such as from dedicated chips or CPU instructions—before mixing into PRNG states; for example, Linux kernels since version 3.17 incorporate hardware RNGs like those in Raspberry Pi or Intel CPUs directly into the /dev/random pool, which seeds CSPRNGs like the one powering /dev/urandom after conditioning. Virtualized environments address boot-time entropy starvation by emulating hardware RNGs, as in KVM's virtio-rng device (available since QEMU 1.6 in 2013), which forwards host entropy to guest PRNGs, preventing weak seeds from predictable sources like timestamps. Empirical validations, such as those for FIPS 140-3 modules, confirm entropy rates (e.g., >0.8 bits per bit for validated sources) sufficient for reseeding high-security PRNGs without degradation. However, integration requires careful conditioning to remove biases, as raw hardware entropy may exhibit correlations detectable by advanced attacks if unprocessed.

References

  1. [1]
    pseudorandom number generator - Glossary | CSRC
    Definitions: A deterministic computational process that has one or more inputs called "seeds", and it outputs a sequence of values that appears to be random ...
  2. [2]
    Random Bit Generation | CSRC
    May 24, 2016 · The National Institute of Standards and Technology (NIST) Random Bit Generation (RBG) project focuses on the development and validation of generating random ...Publications · Guide to the Statistical Tests · News & Updates · Events
  3. [3]
    [PDF] A review of pseudorandom number generators
    This is a brief review of the current situation concerning practical pseudorandom number generation for Monte Carlo calculations.
  4. [4]
    [PDF] A Statistical Test Suite for Random and Pseudorandom Number ...
    The NIST Statistical Test Suite supplies the user with nine pseudo-random number generators. A brief description of each pseudo-random number generator follows.
  5. [5]
    PRNG - Glossary | CSRC - NIST Computer Security Resource Center
    A deterministic computational process that has one or more inputs called seeds, and it outputs a sequence of values that appears to be random.
  6. [6]
    [PDF] Potential Weaknesses In Pseudorandom Number Generators
    PRNG weaknesses include improper implementation, bugs, intentionally built-in flaws, and insufficient entropy, which can be hard to detect.
  7. [7]
    [PDF] Chapter 3 Pseudo-random numbers generators - Arizona Math
    Pseudo-random number generators (RNGs) use a seed and a state space to generate numbers, with a function f and output function g. They should produce a uniform ...
  8. [8]
    [PDF] Generating Random and Pseudorandom Numbers
    • A pseudorandom number generator (PRNG) is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of ...
  9. [9]
    Design of a cryptographically secure pseudo random number ...
    May 21, 2022 · Random number generators are classified into two categories: true random number generators (TRNG) and pseudo random number generators (PRNG).
  10. [10]
    [PDF] Randomness and Pseudorandom Number Generators
    Nov 7, 2023 · number generation process), whereas a pseudorandom number is defined (nec- essarily) by some mathematical formula that can repeatably give the ...
  11. [11]
    [PDF] Tutorial: Random Number Generation - Koc Lab
    – Compared to True Random Number Generators, Pseudo-Random Number Generators can be generated with very fast calculations. They are easier to debug and test ...
  12. [12]
    [PDF] NIST Standards on Random Numbers
    Deterministic Random Bit Generators (DRBG). • Pseudorandom number generators. (Deterministic cryptographic algorithms with state). • Generates pseudorandom bits.
  13. [13]
    MSC51-CPP. Ensure your random number generator is properly ...
    A pseudorandom number generator (PRNG) is a deterministic algorithm capable of generating sequences of numbers that approximate the properties of random ...
  14. [14]
    [PDF] PROCEEDINGS OF SPIE - s2.SMU
    There are two major classes of RNG: pseudo-random number generators (PRNG) and true random num- ber generators (TRNG). These are also referred to as ...
  15. [15]
    [PDF] Random Number Generation (RNG)
    If internal state has M bits, total state space is 2M values. • If mapping is 1-1, space divides into a finite no. of cycles. • Best case is a single cycle of ...Missing: size | Show results with:size
  16. [16]
    [PDF] Dynamical pseudorandom number generators - MIT Mathematics
    May 14, 2025 · This paper explores the mathematical foundations and properties of dynamical PRNGs, which, in the context of arithmetic dynamics, are ...
  17. [17]
    4.5. Applications — Discrete Structures for Computing
    For a linear congruence generator to have a maximum period, it needs several conditions. These conditions are given by the Hull–Dobell theorem. Theorem ...
  18. [18]
    Linear Congruential Method
    Maximal period can be achieved by some proven selection of these values. For m a power of 2, i.e. $m = 2^b$ , and $ c \ne 0$ , the longest possible period is ...
  19. [19]
    A PRNG shootout
    They have excellent (sub-ns) speed, a state space (256 bits) that is large enough for any parallel application, and they pass all tests we are aware of.
  20. [20]
    [PDF] HISTORY OF UNIFORM RANDOM NUMBER GENERATION - Hal-Inria
    In this article, we give a historical account on the design, implementation, and testing of uniform random number generators used for simulation. 1 INTRODUCTION.
  21. [21]
    Pseudo-Random Number Generators: From the Origins to Modern ...
    Nov 17, 2024 · While true randomness is crucial in security-critical applications, it's typically slower and harder to generate reliably in software ...
  22. [22]
    [PDF] History of Random Number Generators
    Dec 19, 2017 · Dice and coins were used for random numbers. Tables were created, then a machine, and later electronic devices and physical devices like ...Missing: mechanical | Show results with:mechanical
  23. [23]
    [PDF] Random Number Generators - IT Courses
    Middle-square method. ○ Developed by John von Neumann around 1946. ○ First ever PRNG? ○ The next number in a sequence is obtained by squaring the previous ...
  24. [24]
    The Art of Computer Programming: Random Numbers - InformIT
    Jun 23, 2014 · Von Neumann's original “middle-square method” has actually proved to be a comparatively poor source of random numbers. The danger is that ...
  25. [25]
    Derrick Henry Lehmer | Encyclopedia MDPI
    Nov 24, 2022 · In 1948, he developed the Linear congruential generator (pseudorandom number generator), which is frequently referred to as a Lehmer random ...
  26. [26]
    A121491 - OEIS
    The linear congruential generator for pseudorandom numbers was proposed by Derrick Henry Lehmer: "Mathematical methods in large-scale computing units," in ...
  27. [27]
    [PDF] Doing Mathematics on the ENIAC. Von Neumann's and Lehmer's ...
    It occurred to von Neumann that the computer could be programmed to generate its own random numbers and so he became interested in sequences of computable ...
  28. [28]
    A Brief History of Random Numbers - Carl Tashian
    Mar 10, 2017 · John von Neumann developed a PRNG around 1946. His idea was to start with an initial random seed value, square it, and slice out the middle ...
  29. [29]
    Pseudorandom numbers and linear congruential genrators
    Apr 20, 2025 · Using LCG's for pseudorandom number generation dates back to the 1950's. Their quality is nowadays regarded as inadequate, but they are ...
  30. [30]
    [PDF] It is high time we let go of the Mersenne Twister - arXiv
    When the Mersenne Twister made his first appearance in 1997 it was a powerful example of how linear maps on F2 could be used to generate pseudorandom numbers.
  31. [31]
    [PDF] On the Xorshift Random Number Generators
    Marsaglia [2003] proposed a class of very fast uniform random number generators. (RNGs) called xorshift. The state of a xorshift generator is a vector of bits.
  32. [32]
    [PDF] PCG: A Family of Simple Fast Space-Efficient Statistically Good ...
    Sep 5, 2014 · This paper introduces the PCG family of random number generators and the tech- niques that underlie them. In order to do so, it also ...
  33. [33]
    Linear Congruential Generators in Python - QuantStart
    Periodicity refers to the length of the sequence that an LCG can generate before it begins to repeat itself. For an LCG with parameters carefully selected to ...
  34. [34]
    [PDF] Random-Number Generators - Stony Brook Computer Science
    Full-Period Theorem (Hull and Dobell, 1966). In general, cycle length determined by parameters m, a, and c: The LCG Zi = (aZi-1 + c) (mod m) has full period (m) ...
  35. [35]
    Linear Congruential Generators - Monte Carlo Method
    The most widely used pseudorandom number generators are linear congruential generators (LCGs). Introduced by Lehmer (1951), these are specified with ...
  36. [36]
    Pseudo-random number generators and random sampling
    Properties of PRNGs¶. dimension of output. commonly 32 bits, but some have more. number of states. dimension of state space in bits.
  37. [37]
    glibc rand function implementation - Stack Overflow
    Sep 5, 2013 · glibc rand() has two different generator implementations: A simple linear congruential generator (LCG), defined by the following equation.random - Prediction of the next number generated by C (glibc) rand()libc random number generator flawed? - Stack OverflowMore results from stackoverflow.com
  38. [38]
    Tests of Pseudo-Random Numbers - Oxford Academic
    Summary. The lattice and spectral tests are shown to be suitable only for full-period linear congruential pseudo-random number generators.
  39. [39]
    [PDF] Linear Feedback Shift Registers (LFSRs)
    • A maximum-length sequence is pseudo-random: – number of 1s = number of 0s + 1. – same number of runs of consectuive 0s and 1s. – 1/2 of the runs have length 1.
  40. [40]
    [PDF] Maximum Length Linear Feedback Shift Registers
    Linear Feedback Shift Registers (LFSRs) are commonly used in digital circuit design to generate long 'random' sequences of 1s and 0s with little hardware ...
  41. [41]
    [PDF] Linear Feedback Shift Registers: Pseudo-Random Number ...
    Abstract. Cryptology is the study and application of encrypting and decrypting data so that only the intended recipient and senders can view data.
  42. [42]
    [PDF] Parallelizable efficient large order multiple recursive generators
    Apr 16, 2023 · Based on a k-th order linear recurrence modulo p, this generator produces the next pseudo random number based on a linear combination of the ...
  43. [43]
    [PDF] Random Number Generation A Practitioner's Overview
    I Rule of thumb: never use more than pPer(xi ) of a sequence → e = 2. I Thus cost per random number is not constant with number of processors!! Page 17. RNG: A ...<|control11|><|separator|>
  44. [44]
    Pseudo-random generators using linear feedback shift registers with ...
    Apr 18, 2024 · This paper investigates using three extractors with LFSRs to generate pseudo-random bit streams, focusing on bit stream quality and efficiency.
  45. [45]
    [PDF] Implementation of Pseudo-Random Number Generator Using LFSR
    Generating pseudo-random sequences of values using Linear Feedback Shift Register can help to build strong security to avoid unauthorized access to private.
  46. [46]
    [PDF] Counter-based pseudorandom number generators for CORSIKA 8
    Counter-based pseudorandom number generators (CBPRNGs) produce sequences of pseudorandom numbers following xn = g(n), where g is a bijection and n a counter.
  47. [47]
    [PDF] Counter-based pseudorandom number generators for CORSIKA 8
    May 18, 2021 · Counter-based pseudorandom number generators (CBPRNGs) produce sequences of pseudorandom numbers, are very efficient, have low memory pressure, ...
  48. [48]
    Philox counter-based RNG — NumPy v2.1 Manual
    Philox is a 64-bit PRNG that uses a counter-based design based on weaker (and faster) versions of cryptographic functions.
  49. [49]
    ThreeFry Counter-based RNG - RandomGen 2.1.1
    ThreeFry is a 32 or 64-bit PRNG that uses a counter-based design based on weaker (and faster) versions of cryptographic functions.
  50. [50]
    How can a block cipher in counter mode be a reasonable PRNG ...
    May 19, 2015 · A secure block cipher can be converted into a CSPRNG by running it in counter mode. This is done by choosing a random key and encrypting a 0, ...Does using stream/block ciphers as PRNGs require a key and a ...Can any block cipher in CTR mode be used as a CSPRNG?More results from crypto.stackexchange.com
  51. [51]
    [PDF] NIST Special Publication 800-90A Revision 1
    CTR_DRBG uses an approved block cipher algorithm in the counter mode as specified in [SP. 800-38A], but allows the counter field to be a subset of the input ...
  52. [52]
    CTR_DRBG - Glossary | CSRC
    Definitions: A DRBG specified in SP 800-90A based on a block cipher algorithm. Sources: NIST SP 800-131A Rev.2
  53. [53]
    [PDF] Security Analysis of NIST CTR-DRBG - Cryptology ePrint Archive
    CTR-DRBG is one of the recommended designs of NIST standard SP 800-90A, which initially included the now infamous Dual-EC. While the latter has received lots of ...
  54. [54]
    A non-linear congruential pseudo random number generator
    A non-linear congruential pseudo random number generator is introduced. This generator does not have the lattice structure in the distribution of tuples of.
  55. [55]
    predicting nonlinear pseudorandom number generators
    Jul 27, 2004 · We believe they may reflect some inherent difficulties in breaking nonlinear congruential generators. In some sense the problem we solve can be ...
  56. [56]
    A NONLINEAR CONGRUENTIAL PSEUDORANDOM NUMBER ...
    The non-linear generator is defined by zn≡xN(n)+1·x −1N(n) (mod p), n≥0, where x −1N(n) denotes the inverse element of xN(n) in the Galois field GF(p). A ...
  57. [57]
    Efficient Random Number Generators (RNG) based on Nonlinear ...
    Sep 17, 2015 · Efficient Random Number Generators (RNG) based on Nonlinear Feedback Shift Registers (NLFSR) ... (PRNG) and cryptographically secure (CS) PRNG ...<|control11|><|separator|>
  58. [58]
    A Novel Nonlinear Pseudorandom Sequence Generator for ... - MDPI
    Oct 13, 2022 · We propose a novel pseudorandom sequence generator based on the nonlinear chaotic systems, which is constructed by the fractal function.
  59. [59]
    Non-linear pseudo-random number generators via coupling DX ...
    This brief proposes a class of nonlinear pseudorandom number generators (PRNGs) based on coupling linear generators (DX generators) with a nonlinear generator ...<|separator|>
  60. [60]
    [PDF] Principles of Pseudo-Random Number Generation in Cryptography
    Aug 26, 2006 · 1 Since security should not reside in uncertainty about a party's algorithm, it must instead originate from the entropy of the key-space.
  61. [61]
    9. Pseudorandom Number Generators - Computer Security
    A pseudorandom number generator (pRNG) is an algorithm that takes a small amount of truly random bits as input and outputs a long sequence of pseudorandom bits.Randomness and entropy · Pseudorandom Number... · Rollback resistance
  62. [62]
    [PDF] SoK: Security Models for Pseudo-Random Number Generators
    The lack of insurance about the generated random numbers can cause serious damages in cryptographic protocols, and vulnerabilities can be exploited by ...
  63. [63]
    [PDF] Security Analysis of Pseudo-Random Number Generators with Input
    The lack of insurance about the generated random numbers can cause serious damages in cryptographic protocols, and vulnerabilities can be exploited by attackers ...<|separator|>
  64. [64]
    [PDF] An Analysis of the NIST SP 800-90A Standard
    The standard defines three DRBG mechanisms, HASH-DRBG, HMAC-DRBG, and CTR-DRBG, based on a hash function, HMAC, and a block cipher respectively. Algorithms and ...
  65. [65]
    [PDF] The NIST SP 800-90A Deterministic Random Bit Generator ...
    Oct 29, 2015 · Derivation function (df) for CTR_DRBG: counter-mode (CTR) block cipher mechanism. DRBGs are defined in NIST SP 800-90A for use with a ...
  66. [66]
    Fortuna - Schneier on Security
    Fortuna is a PRNG; it generates cryptographically secure pseudorandom numbers on a computer. It can also be used as a real random number generator.
  67. [67]
    [PDF] Recommendation for the Entropy Sources Used for Random Bit ...
    This Recommendation specifies the design principles and requirements for the entropy sources used by Random Bit Generators, and the tests for the validation of ...<|separator|>
  68. [68]
    NIST SP 800-90A Rev. 1
    Jun 24, 2015 · This Recommendation specifies mechanisms for the generation of random bits using deterministic methods.
  69. [69]
    [PDF] Intel® Digital Random Number Generator (DRNG)
    Oct 17, 2018 · As shown, the DRNG appears as a hardware module on the processor. An interconnect bus connects it with each core. Figure 2. Digital Random ...Missing: integration | Show results with:integration
  70. [70]
    Hardware-based Random Number Generator (RDRAND)
    RDRAND is a hardware random number generator that is available on Intel processors from the Ivy Bridge line (2012) or later, and AMD processors starting in ...Missing: integration | Show results with:integration
  71. [71]
    Could RDRAND (Intel) compromise entropy?
    Sep 10, 2013 · It modifies RdRand to output (X xor Rigged) when it guesses the running code wants (X xor RdRand); and otherwise makes RdRand output Rigged.Is RDSEED a true RNG? - Cryptography Stack ExchangeTechnical feasibility of decrypting https by replacing the computer's ...More results from crypto.stackexchange.comMissing: integration | Show results with:integration
  72. [72]
    6 Pseudorandom Numbers | Probability and Algorithms
    The basic properties characterizing a secure pseudorandom bit generator are ''randomness-increasing" and "computationally unpredictable." Recently obtained ...Missing: PRNG | Show results with:PRNG
  73. [73]
    [PDF] Random Numbers in Scientific Computing - UMBC
    May 22, 2010 · The fact that good pseudo random numbers can be generated quickly makes PRNGs the typical choice for scientific applications, as well as ...
  74. [74]
    Random Number Generators for Precision Monte Carlos | EP News
    Sep 19, 2020 · For precision Monte Carlo, algorithms based on KA mixing, like RANLUX, are used. These can generate numbers random to the level of 2-mixing.
  75. [75]
    Selection of random number generators in GATE Monte Carlo toolkit
    In this study, PRNGs were used in identical Monte Carlo simulations to investigate their possible influence on the outcomes of simulations. This study is ...<|separator|>
  76. [76]
    Random Number Generators in Modeling and Simulation
    Sep 25, 2025 · Specifically, it is used in seeding experiments in operations research, generating safe keys in cryptography, and characterizing stochastic ...
  77. [77]
    PRNGs and Controlling Fate in Video Games
    Dec 13, 2018 · This article delves into the details of the properties of Pseudo Random Number Generators and how game designers can make use of them.
  78. [78]
    How does minecraft use a seed to generate a completely unique ...
    Oct 21, 2011 · It gives the seed to a pseudorandom number generator (PRNG) and uses that PRNG to generate the world. Giving the same seed will give the ...Missing: applications gaming
  79. [79]
    How do roguelikes generate levels? - Brogue - Rock Paper Shotgun
    Jul 28, 2015 · Random number generators just generate sequences of numbers that seem chaotic in normal uses. They generate the same sequence every time, unless ...
  80. [80]
    [PDF] Procedural Level Generation in 2D Roguelite Games - Theseus
    Dec 4, 2024 · Rogue is a brutal top-down dungeon crawler where procedural generation is used to create its levels and events. ASCII characters are used to ...
  81. [81]
    [PDF] Limiting the impact of unreliable randomness in deployed security ...
    Oct 9, 2019 · Most key exchange protocols (e.g., TLS, SSH, and IKE) depend on the secure generation of random numbers. At the core of many of these protocols ...
  82. [82]
    Cryptographically Secured Pseudo-Random Number Generators
    The most widely used standard is the NIST SP 800-22 battery, and that is why in the present work we make use of its tests, although it is true that many of them ...
  83. [83]
    [PDF] Cryptanalytic Attacks on Pseudorandom Number Generators
    PRNGs are mechanisms used to generate values assumed to be random, like cryptographic keys. They are considered a unique cryptographic primitive, and are a ...
  84. [84]
    RFC 8937 - Randomness Improvements for Security Protocols
    CSPRNGs are critical building blocks for TLS and related transport security protocols. TLS in particular uses CSPRNGs to generate several values, such as ...Missing: SSH VPN
  85. [85]
    A Guide to Cryptographically Secure Pseudo-Random Number ...
    CSPRNGs build upon the basic principles of PRNGs but add an extra layer of security. They generate sequences of numbers that are not only statistically random ...
  86. [86]
    RFC 8937: Randomness Improvements for Security Protocols
    This document describes a way for security protocol implementations to augment their CSPRNGs using long-term private keys. This improves randomness.
  87. [87]
    Pseudorandom Number Generators in Cryptography - NSRLM
    Sep 14, 2025 · A well-designed PRNG ensures that encryption keys, initialization vectors, nonces, and digital signatures remain unpredictable to attackers.
  88. [88]
    Testing Cryptographically Secure Pseudo Random Number ...
    Our approach allows to test Pseudo Random Number Generators (PRNGs) including Cryptographically Secure Pseudo Random Number Generators (CSPRNGs). The paper ...
  89. [89]
    SP 800-22 Rev. 1, A Statistical Test Suite for Random and ...
    This paper discusses some aspects of selecting and testing random and pseudorandom number generators. The outputs of such generators may be used in many ...
  90. [90]
    [PDF] Statistical Testing of Random Number Generators - CSRC
    . The DIEHARD suite of statistical tests developed by George Marsaglia consists of ... will focus strictly on the types of defects that this battery of ...
  91. [91]
    [PDF] TestU01: A C Library for Empirical Testing of Random Number ...
    It provides general implementations of the classical statistical tests for RNGs, as well as several others tests proposed in the literature, and some original ...
  92. [92]
    Statistical Testing of Random Number Generators and Their ... - MDPI
    While this result aligns with the existence of cryptographically secure PRNGs, the low quality of the PRNG used highlights the limitations of statistical ...
  93. [93]
    Random Number Generator Performance - PCG
    All members of the PCG family are faster than other generators in their class. RanQ1, the Mersenne Twister, and Minstd are all colored red because they fail ...Missing: ChaCha | Show results with:ChaCha
  94. [94]
    Finding the Best 64-bit Simulation PRNG
    Sep 21, 2017 · Mersenne Twister (MT19937-64) · It's between 1/4 and 1/5 the speed of xoroshiro128+. · It's got a large state: 2,500 bytes. Versus xoroshiro128+'s ...Missing: ChaCha | Show results with:ChaCha
  95. [95]
    [PDF] Intel® Advanced Encryption Standard (AES) New Instructions Set
    CBC encryption of 4 buffers in parallel. ECB encrypt of. 1 block. CTR encrypt of. 1 block. Performance in CPU Cycles Per Byte. AES-128. 1.33. 2.01. 2.09. Table ...Missing: PRNG | Show results with:PRNG
  96. [96]
    [PDF] semiconductor semiconduc
    ChaCha20 offers speeds of around 4–14 cycles per byte in software on modern x86 processors, and reasonable hardware performance. It is not patented, and its.
  97. [97]
    Can reduced-round ChaCha be used as non-cryptographic fast ...
    Mar 21, 2018 · The 8-round version encrypts data at 1.88 cycles-per-byte on a Core2Duo, which is already extremely fast. As there's no real key schedule, ...Different ways of building a ChaCha20-based RNGUsing ChaCha20 as a PRNG with a variable-length seedMore results from crypto.stackexchange.com
  98. [98]
    [PDF] High-Performance Lattice-Based Pseudorandom Number Generator
    Aug 22, 2025 · Under the AVX2 and AVX512 implementations, the performance reaches 1.61 Cycles/byte and 1.14 Cycles/byte, and the throughput reaches 16.12 Gbps ...
  99. [99]
    [PDF] High-Performance Pseudo-Random Number Generation on ...
    We present a comparison of both speed and sta- tistical quality with other common GPU-based PRNGs, demonstrating favourable performance of the xorgens-based ...
  100. [100]
    Insecure Randomness - OWASP Foundation
    Standard pseudo-random number generators cannot withstand cryptographic attacks. Insecure randomness errors occur when a function that can produce predictable ...
  101. [101]
    DDJ, Jan96: Randomness and Netscape Browser - People @EECS
    Our study revealed serious flaws in Netscape's implementation of SSL that make it relatively easy for an eavesdropper to decode the encrypted communications.
  102. [102]
    [SECURITY] [DSA 1571-1] New openssl packages fix predictable ...
    May 13, 2008 · Luciano Bello discovered that the random number generator in Debian's openssl package is predictable. This is caused by an incorrect Debian-specific change to ...
  103. [103]
  104. [104]
    4.2.3 Random Number Generator - IuE
    In the case of linear congruential methods all rn lie on relatively few parallel hyperplanes, as is shown on the left side of Fig. 4.7. Figure 4.7: Lattice ...
  105. [105]
    Systematic errors due to linear congruential random-number ...
    Aug 30, 2004 · We show that linear congruential pseudo-random-number generators can cause systematic errors in Monte Carlo simulations using the ...Missing: artifacts | Show results with:artifacts
  106. [106]
    [PDF] An Implementation of the Lattice and Spectral Tests for Multiple ...
    In the next section, we recall some basic facts about linear congruential and multiple re- cursive generators and their lattice structure. We outline an easy ...Missing: artifacts | Show results with:artifacts
  107. [107]
    Poor Statistical Qualities for the RANDU Random Number Generator
    The RANDU random number generator was distributed by IBM in the 1960s. The generator function for this linear congruential pseudorandom number generator is
  108. [108]
    RANDU: A truly horrible random number generator
    Apr 14, 2019 · So out of 256 possible 8-bit numbers, this generator only ever outputs 64 of them.
  109. [109]
    Upper bounds for the Beyer ratios of linear congruential generators
    It is well known that the set of all vectors of consecutive pseudorandom numbers determines a lattice if the linear congruential generator has maximal period ...Missing: artifacts | Show results with:artifacts
  110. [110]
    [PDF] Testing Parallel Random Number Generators 1 Introduction - CS, FSU
    Tests on sequential generators: The popular 32 bit Unix LCG, rand fails even sequential PRNG tests. 4. For example, the collisions test fails for the.
  111. [111]
    Testing non-cryptographic random number generators: my results
    Aug 22, 2017 · The 32-bit Mersenne Twister will fail at 256 GB of output and its 64-bit version will fail at 512 GB of output (which takes three hours to reach) ...
  112. [112]
    [PDF] Randomised Smoothing and PRNG-based attacks - USENIX
    As an example, we hide an attack in the random number generator and show that the randomness tests suggested by NIST fail to detect it. We advocate updat- ing ...
  113. [113]
    [PDF] Statistical Tests of Some Widely Used and Recently Proposed ...
    Several widely used uniform random number generators have been extenslvel; subjected to three commonly used statistical tests of uniformity and random-.
  114. [114]
    A Birthday Test: Quickly Failing Some Popular PRNGs - PCG
    Jun 9, 2018 · In this post, we'll put together a test based around a very classic example from the world of probability theory, the Birthday Problem.
  115. [115]
    [PDF] Dual EC: A Standardized Back Door - Cryptology ePrint Archive
    Jul 31, 2015 · Abstract. Dual EC is an algorithm to compute pseudorandom num- bers starting from some random input. Dual EC was standardized by.
  116. [116]
    How the NSA (may have) put a backdoor in RSA's cryptography
    Jan 6, 2014 · The evidence is mounting for Dual_EC_DRBG being well-suited for use as a back door. A working proof of concept backdoor was published in ...
  117. [117]
    [PDF] Results from the 2008 Debian OpenSSL Vulnerability
    The 2008 Debian OpenSSL vulnerability caused predictable keypairs, slow fixing, and allowed impersonation and traffic decryption. Fixing was slow, and ...
  118. [118]
    Sony PS3 Security Broken
    Jan 6, 2011 · Sony used an ECDSA signature scheme to protect the PS3. Trouble is, they didn't pay sufficient attention to their random number generator.Missing: PRNG | Show results with:PRNG
  119. [119]
    CVE-2013-7372 - NVD
    java in the SecureRandom implementation in Apache Harmony through 6.0M3, as used in the Java Cryptography Architecture (JCA) in Android before 4.4 and other ...
  120. [120]
    Android Security Vulnerability - Bitcoin.org
    Aug 11, 2013 · A component of Android responsible for generating secure random numbers contains critical weaknesses, that render all Android wallets generated to date ...
  121. [121]
    Pseudorandom number generators based on neural networks
    Apr 7, 2025 · ... state transition function denoted as f: S \rightarrow S; \mathcal {U} represents the output space; and g is the mapping function that maps ...
  122. [122]
    [1810.00378] Pseudo-Random Number Generation using ... - arXiv
    Sep 30, 2018 · We demonstrate that a GAN can effectively train even a small feed-forward fully connected neural network to produce pseudo-random number sequences with good ...
  123. [123]
    Pseudo Random Number Generation: a Reinforcement Learning ...
    Dec 15, 2019 · Test suites are used to evaluate PRNGs quality by checking statistical properties of the generated sequences. ... neural network. But what about ...
  124. [124]
    Learned pseudo-random number generator: WGAN-GP for ... - NIH
    Jun 14, 2023 · In this paper, we propose a Wasserstein distance-based generative adversarial network (WGAN) approach to generating PRNGs that fully satisfy the NIST test ...
  125. [125]
    POST-QUANTUM PSEUDO RANDOM NUMBER GENERATORS
    This study explores various DRBGs, including Hash-DRBG, HMAC-DRBG, KHF-DRBG, AES-CTR DRBG, and TDEA-CTR DRBG, assessing their effectiveness within post-quantum ...
  126. [126]
    [PDF] LWE Based Quantum-Resistant Pseudo-Random Number Generator
    With the rapid advancement of quantum computing, the imminent “quantum-threat” looms closer, posing a risk to our current cryptographically secure PRNGs.
  127. [127]
    [PDF] Balancing security and efficiency in deterministic random bit ...
    Feb 21, 2025 · This article examined the use of five DRBG techniques for post-quantum cryptography: Hash-.
  128. [128]
    LWR-based Quantum-Safe Pseudo-Random Number Generator
    In this study, a scheme for Quantum-Safe PRNG (QSPRNG) is proposed to resolve the issues pertaining to post-quantum security. The proposed scheme comprises ...
  129. [129]
    [PDF] LWE Based Quantum-Resistant Pseudo-Random Number Generator
    With the rapid advancement of quantum computing, the imminent “quantum-threat” looms closer, posing a risk to our current cryptographically secure PRNGs.
  130. [130]
    Non Deterministic Pseudorandom Generator for Quantum Key ...
    Nov 6, 2023 · In this work we propose a pseudorandom generator based on post quantum primitives. The central theme of this random number generator is ...
  131. [131]
    Evaluation of Cryptographically Secure Pseudo Random Number ...
    In this study, we would evaluate different kinds of RNGs against quantum attacks including the one which is based on lattice-based cryptography.
  132. [132]
    Entropy Sources Based on Silicon Chips: True Random Number ...
    There are two types of entropy source, dynamic and static entropy source, which can be generated from silicon chips. Dynamic entropy sources that provide true ...
  133. [133]
    use of PRNG in OpenSSL - fips mode
    Apr 4, 2017 · CTR_DRBG is an approved PRNG for FIPS compliance, defined in NIST SP800-90A. Linux's /dev/random is, in principle, a suitable entropy source per NIST SP800-90B.
  134. [134]
    Understanding random number generators, and their limitations, in ...
    Jun 5, 2019 · There are algorithms to produce pseudo-random values from within an ideal, deterministic computing environment. However, there is no algorithm ...
  135. [135]
    Random Number Generator Using Build In Hardware
    The hardware random number generator is fed directly into the Linux entropy pool which may be accessed as /dev/random.<|control11|><|separator|>
  136. [136]
    How to ensure entropy and proper random numbers generation in ...
    Aug 8, 2019 · Using the QEMU/KVM VirtIO RNG device, you can make the physical, entropy-rich, hypervisor emulate a hardware RNG and pass it to the VM ...
  137. [137]
    [PDF] SP 800-90B Non-Proprietary Public Use Document Entropy Source ...
    May 5, 2025 · This entropy source was evaluated in compliance with NIST SP800-90B from Jan. 2018 and FIPS 140-3 Implementation Guidance from Dec. 2024.