CS475 Lab 1: Analyze a Cipher

Due Monday, January 29, at 9:00 AM

The program alphabet.py in the class examples area defines an alphabet cipher, where each letter is replaced by a different letter. Produce a brief report that answers the following:
  1. What is the size of the key space for this cipher? (How many keys are possible?)
  2. Encrypt the program with itself, using a random key, and then decrypt it. When you decrypt it, use the time command to see how long it took. How long did it take? time works like this:
    time python alphabet.py ....
  3. Using the program described, how long would it take to complete a brute-force attack? Assume validating the solution takes no time at all. Validation could be performed by running the program, with the results reported to the user if the program runs without any errors.
  4. Given this result, is the cipher secure against brute force?
  5. What information from the plaintext is preserved in the ciphertext?
Upload your answers in the class upload area. Remember to include your name.