Date post: | 15-Dec-2015 |
Category: |
Documents |
Upload: | jair-harler |
View: | 220 times |
Download: | 0 times |
2
Main Ingredients of the Enigma
Keyboard (with A-Z) Light bulbs (with A-Z) Plugboard (with A-Z) Rotors (with 0-25) Reflector (with 0-25)
3
User Interface
The keyboard and light bulbs were the user interface for entering and reading messages.
The plugboard was used to increase the number of keys (settings).
4
Rotors
Each rotor was connected with a series of wires that created a permutation cipher.
An electric signal would enter the rotor at one position and the permutation would cause the signal to leave at a different position on the far side of the rotor.
5
Reflector
The reflector rotor at the end was a fixed product of disjoint two-cycles (i.e. a permutation), such as
= (0, 12)(1, 9)(2, 3) (4, 24)(5, 18)(6, 23)(7, 8) (10, 25)(11, 13)(14, 21) (15, 17)(16, 19)(20, 22)
Note that -1 = , so x = x for all x.
6
Mathematics of the Enigma
If we ignore the plugboard settings, the Enigma is a product of permutations!
xplain
yzw
a b c dcipher
reflector rotor 3 rotor 2 rotor 1
8
Mathematics of the Enigma (cont.)
Equation (1) is a model for the Enigma if we encrypt one letter!
Recall that the rotors move like an odometer, with rotor 2 changing when rotor 1 changes from 25 to 0 and rotor 3 changing in a similar fashion.
9
Mathematics of the Enigma (cont.)
To account for the rotation of the rotors, we introduce a “shift” variable for each rotor, which keeps track of how far a rotor has shifted from its initial position!
Shift variables: s1 rotor 1 s2 rotor 2 s3 rotor 3 Note: For s2 to increase, we need s1 to change from 25
to 0 and for s3 to increase, we need s2 to change from 25 to 0.
10
Mathematics of the Enigma (cont.)
To account for the shift s1, instead of computing
we compute
Instead of computing the inverse of
to get x, i.e.
we need to solve (2) for x in terms of y.
11
Mathematics of the Enigma (cont.)
Applying 1-1 to both sides of (2) yields:
Adding - s1 mod 26 to both sides of (3),
We will use functions of form (2) and (4) to account for the moving rotors!
To encrypt, we actually compute the following:
13
Mathematics of the Enigma (cont.)
After each letter, check shift variables (mod 26): s1 = (s1 + 1) mod 26
If s1 = 0, then s2 = (s2 + 1) mod 26
If s2 = 0, then s3 = (s3 + 1) mod 26
14
Example 1
Suppose we are given 1, 2, 3, and as follows:
1 = (0, 15, 7, 8, 19, 23) (1, 4, 17, 2) (3, 13, 25, 5, 21, 12) (6, 9, 10, 22, 11, 14, 24, 16, 18, 20)
2 = (0, 5, 9) (1, 2, 3, 7, 6, 8, 4) (10, 11, 12, 15, 18, 13, 14, 16, 19, 17) (20, 25, 22, 21, 24, 23)
3 = (0, 10, 20, 3, 13, 23, 7, 17, 5, 15, 25, 1, 11, 21) (2, 12, 22, 4, 14, 24, 8, 18, 9, 19, 6, 16) = (0, 12) (1, 9) (2, 3) (4, 24) (5, 18) (6, 23) (7, 8) (10, 25) (11, 13) (14, 21) (15, 17) (16, 19)
(20, 22), with s1 = 24, s2 = 10, and s3 = 5. Use these initial settings to encipher the message “Get your forces ready”.
19
Example 1 (cont.)
Thus, d = 15, which implies G is encrypted as P. Finally, update shift variables. s1 = (s1 + 1) mod 26 = (24+1) mod 26 = 25
s2 = 10
s3 = 5 Repeat with x = 4 for E, … Homework: Finish enciphering message!