Block Cipher Constructions and Pseudorandom Objects
Where pseudorandom permutations come from, in practice and in theory. Practice (Ch. 5): why heuristic block ciphers inside provable modes are sound methodology; block ciphers as PRPs, not encryption schemes; confusion–diffusion and substitution–permutation networks (invertible S-boxes, the avalanche effect, key-recovery attacks on 1- and 2-round SPNs and a distinguisher for 3 rounds); Feistel networks and their inversion; DES (16 rounds, 56-bit key, E-expansion, 6→4 S-boxes), attacks on 1-, 2- and 3-round DES, brute force and the DES challenges, differential and linear cryptanalysis; double encryption and meet-in-the-middle, triple encryption (3DES, EDE); AES (Rijndael, the AES competition, AddRoundKey/SubBytes/ShiftRows/MixColumns, reduced-round attacks, side channels); stream ciphers from block ciphers. Theory (Ch. 6): one-way functions and permutations, families, candidates; hard-core predicates and pitfalls; the Goldreich–Levin theorem in three stages (perfect predictor, 3/4 + 1/p, full proof via pairwise-independent sampling and Chebyshev); the PRG G(s) = (f(s), hc(s)); stretching by the hybrid argument; GGM tree PRFs; Luby–Rackoff Feistel PRPs; one-way functions as necessary and sufficient for private-key cryptography (PRG ⇒ OWF, EAV-secure encryption ⇒ OWF); computational indistinguishability and multi-sample indistinguishability. Exercises worked.
Corresponds to Katz & Lindell, Introduction to Modern Cryptography, Chapters 5–6.
Motivation: where does a pseudorandom permutation come from?
IntuitionTwo answers to one question
Every construction in Chapters 3–4 assumed a PRF or PRP. This note answers “do they exist, and how are they built?” twice:
- In practice (Chapter 5): block ciphers such as DES and AES are heuristic designs with no security proof and no reduction to a simpler problem, trusted because of decades of failed cryptanalysis.
- In theory (Chapter 6): pseudorandom generators, functions and permutations can be provably built from any one-way function, and one-way functions are also necessary. Private-key cryptography rests on exactly one minimal assumption.
The theoretical constructions are far too inefficient to use. Their value is understanding what security fundamentally requires. (The applied view of these ciphers is in security-in-distributed-systems.)
Part I — Block ciphers in practice (Chapter 5)
ImportantWhy prove things on top of an unproven block cipher?
- A PRP is a low-level, simple-to-test target. Checking “looks like a random permutation” is easier than checking “this scheme is CCA-secure”.
- It is replaceable. A broken cipher can be swapped for another with the same block length without changing the higher-level scheme’s formats.
- Heuristics are confined to one place. Modes, MACs and protocols are proven; designers focus only on building good PRPs.
WarningBlock ciphers are PRPs, not encryption schemes
Despite the name, a block cipher is a building block (strong PRP). AES’s call for submissions explicitly asked how indistinguishable from a random permutation candidates were. Practical ciphers fix one or a few key and block lengths rather than a family indexed by . Treat those lengths as the "" and require them to be large enough against modern computing.
WarningDon’t design your own
The point is intuition for how ciphers are built, not a recipe. Use standardised, unpatented, heavily analysed ciphers. Seemingly arbitrary design choices are not arbitrary, and the descriptions here are deliberately incomplete and not implementable.
Substitution–permutation networks
DefinitionConfusion and diffusion (Shannon)
A random -bit permutation needs an -bit table: astronomically large for , versus about 32 Kbit for sixteen random 8-bit tables. So: split the input into small pieces, pass each through a small random-looking function (confusion), then mix the outputs (diffusion), and repeat for several rounds.
Without diffusion, inputs differing in one bit would give outputs differing in one byte, which a random function would never do.
DefinitionSubstitution–permutation network (SPN)
Each round:
- key mixing: XOR a round subkey, derived from the master key by the public key schedule;
- substitution: apply public S-boxes to small chunks;
- permutation: apply a public mixing permutation that reorders bits (here “permutation” means a bit reordering).
Everything except the key is public (Kerckhoffs). Security depends entirely on the choice of S-boxes, mixing and key schedule.
TheoremDesign choice 1 — invertible S-boxes (Claim 5.1)
If every S-box is a bijection, the SPN is efficiently invertible: undo each round backwards (invert the bit permutation, look up the S-box inverse tables, XOR the same subkey), and . Purely random S-boxes are not ideal, though: they resist differential and linear cryptanalysis worse than carefully designed ones.
DefinitionDesign choice 2 — the avalanche effect
Small input changes must quickly become large output changes. Two properties suffice:
- flipping any one S-box input bit flips at least two of its output bits;
- the mixing permutation sends each S-box’s outputs to different S-boxes in the next round.
Then the number of affected bits doubles each round: bits after rounds, so a 128-bit block is fully affected after 7 rounds. Random S-boxes don’t guarantee property 1: for a random 4-bit S-box, the chance an output lies within Hamming distance 1 of a given value is , and with many S-boxes some will fail.
Attacks on reduced-round SPNs
ExampleWhy one, two or three rounds are not enough
- 1 round (complete break from one known pair): invert the public mixing permutation and S-boxes to get , then XOR with to get .
- 2 rounds (64-bit block, sixteen 4-bit S-boxes, independent 64-bit round keys ): peel off the last round’s mixing and S-boxes. Each 4-bit chunk entering round 2 depends on at most 4 first-round S-boxes, hence only 16 bits of , plus 4 bits of . Guess these 20 bits ( options) and check against several known pairs. About 5 pairs leave a unique survivor; with 8, work per chunk and about total, instead of . Lesson: key bits that can be isolated are cheap. Diffusion must make every key bit affect every output bit.
- 3 rounds (distinguisher): the avalanche isn’t complete, so encrypting two inputs differing in one bit gives outputs with many equal bits.
ExampleVariations (Exercises 5.1–5.3)
- 8-bit S-boxes: each round-2 S-box can depend on up to 8 first-round S-boxes, i.e. 64 bits of . With a 64-bit block that is all of : about guesses, so isolation largely disappears. With a 128-bit block it is still about per byte. Larger S-boxes help against this attack more than larger blocks.
- 3-round SPN in CTR mode: consecutive counters differ in a few low-order bits, so the incomplete avalanche makes the pads correlated, which leaks relations between plaintext blocks. Distinguishability alone is disastrous.
- Reordering into key mixes, then substitutions, then permutations: XORs of keys collapse to one key, composed S-boxes to one S-box layer, composed permutations to one permutation. It is a one-round SPN, broken as above, whether or not the components differ.
(Worked here.)
Feistel networks
DefinitionFeistel network
Split the input into halves . Each round :
The round function (keyed by a subkey, usually built from S-boxes and mixing) need not be invertible. Invertibility forces structure, which works against the chaos a cipher wants; Feistel avoids this.
TheoremClaim 5.2 — Feistel networks are always invertible
If follows , then
Inversion only evaluates forwards. Reduced-round attacks on SPNs carry over when is built the same way.
DES — the Data Encryption Standard
DefinitionDES at a glance
IBM (with NSA input), US federal standard in 1976. A 16-round Feistel network: 64-bit block, 56-bit key, 48-bit round subkeys chosen by a public schedule (the key is permuted, split into 28-bit halves, and each subkey takes 24 bits from each half). Public initial and final permutations , add no security (they only slow software).
AlgorithmThe DES round function
- Expand the 32-bit to 48 bits with (duplicating half the bits), then XOR with the subkey: .
- S-boxes: split into eight 6-bit chunks, each through with 6-bit input and 4-bit output: the non-invertible confusion step.
- Mixing permutation of the 32 output bits: diffusion.
NoteProperties of the DES S-boxes
- Each is a table of 4-bit entries.
- The outer input bits (1 and 6) select the row; bits 2–5 select the column.
- Each row is a permutation of .
- Flipping one input bit flips at least two output bits.
They look random but were carefully designed (with NSA help). Random S-boxes, or a random mixing permutation, make DES far easier to break, notably by differential cryptanalysis. Property 4 plus good mixing completes the avalanche by about round 7, well within 16.
Attacks on reduced-round DES
ExampleOne and two rounds — the full key from a few pairs
1 round: and , so ‘s input and output are both known. Undo the mixing permutation to get each S-box’s 4-bit output. Since each row is a permutation, the output fixes the input once the row is chosen: 4 candidate 6-bit inputs per S-box, each giving a candidate subkey chunk (). That leaves candidate subkeys; test them on another pair.
2 rounds: has input and output ; has input and output . Both are fully known, so attack each round as above. This works even with independent round keys.
ExampleThree rounds — meet in the XOR, work
Now no single has both input and output known. But is known, with inputs to and to . Key bits split: the left key half feeds only –, the right half only –.
- For each of the left half-keys, compute –‘s outputs in and and check the 16 corresponding bits of . About survive.
- Do the same for the right half.
- Brute-force the combinations.
Total , easy on a PC. Again: separable key bits are fatal.
Security of DES
WarningThe 56-bit key is DES’s only real weakness
- Brute force: ; using the complementation property. Objections to the key length date from the 1970s.
- RSA’s DES challenges: DESCHALL took 96 days (1997); distributed.net 41 days (early 1998); EFF’s Deep Crack ($250,000) 56 hours (1998); Deep Crack plus distributed.net later 22 h 15 min. DES has long been insecure.
- Spurious keys: for one pair, another key also maps with probability about . Rule it out with a second pair.
TheoremThe complementation property and search (Exercises 5.4–5.5)
. Complementing commutes with bit-duplication in , so : identical S-box inputs and outputs. Each Feistel half is then (complement) (same value), which stays complemented.
Attack: obtain and . Try one key from each complementary pair: if then ; if then . That is trials. (Worked here.)
ExampleWeak keys and silly variants (Exercises 5.7, 5.10)
- Weak keys: with every subkey is identical, so decryption (subkeys in reverse order) equals encryption: , an involution. The same holds for any key whose two 28-bit halves are each constant: all ones, , . Four keys in are no practical threat, but implementations can reject them.
- S-boxes output zero: , so each round just swaps halves, and 16 rounds give the identity (up to ). No key dependence at all.
- = identity: , a fixed linear map independent of the key.
- Same subkey every round: decryption equals encryption (up to a final swap), so the cipher is (nearly) an involution, easily distinguished. Identical rounds also enable slide attacks (Biryukov–Wagner), which recover the key with about known plaintexts.
(Worked here.)
DefinitionAdvanced cryptanalysis
- Differential cryptanalysis (Biham–Shamir, late 1980s): find input differences that lead to output differences with probability well above , then use pairs with that difference to isolate and test key portions. It is a chosen-plaintext attack: about chosen plaintexts against DES. Random S-boxes make DES much weaker, and IBM later confirmed the designers (and NSA) knew the technique and hardened the S-boxes against it, keeping it secret. It completely broke FEAL-8.
- Linear cryptanalysis (Matsui, early 1990s): find XOR relations that hold with probability . Such a relation alone is a distinguisher with advantage ; Matsui leverages it to recover keys. It needs only known plaintexts: about for DES.
Both are impractical against DES (impossible quantities of plaintext), so exhaustive search remains the best practical attack, a tribute to the design. Any new cipher must now show resistance to both.
Increasing the key length
NoteBlack-box constructions over tweaking internals
Changing DES internally (say, a longer key schedule) discards decades of earned confidence. Small changes can destroy security. Instead, compose the unmodified cipher, which also works for any block cipher.
TheoremDouble encryption falls to meet-in-the-middle
has a -bit key, but given :
- list for all ;
- list for all ;
- sort both (counting sort, ) and merge to find matches (Exercise 5.8: walk both sorted lists with two pointers, ).
About candidate pairs remain; test them on a second pair. Time , space : barely better than attacking single encryption. Double-DES costs about (really about ) time and about memory, too thin a margin, so it is not used.
DefinitionTriple encryption
- Three keys: . No weakness known.
- Two keys: . There is an attack with time and chosen-plaintext queries, considered unrealistic.
The EDE pattern () gives backward compatibility: equal keys reduce to single encryption. Since is also a PRP, it costs nothing. 3DES replaced DES as the NIST standard in 1999. Its drawbacks are a 64-bit block (birthday problems in modes) and slowness (three DES calls). (NIST has since disallowed 3DES for encryption after 2023.)
AES — the Advanced Encryption Standard
NoteThe AES competition
NIST’s call came in 1997. 15 worldwide submissions led to two public conferences (1998, 1999), 5 finalists, a third conference, and in October 2000 the winner Rijndael (Daemen–Rijmen). Every entrant had motive to break the others (for honour; the winner had to be unpatented), so the world’s best cryptanalysts scrutinised all of them intensively.
DefinitionAES structure
An SPN-like cipher on a byte state. Block 128 bits; key 128/192/256 bits; 10/12/14 rounds. (Rijndael allows more sizes; AES is the standardised subset.) Each round:
- AddRoundKey: XOR a 16-byte round key, ;
- SubBytes: one fixed bijective 8-bit S-box applied to every byte;
- ShiftRows: row rotated left by places;
- MixColumns: each column, viewed as a polynomial over , is multiplied by modulo : an invertible linear map.
ShiftRows and MixColumns together act as the (linear, not merely bit-reordering) diffusion layer. The final round omits MixColumns and ends with a key addition, so the last round can’t simply be peeled off.
NoteAES security
The best attacks of the book’s era were on reduced rounds: 6-round AES-128 at about , 8-round AES-192 at about , 8-round AES-256 at about . Nothing better than brute force was known on full AES. (Later “biclique” attacks shave full AES-128 to about , with no practical impact.) Side-channel attacks (timing, power on smartcards) can extract keys but assume strong physical access. AES is free, standardised, fast and highly secure: the default PRP.
Stream ciphers from block ciphers
NoteUse a block cipher in a streaming mode
Dedicated stream ciphers (for example RC4) are less trusted: there is no long-standing standard without known weaknesses. A block cipher in CTR or OFB mode inherits the cipher’s security. Stream ciphers win only on speed (often about 2×) and on avoiding padding, which rarely matters given how fast AES is.
ExampleDouble-DES as a compression function (Exercise 5.9)
, mapping 112 bits to 64:
- (a) An explicit collision: for any weak key , . So for all four weak keys: three collisions for free.
- (b) Preimages: meet in the middle. Tabulate and and match, at about time and memory. About preimages exist, so restricting key bits to embed some structure is possible, but not arbitrary meaningful text.
- (c) Inside Merkle–Damgård: a 64-bit output falls to birthday collisions in about , and the preimage attack propagates. Unusable.
(Worked here.)
Part II — Theoretical constructions (Chapter 6)
IntuitionThe minimal assumption
Proving PRGs exist unconditionally would require complexity-theory breakthroughs (it implies P ≠ NP), so some assumption is unavoidable. The goal is one that is both necessary and sufficient. That assumption is the existence of one-way functions, minimal for nearly all of cryptography, and intuitively much weaker than “PRFs exist” even though the two turn out to be equivalent.
One-way functions
DefinitionOne-way function (Def. 6.1)
(with input and output lengths polynomially related) is one-way if
- easy to compute: a poly-time computes ;
- hard to invert: for every ppt ,
Finding any preimage counts as inverting, not necessarily the original .
WarningReading the definition carefully
- Hardness holds only for uniformly random inputs and large enough . A negligible fraction of inputs may be easy.
- Not one-way means some ppt inverts with probability at least for infinitely many . An inverter that succeeds with probability on even only already breaks one-wayness.
- Exhaustive search always inverts, so one-wayness is purely a statement about efficient computation.
DefinitionOne-way permutations and families (Defs. 6.2–6.4)
- One-way permutation: one-way, with each restriction to a bijection. determines , yet is computationally hidden.
- Family : defines the domain and range ; Samp samples (almost) uniformly; is deterministic. It is one-way if the inversion experiment (sample , , give , succeed if any preimage is found) has negligible success. A family of permutations has bijective on .
ExampleCandidates
- Factoring: is easy to invert unrestricted (the product almost always has a small factor). Fix it by requiring , or by using the input to sample two similar-size primes (Chapters 7–8).
- Subset sum: . NP-completeness is worst case; one-wayness needs average-case hardness. Belief rests on the absence of good algorithms, not on NP-hardness.
- Discrete log: , a family of permutations.
Hard-core predicates
DefinitionHard-core predicate (Def. 6.5)
A poly-time predicate such that for every ppt : . It is one bit of that is as good as random given .
WarningOne-way functions can leak a lot
- Half the input: is one-way if is, yet reveals half its input. One-wayness only says “not all of ”.
- The XOR of all bits isn’t automatically hard-core: is one-way yet outputs that bit. Every fixed predicate fails for some one-way function.
- Meaningless hard-core bits: “hides” because is undetermined, even for non-one-way . Useless for PRGs.
- For 1–1 functions, a hard-core predicate exists only if is one-way (Exercise 6.9). Otherwise invert to the unique and compute .
ImportantThe roadmap (Theorems 6.6–6.9, Corollary 6.10)
- Goldreich–Levin: for any OWF , is hard-core for . It is the XOR of a random subset of ‘s bits.
- One-way permutation + hard-core bit ⇒ PRG stretching by one bit: .
- One-bit stretch ⇒ any polynomial stretch (hybrid argument).
- Length-doubling PRG ⇒ PRFs (GGM) ⇒ PRPs (Luby–Rackoff).
So one-way permutations give PRGs, PRFs and PRPs. Any one-way function suffices too (Håstad–Impagliazzo–Levin–Luby), but that construction is very involved.
The Goldreich–Levin theorem
TheoremTheorem 6.11 — Goldreich–Levin
If is one-way and with , then is a hard-core predicate of .
Proof strategy: turn any predictor for into an inverter for , in three increasingly hard stages.
ProofStage 1: a perfect predictor (Proposition 6.12)
If always outputs , query : . That gives queries and all of , contradicting one-wayness.
∎
ProofStage 2: success (Proposition 6.13)
Key identity: for any .
Good inputs (Claim 6.14): by averaging, a set of at least inputs has . Otherwise the overall success couldn’t reach . Fixing leaves only random, so repeated trials are independent.
One bit: and are each uniform (not independent). A union bound on failures gives , so both answers are right, and correct, with probability at least .
Amplify: take the majority over about independent ‘s. Chernoff gives error at most per bit. A union bound over bits gives all of with probability at least on , i.e. overall at least , which is non-negligible.
Why : below that, the two-query union bound gives no advantage.
∎
ProofStage 3: the full theorem, success (Proposition 6.16)
Problem: two queries, each right with probability only , can’t be combined. Fix: query only on and guess yourself, for many at once, cheaply.
Pairwise-independent ‘s from few seeds: pick uniform seeds and set for every nonempty . That gives strings, each uniform and pairwise independent (for , some seed is in exactly one of them).
Guess only bits: guess , all correct with probability . By linearity, , so all guesses are then right.
Algorithm : for each , set and .
Analysis (Claim 6.18): with correct ‘s and , each indicator has mean at least , variance below , and the are pairwise independent. By pairwise-independent Chebyshev, . A union bound over bits gives correct with probability at least .
Total: , which is non-negligible. This contradicts one-wayness.
∎
FormulaTools: Markov, Chebyshev, pairwise sampling
- Markov: .
- Chebyshev: (Markov applied to ).
- Pairwise-independent sampling (Corollary 6.15): for pairwise-independent variables with mean and variance , variances add (zero covariances), so
Weaker than Chernoff’s exponential tail, but it needs only pairwise independence, which is exactly what the subset-XOR trick supplies. (Compare the classical inequalities in concentration-of-measure-for-bandits.)
Pseudorandom generators from one-way permutations
TheoremTheorem 6.19 — One bit of stretch
If is a one-way permutation with hard-core predicate , then is a PRG with . is uniform because is a permutation, and looks uniform given .
ProofDistinguisher ⇒ predictor
Suppose distinguishes from uniform -bit strings with advantage . Uniform is the same as for a random bit , which is half and half . So separates from with advantage ; say it outputs 1 more often on the former.
Predictor : pick a random , run , and output if says 1, else . Then
contradicting being hard-core.
∎
WarningWhy stretching even by one bit is remarkable
A deterministic algorithm creates a bit of (pseudo)randomness. That is impossible against unbounded observers. It is possible only because the observer is computationally bounded.
TheoremTheorem 6.20 — Any polynomial stretch
From with : let ; for set ; output . Output one bit and reseed with the other .
ProofThe hybrid argument
Hybrids: is truly random bits followed by bits generated from a fresh random seed. and is uniform.
Distinguisher for , given : pick ; output random bits, then ‘s last bit, then the generator’s output from seed ; run on the result.
- If , this is exactly .
- If is uniform, it is exactly .
The sum telescopes:
which is non-negligible: a contradiction.
∎
ImportantThe hybrid technique
Three ingredients: (1) the extreme hybrids are the two distributions to be compared; (2) neighbouring hybrids differ in one use of the primitive, so distinguishing them breaks it; (3) there are polynomially many hybrids, so the advantage drops only by a factor . Running on inputs it “doesn’t expect” is fine: it is just an algorithm.
NoteBlum–Micali generator and the stream-cipher analogy
Unrolling with and also outputting the final state gives the explicit PRG : iterate the permutation and emit a hard-core bit per step. Practical stream ciphers likewise keep a large secret internal state, output a few bits per step and update the state. The theory suggests this heuristic is sound.
Pseudorandom functions: the GGM construction
IntuitionFrom strings to functions via a tree
A random function on is a -bit table, too long to generate. For a 1-bit input, (halves of a length-doubling PRG) works directly. For 2 bits, apply twice: . The four leaves are pseudorandom (hybrid: replace by independent uniform seeds, then apply PRG security to each). Extend to depth .
AlgorithmGGM construction (Construction 6.21; Goldreich–Goldwasser–Micali)
With a length-doubling PRG:
A complete binary tree of depth has the root labelled and children of their parent. The input is a root-to-leaf path and the output is the leaf label. Evaluation costs PRG calls; the exponential tree is never built. Internal nodes must not be output: an internal label determines its whole subtree, so revealing it would break pseudorandomness.
TheoremTheorem 6.22 — GGM is a PRF
If is a length-doubling PRG, Construction 6.21 is an efficiently computable PRF.
ProofSketch: hybrids over tree levels, filled lazily
: levels have independent uniform labels and lower levels are computed by . is GGM and is a random function, so some neighbouring pair is distinguished with advantage at least .
The full level is exponential, so the reduction fills the tree lazily. It receives samples (one per possible query), each either for fresh seeds or uniform -bit strings. Picking a random , it labels the children of each newly reached level- node with the next sample, and answers repeated paths consistently. Pseudorandom samples give ; uniform samples give . Many samples of are jointly pseudorandom (multi-sample theorem below), contradicting PRG security.
∎
Pseudorandom permutations: Luby–Rackoff
TheoremTheorem 6.24 — Four-round Feistel with PRF round functions is a strong PRP
With independent keys for an -bit PRF , the 4-round Feistel network with round functions is a strong PRP on bits with a -bit key: efficiently computable, efficiently invertible (Claim 5.2), and indistinguishable from a random permutation even given the inverse oracle. Three rounds give a PRP secure against forward queries only. (Proof not given.) A beautiful link between practice (DES is Feistel) and theory.
ExampleWhy fewer rounds fail
- 1 round: the output’s left half equals , the input’s right half.
- 2 rounds: query and with the same right half. The left halves of the outputs satisfy , which holds with probability 1, versus for random.
- 3 rounds with an inverse oracle: there is a known distinguisher using a mix of forward and backward queries, which is why strong PRPs need 4.
(First two worked here.)
One-way functions are necessary and sufficient
TheoremTheorems 6.25–6.26 — Sufficiency
If one-way functions exist, then PRGs, PRFs and PRPs exist (HILL plus GGM plus Luby–Rackoff). Hence CCA-secure private-key encryption and existentially unforgeable MACs exist (Chapters 3–4).
TheoremProposition 6.27 — PRGs (and PRFs) imply one-way functions
PRFs give PRGs via . Given a length-doubling PRG , set . An inverter becomes a distinguisher: on input , run the inverter and output 1 iff it returns with .
- On : success .
- On uniform : is in ‘s range with probability at most , so success .
The advantage is non-negligible: a contradiction.
TheoremProposition 6.28 — EAV-secure encryption implies one-way functions
Perfectly secret schemes exist without assumptions (keys at least as long as messages), so the argument must use messages longer than keys. Define
ProofInverter ⇒ eavesdropper
: choose random of length , receive , run the inverter on . If it returns with , output 0; else guess at random.
- : the inverter succeeds with probability at least , so .
- : success requires some key with . By a union bound over keys and the independent uniform of bits, this has probability at most . So .
Overall , a non-negligible advantage. The bound needs plaintext longer than key; it fails for one-time-pad-like schemes.
∎
TheoremProposition 6.29 — Secure MACs imply one-way functions
Stated without proof. It is subtle because unconditionally secure MACs exist when the number of authenticated messages is bounded relative to the key length.
ImportantPrivate-key cryptography ⟺ one-way functions
One-way functions are necessary and sufficient for PRGs, PRFs, PRPs, secure private-key encryption and MACs: a single, minimal assumption. Public-key cryptography appears to need more: one-way functions are necessary but are not believed sufficient, with evidence that black-box constructions from them are unlikely (Impagliazzo–Rudich).
Computational indistinguishability
DefinitionEnsembles and computational indistinguishability (Defs. 6.30–6.31)
A probability ensemble is a sequence of distributions , one per security parameter (finite distributions alone would be trivially distinguishable by hard-wiring them). if for every ppt (given ),
NotePseudorandomness is a special case (Defs. 6.32–6.33)
- is pseudorandom if .
- A PRG is an expanding with pseudorandom.
- Likewise DDH is , and quadratic residuosity is “residues ≈ non-residues”, over non-numeric index sets.
- Computational indistinguishability is the computational relaxation of equal distributions, exactly as indistinguishable encryption relaxes perfect secrecy.
TheoremTheorem 6.34 — Many samples stay indistinguishable
If are efficiently samplable, then independent samples of are indistinguishable from samples of .
ProofHybrid over sample positions
, with and . , given one sample , picks a random , samples copies of and of itself (this is where efficient samplability is needed), and places at position . If it gets ; if , . Telescoping gives advantage . Example: is a pseudorandom -bit string, as used in the GGM proof.
∎
Quick reference
| Object | Statement | Note |
|---|---|---|
| Methodology | heuristic PRP + proven modes | low-level, replaceable, one heuristic |
| SPN | XOR subkey → S-boxes → mix, repeated | S-boxes must be bijective |
| Avalanche | ≥2-bit S-box change + spreading ⇒ bits after rounds | 7 rounds for 128 bits |
| Reduced SPN | 1 round: key from one pair; 2 rounds: ; 3 rounds: distinguisher | isolated key bits are fatal |
| Feistel | invertible for any | |
| DES | 16-round Feistel, 64-bit block, 56-bit key, + 6→4 S-boxes | well designed, key too short |
| Reduced DES | 1–2 rounds: candidates; 3 rounds: | halves of the key separate |
| DES brute force | (complementation) | Deep Crack: 56 hours |
| Diff. / linear | chosen / known | impractical against DES |
| Double encryption | meet in the middle: time and memory | double-DES unused |
| Triple encryption | EDE; 3 keys secure, 2 keys only weak to chosen queries | 3DES (64-bit block) |
| AES | SPN on bytes; 10/12/14 rounds | the default PRP |
| OWF | easy to compute, inverted with negligible probability on random input | factoring, subset sum, DLog |
| Hard-core | unpredictable from | no universal fixed predicate |
| Goldreich–Levin | hard-core for | pairwise sampling + Chebyshev |
| PRG from OWP | ; iterate for any stretch | Blum–Micali |
| Hybrid argument | extremes, neighbours, polynomially many | advantage |
| GGM | leaves only | |
| Luby–Rackoff | 4-round PRF Feistel = strong PRP; 3 rounds = PRP | |
| Minimality | OWF ⟺ PRG ⟺ PRF ⟺ private-key encryption and MACs | public key needs more |
| Indistinguishability | multi-sample via hybrids |
Facts to keep to hand
- Practical block ciphers are heuristic PRPs built from confusion and diffusion. SPNs (AES) need invertible S-boxes; Feistel networks (DES) don’t. Security comes from careful S-boxes, mixing, enough rounds for full avalanche, and inseparable key bits. Reduced-round attacks show exactly what fails without each.
- DES failed only on key length; the fixes are black-box. Its design withstood differential and linear cryptanalysis. Double encryption falls to meet-in-the-middle; 3DES works but is slow with small blocks; AES, chosen by open competition, is the standard.
- In theory, everything comes from one-way functions. Goldreich–Levin extracts a hard-core bit from any OWF, a one-way permutation plus that bit stretches by one, the hybrid argument stretches arbitrarily, GGM trees give PRFs, and four Feistel rounds give PRPs.
- And one-way functions are unavoidable. PRGs, eavesdropper-secure encryption with messages longer than keys, and MACs all imply OWFs, so OWFs are the minimal assumption for private-key cryptography. Computational indistinguishability and hybrid arguments are the common language of all these proofs.
References
- Katz & Lindell, Introduction to Modern Cryptography — Chapters 5–6
- Goldreich, Foundations of Cryptography, Vol. 1 (2001) — Chapters 2–3
- Goldreich & Levin, “A Hard-Core Predicate for All One-Way Functions” (1989)
- Luby & Rackoff, “How to Construct Pseudorandom Permutations from Pseudorandom Functions” (1988)
- Daemen & Rijmen, The Design of Rijndael (2002)
Mentioned in
- Block Cipher Attacks, PRF Constructions, and the Ideal Cipher Model
- Digital Signatures and Public-Key Infrastructure
- Message Authentication Codes and Hash Functions
- Number Theory for Cryptography
- Private-Key Encryption and Pseudorandomness
- Public-Key Encryption Schemes
- Stream Cipher Attacks and Case Studies