HW0: Dictionaries and Cryptanalysis
polyalphabetic cipher is only one step up from the Caeser cipher,
but it provides a good introduction to modular arithmetic,
dictionaries, and cryptanalysis. For example:
For this homework, you're looking for words to use as plaintext and
key that produce a Vigenere ciphertext starting with "moose".
Because exchanging the key and plaintext results in the same output,
you'll get each pair of words twice. For example, "jasons" and
"dower" can be plaintext and ciphertext, or vice versa.
Choose your words from this dictionary of words
from Shakespeare (275KB plain text).
A trivial implementation that reads the dictionary into a vector of
strings, and runs two nested loops over all possible plaintext and
key combinations, runs in 2.5 minutes on my laptop with optimization
enabled. Feel free to use a smarter algorithm if you like, but
this homework is mostly to verify you can read text and process
Turn in your list of pairs of words, and the source code for your
search program on Blackboard (you'll need to log in first) by the due date of Friday, January 23.