# Anoraks Corner by Tony Sale

Back to Index

Tony Sale's
Codes and Ciphers

## Welcome to Anoraks Corner, an exploration of the "E" Rack.

Alan Turing, in 1939, proposed a letter frequency attack using what he called the "E" rack.

I'm not sure that this was ever built and I decided to investigate this to see how good it might have been. The result is a Virtual E Rack which actually works quite well.

### Letter Frequency.

The basis of this attack is that the frequency of occurance of some letters of natural language is very far from random. For instance, in German and English the letter E occurs at about 12% compared with a random score of 4%. Code breakers had long ago realised this, it was used to attack Caesar's substitution ciphers. What Alan Turing realised was that it could be mechanised along similar lines to his development of the Turing Bombe.

If a length of cipher text could be decipherd simultaneously by lots of Letchworth Enigmas and the number of output E counted, then a correct setting would show as a large count of E, but more importantly an incorrect setting could be rapidly rejected by a low count of E.

### Minimum length of cipher text.

The first question is how long must the cipher text be to obtain a significant result.

Measurements on some original deciphered German messages showed an E frequency of one in eight letters. (Oliver Lawn's 1941 paper gives one in 8.34 over 5,410 German message letters). This agrees with the 12% quoted elswhere.

What is however more important for the determination of minimum length is the maximum distance between E in messages. Examining the German decrypts gives 8 for the average but a long tail out to 34 as the maximum inter E distance in these messages.

Succesive starting point lengths of 50 letters gives a minimum of 2 Es for an average of 4. 80 letter lengths give minimum 5 and lenth 120 gives minimum 9.

Next question; what are the maximum counts of any letter when a length of cipher text is deciphered on the wrong Enigma settimg. The Virtual E rack enables this to be measured by setting the cut off limit so low that all decipherements are shown. One result is that for a cipher length of 70, E max on the correct settings is 9 but E count off the correct settings also can be 9 as are the maximum counts for non E off the correct setting. However a cipher length of 130 letters gives a count of 25 on E max correct with counts of 17 for E on incorrect and for other letters maxima.

So it would appear that a cipher length of over 100 letters is required to get a clear indication of the correct setting and this is confirmen by Virtual E rack.

### Limitations for use of the E rack.

Most importantly the Steckers (plug board connections) must be known or mostly all known. The reason for this is that a letter sbstitution on the output side would just mean a different letter giving a maximum in place of E if E was Steckered. But missing or wrong substitutions on the input side completely changes the encipherment.

Virtual E rack will work with one Stecker pair missing and sometimes with two, but it depends which two.

Then there is wheel turnover. Because the ring settings are not known (ZZZ is assumed), any turnover in the course of encipherment of the original message is not reproduced. Virtual E rack tries to take care of turnover in the right hand to centre wheels by deciphering the cipher text consecutively at two turnover points on the right hand wheel, 2 and 16 are used. This means that the decipherment will only be wrong for a maximum of half a wheel rotation for one of the two settings. (I tried using 3 decipherments at about 8 position intervals but the improvement was so slight it was thought better to go faster on two).

### So where could the E rack be used?

Firstly Turing et al in their original 1939 note, suggested it could be used against German Naval Enigma. The problem, at that time, was the lack of complete Bigram tables. Some entries had been worked out by Turing, but only very few. This meant that although they could sometimes find the settings for one message, they could not decipher other messages because they couldn't decode the message keys, the wheel start positions.

But if they had found the Steckers from the message they had broken, then the E rack could be used to find the wheel starts for the other messages. However the capture of the complete Bigram tables probably rendered the E rack unneccessary.

My interest arose from finding another case where the E rack could be used. In preparing German texts for Anoraks Corner, I revisited some intercepts I had originally posted on the discussion email list in 1996. In this batch were two 3 part messages intercepted on 2nd November 1944. When I broke these using my High Speed Bombe, I found that the second three part message, sent from a different originator to the same central control, with about 3 hours difference in time, had the same Stecker connections but different wheel order and Ringstellung. If BP had deduced that this was an established practice then the E rack could be used to find the wheel order and wheel starts of other message to the same control on the same day.

Having broken one message of the first three parter on a crib (standard message ending), I was then able to break the second three part message using Virtual E rack.

### Was there an E rack in 1944?

I have often wondered why 4 Bombes were linked together as the Giant. Four Bombes each with 30 Enigma sets would give the 120 sets neccessary for an E rack. I will investigate further to see whether the Giant was ever used as an E rack.

### The Virtual E rack.

You need to go to the Tools Index and download a zip file containing Virtual E rack. I suggest you put it in \anoracks\tools if you have already set this up on your hard disk.

Because Virtual E rack is a .exe file you have to leave your browser and run it from your hard disk, just like my High Speed Bombe. In fact it is derived from that and the interface is very similar. You need a text file set with the parameters and the cipher text. Have a look at RACKTEST.TXT using Wordpad or Edit.

When you run rack.exe the setup screen appears top left. Click on Setup in the menu bar to load the setup data from a text file. You can adjust elements after the data is loaded but before you click OK. Next clicking on Run on the menu bar brings up the Results window bottom left and you can see the starts and wheel orders being worked through. Any letter scores exeeding the limit value will cause a set of counts to be shown for every letter in the alphabet.

Note that the counts are shown in extended HEX, 9 + (alphabet letter vaue) i.e. A is 10, H is 17, and this only applies to outputs not to inputs.

Clicking on Quit on the Results window stops the stepping through wheel starts. Clicking Quit again removes the Results window and then you can alter the data in the Setup window before clicking OK and Run if you want to go again.

One thing I am not very happy with is the choice of "Factor" to set the limit. It's advantage is that it results in a discrimination very nearly independant of the cipher length. Perhaps someone can suggest a better way of setting the limit.

### Trying out Virtual E rack for real.

Scenario 6 can be solved using the Virtual E rack.

 This page was originally created by the late Tony Sale, the original curator of the Bletchley Park Museum,