Block Ciphers · Cryptography and Network Security

Differential Cryptanalysis

Watch lectures

Differential Cryptanalysis

1. Core Idea: Track XOR Differences, Not Values

Differential cryptanalysis (Biham–Shamir, 1990) is a chosen-plaintext attack: feed pairs (P,P′)(P, P') with fixed input difference ΔP=P⊕P′\Delta P = P \oplus P' and study output difference ΔC=C⊕C′\Delta C = C \oplus C'. Key insight: XOR differences propagate through linear parts (E, P, XOR-key cancel!) deterministically, and through S-boxes probabilistically — key bits cancel since (X⊕K)⊕(X′⊕K)=X⊕X′(X \oplus K) \oplus (X' \oplus K) = X \oplus X'.

ΔP → [E] → ΔE (deterministic) → XOR K cancels → S-box → ΔS with prob p
   → [P] → next round Δ (deterministic) → ... → ΔC with prob p1·p2·...

2. S-Box Difference Table (Worked Mini-Example)

For S-DES S0S0, input difference Δin=0001\Delta_{in} = 0001: try all 16 inputs XX, compute S(X)⊕S(X⊕0001)S(X) \oplus S(X \oplus 0001): output Δ=00\Delta = 00 occurs 4/16, Δ=01\Delta = 01 occurs 2/16, etc. — non-uniform! A uniform (ideal) S-box would give each Δ\Delta exactly 4/16. Entries like P(Δout=00∣Δin=0001)=4/16=1/4P(\Delta_{out} = 00 | \Delta_{in} = 0001) = 4/16 = 1/4 are the signal. DES S-boxes were secretly designed to minimize max differential probability (≤1/4\le 1/4-ish) — the classified criteria.

Toy trace: 2-round cipher, characteristic ΔP=00001000→ΔC=0100\Delta P = 00001000 \to \Delta C = 0100 with p=3/8p = 3/8: send ≈4/p=11\approx 4/p = 11 pairs (rule: c/pc/p pairs for signal); majority-vote ΔC\Delta C confirms characteristic; then guess last-round subkey bits: only the key making observed pairs fit the characteristic survives filtering.

3. Characteristics, Rounds, and Key Recovery

  • Chain single-round differentials into an (r−1)(r-1)-round characteristic with probability P=∏piP = \prod p_i (independence assumption, roughly holds).
  • Attack rr-round cipher: use characteristic over first r−1r-1 rounds, then peel the last round: for each candidate last-subkey, partially decrypt ΔC\Delta C one round and check the characteristic's predicted value — wrong keys randomize, right key scores ≈P\approx P.
  • Data needed ≈c/P\approx c/P chosen pairs; PP decays exponentially in rounds — hence round count is the defense.

4. Differential vs DES/AES (Numbers to Quote)

Cipher Best characteristic PP Data needed Verdict
8-round DES ≈2−20\approx 2^{-20} ≈221\approx 2^{21} pairs — practical break Reduced DES falls
15-round DES ≈2−47\approx 2^{-47} ≈247\approx 2^{47} chosen plaintexts Worse than 2552^{55} brute force? Comparable — resists
Full 16-round DES ≈2−55\approx 2^{-55}–2−602^{-60} ≥\ge brute force Practically secure vs differential
AES-128 provably ≤2−150\le 2^{-150} (4+ rounds, wide trail) utterly infeasible Immune by design (Wide Trail Strategy)

AES's Wide Trail (Rijndael designers, also differential pioneers) bounds every 4-round differential below 2−1502^{-150} — differential attack needs more than the codebook. Design lesson: S-box max differential probability × branch number × rounds = security margin.

Exam Points

  • Difference-propagation diagram + key-cancellation line — 2-mark opener.
  • S-box non-uniformity + c/Pc/P data rule with toy numbers — 5-mark core.
  • Last-round peeling logic (right key scores PP, wrong keys random) — favourite 2–3 marker.
  • Table: 8-round practical vs 16-round infeasible vs AES bound.
Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.

← All Cryptography and Network Security modules