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:
What is the size of the key space for this cipher? (How many keys are possible?)
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 ....
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.
Given this result, is the cipher secure against brute force?
What information from the plaintext is preserved in the ciphertext?
Upload your answers in the class upload area. Remember to include your name.