# An example of the basic Enigma

Tony Sale's
Codes and Ciphers

This is a supplementary page illustrating Tony Sale's sequence of pages on the Enigma.

## A detailed working through of Enigma encipherment

The Enigma machine gives a mechanised way of performing one alphabetic substitution cipher after another.

In this example we are only concerned with the encipherment of a single letter.

We will suppose that the basic Enigma has been loaded with the rotors I, II, III. Thus the right-hand rotor R is III. We will assume also that each rotor is in its A position when the encipherment is performed. (See however the technical note at the end of this page for a more exact statement). Taking the information from this page specifying the actual rotor wirings, this means that the right-hand rotor R effects the substitution:

ABCDEF G HIJKLMNOPQRSTUVWXYZ
BDFHJL C PRTXVZNYEIWGAKMUSQO

and that the centre rotor M is II and effects:

AB C DEFGHIJKLMNOPQRSTUVWXYZ
AJ D KSIRUXBLHWTMCQGZNPYFVOE

and that the left hand rotor L is I and effects:

ABC D EFGHIJKLMNOPQRSTUVWXYZ
EKM F LGDQVZNTOWYHXUSPAIBRCJ

Suppose the input character is G.
Then the right hand rotor effects G -> C
The centre rotor effects C -> D
The left hand rotor effects D -> F

Now the current reaches the reflector, which we will suppose is the standard B reflector, effecting:

ABCDE F GHIJKLMNOPQRSTUVWXYZ
YRUHQ S LDPXNGOKMIEBFZCWVJAT

(Note that the reflector only has 13 connections, i.e. A <-> Y etc.)

So the reflector effects F -> S.

The current now goes back through the three rotors.
Because the current is now going in the other direction we need to write out the inverses of the substitutions given above.

The left hand rotor (inverse) effects:

ABCDEFGHIJKLMNOPQR S TUVWXYZ

The middle rotor (inverse) effects:

ABCDEFGHIJKLMNOPQR S TUVWXYZ
AJPCZWRLFBDKOTYUQG E NHXMIVS

The right hand rotor (inverse) effects:

ABCD E FGHIJKLMNOPQRSTUVWXYZ
TAGB P CSDQEUFVNZHYIXJWLRKOM

Using these tables we see that

The left hand rotor effects S -> S
The centre rotor effects S -> E
The right hand rotor effects E -> P

So finally we find that with the basic Enigma with this order and position of its rotors,

Input key = G, Output lamp = P.

## Exercise:

Check that an input P results in lamp G lighting up, showing the reciprocal property.

In fact you can check that in this position the Enigma enciphers letters as follows:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
UEJOBTPZWCNSRKDGVMLFAQIYXH

and simply swaps the 13 pairs:

(AU)(BE)(CJ)(DO)(FT)(GP)(HZ)(IW)(KN)(LS)(MR)(QV)(XY)

This may seem confusing at first: why use a complicated machine just to swap letters? The point however is that the right-hand rotor will move before another letter is enciphered, and the complexity of the Enigma means that the swapping it effects for each subsequent letter in the message is a completely different one.

You should be sure to understand this sequence of operations by the rotors before going on to see how the rotors move, and before meeting the extra complications introduced by the plugboard and ring setting.

### Technical note:

This calculation of the action of the Enigma has been performed for current passing through rotors in the AAA position. However, the Enigma is designed so that the right hand rotor advances by one position immediately after the input key is depressed, and the current flows through the rotors when in this stepped-on position. So this encipherment of letters actually arises if the input key is depressed while rotors are in the position preceding AAA (this would normally be position AAZ.)

 This page is created by Tony Sale the original curator of the Bletchley Park Museum, and Secretary of the Bletchley Park Heritage Society. Technical assistance from Andrew Hodges