This project is an introduction to encryption and decryption through subtitution ciphers. (Shift ciphers, affine ciphers, random substitutions) The first two exerises are required. The Challenge Exercises are provided for students who would like more of a challenge than the required exercises provide. If there are questions on them, please ask. You may work on this project in teams of 2 or individually. Programs should be written in Python and submitted on Kit.

  1. Extension of code from "Practical Cryptography": Modify your shift cipher so that you can encrypt and decrypt with an affine cipher. The program should take 2 inputs for the cipher instead of 1.
  2. Exercise 1.3 (page 11) from "Practical Cryptography". You may write this as a separate program from the previous one, or you may include additional functions to the previous program.
  3. Challenge 1: (Not required, but may be interesting for those who get through the previous exercises quickly and easily) Exercise 1.5 (page 12) from "Practical Cryptography".
  4. Challenge 2: (Not required, but may be interesting for those who get through the previous exercises quickly and easily) Exercise 1.6 (page 12) from "Practical Cryptography".
  5. Challenge 3: (Not required, but may be interesting for those who get through the previous exercises quickly and easily) Write a program that performs a letter frequency attack with no (or only minor) human intervention on a shift or affine cipher. Your program should produce possible plaintexts in order of likelihood. You might ask the user how many possible plaintexts to return.

Submit your programs on Kit.