7.7 Exercises

  1. Consider the following DES-like encryption method. Start with a message of 2n bits. Divide it into two blocks of length n (a left half and a right half): M0M1. The key K consists of k bits, for some integer k. There is a function f(K, M) that takes an input of k bits and n bits and gives an output of n bits. One round of encryption starts with a pair MjMj+1. The output is the pair Mj+1Mj+2, where

    Mj+2=Mjf(K, Mj+1).

    ( means XOR, which is addition mod 2 on each bit). This is done for m rounds, so the ciphertext is MmMm+1.

    1. If you have a machine that does the m-round encryption just described, how would you use the same machine to decrypt the ciphertext MmMm+1 (using the same key K)? Prove that your decryption method works.

    2. Suppose K has n bits and f(K, M)=KM, and suppose the encryption process consists of m=2 rounds. If you know only a ciphertext, can you deduce the plaintext and the key? If you know a ciphertext and the corresponding plaintext, can you deduce the key? Justify your answers.

    3. Suppose K has n bits and f(K, M)=KM, and suppose the encryption process consists of m=3 rounds. Why is this system not secure?

  2. Bud gets a budget 2-round Feistel system. It uses a 32-bit L, a 32-bit R, and a 32-bit key K. The function is f(R, K)=RK, with the same key for each round. Moreover, to avoid transmission errors, he always uses a 32-bit message M and lets L0=R0=M. Eve does not know Bud’s key, but she obtains the ciphertext for one of Bud’s encryptions. Describe how Eve can obtain the plaintext M and the key K.

  3. As described in Section 7.6, a way of storing passwords on a computer is to use DES with the password as the key to encrypt a fixed plaintext (usually 000 . . . 0). The ciphertext is then stored in the file. When you log in, the procedure is repeated and the ciphertexts are compared. Why is this method more secure than the similar-sounding method of using the password as the plaintext and using a fixed key (for example, 0000)?

  4. Nelson produces budget encryption machines for people who cannot afford a full-scale version of DES. The encryption consists of one round of a Feistel system. The plaintext has 64 bits and is divided into a left half L and a right half R. The encryption uses a function f(R) that takes an input string of 32 bits and outputs a string of 32 bits. (There is no key; anyone naive enough to buy this system should not be trusted to choose a key.) The left half of the ciphertext is C0=R and the right half is C1=Lf(R). Suppose Alice uses one of these machines to encrypt and send a message to Bob. Bob has an identical machine. How does he use the machine to decrypt the ciphertext he receives? Show that this decryption works (do not quote results about Feistel systems; you are essentially justifying that a special case works).

    1. Let K=111111 be the DES key consisting of all 1s. Show that if EK(P)=C, then EK(C)=P, so encryption twice with this key returns the plaintext. (Hint: The round keys are sampled from K. Decryption uses these keys in reverse order.)

    2. Find another key with the same property as K in part (a).

  5. Alice uses quadruple DES encryption. To save time, she chooses two keys, K1 and K2, and encrypts via c=EK1(EK1(EK2(EK2(m)))). One day, Alice chooses K1 to be the key of all 1s and K2 to be the key of all 0s. Eve is planning to do a meet-in-the-middle attack, but after examining a few plaintext–ciphertext pairs, she decides that she does not need to carry out this attack. Why? (Hint: Look at Exercise 5.)

  6. For a string of bits S, let S denote the complementary string obtained by changing all the 1s to 0s and all the 0s to 1s (equivalently, S=S11111). Show that if the DES key K encrypts P to C, then K encrypts P to C. (Hint: This has nothing to do with the structure of the S-boxes. To do the problem, just work through the encryption algorithm and show that the input to the S-boxes is the same for both encryptions. A key point is that the expansion of C is the complementary string for the expansion of C.)

  7. Suppose we modify the Feistel setup as follows. Divide the plaintext into three equal blocks: L0, M0, R0. Let the key for the ith round be Ki and let f be some function that produces the appropriate size output. The ith round of encryption is given by

    Li=Ri1, Mi=Li1, Ri=f(Ki, Ri1)Mi1.

    This continues for n rounds. Consider the decryption algorithm that starts with the ciphertext An, Bn, Cn and uses the algorithm

    Ai1=Bi, Bi1=f(Ki, Ai)Ci, Ci1=Ai.

    This continues for n rounds, down to A0, B0, C0. Show that Ai=Li, Bi=Mi, Ci=Ri for all i, so that the decryption algorithm returns the plaintext. (Remark: Note that the decryption algorithm is similar to the encryption algorithm, but cannot be implemented on the same machine as easily as in the case of the Feistel system.)

  8. Suppose EK(M) is the DES encryption of a message M using the key K. We showed in Exercise 7 that DES has the complementation property, namely that if y=EK(M) then y=EK(M), where M is the bit complement of M. That is, the bitwise complement of the key and the plaintext result in the bitwise complement of the DES ciphertext. Explain how an adversary can use this property in a brute force, chosen plaintext attack to reduce the expected number of keys that would be tried from 255 to 254. (Hint: Consider a chosen plaintext set of (M1, C1) and (M1, C2)).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.198.49