Linear Cryptanalysis
1. Core Idea: Linear Approximations with Bias
Linear cryptanalysis (Matsui, 1993) is a known-plaintext attack: find linear equations that hold with probability $p
e 1/2\epsilon = |p - 1/2|\epsilon = 0$; S-box nonlinearity leaves small biases attackers amplify. Needs only known (not chosen) plaintext — weaker attacker assumption than differential, but far more data.
2. Piling-Up Lemma (Worked)
Combine approximations: bias of XOR of independent approximations:
Worked: S-box approximations with biases , , : combined . Data needed (Matsui's rule: pairs): here known plaintexts. Each added round multiplies biases (shrinking fast) — same exponential-rounds defense as differential.
S-box linear table logic: for S-DES , mask relation over inner products: count agreements over 16 inputs; . Best nonzero entry per S-box is its linear strength; DES S-boxes keep max bias -ish per box.
3. Matsui's Algorithm 1 and 2 (Key Recovery)
- Algorithm 1 (key-bit decision): use -round approximation with bias : count agreements over known pairs; if agreements , key-XOR sum , else . Success rate from normal approximation: gives .
- Algorithm 2 (key extraction): peel last round — for each candidate last-subkey, partially decrypt and measure bias of the approximation; right key shows , wrong keys . Recovers 26 key bits of DES with known plaintexts; remaining 30 by brute force → total data + work (1994 experiment: 50 days).
- DES full-16 needs known pairs ( TB) — impractical; 8-round DES needs only .
4. Differential vs Linear (Exam Table)
| Point | Differential (Topic 5) | Linear (this topic) |
|---|---|---|
| Plaintext | Chosen pairs with fixed | Known (arbitrary) pairs |
| Signal | S-box difference non-uniformity, prob | Linear-approximation bias |
| Combiner | (Piling-Up) | |
| Data | ||
| DES-16 cost | chosen | known (Matsui experiment) |
| Designer defense | Low max differential prob + rounds | Low max linear bias + rounds (wide trail bounds both) |
AES: max S-box bias with branch number 5 → 4-round bias , data — immune.
Exam Points
- Bias definition + Piling-Up formula with worked combiner — 5-mark numerical core.
- rule + Matsui Algorithm 1 majority logic.
- Known-vs-chosen distinction + full table differential-vs-linear — guaranteed 5-marker.
- DES numbers ( known, 50-day experiment) vs AES immunity line.