Assignment
Assignment
Assignment-1
1. An encryption scheme is formally dened by algorithms Gen, Enc and Dec as well as a message space M. Give formal specications of these components for the shift cipher, the substitution cipher, and the Vigenere cipher (for the latter, you may assume the key always has length ). 2. Consider an improved version of the Vigenere cipher, where instead of using multiple shift ciphers, multiple mono-alphabetic substitution ciphers are used. That is, the key consists of t random permutations of the alphabet, and the plaintext characters in positions i; t + i; 2t + i and so on are encrypted using the ith permutation. Show how to break this version of the cipher. 3. Perfect Secrecy of Historical Ciphers (a) Prove that if only a single character is encrypted, then the shift cipher is perfectly secret. (b) What is the largest plaintext space M you can nd for which the mono-alphabetic substitution cipher provides perfect secrecy? (Note: M need not contain only valid English words.) (c) Show how to use the Vigenere cipher to encrypt any word of length t so that perfect secrecy is obtained (Note: you can choose the length of the key). Prove your answer. 4. Prove that a private-key encryption scheme is perfectly secret if and only if it is perfectly indistinguishable. (Remember to prove both directions.) 5. Prove or refute: For every encryption scheme that is perfectly secret it holds that for every distribution over the message space M every m, m M and every c C Pr[M = m|C = c] = Pr[M = m |C = c] 6. Which of the following is/are negligible function(s)? Justify. 1 1 (A) 21 (B) (log n)! (C) (log log n)! (D) n
1 1010
(E) n n
7. Let f, g be negligible functions. Decide whether (a) H(n) = f (n) g(n) and (b) H(n) = f (n)/g(n) are necessarily negligible functions (for arbitrary f, g) or not. If it is, prove it. If not, give a counterexample. (2 1 = 2 marks) 8. Let f, g be length preserving one-way function (so, e.g., |f (x)| = |x|). For each of the following functions h, decide whether it is necessarily a one-way function (for arbitrary f, g) or not. If it is, prove it. If not, show a counterexample. 1-1
(a) h(x) = f (x) g(x). (b) h(x) = f (f (x)). (c) h(x1 x2 ) = f (x1 )
def def
def
(d) h(x1 , x2 ) = (f (x1 ), x2 ) where |x1 | = |x2 |. 9. Let G be a length-doubling pseudorandom generator. Prove that G is a one-way function.
1-2