CS166
Chris Pollett
Sep. 10, 2012
Input 32 bits 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Output 32 bits 15 6 19 20 28 11 27 16 0 14 22 25 4 17 30 9 1 7 23 13 31 26 2 8 18 12 29 5 21 10 3 24
49 42 35 28 21 14 7 0 50 43 36 29 22 15 8 1 51 44 37 30 23 16 9 2 52 45 38 31
55 48 41 34 27 20 13 6 54 47 40 33 26 19 12 5 53 46 39 32 25 18 11 4 24 17 10 3
13 16 10 23 0 4 2 27 14 5 20 9 22 18 11 3 25 7 15 6 26 19 12 1
12 23 2 8 18 26 1 11 22 16 4 19 15 20 10 27 5 24 17 13 21 7 0 3
Which of the following is true?
We'll view it as a table lookup based on the two hex digits of the byte `a_(ij)`.
We now consider a few other block ciphers...
(K[0],K[1],K[2],K[3]) = 128 bit key; (L,R) = plaintext (64-bit block); delta = 0x9e3779b9; sum = 0; for (i = 1; i<=32; i++) { sum += delta; L += ((R<<4)+K[0]) ⊕ (R+sum) ⊕ ((R>>5)+K[1]); R += ((L<<4)+K[2]) ⊕ (L+sum) ⊕ ((L>>5)+K[3]); } ciphertext = (L,R);
(K[0],K[1],K[2],K[3]) = 128 bit key; (L,R) = ciphertext (64-bit block); delta = 0x9e3779b9; sum = delta << 5 for (i = 1; i<=32; i++) { R -= ((L<<4)+K[2]) ⊕ (L+sum) ⊕ ((L>>5)+K[3]); L -= ((R<<4)+K[0]) ⊕ (R+sum) ⊕ ((R>>5)+K[1]); sum -= delta; } plaintext = (L,R);