A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Pseudorandom Generators

Research Depth 100 in the knowledge graph ☐ I know this ☆ Set as goal
1topic build on this
540prerequisites beneath it
See this on the map →
One-Way FunctionsRandom Number Generation in Cryptography→→Pseudorandom Functions
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 2128 of the 2huge 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

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Finite State Machines (FSMs) → Deterministic Finite Automata (DFA) → Nondeterministic Finite Automata (NFA) → Two-Way Finite Automata → NFA to DFA Conversion (Subset Construction) → DFA Properties and Minimization Algorithms → Regular Languages: Definition and Characterization → Context-Free Grammars (CFGs) → Pushdown Automata (PDA) → Equivalence of CFGs and Pushdown Automata → Closure Properties of Context-Free Languages → Limitations of Context-Free Languages → Pumping Lemma for Context-Free Languages → Turing Machines → Variants of Turing Machines and Equivalence → Nondeterministic Time Complexity and NP → The P vs. NP Problem → Complexity Class P: Polynomial Time → Hash Functions and Collision Resistance → The RSA Cryptosystem → Computational Hardness Assumptions → One-Way Functions → Pseudorandom Generators

Longest path: 101 steps · 540 total prerequisite topics

Prerequisites (2)

Leads To (1)