## Section4.7Investigations: Enigma

This section contains all the investigations for Chapter 4. Completing the investigations is an important part of learning the course material!

### Worksheet4.7.1Investigation: The Paper Enigma

Make your own paper enigma with pdf/paper_enigma.pdf.

How to use the paper enigma.

• Cut out the rotors following the dotted lines. Do not cut off the arrows. Those are the notches to indicate when to move the next rotor.
• You can cut little slits in the paper to insert the rotors. Cut three little slits along the top and bottom line, just long enough for the rotor to fit. (Cut the top line of each of the three gray boxes at the top of the paper enigma. Cut three similar slits along the bottom.)
• For the initial message, place rotor I in the leftmost spot with M along the top row. Rotor II should be the middle rotor with C along the top row. Rotor III should be in the rightmost spot with K along the top row. See Figure 4.7.1.
• The rightmost rotor moves up one space as you enter the letter on the keyboard. That is, always move the rightmost rotor up one space before encrypting a letter, even the very first time. So that your starting position should be Figure 4.7.2.
• To simulate the wiring of a rotor, match up letters between the right and left side of each rotor. For example, the ciphertext letter Q enters straight across into the right side of the rightmost rotor, as a letter D, then you find the D on the left hand side of that rotor, then go straight across from the left hand D to the center rotor. Repeat similarly for each rotor and the reflector. A diagram of this for the first letter is given in Figure 4.7.3. This shows that the ciphertext letter Q corresponds to the plaintext letter E at the first step.
• Using the notch/arrow. If the $\uparrow$ appears in the top row of a rotor, at the next step move that rotor and the rotor to the left of the arrow up one space.
###### 1.

With initial rotor setting I:M, II:C, III:K placed into the machine left to right (I=left, III=right), decrypt the message QMJIDO MZWZJFJR. Remember to move the rightmost rotor one letter up before every letter, including the first letter.

###### 2.

Change the initial setting to II:T, III:U, I:N (II=left, I=right) and decrypt the message HWETMT. Remember to move the rightmost rotor one letter up before every letter, including the first letter. Note: be careful about the notch on the middle rotor!

###### 3.

How many initial settings for the paper enigma? Remember there aren't any plugboard swaps in this model and the rotors are removable.

### Worksheet4.7.2Investigation: Understanding the Plugboard

Let's examine the effect of the plugboard on the number of settings, but let's start with a simpler case of the mini enigma with only the six letters A, B, C, D, E, F.

###### 1.

Suppose only one cable is used. How many ways are there to swap one pair of letters from the six letters A, B, C, D, E, F? List all the options.

###### 2.

Suppose two cables are used. How many ways to swap two pairs of letters from a total of six letters? Come up with a formula. Then check your formula by listing all the options.

###### 3.

Suppose three cables are used. How many ways to swap three pairs of letters from a total of six letters?

###### 4.

Generalize to find a formula for how many ways to swap $k$ pairs of letters from a total of six letters.

###### 5.

Generalize your formulas for the plugboard to find the number of ways to swap ten pairs of letters from the normal alphabet of 26 letters (that is, using ten cables).

###### 6.

Find the number of initial settings for an Enigma machine if there are a total of five rotors and three are placed into the machine, 26 letters on each rotor, and ten cables where each cable swaps a pair of letters. (This was the case at the end of the WWII.)

### Worksheet4.7.3Investigation: Letter Chains

###### 1.

Use the mini enigma in Sage Computation 4.2.10 to encrypt ABCABC. That is, encrypt A with step 0, B with step 1, C with step 3, etc. Similarly encrypt each group of six letters below, starting back at step 0 for each group.

 ABCABC $\qquad \qquad$ BEDBED CFACFA DABDAB EDEEDE FCFFCF
###### 2.

Find the permutation for the letters A,B,C,D,E,F given by step 0 of the mini enigma. For example, A goes to B and B goes to A.

$P_0=$

 A B C D E F B A

###### 3.

Find the permutation for the letters A,B,C,D,E,F given by step 3 of the mini enigma.

$P_3=$

 A B C D E F C

###### 4.

Find $P_3(P_0)\text{.}$ That is, find the permutation given by applying $P_0$ first and then $P_3\text{.}$

 A B C D E F D

###### 5.

If you look carefully at Exercise 1, you should be able to see the permutation $P_3(P_0)$ in your table. Where is it and why?

### Worksheet4.7.4Investigation: Turing Loops

###### 1.

The following example of a plaintext, ciphertext pairing is taken from chapter 6 of Turing's Treatise on the Enigma (known at Bletchley as the Prof's Book). The crib in this case is “keine Zusaetze zum Vorberiqt” which means “No additions to Preliminary Report”. Find all loops for this crib.

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 CT D A E D A Q O Z S I Q M M K B I L G M P W H A I V PT K E I N E Z U S A E T Z E Z U M V O R B E R I Q T
###### 2.

The next example is from The Turing Bombe by Graham Ellsbury. Ellsbury writes “One very fruitful source was weather reports, for example, the crib used for the first break on D-Day was WETTERVORHERSAGEBISKAYA.” (This translates to Weather Forecast Biskaya which refers to the Bay of Biscay off the western coast of France.) Now suppose that the ciphertext includes the sequence QFZWRWIVTYRESXBFOGKUHQBAISEZ. We can make guesses about where the message occurs in the cipher text using the Enigma property that no letter can be encoded as itself. For example,

 CT Q F Z W R W I V T Y R E S X B F O G K U H Q B A I S E Z PT W E T T E R V O R H E R S A G E B I S K A Y A

doesn't work because V can't be encrypted as itself. Find where the message can occur in the cipher text. The message will not wrap around in this ciphertext. You may use Sage to help do the shifting by changing the num variable in the code below.

 CT Q F Z W R W I V T Y R E S X B F O G K U H Q B A I S E Z PT

Then find all loops as above.