Pseudorandomness and Pseudorandom Generators

Imagine you need a one-time pad to encrypt a gigabyte of video. But you and your friend only met once. You exchanged just 128 bits of secret coin flips. True randomness is expensive to generate. It is also awkward to store and impossible to share efficiently over a long distance. Yet modern cryptography constantly demands long streams of unpredictable bits: session keys, initialization vectors, nonces, keystreams for stream ciphers. The gap between the randomness we can afford and the randomness we need is exactly the problem this article solves. The resolution is a beautiful shift in perspective. Instead of asking for output that is genuinely random, cryptographers ask for something else. They want output that no efficient adversary can tell apart from random. This is the idea of computational indistinguishability. The object that produces such output from a short seed is a pseudorandom generator (PRG). A PRG takes a short, truly random seed. It deterministically stretches this seed into a much longer string. That string "looks random" to any polynomial-time observer. Yet the output is entirely determined by the seed. Therefore it contains far less than its apparent amount of entropy. This idea matters because it underlies almost every symmetric-key primitive in practice. Stream ciphers are PRGs in disguise. Block ciphers, when run in counter mode, behave like PRGs. Key-derivation functions stretch a master secret into many session keys. They do this using PRG-like constructions. Even the security definitions for encryption schemes rely on the same template. That template is the indistinguishability idea introduced here. Understanding PRGs precisely is therefore a gateway to further topics. It leads to Stream Ciphers, Pseudorandom Functions and Permutations, and the entire edifice of provable security. This article builds the definition of computational indistinguishability from first principles. It states the PRG definition carefully. It walks through why "efficient stretching that looks random" is even possible. This holds under standard hardness assumptions. The article gives a worked trace of a toy construction. This makes the abstract definition concrete. It closes with the classic pitfalls. It also covers the historical figures who built this theory. Finally, it shows where PRGs show up in deployed systems.

Key takeaways
  • A PRG is a deterministic algorithm that stretches a short random seed into a longer string.
  • Security is defined via computational indistinguishability: no efficient distinguisher can tell PRG output from truly random output better than negligible advantage.
  • The formal game is the PRG distinguishing game, played against a probabilistic polynomial-time (PPT) adversary.
  • PRGs cannot be information-theoretically secure — the output space is smaller than the seed space would allow for true randomness — so security is inherently computational and typically rests on assumed hard problems.
  • The next-bit predictor characterization shows that unpredictability of every output bit, given all previous ones, is equivalent to full indistinguishability.
  • PRGs are the seed (pun intended) for stream ciphers, pseudorandom functions, and most symmetric cryptographic building blocks.
The core insight

A pseudorandom generator turns a short secret into a long string that no efficient algorithm can distinguish from true randomness, even though it is fully determined by the seed.

The idea

A pseudorandom generator is a deterministic function

G:{0,1}n→{0,1}ℓ(n)G : \{0,1\}^n \to \{0,1\}^{\ell(n)}

with ℓ(n)>n\ell(n) > n, that maps every nn-bit seed to an ℓ(n)\ell(n)-bit output, such that the output distribution — when the seed is chosen uniformly at random — is computationally indistinguishable from the uniform distribution on {0,1}ℓ(n)\{0,1\}^{\ell(n)}. The function ℓ(n)\ell(n) is called the stretch factor, and it must satisfy ℓ(n)−n≥1\ell(n) - n \geq 1 (some works require ℓ(n)≥n+ω(log⁡n)\ell(n) \geq n + \omega(\log n) so that stretch grows meaningfully with security parameter, but any polynomial stretch above nn is the essential requirement). The key technical term is computational indistinguishability. Two probability ensembles {Xn}\{X_n\} and {Yn}\{Y_n\} (indexed by a security parameter nn) are computationally indistinguishable if, for every PPT algorithm DD (the "distinguisher"), the quantity

Adv(D)=∣Pr⁡[D(Xn)=1]−Pr⁡[D(Yn)=1]∣\mathrm{Adv}(D) = \Big|\Pr[D(X_n) = 1] - \Pr[D(Y_n) = 1]\Big|

