Survey

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Survey

Document related concepts

no text concepts found

Transcript

Homework 3 Questions 1. Describe how you would conduct a chosen plaintext attack against an affine cipher. I remind you that the goal of the attack is to find the e-key, which is the pair of numbers (, ). 2. How many keys are possible in the affine crypto system? ( I remind you that in this system x is encoded by x + (mod 26).) Justify your answer. 3. Alice and Bob are using the one-time pad cryptosystem. Suppose that the plaintext is 10110101110 and the ciphertext is 00010110111. What is the key? 4. One reasonable idea for enhancing the security of a cryptosystem is to use double encryption. Thus Alice first encrypts the message m getting c1 and then she encrypts c1 obtaining c2 which she sends to Bob. Suppose Alice is doing this using the Hill cipher. Is double encryption (with the Hill cipher) any safer than simple encryption? Say ‘yes’ or ‘no’ and justify your answer. 5. Suppose that in the “Baby DES” cryptosystem we have been able to determine that the first 4 bits of K_3 are either 1100 or 0101 and the last 4 bits of K_3 are 1110. List all the possibilities for K. 6. Alice is sending a DES encrypted message to Bob, and one bit in block C15 is corrupted during the transfer over the network (all the other ciphertext blocks are correct). What blocks of the plaintext will be garbled when Bob is doing the decryption and how many bits will be affected if a. Alice is using the ECB mode. b. Alice is using CBC. c. Alice is using CFB, 8-bit variant. 7. Alice wants to use quad-DES by doing four DES encryptions with two keys K1 and K2 using the formula C = E K1 (E K1 (E K2 (E K2 (P)))). Describe briefly how Eve can mount an efficient attack of the type “known plaintext.” Suppose Eve can do 256 simple DES encryptions/decryptions in about 20 minutes and also assume that doing double DES encryptions/decryptions takes two times the time for single DES encryption/decryption. How long it will take to Eve to break the new scheme proposed by Alice (ignoring the time for all other operations except DES encryptions/decryptions)? Justify briefly. 8. We are analyzing the security of the substitution cryptosystem, denoted as usual EK. (K is the key, which in the case of the substitution cryptosystem is a table indicating how each letter is substituted). Suppose the message space M consists of all possible combinations of two letters from the English alphabet, in other words M = {aa, ab, ac, …, zz}, and each message from M is equally likely to be sent by Alice. (a) What is Prob (M= ‘aa’)? (here M is a randomly chosen message from M). (b) What is Prob (M = ‘aa’| EK(M) = ‘bc’)? (Here M is a randomly chosen message from M, and K is a randomly chosen key). (c) What do (a) and (b) say about the security of the substitution cryptosystem? More precisely, is it perfectly secure (according to the formal definition discussed in class)? 9. The alphabet of a certain language has only the 5 letters (0,1,2,3,4). Suppose the message `42’ is encrypted with an affine cipher and the ciphertext is `12’. (a) Find the key. (b) The ciphertext 3124 has been obtained using the key from (a). Find the corresponding plaintext. . 10. We encrypt with double Vigenere using for the first encryption the key k_1 = (1,3,5,7) and for the second encryption the key k_2 = (2,4). Show that this is equivalent to simple Vigenere encryption, and find the key for the single Vigenere encryption that is equivalent with double Vigenere encryption with the above keys k_1 and k_2. 11. The plaintext `friday’ is encrypted using the Hill cipher with m=2 to give the ciphertext `PQCFKU’. Find the the key K. (It is acceptable to write the key K as a product of two matrices without performing the multiplication or taking the inverse.) 12. Suppose that you are informed that the plaintext `abccab’ has been encrypted with the Vigenere cipher and the corresponding ciphertext is `bbccab’. What is the key length? 13. The alphabet is {0,1,2,3,4}. The Hill cipher is used with m=2, and the key is the 2-by-2 matrix K = (4 1) (3 1) Encrypt the message `1 2 3 4’. 14. Apply one round of the Feistel structure to the string P = 1111 1010 and the key K = 0110, where the function f is defined by f (R,K) = R + K (+ is bitwise XOR).