SecSIGSecurity Special Interest Group of US MensaCuriosity. Perspective. Security.

Research Library · Idea

Piling-up lemma

The piling-up lemma gives the probability that an XOR of independent binary random variables equals zero. If X1, ..., Xn are independent and each Xi is 0 with probability pi, then the probability that X1 XOR ... XOR Xn = 0 is 1/2 + 2^(n-1) times the product of the terms (pi - 1/2). Mitsuru Matsui stated it under that name as Lemma 3 of his 1993 paper introducing linear cryptanalysis of DES. 1 Writing each bias as ei = pi - 1/2, the bias of the XOR is 2^(n-1) e1 e2 ... en. If any one variable is unbiased, the XOR is unbiased. 2

In linear cryptanalysis the lemma combines linear approximations of individual S-boxes into an approximation across several rounds, with the intermediate bits cancelling. Matsui's worked example combines four approximations into a five-round DES relation that holds with probability 1/2 + 2^3(-10/64)^2(-20/64)^2, about 0.519. He concludes that about 2800 known plaintexts determine the corresponding key bits with 97.7% success. 1 Howard Heys applies it to a toy 16-bit cipher, where four S-box approximations with biases of magnitude 1/4 give an overall bias of -1/32. His experiment measured a bias of 0.0336, close to the expected 1/32 in magnitude. 2

The lemma's hypothesis of independence does not hold exactly inside a cipher. Heys notes that S-box approximations are not independent, which can significantly affect the computed probability. Several sets of active S-boxes with the same plaintext and last-round bits can also combine into a linear hull with a higher bias than any one set predicts. He adds that the method works well for many ciphers because independence is a reasonable approximation and a single strong approximation tends to dominate the hull. 2 For this reason he cautions that "proofs" of resistance built on the best single approximation rest on these assumptions. 2

Source · Linear Cryptanalysis Method for DES Cipher (Mitsuru Matsui) (opens in a new tab) · Springer

References

  1. Linear Cryptanalysis Method for DES Cipher (Mitsuru Matsui) (opens in a new tab) · Springer · EUROCRYPT 1993, LNCS 765, pp. 386-397. ↩ ↩
  2. A Tutorial on Linear and Differential Cryptanalysis (Howard M. Heys) (opens in a new tab) · Memorial University of Newfoundland ↩ ↩ ↩ ↩

Research articles

See what connects to it on the map of ideas →

See also