is a negligible function of nn — meaning it shrinks faster than the reciprocal of every polynomial, i.e. for every constant cc, eventually Adv(D)<1/nc\mathrm{Adv}(D) < 1/n^c. Negligibility is exactly the threshold at which an adversary running for polynomially many trials still cannot accumulate a noticeable edge; it is the standard "close enough to impossible" bar throughout modern cryptography. A PRG's security is then defined by requiring the distribution G(Un)G(U_n) — GG applied to a uniform nn-bit seed UnU_n — to be computationally indistinguishable from Uℓ(n)U_{\ell(n)}, a truly uniform ℓ(n)\ell(n)-bit string. Crucially, this is a statement about efficient observers only. An information-theoretic (unbounded) adversary can always distinguish G(Un)G(U_n) from uniform, because GG's range has size at most 2n2^n out of 2ℓ(n)2^{\ell(n)} possible strings — an astronomically small fraction once ℓ(n)>n\ell(n) > n. So no PRG can be perfectly random; the entire discipline lives in the gap between "distinguishable in principle" and "distinguishable in polynomial time."

How it works

The distinguishing game

PRG security is formalized as a game between a challenger and a distinguisher DD. ``` PRG-INDISTINGUISHABILITY GAME G_{PRG-DIST}(D, n): 1. Challenger flips a fair coin b ∈ {0, 1}. 2. If b = 0: seed s <- Uniform({0,1}^n) y <- G(s) // pseudorandom string Else: y <- Uniform({0,1}^{ell(n)}) // truly random string 3. Challenger sends y to D. 4. D outputs a guess b' ∈ {0, 1}. 5. D "wins" (succeeds) if b' = b. Distinguishing advantage: Adv(D, n) = | Pr[b' = 1 | b = 1] - Pr[b' = 1 | b = 0] | = 2 * Pr[b' = b] - 1 ``` G is a secure PRG if, for every PPT distinguisher D, Adv(D, n) is negligible in n. The two expressions for advantage are algebraically equivalent — a standard fact worth internalizing. Writing p1=Pr⁡[b′=1∣b=1]p_1 = \Pr[b'=1\mid b=1] and p0=Pr⁡[b′=1∣b=0]p_0 = \Pr[b'=1\mid b=0], we have Pr⁡[b′=b]=12p1+12(1−p0)\Pr[b'=b] = \tfrac12 p_1 + \tfrac12(1-p_0), so 2Pr⁡[b′=b]−1=p1−p02\Pr[b'=b]-1 = p_1 - p_0, matching the first line up to sign. This means "guessing correctly noticeably more than half the time" and "distinguishing the two conditional output distributions" are the same phenomenon measured two ways.

Building intuition: the next-bit test

A subtler and extremely useful characterization is the next-bit predictor view, originally due to Yao. Say a PPT algorithm PP is a next-bit predictor for GG if, given the first ii bits of G(s)G(s) for a random seed ss, PP guesses bit i+1i+1 correctly with probability noticeably better than 1/21/2, for some index ii. ``` NEXT-BIT PREDICTION GAME G_{NBP}(P, n, i): 1. s <- Uniform({0,1}^n) 2. y <- G(s) // y has length ell(n) 3. P is given y_1 y_2 ... y_i (the first i bits of y) 4. P outputs a guess g for y_{i+1} 5. P succeeds if g = y_{i+1} ```

