Homework 8 (due 3/11)
CSC 233


We talked about the ADFGX cipher, mechanization, and the one-time pad, also known as the Vernam cipher, though the book explains that Vernam was preceded by someone else (Section 3.12). We then talked about (single rotor) rotor ciphers, in preparation for the Enigma (which, initially, used three rotors).

A detailed account of the history of rotor machines, and their cryptanalysis (with more material on the Enigma) is

Cipher A. Deavours, Louis Kruh. Machine Cryptography and Modern Cryptanalysis.

On the historical side, there is David Kahn's "Seizing the Enigma".  Also, check out the 2001 move Enigma. It includes a lot of accurate detail on the cryptographic history of Bletchley Park's work.


Submission: The homework is due by midnight (I will not accept late homeworks). You can submit your homework through d2l into the drop-box for this homework.

Please prepare your homework as a single file containing all answers (e.g. doc, docx, or pdf, not a zip file). For an example, see hwexample.docx . How to take screenshots? Check out screenshots for MAC, Windows, Linux.


1. (Reading)  Read 5.2 on the Jefferson cipher. (Section 5.3 covers cryptanalysis of the Jefferson cipher, we will not see that in class.) Read Sections 3.7-3.12 on one-time pads and randomness. Read Section 6.2 on the ADFGX cipher (the rest of Chapter 6 has interesting material on WWI cryptography). Read Section 8.1 on mechanization and rotor ciphers. If you're interested in Enigma, and want to read ahead, continue Chapter 8.

2. (Vernam Cipher/One-time pad, 12pt) You want to encrypt the text "tip" using the Vernam Cipher.

a) [4pt] Using the Baudot code, translate "tip" into binary (use the Baudot table for the code).

b) [4pt] You have two tapes, containing "110" and "10100". Use Morehouse's (cryptographically flawed) method to construct a long key, and use that key to encrypt your result from a).

c) [4pt] You have intercepted two ciphertexts: ct1 = 010101101000000, and ct2 = 001110000101101. You  suspect that both ciphertexts were Vernam encrypted using the same key k (which you don't know). You also know that one of the plaintexts (you don't know which one), starts with the letters "ha". Find the plantexts. (Letters were encoded using the Baudot table). Hint: you can find the first two letters of the other plaintext easily. At that point you need to guess and try. Make yourself a list of options before you try them.

3. (ADFGX, 8pt) Encrypt the plaintext "friedman" using the key matrix we saw in class:

 
A
D
F
G
X
A
c
o
x
f
m
D
k
a
z
n
w
F
l
ij
d
s
y
G
h
u
p
v
b
X
r
e
q
t
g

and the keyword "qwerty" in the ADFGX system.

4. [Rotor Cipher, 20pt] You are trying to reconstruct the internal wiring of a single-rotor machine. You paid money for a plaintext/ciphertext pair, and got the following:

nothingwillcomeofnothing
IJSCDKBGDKKXNBBYEZIOXSIQ

a) [7pt] Construct the Friedman tableau (see d2l for an eletronic version of the worksheet). You can assume that the initial setting of the rotor was "z", so that the first letter of the plaintext ("n" in this case) got encrypted with the "a" alphabet.

b) [9pt] Complete the Friemdan tableau by filling in the diagonals.

c) [4pt] What was the keyword used to set the wiring of the rotor? Hint: if you set it up right, the keyword should appear in the z-alphabet. You may have to guess some of the letters.


Marcus Schaefer
Last updated: March 5th, 2020.