26.10.2012 Views

Internet Security - Dang Thanh Binh's Page

Internet Security - Dang Thanh Binh's Page

Internet Security - Dang Thanh Binh's Page

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SYMMETRIC BLOCK CIPHERS 65<br />

Table 3.7 Permutation function P<br />

16 7 20 21<br />

29 12 28 17<br />

1 15 23 26<br />

5 18 31 10<br />

2 8 24 14<br />

32 27 3 9<br />

19 13 30 6<br />

22 11 4 25<br />

Table 3.8 Inverse of initial permutation, IP −1<br />

40 8 48 16 56 24 64 32<br />

39 7 47 15 55 23 63 31<br />

38 6 46 14 54 22 62 30<br />

37 5 45 13 53 21 61 29<br />

36 4 44 12 52 20 60 28<br />

35 3 43 11 51 19 59 27<br />

34 2 42 10 50 18 58 26<br />

33 1 41 9 49 17 57 25<br />

The output P(�i) are obtained from the input �i by taking the 16th bit of �i as the first<br />

bit of P(�i), the seventh bit as the second bit of P(�i), and so on until the 25th bit of �i<br />

is taken as the 32nd bit of P(�i). Finally, the permuted result is XORed with the left half<br />

Li of the initial permuted 64-bit block. Then the left and right halves are swapped and<br />

another round begins. The final permutation is the inverse of the initial permutation, and<br />

is described in Table 3.8 IP −1 . Note here that the left and right halves are not swapped<br />

after the last round of DES. Instead, the concatenated block R16||L16 is used as the input<br />

to the final permutation of Table 3.8 (IP −1 ). Thus, the overall structure for DES algorithm<br />

is shown in Figure 3.4.<br />

Example 3.2 Suppose the 64-bit plaintext is X = 3570e2f1ba4682c7, and the same key<br />

as used in Example 3.1, K = 581fbc94d3a452ea is assumed again. The first two-round<br />

keys are, respectively, K1 = 27a169e58dda and K2 = da91ddd76748.<br />

For the purpose of demonstration, the DES encryption aims to limit the first two<br />

rounds only. The plaintext X splits into two blocks (L0,R0) using Table 3.4 IP such that<br />

L0 = ae1ba189 and R0 = dc1f10f4.<br />

The 32-bit R0 is expanded to the 48-biy E(R0) such that E(R0) = 6f80fe8a17a9.<br />

The key-dependent function Ɣi is computed by XORing E(R0) with the first round key<br />

K1, such that<br />

Ɣ1 = E(R0) ⊕ K1<br />

= 4821976f9a73

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!