11.07.2015 Views

Cryptography - Sage

Cryptography - Sage

Cryptography - Sage

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Deciphering. Suppose we begin with C = R r R r−1 = R ′ −1R ′ 0, and a reversed key sequenceK ′ 1, K ′ 2 . . . , K ′ r = K r , K r−1 . . . , K 1 . The deciphering follows the same algorithm asenciphering with respect to this key sequence:R ′ j+1 = R ′ j−1 ⊕ f K ′j+1(R ′ j). (5.2)Setting j = r − i − 1, we have K ′ j+1 = K ′ r−i = K i+1 . We moreover want to show therelationsR ′ −1 = R r , R ′ 0 = R r−1 , . . . , R ′ r−1 = R 0 , R ′ r = R −1 .In other words, we want to show that R ′ j = R i whenever i + j = r − 1.Clearly this relation holds for (i, j) = (r, −1) and (i, j) = (r − 1, 0). Assuming it holdsfor j − 1 and j we prove that it holds for j + 1. The deciphering sequence (5.2) can bereplaced byR ′ j+1 = R ′ j−1 ⊕ f K ′j+1(R ′ j) = R ′ r−i−2 ⊕ f K ′r−i(R ′ r−i−1) = R i+1 ⊕ f Ki+1 (R i )The expression R i+1 = R i−1 ⊕f Ki+1 (R i ) in (5.2) can be rearranged by adding (= substracting)f Ki+1 (R i ) to both sides to get R i+1 ⊕f Ki+1 (R i ) = R i−1 . We conclude that R ′ j+1 = R i−1 ,so the equality holds by induction.Example 5.1 (Feistel cipher) Let f Kicomposition of the following maps:be the block cipher, of block length 4, which is the1. The transposition cipher T = [4, 2, 1, 3]; followed by2. A bit-sum with the 4-bit key K i ; followed by3. A substitution cipher S applied to the 2-bit blocksS(00) = 10, S(10) = 01, S(01) = 11, S(11) = 00,i.e. b 1 b 2 b 3 b 4 ↦→ S(b 1 b 2 )S(b 3 b 4 ).Let C be the 3-round Feistel cryptosystem of key length 12, where the three internal keysK 1 , K 2 , K 3 are the first, second, and third parts of the input key K, and the round functionis f Ki .Exercise. Compute the enciphering of the text M = 11010100, using the key K =001011110011.Feistel ciphers 39

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

Saved successfully!

Ooh no, something went wrong!