Theorem (Yao's next-bit test). GG is a secure PRG if and only if no PPT algorithm is a next-bit predictor for GG with non-negligible advantage over 1/21/2, for any bit position ii. The "only if" direction is easy: a good next-bit predictor can be turned into a distinguisher (feed it the challenge string, check its guess against a locally supplied extra bit generated similarly — details in the correctness section below). The "if" direction is the interesting one and is proved by a hybrid argument: it shows that if no single bit is predictable, then the entire output is indistinguishable from uniform. This equivalence is enormously useful in practice, because verifying "every bit is unpredictable from its predecessors" is often more tractable than reasoning about the full joint distribution.

A concrete construction template

In practice, PRGs are built by composing a hardness assumption with a stretching mechanism. The canonical template, when a one-way permutation with a hard-core predicate is available, is: ``` CONSTRUCTION: PRG from a one-way permutation f with hard-core bit h Given: f: {0,1}^n -> {0,1}^n (a one-way permutation) h: {0,1}^n -> {0,1} (a hard-core predicate for f) G(s): x0 <- s output_bits <- empty list for i = 1 to k: // k = desired extra output length b_i <- h(x_{i-1}) // leak one "safe" bit x_i <- f(x_{i-1}) // advance the internal state append b_i to output_bits return (x_k, output_bits) // length n + k > n ``` Here xkx_k, the final permuted state, is included in the output because ff is a bijection — it costs nothing to reveal (it reveals no information about the seed beyond what an attacker already effectively has), while each bib_i leaks exactly one unpredictable bit per application of ff. The security proof is a reduction: any next-bit predictor against this GG is turned into an algorithm that predicts the hard-core bit h(xi−1)h(x_{i-1}) from f(xi−1)f(x_{i-1}) alone, contradicting the hard-core predicate property. Composing this with the next-bit theorem gives full PRG security.

Figure
The PRG pipeline: short seed, deterministic stretch, indistinguishable long output
seed s n bits, uniform G deterministic stretch function output G(s), length ℓ(n) > n computationally indistinguishable from uniform string U, length ℓ(n) PPT Distinguisher D outputs guess b' advantage ≤ negligible(n) Note: |seed space| = 2ⁿ ≪ |output space| = 2^ℓ(n) So G(s) covers a negligible fraction of all strings — indistinguishability must be computational, not statistical.

Complexity & correctness

Running time. A PRG GG is required to be computable by a deterministic algorithm running in time polynomial in nn (equivalently, polynomial in the output length ℓ(n)\ell(n), since ℓ(n)\ell(n) is itself polynomial in nn). For the one-way-permutation-based construction above, each of the kk rounds costs one evaluation of ff and one evaluation of hh; if both are computable in polynomial time (as required for ff to be a candidate one-way permutation with efficient forward evaluation), the whole generator runs in time O(k⋅Tf)O(k \cdot T_f) where TfT_f is the cost of one ff-evaluation — polynomial overall.

Space. The generator needs only O(n)O(n) space to hold the current state xix_i, plus O(k)O(k) space to accumulate output bits, so total space is O(n+k)O(n + k), linear in the output length. No PRG needs more space than its output length up to additive lower-order terms, since it is a straight-line, non-branching stretch computation.

Why perfect (information-theoretic) security is impossible. This is the honest limitation to state up front. Fix any G:{0,1}n→{0,1}ℓ(n)G: \{0,1\}^n \to \{0,1\}^{\ell(n)} with ℓ(n)>n\ell(n) > n. The image of GG has size at most 2n2^n, while the codomain has size 2ℓ(n)2^{\ell(n)}. An unbounded distinguisher can simply hard-code the entire image set of GG (computing it by brute force) and output 1 iff the challenge string lies in that set. Since ∣image(G)∣/2ℓ(n)≤2n−ℓ(n)|image(G)| / 2^{\ell(n)} \le 2^{n - \ell(n)}, which vanishes as ℓ(n)\ell(n) grows past nn, this distinguisher achieves advantage close to 1 exactly when ℓ(n)\ell(n) is even modestly larger than nn — and even when the gap is a single bit, the image covers at most half the space, giving distinguishing advantage at least 1/21/2. This proves rigorously that no PRG can fool an unbounded adversary; the entire notion is meaningful only relative to bounded (PPT) adversaries, which is why computational indistinguishability, not statistical indistinguishability, is the correct and unavoidable definitional choice.

Existence is conditional, not unconditional. It remains a major open problem (equivalent to P≠NPP \ne NP being necessary but not known sufficient) whether PRGs exist unconditionally. What is known: PRGs exist if and only if one-way functions exist (Håstad–Impagliazzo–Levin–Luby, the HILL theorem — one direction is straightforward: a secure PRG immediately yields a one-way function; the deep direction constructs a PRG from any one-way function, not just one-way permutations, using universal hash functions and the Goldreich–Levin hard-core predicate). So all PRG security claims are conditional on a computational hardness assumption; there is no proof of security from "first principles" alone.

Correctness of the next-bit theorem (proof sketch). The forward direction (predictor ⟹ distinguisher) is direct: given a next-bit predictor PP that succeeds with probability 12+ε\tfrac12 + \varepsilon at position ii, build a distinguisher DD that, on challenge string yy, runs PP on the first ii bits of yy and outputs 1 (claims "pseudorandom") if PP's guess matches yi+1y_{i+1}, else outputs a random guess; a careful accounting shows DD's advantage is Θ(ε)\Theta(\varepsilon), non-negligible if ε\varepsilon is. The reverse direction (no predictor at any position ⟹ full indistinguishability) uses a hybrid argument, one of the most important proof techniques in cryptography. Define hybrid distributions H0,H1,…,Hℓ(n)H_0, H_1, \dots, H_{\ell(n)} where HiH_i consists of the first ii bits of G(s)G(s) followed by ℓ(n)−i\ell(n) - i truly uniform bits. Then H0H_0 is exactly the uniform distribution Uℓ(n)U_{\ell(n)}, and Hℓ(n)H_{\ell(n)} is exactly G(Un)G(U_n). If some distinguisher DD separated H0H_0 from Hℓ(n)H_{\ell(n)} with advantage ε\varepsilon, then by a standard triangle-inequality / averaging argument, DD must separate some adjacent pair Hi−1H_{i-1} and HiH_i with advantage at least ε/ℓ(n)\varepsilon / \ell(n). But Hi−1H_{i-1} and HiH_i differ only in whether position ii is drawn pseudorandomly (via GG, correlated with the earlier bits) or independently at random — distinguishing them is exactly equivalent to a next-bit prediction task at position ii. Since ℓ(n)\ell(n) is polynomial, dividing a negligible-or-nonexistent quantity by it still leaves something negligible (or the contrapositive: if ε\varepsilon were non-negligible, ε/ℓ(n)\varepsilon/\ell(n) would remain non-negligible, contradicting the no-predictor assumption). This completes the equivalence.

Tradeoffs to be honest about:

  • PRGs give computational, not information-theoretic, security — a sufficiently powerful adversary (unbounded time/space) can always break them in principle.
  • Security depends on unproven hardness assumptions (one-way functions existing); if P=NPP = NP, essentially all standard PRG candidates collapse.
  • Stretching further (large ℓ(n)\ell(n)) does not come "for free" in a security proof — the hybrid argument's loss factor of ℓ(n)\ell(n) means the underlying one-way function assumption must be very strong (negligible-enough inversion probability) to support large stretch with a tight security bound; in practice, block-cipher/hash-based PRGs sidestep this by direct heuristic construction (e.g., counter mode) rather than a bit-by-bit hybrid.

Worked example

Because a real cryptographic PRG (e.g., built from AES or SHA-256) is too complex to trace by hand, we illustrate the mechanics and the distinguishing game using a deliberately small, insecure toy generator — this is pedagogically standard: the goal is to see exactly how the game and next-bit test operate, not to see a secure scheme.

Toy generator. Let n=4n = 4. Define

G(s)=s∥parity(s)G(s) = s \parallel \mathrm{parity}(s)

where parity(s)\mathrm{parity}(s) is the XOR of all 4 bits of ss — so ℓ(4)=5\ell(4) = 5, a stretch of exactly one bit. Trace for a specific seed:

StepValue
seed ss`1011`
bit-by-bit XOR1⊕0⊕1⊕1=11 \oplus 0 \oplus 1 \oplus 1 = 1
parity bit`1`
output G(s)G(s)`10111`

Now run the distinguishing game conceptually. The challenger flips bb:

  • If b=0b = 0: samples ss uniformly from the 16 possible 4-bit strings, outputs G(s)G(s), a 5-bit string whose last bit always equals the XOR of the first four.
  • If b=1b = 1: samples a uniform 5-bit string — with probability 1/21/2 its last bit will not match the XOR of the first four.

Distinguisher strategy. ``` D(y): // y is 5 bits: y1 y2 y3 y4 y5 p <- y1 XOR y2 XOR y3 XOR y4 if p == y5: return 1 // "guess: pseudorandom" else: return 0 // "guess: truly random" ``` Compute DD's advantage exactly. When b=0b=0 (input is G(s)G(s)), the parity check always holds by construction, so Pr⁡[D outputs 1∣b=0]=1\Pr[D \text{ outputs } 1 \mid b=0] = 1. When b=1b=1 (input is truly uniform 5 bits), the last bit is independent and uniform, so it matches the XOR of the first four with probability exactly 1/21/2: Pr⁡[D outputs 1∣b=1]=1/2\Pr[D \text{ outputs } 1 \mid b=1] = 1/2.

Adv(D)=∣1−1/2∣=1/2.\mathrm{Adv}(D) = |1 - 1/2| = 1/2.

This is a constant (certainly non-negligible) advantage, and DD runs in O(1)O(1) time (just four XORs and a comparison) — so this toy GG is not a secure PRG. This is exactly the intended lesson: appending a simple deterministic function of the seed (like a parity bit) as "extra output" creates a detectable structural signature. A real PRG's extra bits must be computationally unpredictable given everything already output, which is precisely why constructions rely on one-way functions and hard-core predicates rather than simple linear functions of the seed.

Second trace — the next-bit view. Apply the next-bit predictor test at position i=4i = 4 (predicting the 5th bit given the first four). The predictor PP simply computes p=y1⊕y2⊕y3⊕y4p = y_1 \oplus y_2 \oplus y_3 \oplus y_4 and outputs g=pg = p. When the string comes from GG, this succeeds with probability 11; a real PRG would force PP's success probability down to 1/2+negl(n)1/2 + \mathrm{negl}(n). This shows concretely how a next-bit predictor and a full distinguisher are two views of the identical weakness, exactly as the theorem predicts.

Common pitfalls & traps

PitfallWhy it's wrongFix
Believing a PRG can be statistically randomRange of GG is at most 2n2^n out of 2ℓ(n)2^{\ell(n)} strings; an unbounded adversary always distinguishesState security only against PPT adversaries; never claim information-theoretic security for a PRG
Confusing "passes statistical test suites" (e.g. NIST STS) with "is a secure PRG"Statistical tests catch simple structural biases, not adversarial exploitation of an underlying hard problemCryptographic PRGs need a security reduction to a hardness assumption, not just empirical randomness tests
Assuming any stretching function works if output "looks random"Deterministic patterns (like our toy parity example) can be invisible to naive inspection yet trivially detected by a targeted distinguisherRequire existence of an explicit reduction: breaking the PRG must imply breaking a known-hard problem
Treating negligible advantage as "zero"Negligible means asymptotically vanishing faster than any inverse polynomial, not exactly zero for any fixed nnAlways reason asymptotically in the security parameter; fixed small nn can still have nontrivial advantage
Reusing a PRG seed across multiple sessions expecting independent outputSame seed under a deterministic GG always produces the same output — determinism, not randomness, governs repeatsNever reuse seeds; combine PRGs with fresh, unique nonces or counters as in Stream Ciphers keystream generation
Forgetting the hybrid argument's polynomial loss factorA security proof with an ℓ(n)\ell(n)-factor loss requires the base assumption to be strong enough to absorb itTrack advantage bounds explicitly through the hybrid steps rather than hand-waving "still negligible"

Pioneers & history

Origins · 1 minAndrew Chi-Chih Yao and how this was discovered
AC
Andrew Chi-Chih Yao
1946–present · Formalized computational indistinguishability and the next-bit test that underlies the modern PRG definition

Yao's 1982 paper "Theory and Applications of Trapdoor Functions" gave the first rigorous treatment connecting one-way permutations, hard-core predicates, and pseudorandom generation, along with the next-bit unpredictability characterization that remains the standard proof technique taught today. He later won the Turing Award (2000) for foundational contributions to the theory of computation, including complexity-based cryptography and communication complexity.

History
1982
— Blum and Micali construct the first PRG from the discrete-logarithm hardness assumption, and Yao formalizes the next-bit test and its equivalence to full indistinguishability.
1984
— Goldwasser and Micali introduce computational indistinguishability and probabilistic encryption, tightly linking PRG-style definitions to encryption security.
1989
— Håstad, Impagliazzo, Levin, and Luby (published fully in 1999) prove that PRGs exist if and only if one-way functions exist, resolving the minimal-assumption question.
1996
— Goldreich, Goldwasser, and Micali–style constructions extend PRGs to pseudorandom function families, foreshadowing modern block-cipher design.
2013
— Public revelations about the Dual_EC_DRBG backdoor dramatize, in a real-world incident, why statistical randomness is not the same as proven pseudorandomness.

Where this matters

Every stream cipher — RC4 historically, ChaCha20 in modern TLS and SSH — is fundamentally a PRG whose output is XORed with plaintext; understanding PRG security is a direct prerequisite to understanding Stream Ciphers. Operating-system CSPRNGs (`/dev/urandom` on Linux, `CryptGenRandom`/`BCryptGenRandom` on Windows, `getrandom()` syscalls) are engineered to meet the PRG indistinguishability definition, seeded from hardware entropy sources and then stretched deterministically for all subsequent requests. TLS 1.3 key schedules, SSH session key derivation, and disk-encryption tools (e.g., LUKS, BitLocker) all rely on PRG-like key-derivation functions to expand a single master secret into many independent-looking subkeys. Block ciphers run in counter mode (CTR) are explicitly designed and analyzed as PRGs, forming the bridge to Pseudorandom Functions and Permutations, where a keyed family of functions must look random not just once but under adaptive, repeated querying. Hardware random number generators (Intel's RDRAND) are themselves typically PRGs seeded by a physical entropy source, illustrating that "randomness" in deployed systems is almost always this computational notion rather than a literal physical process observed directly.

Ask the tutor: How does the hybrid-argument proof change if the PRG's stretch factor ℓ(n) grows super-polynomially instead of polynomially?

Can a PRG ever produce output that is truly, statistically random?

No. By definition, a PRG is a deterministic function of a short seed, so its output distribution has entropy at most equal to the seed's entropy (at most nn bits), even though the output string is ℓ(n)>n\ell(n) > n bits long. A truly random string of length ℓ(n)\ell(n) has entropy ℓ(n)\ell(n). These two distributions are therefore statistically distinguishable in principle — an unbounded adversary can enumerate all 2n2^n possible outputs of GG and check membership. What a secure PRG guarantees is only that this gap is invisible to any adversary running in polynomial time, which is the practically relevant notion for essentially all real-world attackers.

How is a PRG different from a true random number generator (TRNG)?

A TRNG harvests physical entropy — thermal noise, clock jitter, radioactive decay timing — to produce bits whose randomness is grounded in physics, not computation. A PRG takes a short seed (ideally sourced from a TRNG once) and deterministically stretches it using a fixed algorithm. In practice, systems combine both: hardware entropy seeds a cryptographic PRG (often called a CSPRNG, cryptographically secure PRG), which then services all subsequent randomness requests efficiently, since re-sampling physical entropy for every request would be far too slow for high-throughput applications like TLS handshakes.

Why do we need the hybrid argument instead of a direct proof for the next-bit theorem?

The direct claim — "no bit is individually predictable, therefore the whole string is indistinguishable" — is not obviously implied by a simple union bound or independence argument, because the bits of a PRG's output are highly correlated (they all derive from one seed). The hybrid argument works around this by constructing a chain of intermediate distributions that gradually morph from all-random to all-pseudorandom one position at a time, so that any large gap between the endpoints must show up as a detectable gap between some adjacent pair — which is exactly a next-bit prediction task. This chaining technique, invented for this proof, recurs throughout cryptography anywhere a sequence of small changes needs to be shown collectively harmless.

Does a bigger stretch factor ℓ(n) make a PRG less secure?

Not directly by definition, but it does affect the tightness of security proofs built via hybrid arguments, since the reduction's advantage loss scales with the number of hybrid steps, which is ℓ(n)\ell(n). A larger stretch means the underlying hardness assumption must hold with a correspondingly smaller failure probability to preserve a meaningful security guarantee. In engineering practice, PRGs are not built bit-by-bit via hard-core predicates for large stretch; instead, block ciphers in counter mode or dedicated stream cipher designs (ChaCha20) achieve large stretch efficiently, with security analyzed directly rather than through a bit-by-bit hybrid chain.

What is the practical relationship between PRGs and stream ciphers?

A stream cipher is essentially a keyed PRG: the secret key (and often a nonce) acts as the seed, and the cipher expands it into a long keystream that is XORed with the plaintext to produce ciphertext. The security requirement is identical to the PRG definition — the keystream must be indistinguishable from true randomness to any PPT adversary who does not know the key. This is precisely why stream cipher design and PRG design share the same toolbox and the same failure modes, and why weaknesses in the underlying pseudorandomness (like the biases eventually found in RC4) directly translate into practical plaintext-recovery attacks.

Is the existence of PRGs proven, or is it an assumption?

It is conditional. Nobody has proven unconditionally that PRGs exist, because doing so would in particular imply P≠NPP \ne NP (if P=NPP = NP, one-way functions cannot exist, and PRGs require one-way functions). What is proven is the equivalence: PRGs exist if and only if one-way functions exist. So all cryptographic deployments of PRGs rest on believing some concrete computational problem (integer factorization, discrete log, or the heuristic strength of a block cipher like AES) is hard for polynomial-time adversaries — an assumption supported by decades of unsuccessful attack attempts, not by mathematical proof from first principles.

Why is the "next-bit test" useful if the full indistinguishability definition already exists?

The full definition quantifies over all possible distinguishers examining the entire output at once, which can be unwieldy to reason about directly, especially when designing a construction incrementally (one output bit per round, as in the one-way-permutation-based PRG). The next-bit test lets a designer or prover focus on a local property — is this one new bit unpredictable given everything already produced — and then invoke the hybrid-argument theorem to lift that local guarantee automatically to the global, full-string indistinguishability guarantee, which is usually far easier to establish and to reason about in a stepwise security proof.

Before this

Where this leads