Homework 2 (due 1/17)
CSC 233

We fnished chapter 1, and will start on chapter 2 next week.

There were several handouts, including ciphertext examples subst0.txt (which we solved together), and subst1.txt (which will be part of the extra credit), and Alberti's cipherdisk and Trithemius' tabula recta (see the Wikipedia tabula recta entry for a modern version).

Next week we will spend time on the ill-named Vigenere cipher and how to break it.

1. (Reading Assignment) Finish reading chapter 1 (if you have not done so already), and read chapter 2 up to and including the section on the Viennese Black Chamber, and feel free to continue reading the story of Charles Babbage and the Vigenere cipher.

2. (Substitution Cipher) Your goal is to break a substitution cipher. Enter your last name below and hit return to get your ciphertext. The ciphertext will be different each time you submit the form (since I use a random substitution), but your plaintext does not change. Attack the cipher with the tools mentioned in class and in the book.

You can use substitution.xls to help you with the analysis (or download and use the tool from Simon Singh's Code Book CD). In the column called cipher you can enter letters to substitute for the corresponding letters in column F. The "encode" and "decode" buttons will perform the substitutions accordingly.

The "analyze ciphertext" button will determine the relative frequencies of letters in the ciphertext. After hitting that button you should sort rows 5-30 in columns H/I in descending order by column I, so you get a first, rough order of the letters by frequency.

You can also enter text in cell I1, and hit the "Count" button to count how often  that text occurs within the ciphertext. That'll help you with determining bigram and trigram frequencies.

Last Name:

When writing up your solution, include details about how you proceeded, including information about what decisions you made, why you made them, and (if necessary), why you went back on an earlier decision.

Also include intermediary snapshots of the plaintext as you have it reconstructed (similar to how the book does it).

Note: Even if you don't manage to break the cipher, write up what you tried.

3. (Alberti's Cipher Disk) Decrypt the following text using Alberti's cipher disk.


4. (Alberti's Cipher Disk) You have intercepted the following ciphertext:


You know it's been encrypted using Alberti's Cipher Disk, but when you decrypt it,
you get gibberish. It seems the parties have agreed on an index letter other than k.

Determine the new index letter and find the plaintext. Describe, in detail, how you proceeded.                         

5. (Extra Credit) Finish decrypting subst1.txt. You can assume that P = e and L = t.  As for problem 1, describe how you proceeded (i.e. which choices did you make, why did you make them, when did you decide that a choice was bad and went back on it, etc.)

Marcus Schaefer
Last updated: January 10th, 2006.