HOME

TheInfoList



OR:

In cryptanalysis, the piling-up lemma is a principle used in
linear cryptanalysis In cryptography, linear cryptanalysis is a general form of cryptanalysis based on finding affine approximations to the action of a cipher. Attacks have been developed for block ciphers and stream ciphers. Linear cryptanalysis is one of the two ...
to construct linear approximations to the action of
block cipher In cryptography, a block cipher is a deterministic algorithm operating on fixed-length groups of bits, called ''blocks''. Block ciphers are specified cryptographic primitive, elementary components in the design of many cryptographic protocols and ...
s. It was introduced by Mitsuru Matsui (1993) as an analytical tool for linear cryptanalysis. The lemma states that the bias (deviation of the
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a ...
from 1/2) of a linear Boolean function (XOR-clause) of
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independe ...
binary random variables is related to the product of the input biases: :\epsilon(X_1\oplus X_2\oplus\cdots\oplus X_n)=2^\prod_^n \epsilon(X_i) or :I(X_1\oplus X_2\oplus\cdots\oplus X_n ) =\prod_^n I(X_i) where \epsilon \in \tfrac, \tfrac/math> is the bias (towards zero) and I \in 1, 1/math> the ''imbalance'': :\epsilon(X) = P(X=0) - \frac :I(X) = P(X=0) - P(X=1) = 2 \epsilon(X). Conversely, if the lemma does not hold, then the input variables are not independent.


Interpretation

The lemma implies that XOR-ing independent binary variables always reduces the bias (or at least does not increase it); moreover, the output is unbiased if and only if there is at least one unbiased input variable. Note that for two variables the quantity I(X \oplus Y) is a
correlation In statistics, correlation or dependence is any statistical relationship, whether causal or not, between two random variables or bivariate data. Although in the broadest sense, "correlation" may indicate any type of association, in statisti ...
measure of X and Y, equal to P(X=Y)-P(X\ne Y); I(X) can be interpreted as the correlation of X with 0.


Expected value formulation

The piling-up lemma can be expressed more naturally when the random variables take values in \. If we introduce variables \chi_i = 1 - 2X_i = (-1)^ (mapping 0 to 1 and 1 to -1) then, by inspection, the XOR-operation transforms to a product: :\chi_1\chi_2\cdots\chi_n = 1 - 2(X_1 \oplus X_2\oplus\cdots\oplus X_n) = (-1)^ and since the expected values are the imbalances, E(\chi_i)=I(X_i), the lemma now states: :E\left(\prod_^n \chi_i \right)=\prod_^nE(\chi_i) which is a known property of the expected value for independent variables. For dependent variables the above formulation gains a (positive or negative)
covariance In probability theory and statistics, covariance is a measure of the joint variability of two random variables. If the greater values of one variable mainly correspond with the greater values of the other variable, and the same holds for the le ...
term, thus the lemma does not hold. In fact, since two Bernoulli variables are independent if and only if they are uncorrelated (i.e. have zero covariance; see uncorrelatedness), we have the converse of the piling up lemma: if it does not hold, the variables are not independent (uncorrelated).


Boolean derivation

The piling-up lemma allows the cryptanalyst to determine the
probability Probability is the branch of mathematics concerning numerical descriptions of how likely an Event (probability theory), event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and ...
that the equality: :X_1\oplus X_2\oplus\cdots\oplus X_n=0 holds, where the ''X''s are
binary variable Binary data is data whose unit can take on only two possible states. These are often labelled as 0 and 1 in accordance with the binary numeral system and Boolean algebra. Binary data occurs in many different technical and scientific fields, wher ...
s (that is, bits: either 0 or 1). Let ''P''(A) denote "the probability that A is true". If it equals
one 1 (one, unit, unity) is a number representing a single or the only entity. 1 is also a numerical digit and represents a single unit of counting or measurement. For example, a line segment of ''unit length'' is a line segment of length 1. I ...
, A is certain to happen, and if it equals zero, A cannot happen. First of all, we consider the piling-up lemma for two binary variables, where P(X_1 = 0)=p_1 and P(X_2 = 0)=p_2. Now, we consider: :P(X_1 \oplus X_2 = 0) Due to the properties of the xor operation, this is equivalent to :P(X_1=X_2) ''X''1 = ''X''2 = 0 and ''X''1 = ''X''2 = 1 are
mutually exclusive events In logic and probability theory, two events (or propositions) are mutually exclusive or disjoint if they cannot both occur at the same time. A clear example is the set of outcomes of a single coin toss, which can result in either heads or tails ...
, so we can say :P(X_1=X_2)=P(X_1=X_2=0) + P(X_1=X_2=1)=P(X_1=0, X_2=0) + P(X_1=1, X_2=1) Now, we must make the central assumption of the piling-up lemma: the binary variables we are dealing with are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independe ...
; that is, the state of one has no effect on the state of any of the others. Thus we can expand the probability function as follows: : Now we express the probabilities ''p''1 and ''p''2 as ½ + ε1 and ½ + ε2, where the ε's are the probability biases — the amount the probability deviates from ½. : Thus the probability bias ε1,2 for the XOR sum above is 2ε1ε2. This formula can be extended to more ''X''s as follows: :P(X_1\oplus X_2\oplus\cdots\oplus X_n=0)=1/2+2^\prod_^n \epsilon_i Note that if any of the ε's is zero; that is, one of the binary variables is unbiased, the entire probability function will be unbiased — equal to ½. A related slightly different definition of the bias is \epsilon_i = P(X_i=1) - P(X_i=0), in fact minus two times the previous value. The advantage is that now with :\varepsilon_= P(X_1\oplus X_2\oplus\cdots\oplus X_n=1)- P(X_1\oplus X_2\oplus\cdots\oplus X_n=0) we have :\varepsilon_=(-1)^\prod_^n \varepsilon_i, adding random variables amounts to multiplying their (2nd definition) biases.


Practice

In practice, the ''X''s are approximations to the S-boxes (substitution components) of block ciphers. Typically, ''X'' values are inputs to the S-box and ''Y'' values are the corresponding outputs. By simply looking at the S-boxes, the cryptanalyst can tell what the probability biases are. The trick is to find combinations of input and output values that have probabilities of zero or one. The closer the approximation is to zero or one, the more helpful the approximation is in linear cryptanalysis. However, in practice, the binary variables are not independent, as is assumed in the derivation of the piling-up lemma. This consideration has to be kept in mind when applying the lemma; it is not an automatic cryptanalysis formula.


See also

*
Variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of number ...
of a sum of independent real variables


References

{{Cryptography navbox , block Cryptographic attacks Lemmas