Pseudorandom Generators

Research Depth 70 in the knowledge graph I know this Set as goal
Unlocks 1 downstream topic
prg computational-indistinguishability seed-expansion hard-core-bit

Core Idea

A pseudorandom generator (PRG) is a deterministic function G: {0,1}^n → {0,1}^l(n) with l(n) > n (expansion) such that the output on a random seed is computationally indistinguishable from a truly random string of length l(n). No efficient statistical test can tell PRG output from random with non-negligible advantage. PRGs exist if and only if one-way functions exist (HILL theorem). The Goldreich-Levin hard-core bit construction turns any OWF into a PRG by extracting one pseudorandom bit per invocation, then iterating. PRGs are the theoretical foundation of stream ciphers and the basis for building pseudorandom functions.

Explainer

A pseudorandom generator (PRG) is a deterministic algorithm that stretches a short, truly random seed into a longer output that is computationally indistinguishable from a truly random string of the same length. The seed might be 128 bits; the output might be megabytes. No efficient algorithm — no statistical test, no machine learning model, no adversarial strategy running in polynomial time — can tell the PRG's output from genuine randomness with non-negligible advantage. This is a strictly computational guarantee: an all-powerful adversary could detect the pseudorandomness (only 2^128 of the 2^{huge} possible output strings are reachable), but no adversary with bounded resources can.

The existence of PRGs is equivalent to the existence of one-way functions — the most fundamental assumption in cryptography. The forward direction (OWFs imply PRGs) was proven by Hastad, Impagliazzo, Levin, and Luby (the HILL theorem). The construction uses the Goldreich-Levin hard-core bit: given any one-way function f, there exists a predicate b(x) that is easy to compute from x but looks random given only f(x). Define G(x) = (f(x), b(x)) — this expands by one bit, and the extra bit is pseudorandom. Iterating (compute f, extract a hard-core bit, use f(x) as the new state) yields arbitrary expansion. The reverse direction is simpler: a PRG is itself a one-way function (inverting G on a random output requires finding the seed from an exponentially small set).

PRGs are the theoretical foundation of stream ciphers (which produce a long keystream from a short key and encrypt by XOR) and the first step in the construction chain that builds all of symmetric cryptography from OWFs: OWFs → PRGs → pseudorandom functions → MACs → secure encryption. Each step in this chain is proven by reduction, ensuring that breaking the higher-level primitive implies breaking the lower-level one, which ultimately implies breaking the one-way function.

In practice, deployed CSPRNGs (ChaCha20, AES-CTR used as a PRNG) are not built through the theoretical OWF-to-PRG construction — that construction is correct but horrendously slow, extracting one pseudorandom bit per OWF invocation. Instead, practical PRGs are designed directly using concrete ciphers and analyzed under specific assumptions about those ciphers. The theoretical framework provides the definitions (what it means to be pseudorandom) and the feasibility result (PRGs can exist), while practice provides efficient instantiations. Understanding the theory explains why the definitions look the way they do and what guarantees they provide — which is essential for correctly using and analyzing the practical constructions.

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesLiteral EquationsSlope-Intercept FormPoint-Slope FormWriting Linear EquationsParallel and Perpendicular Line SlopesGraphing Linear EquationsPiecewise FunctionsStep FunctionsComposition of FunctionsInverse FunctionsRadical Functions and GraphsRational ExponentsExponential Functions and GraphsLogarithms IntroductionTime and Space ComplexityTime Complexity Classes: P and EXPTIMENondeterministic Time Complexity and NPThe P vs. NP ProblemComplexity Class P: Polynomial TimeHash Functions and Collision ResistanceThe RSA CryptosystemComputational Hardness AssumptionsOne-Way FunctionsPseudorandom Generators

Longest path: 71 steps · 407 total prerequisite topics

Prerequisites (2)

Leads To (1)