Comp 3704
Introduction to Cryptography
Homework 4
Due Tuesday, February 4, 2003
  1. How many keys are there for a permutation cipher with blocks n characters long?
  2. Do problem 1.26 from the text. Note that part (b) is asking you to cryptanalyze - you must determine the size of the block and the size of matrix by trial and error. The text may be encrypted as multiple blocks.
  3. Do problem 1.28 from the text (cryptanalyzing a text that was encrypted with the autokey cipher)
  4. Using a linear feedback stream cipher with m=4, a key c = (1, 0, 0, 1) and k=(1, 1, 1, 1), encrypt the plaintext 10101110 and decrypt the ciphertext 11010111.
  5. This problem shows a nice example of calculating conditional probabilities and using Bayes Theorem. It has to do with testing for HIV. Say that an HIV test has a sensitivity of 99.9% and a specificity of 99.6%. In other words, if a person IS HIV positive, the the probability of the test (correctly) giving a positive result is 99.9%, and if the person does NOT have HIV, then the probability of the test (correctly) reporting a negative result is 99.6%. Suppose also that there are about 400,000 people in the US that are HIV positive, and the population of the US is about 290 million. Answer these questions: What is the probability that a person chosen at random is HIV positive? What is the probability that a person tested at random will test positive? If a person chosen at random is tested and the test comes back positive, what is the (conditional) probability that they have the disease?
  6. Do problem 2.1 from the text.
  7. Do either problem 2.2 or problem 2.3a from the text.
  8. Extra credit: any of problems 2.3b, 2.4 or 2.5 from the text.
FYI: There remain many interesting problems in the chapter, which you can look at and discuss with me if you're interested. Problem 1.21a asks you to cryptanalyze a substitution cipher. Problem 1.21d asks you to decode a passage without telling you what encryption algorithm was used. Problem 1.24 discusses the Affine-Hill cipher I mentioned in class. Problem 1.25 shows how you might go about cryptanalyzing the Hill Cipher if all you have is ciphertext. Problem 1.29 discusses a stream cipher like the Vigenere cipher, but with a key that rotates with each use. (Notice that it is still a synchronous and periodic stream, but with a much larger period.)