MATHEMATICS 139, Fall 2007: Final Examination

This is a take-home exam. Hand it in by the end of exam period, Wednesday December 19 at 9:45pm. When you nish you can leave it in my mailbox or put it under my door. You can take as much time as you need. You can use the texts, your notes, the handouts, your homework, etc. You cannot talk with anyone else about this exam (except me). You may also use Simon Singh’s Black Chamber at www.simonsingh.com/The Black Chamber/chamberguide.html. In particular this has a frequency counter. However remember that the accuracy of anything on the web is not guaranteed and if you use it you should also do the computations by hand. This is very important. Total number of points: 100.

1. (7 points) Barr p. 32, problem 2 (on the Atbash ). 2. (8 points) Barr p. 131, problem 7b (on area codes). 3. (20 points) These questions are about the knapsack cipher. Alice has superincreasing sequence 1 2 4 10 18 She choose the modulus p = 37 and multiplier m = 28. (a) Find the inverse of m mod 37. (b) What is her public sequence? (c) Bob sends her the following message: 43 (it’s just a number). Alice decodes this message. What does Alice get? (It will be a sequence of 0’s and 1’s.) 4. (15 points) These questions are about the I. (a1) Compute I for the abcd...xyz (the ). Does this number make sense in terms of the denition of I as a probability? (b) Same two questions for the ciphertext aaaa...aaa (26 a’s). (c) Same two questions for the ciphertext ababab...abab (13 a’s and 13 b’s).

1 2

5. (20 points) These questions are about double . For ex- ample, double (and triple) encryption are used in DES, especially for electronic transfer of funds. (See the wikipedia entry on “triple DES”. ) (a) Is double encryption using the shift cipher more powerful than just doing it once? More precisely, suppose that a plaintext is rst encrypted using a shift cipher, shifting by some number, and then the resulting ciphertext is encypted again using a shift cipher, but shifting by another number dierent from the rst. Is this stronger than using the shift cipher just once? Explain your answer. (b) Same question for the Vigenere cipher, where the rst and second keywords have dierent lengths. (c) Same question for a columnar , where the num- ber of columns in the rst encryption is dierent than the number of columns used in the second encryption. 6. (20 points) These questions are about the history of cryptology. (a) What was the fundamental weakness which lead to the cracking of the Enigma? (b) There is a simple analogue of the use of public cryptology for the exchange of keys. What is it? (c) What was Phil Zimmerman’s goal in developing PGP? (d) When was serious mathematics used in cryptology for the rst time, and by whom? 7. (10 points) Here’s a mystery cipher. Decrypt it. 153324 3454 164150145 511113 114424 3433