Back to the Contents Page

Enigma

All of the cryptography examples so far rely on encrypting the code such that there are so many possible keys it becomes infeasible to check each possible key in turn. Each time a new technology is invented that can calculate faster - for instance computing advances - the code has to be improved to incorporate more and more possible keys to fox cryptanalysists. Enigma was no exception.

Enigma was based on substitution, and it was essential to the Germans using it in the first world war that it had enough keys that the Allies couldn't decipher it using brute force methods of trying each possible key in turn until one worked.

The were two ways that Enigma created variety in the coding method - each variation providing another possible key. The scramblers are wired in different ways, and turn rotate after each letter is coded. The plugboard swaps over groups of two letters - in this example, S and O are both not swapped with another letter, but I is swapped with M and W is swapped with U. This is shown below - the Orange line shows the coding of S, and the purple line shows the coding of I. The operator pressed the S button, and the O button would light up, telling him that S had been coded as O. The yellow spots indicate the letters that would be lit up - so that SI would be rendered as OW. In actual fact, this is not quite right since after coding S as O, at least one of the scramblers would then rotate, and so I would not be turned into W...

The scramblers turned round after each typed letter like an odometer after each mile, constantly changing the key for the substitution used (like choosing a different line of the Vigenère cypher for each letter). There were three scramblers used each day out of five possibilities, and each could be in any of the positions S1, S2 and S3 (60 possibilities), and could start with any letter facing upwards (26 possibilities for each = 17'576 altogether). This gave a total of 60 × 17'576 = 1'054'560 possibilities for the scramblers.

The technology at the time could try those keys out quick enough to break them in a couple of hours, so to create many many more keys, a plugboard was used. This allowed certain letters to be swapped over, for instance A and A could be swapped, and A and A could be swapped etc... This gave 100'391'791'500 more keys, but although there were lots of them, they could be solved relatively easily by looking at words, in the same way that transposition of any sort is not as complicated to solve as substitution. For instance, look at this sentence and work out which letters have been swapped:


Han you lett wcihc tellerd haoe been dwappes voer?

It looks a bit like English, and with a bit of thought, you can translate it into:


Swapped letters:

C <-> H
T <-> L
O <-> V
S <-> D

Giving:

Can you tell which letters have been swapped over?

Neither of the two systems for coding the messages were secure enough on their own, but the difficulty of decoding the scramblers combined with the sheer number of possibilities generated by the plugboard created roughly 10'000'000'000'000'000 keys which were very hard to decode, and this guaranteed the Germans security...

...until the Allies found some short cuts, and broke the Enigma cypher.


The German operators all had a booklet telling them the scramblers and positions to use each day. This was also a problem since they had to make sure the Allies never got hold of a book. The problem - key distribution - was mentioned a while ago and it still hasn't been solved. To send a coded message, the sender has to send the key to the receiver, and anyone can eavesdrop and read the key - unless it is sent in code, in which case the code it is sent by needs a key which must be sent without being read by eavesdroppers... and so on - impossible to do. Or so it seemed in the 1940's...




Back - The Vigenère Cypher
Forward - The Present