30.11.2012 Views

The Enigma of Group Theory - Department of Computer Science ...

The Enigma of Group Theory - Department of Computer Science ...

The Enigma of Group Theory - Department of Computer Science ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

http://www.cs.bris.ac.uk University <strong>of</strong> Bristol, <strong>Department</strong> <strong>of</strong> <strong>Computer</strong> <strong>Science</strong><br />

Machines in use towards the end <strong>of</strong> the war had a larger number <strong>of</strong> rotors, chosen from a larger set.<br />

Note, the order <strong>of</strong> the rotors in the machine is important, so the number <strong>of</strong> ways <strong>of</strong> choosing the rotors is<br />

5 · 4 · 3 = 60.<br />

Each rotor had an initial starting position, and since there are 26 possible starting positions for each rotor,<br />

the total number <strong>of</strong> possible starting positions is 26 3 = 17 576.<br />

<strong>The</strong> first rotor would step on the second rotor on each full iteration under the control <strong>of</strong> a ring hitting<br />

a notch, likewise the stepping <strong>of</strong> the third rotor was controlled by the second rotor. Both the rings were<br />

movable and their positions again formed part <strong>of</strong> the key, although only the notch and ring positions<br />

for the first two rotors were important. Hence, the number <strong>of</strong> ring positions was 26 2 = 676. <strong>The</strong> second<br />

rotor also had a kick associated to it making the cycle length <strong>of</strong> the three rotors equal to<br />

26 · 25 · 26 = 16 900.<br />

<strong>The</strong> effect <strong>of</strong> the moving rotors was that a given plaintext letter would encrypt to a different ciphertext<br />

letter on each press <strong>of</strong> the keyboard. Finally, a plug board was used to swap letters twice in each<br />

encryption and decryption operation. This increased the complexity and gave another possible 10 14<br />

keys.<br />

<strong>The</strong> rotors used, their order, their starting positions, the ring positions and the plug board settings<br />

all made up the secret key. Hence, the total number <strong>of</strong> keys was then around 2 75 .<br />

To make sure encryption and decryption were the same operation the message letter was passed<br />

through the plug board, then through the three rotors, and then through another fixed substitution<br />

called the reflector. After passing through the reflector the message letter was sent back through the<br />

three rotors and the plugboard again. <strong>The</strong> reflector was fixed in the machine, and was given by<br />

ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

YRUHQSLDPXNGOKMIEBFZCWVJAT<br />

<strong>The</strong> operation <strong>of</strong> a simplified <strong>Enigma</strong> machine is described in Fig. 1. By tracing the red lines one<br />

can see how the plaintext character A encrypts to the ciphertext character D. Notice that encryption and<br />

decryption can be performed by the machine being in the same positions. Now assume that rotor one<br />

moves on one step, so A now maps to D under rotor one, B to A, C to C and D to B. You should work<br />

out what happens with the example when we encrypt A again.<br />

A<br />

B<br />

C<br />

D<br />

Figure 1: Simplified <strong>Enigma</strong> machine<br />

Three rotors<br />

LampsKeyboardPlugs<br />

1 2 3 Reflector<br />

A<br />

B<br />

C<br />

D<br />

❏ ❏✡ ✡<br />

❇<br />

✡<br />

❇<br />

❇<br />

✡<br />

✡ ❏✂ ❏<br />

❏<br />

✂<br />

❏✡ ✂❏<br />

❏✡<br />

<strong>The</strong> purpose <strong>of</strong> this note is to present a mathematical model <strong>of</strong> the <strong>Enigma</strong> machine and show how<br />

some basic facts about permutations allowed the Polish cryptographers to break the cipher.<br />

1 Permutations<br />

We want to find a mathematical description <strong>of</strong> the <strong>Enigma</strong> machine. To do this we will first need to<br />

introduce the concept <strong>of</strong> a permutation [?].<br />

We let A be a finite set <strong>of</strong> size n, we might as well assume that the set is given by A = {1, 2, . . . , n}. A<br />

function from A to A is said to be one-to-one if every element in A maps to exactly one element in A; for<br />

example if A = {1, 2, 3}, then we have the one-to-one function f (1) = 2, f (2) = 3 and f (3) = 1. Another<br />

name for such one-to-one functions from A to A is a permutation, since such a function permutes the<br />

elements in the set around.<br />

4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!