Math595/609: Project 1

Vigenere Ciper

Keyword k[0] k[1] ... k[r-1]
Plantext: p[0] p[1] ...
Ciphertext: c[0] c[1] ...

Encrypt: E(p[i]) = c[i]
where let j = i mod r, N be the alphabet size and:
    E(a) = a + k[j] mod N

Project Description

Write a suite of programs to break Vigenere ciphers. Following is a series of hints as to how to proceed.

  1. Write a program to produce plaintext. The program should input "found" text and map it to our alphabet, which is only the letters a through z. It is reasonable to do this by lowercasing any letter A-Z and dropping all other characters.
  2. (Optional) Write program to generate plaintext according to a given frequency distribution. This might be useful for testing. I would suggest that the input be letter-frequency pairs, so that the program be useful in the most general context.
  3. Write a program to do Vigenere encipherment
  4. Write a program to crack a Vigenere cipher:
  5. Additional notes: We mentioned in class another method to determine the key-length.

Program fragments