Encryption Homework

profilebarksq645
525_homework_2.pdf

Name______________________

525 Homework 2: Block ciphers

1. (2 pts) Recall that S-DES operates on a block size of 8 bits, producing a ciphertext that is also 8 bits long.

a. In this scenario, how many different ciphertexts are there?

b. How many different 8-bit block ciphers can there be?

2. (2 pts) Explain why it is impractical to use an ideal block cipher for real-world encryption.

3. (2 pts) To make a secure block cipher, why is diffusion not enough? That is, why is confusion also necessary?

4. (3 pts) Rewrite each bit string according to the given permutation.

a. 11110010 , P = (4, 1, 2, 7, 8, 5, 3, 6)

b. 01111101 , P = (5, 1, 7, 2, 8, 3)

c. 10101101 , P = (2, 5, 8, 5, 3, 1, 6, 6, 4, 7, 4, 2)

5. (3 pts) Below is a substitution table (S-box) expressed in octal (base-8, digits are 0-7). Note that it replaces two digits with one digit, cutting the size of the resultant string in

half:

0 1 2 3 4 5 6 7

0 4 5 0 3 6 7 1 2

1 0 3 6 1 5 2 7 4

2 5 4 1 2 3 6 0 7

3 6 2 4 0 7 1 3 5

4 7 1 2 6 0 5 4 3

5 1 7 3 5 4 0 2 6

6 3 0 5 7 2 4 6 1

7 2 6 7 4 1 3 5 0

Use the table to replace each of the following 8-digit values with 4-digit values, by using

the first digit of each pair to index the row and the second to index the column.

a. 24 52 15 67

b. 00 24 45 54

c. 37 73 65 01

6. (5 pts) Suppose we use S-DES to encrypt m = 10100101 with the key K = 0010010111. Give the values of K1, IP(m), and the output at the end of the first round, that is,

fK1(IP(m)). Show your work.