• Ingen resultater fundet

5.4 Analysis of the Key Schedules

6.1.5 Linear cryptanalysis

In this section we examine the DES for the iterative linear characteristics described in Section 5.3. We will use the same notation as given in [64].

Definition 6.1.1 (DES) For a given S-box Si, i = 1, . . . ,8, α GF(2)6 and β ∈GF(2)4 define

N Si(α, β) = #{x∈GF(2)6, x·α =Si(x)·β} (6.2) where ‘·’ denotes the dot product.

In the following we refer to the figures in Section 5.3 and denote by Xi be the right half of the ciphertext afteri rounds of encryption, i.e.,Xi is the input to the F-function in the (i+ 1)’th round. X0 denotes the right half of the plaintext input to the linear characteristic. Also for every round let us fix a key k and for convenience let F(X) denote F(X, k).

118 CHAPTER 6. ANALYSIS OF SPECIFIC BLOCK CIPHERS 2-round iterative characteristics

For this type of characteristic we consider the following expression

maxα|PrX(F(X)·α = 0)1/2| (6.3) One S-box of the DES is a balanced function, therefore (6.3) is zero for all Q only affecting one S-box. In [65] equation (6.3) was examined for two neigh-bouring S-boxes. The best expression uses the following two approximations,

N S7(3x, fx) andN S8(30x, dx)

which combined give a probability of 0.453. Since the input bits to the two S-boxes are shared combining the two expressions will cancel out all input bits and leave only output and key bits. It is the best linear approximation of the type (6.3). Also one can look for the following expressions with three neighbouring S-boxes involved.

N Si(2x,∗), N Si+1(23x,∗) andN Si+2(30x,∗) N Si(3x,∗), N Si+1(33x,∗) andN Si+2(30x,∗) N Si(3x,∗), N Si+1(31x,∗) andN Si+2(10x,∗)

where ‘’ denotes the any of the 16 possible values. When combined each of these three expressions will leave only output and key bits in the linear expression. For the DES the best one of these is of the third type,

N S1(3x,9x)N S2(31x, bx) andN S3(10x, bx) with a probability of 0.488.

3-round iterative characteristics

For this type of characteristic we consider the following expression

maxα,β(|PrX1(F(X1)·α =X1·β)−1/2| × |PrX2(F(X2)·β =X2·α)−1/2|) (6.4) This kind of characteristic has not been reported by Matsui. However, they exist for the DES with only one active S-box per round. The best one is N S7(4x,8x) and N S8(2x,4), with a probability of 1/228. Extended to a 14 round characteristic, one obtains a probability of 1/2232.

6.1. DES 119 4-round iterative characteristics

As noted in Section 5.3 this is the type of characteristic used by Matsui in the attack on 16-round DES [64, 65, 66]. For this type of characteristic we consider the following expression

maxα,β|PrX(X4·β =X0·α)−1/2|2 (6.5) where (see also Figure 5.9, page 88)

|PrX(X4·β=X−0·α)−1/2|2

=|p4R1/2|2

= 42×

A

|p1(A)1/2|2× |p2(A)1/2|2× |p3(A)1/2|2 and where

p1(A) = PrX1(X1·A=F(X1)·α) p2(A) = PrX2(X2·⊕β) =F(X2)·A) p3(A) = PrX3(X3·A=F(X3)·β) For one value of A one obtains the best probability using

N S5(10x, ex), N S1(4x,4x) and N S5(10x, fx)

in the second, third and fourth rounds respectively, where the 32 bit quanti-ties are A = 00008000, α = 01040080x and β = 21040080x. The probability is 0.506 [64]. However, there is another value of A for the same values of α and β, namely A = 00008800, where the combinations are N S5(11x, ex) in the second round, N S8(03x,1x) and N S1(34x,4x) in the third round and N S5(11x, fx) in the fourth round. The probability is 1/2215. For the 4 round iterative characteristic with α = 01040080x and β = 21040080x

|PrX(X4·β =X0·α)−1/2|2 42×(|0.006|2+|215|2)16× |0.006|2 (6.6) It is seen that the improvement is hardly measurable. However, “many a little makes a mickle” and in the coming section we illustrate that for longer characteristics the improvement is bigger.

120 CHAPTER 6. ANALYSIS OF SPECIFIC BLOCK CIPHERS

Table 6.9: 4 round iterative linear characteristics.

Longer characteristics

As noted earlier calculating the probabilities of linearr-round characteristics for large r, r > 4, is a difficult task. We end this section by giving some other linear characteristics for the DES, for which the bits of the plaintext and ciphertext are the same as for Matsui’s 14 round linear characteristic used in his attack on 16 round DES [65, 66]. Matsui counts on key bits in the first and last rounds, so we consider the characteristic starting in the second round, where we assume that we know the bitX1·α, whereX1 is the right half of the ciphertext after one round of encryption andα= 01040080x. The characteristic ends in the fifteenth round with knowledge about the bit X15·β, where β = 21040080x. Let Li denote the four round characteristic obtained from Li by interchanging the rounds number two and four. Mat-sui’s characteristic is the concatenation ofL1,L1, L1, one round without any approximation and one round with the combination N S5(10x, fx). Totally this characteristic has a probability, pL, s.t. |pL1/2|2 242.97. In Table 6.9 we have listed some other 4 round iterative linear characteristics, that can replace L1 in a 14 round characteristic. As also explained above L2 can re-placeL1 directly, since for four rounds exactly the same bits of the plaintext and ciphertext are affected. The concatenation L3, L3 can replace L1, L1. This holds also forL5, L5. The concatenationL4, L4 can replaceL1, L1. This holds also for L6, L6. Totally this gives us eight paths fromX1·α toX15·β,

6.1. DES 121 yielding

|PrX(X1·α=X15·β)−1/2|2 242.96.

This is only slightly higher than for the best single characteristic.

We found other characteristics like the ones in Table 6.9, however with even smaller probabilities. We looked only for other 4-round iterative char-acteristics. By examining also n-round characteristics, n > 4, one might get other interesting results. Since Matsui’s expression involves at most one S-box for each round and optimises the use of the best one-round expression, with probability 5264 it is doubtful that the probability of his characteristic will be higher than the above estimate.

Probabilities of iterative characteristics

In Section 6.1.1 we showed that the probabilities of characteristics in differ-ential attacks varies, when neighbouring S-boxes are considered. One S-box in the DES take a 6 bit text input and a 6 bit key input. Two neighbouring S-boxes in the DES share two input text bits and take a 10 bit text input and a 12 bit key input. Also in linear characteristics the probabilities of ap-proximations involving neighbouring S-boxes varies depending on the actual values of the four key bits, that affect the shared text bits for two S-boxes.

Example 6.1.4 Consider L2 from Table 6.9. In the second round we use N S8(03x,1x), N S1(34x,4x)

When the two approximations are calculated separately the probability, |pL 1/2| is 2× 642××464 28 using the Piling-Up Lemma. However, if the sixth key bit of S8 and the second key bit of S1 are equal the exact probability,

|pL1/2|is 10246 27.42 and when they are different,|pL1/2|is 10242 29. This splitting of the probability does not seem to have the same importance in linear cryptanalysis on the DES as in differential cryptanalysis on DES.

Whether the phenomenon can be used to find good linear approximation, where neighbouring S-boxes in some rounds are considered, is left as an open problem.

122 CHAPTER 6. ANALYSIS OF SPECIFIC BLOCK CIPHERS