Home

PRNGs

PRNG stands for pseudo-random number generator. It is an algorithm that produces sequences that resemble randomness but are determined by an initial value, or seed, and thus are reproducible. The output is statistically random-looking but not truly random.

A PRNG maintains internal state and applies a state transition function to produce new values. Most rely

Common non-cryptographic PRNGs include linear congruential generators (Xn+1 = (aXn + c) mod m), Mersenne Twister, and XorShift

Seed choice matters: seeds should be unpredictable or derived from entropy. Many PRNGs support reseeding to

Assessment of PRNGs relies on statistical testing and theoretical properties. A good PRNG has a long period,

on
modular
arithmetic
or
bitwise
operations.
Key
characteristics
are
period
(the
length
before
repetition),
uniformity,
independence,
and
reproducibility.
In
practice,
non-cryptographic
PRNGs
favor
speed
and
long
periods,
while
cryptographic
uses
require
unpredictability
and
forward
security.
families.
More
recent
designs
such
as
PCG
and
WELL
aim
for
better
statistical
properties
with
smaller
state.
Cryptographically
secure
PRNGs
(CSPRNGs)
are
built
to
resist
prediction
and
state
compromise,
often
using
cryptographic
primitives
or
DRBG
constructions.
refresh
state.
In
software,
PRNGs
serve
simulations,
games,
randomized
algorithms,
and
procedural
content
generation;
they
are
inappropriate
for
true
randomness
or
high-security
needs
unless
specifically
designed
as
CSPRNGs.
good
statistical
behavior,
and
efficient
output
with
modest
state
requirements.