## CS 167 - Cryptography Homework 1, 50 Points Due: Friday, January 18, 2008

1. What is the ciphertext for ATTACKATDAWN using a shift cipher with shift key k=5?
2. ROT13 is a simple shift cipher for English text such that when it is applied twice it returns the original plaintext. Argue why there is no single shift cipher for English text such that when it is applied three times it returns the original plaintext. Give an example of a simple shift cipher for English other than ROT13 such that when it is applied some number m < 26 times it returns the original plaintext. What is the value of m in this case?
3. The 4th century Indian text, Kama Sutra, proposes, among other things, a method for secret writing where each letter is paired with another and each occurrence of a letter in a document is replaced by its mate. For example, we could pair (A,V), (B,N), (C,E), (D,F), (E,C), (F,D), and so on, so that every "A" is replaced by "V" and every "V" is replaced by "A", every "B" is replaced by "N" and every "N" is replaced by "B", etc.
1. Give an example encryption using a Kama Sutra cipher.
2. How many possible keys are there for the Kama Sutra cipher?
3. What is the security of the Kama Sutra cipher with respect to the four kinds of attacks that can be done on a cryptosystem?
4. Suppose Eve has learned that Bob is using an Affine cipher, and she has been able to apply a known-plaintext attack to learn that the plaintext ``ADOG'' has ``FLHR'' as its ciphertext. What is Bob's key?
5. Suppose Eve has learned that Bob is using a Vigenere cipher with keyword length m < 12, and she has been able to apply a chosen-plaintext attack to learn that the plaintext ``AAAAAAAA'' has ``BCDEBCDE'' as its ciphertext. What are the possible values for m?