Setting the Psi wheels
With the de-chi tape ready, the next step is to set up each of the five Psi wheels of the Lorenz SZ40/42. This needs the pin settings for each wheel, already worked out by the Testery.
Each of the five Psi wheels has a different number of switches (or cams) round its edge: Psi 1 has 43 cams, Psi 2 47, Psi 3 51, Psi 4 53 and Psi 5 59. That is 253 separate cams to set, although the settings were changed daily or weekly rather than for every message.
On Dragon, each Psi wheel pin was a switch, one per cam, grouped into 5 wheels, and each could be on or off. The switches are all numbered, marked with a + where the switch is on (at Bletchley Park this was written as x) and blank where it is off (written • at Bletchley Park). On punched tape, the + or x is a hole and the off or • is unpunched tape.
Psi 1 and Psi 2 are both on the far-left rack, marked BAY 1: Psi 1 is the top section (BAUD A) and Psi 2 is below it (BAUD B). Psi wheels 3, 4 and 5 are on separate racks, from left to right, marked BAUD C, D and E.
Setting the crib
Next, set up the crib to search the cipher text for: a piece of plain text we hope is likely to be in the text. The crib is searched for in ITA2 code, not just as text, so it will most likely include some control characters as well as letters. See the Lorenz machine on Virtual Lorenz for more on how Lorenz encoded onto 5-hole punched tape.
A crib on Dragon can be up to 10 characters. It can run with fewer, but the shorter the crib, the more chance of false matches. Below are a few examples of cribs used on Dragon, grouped by Lorenz link. Bletchley Park gave each link between two Lorenz machines a codename, all named after fish (or at least sea creatures). They found that particular operators at each end of a link were consistent in their wording, their spacing and even how they typed the control codes, so lists of common cribs were collected for each link.
| Crib | Frequency a month | Length | Meaning |
|---|---|---|---|
| 89ROEM95 | 65 | 8 | |
| M89ARMEE | 64 | 8 | Armee = army |
| ANGRIFFE9 | 37 | 9 | Angriff = attack |
| 9DER9FEIND | 34 | 10 | |
| 5M89GR5M89 | 29 | 10 | |
| M89PZ5M89 | 28 | 9 | |
| TAETIGKEIT | 23 | 10 | Tätigkeit = activity |
| Crib | Frequency a month | Length | Meaning |
|---|---|---|---|
| 89ROEM95 | 61 | 8 | |
| 5M89KDO5M8 | 38 | 10 | |
| 9ANGRIFF | 31 | 8 | |
| 9DG9HOSF95 | 29 | 10 | |
| 5M89ROWM95 | 27 | 10 | |
| ABSCHNITT | 23 | 9 | Abschnitt = section or sector |
| 5M89D5M89 | 20 | 9 | |
| 5M89A5M89 | 20 | 9 |
Source: NARA 4628, Special Fish Report, Box 1417.
The ITA2 control codes aren’t normally printable, but at Bletchley Park they wrote them as numbers: 8 = letter shift, 5 = figure shift, 9 = space.
In figure shift, any letter typed is printed as the symbol or number on that key. So 5M89 means: go into figure shift, key M (a full stop), back to letter shift, then space.
How does Dragon find the crib?
When the start switch is thrown, Dragon starts reading the de-chi tape, ten characters at a time. The five impulses of each character are read into a separate series of relays (much like a shift register). The ten characters are then added (using modulo-2 addition, also called XOR) to the characters of the crib. This gives a ten-letter pattern, the extended Psi, written Psi′.
To understand how Dragon works, we need to understand the difference between the Psi stream and the extended Psi stream. The Psi stream is the list of characters you get by turning the Lorenz Psi wheels one step at a time and writing out the characters on the five wheels. But when the Lorenz actually runs, the Psi wheels don’t step on for every character enciphered: they are moved according to the two Mu (motor) wheels (and, on later models, one or more of the other wheels too). If you write out the characters that actually make up the key during a real enciphering run, they appear to repeat letters, because of the staggered movement of the Psi wheels. So a section of the Psi could be SCQLPM, but the Psi′, the letters actually used to encipher the data, could be SCCQLLLPM, the repeated letters being where the Psi wheels didn’t move.
You may remember from the last page that the de-chi is the plain text plus the Psi; in fact, it is the extended Psi′, not the Psi, that appears in this sum.
Now if DE-CHI = PLAIN + PSI′, and we add our crib guess (which is plain text), and guess it is in the right place in the text, the plain text cancels out: PLAIN + CRIB (these cancel out if equal) + PSI′ leaves us with just the extended Psi′.
We are now very close to being able to check the result against the known Psi wheel values set on Dragon’s banks of switches. The problem is that we have the extended Psi′, while our Psi wheel settings are just the pins on the wheels: plain Psi.
Dragon assumed that each repeated letter in the calculated Psi′ was due to a stagger of the motor wheels, and used a bank of relays to contract any repeated letters to give an assumed Psi value. You may notice that neighbouring letters on the Psi wheels can actually be the same, in which case the Psi wheels may have stepped while still giving the same letter. Dragon couldn’t cope with this, and would give a false result. Dragon 2, a later version built at Bletchley Park during the war, also kept track of the Mu and limitation wheels, so it only contracted letters on real Psi wheel movements, which stopped this problem.
An example
| De-chi | VYPPA4RYB9 | The current ten characters read from the tape |
|---|---|---|
| Crib | SCHERENFER | The crib set on the plugboard |
| Psi′ | 554QDDIOOC | De-chi + crib = Psi′ |
| Psi | 54QDIOC | Psi′ contracted (repeated letters removed) = a possible Psi value |
Finding the Psi wheels
The next step is to see whether there is a pattern of cam settings on our Psi switches that exactly matches the sequence of Psi we have calculated. For the first Psi wheel, we check the first impulse of each character of our Psi result.
In our example, the first character, 5, is xx•xx in ITA2, so we store an x. The second character, 4, is •x•••, so we store its first impulse, •. We store these for each of the seven characters of our calculated Psi (54QDIOC), giving x•xx•••.
To find a match, Dragon uses relays to check these settings, in parallel, against every possible position along our Psi switches, which are loaded into another bank of relays. The same is done for impulses 2 to 5, each compared against the matching Psi wheel’s switch relays.
To continue the example, if the settings of the 43 cams on Psi wheel 1 were
x•xx•x••x•x•x•x•x•xxxx•x•x•xxx••x•x•xx•••x••
a match would be found at the 35th position:
x•xx•x••x•x•x•x•x•xxxx•x•x•xxx••x•x•xx•••x••
If a match is found on all five patterns, we have potentially found a wheel setting where the crib could fit. Dragon stops and shows the current values for the operator to write down.
If no match is found, another letter is read from the de-chi tape and the process carries on until a match is found or the end of the tape is reached.
The result display
Once Dragon finds a match and stops, several displays show the results.
For someone to use the results of the crib search, we need to record a few things: where on the Psi wheels the pattern matched; the current position on the de-chi tape being read; and which letters of the Psi′ were contracted.
On each bay is a bank of lights, halfway down the rack. These show the position on the stored Psi settings where the crib fitted. The display on BAY 1 shows the results for both Psi 1 and Psi 2, while the other racks show just their own wheel.
The second thing we need is which character is being read from the de-chi tape. I believe that on the original Dragon this was probably read directly from the tape, by counting tape characters by hand. A later addition, built at Bletchley Park using British “3000 type” relays, was a scale-of-31 counter, visible on GCCS photographs but not on earlier SSA ones. The photographs aren’t entirely clear, and there seems to be no record of exactly what the display was like, but I have made my simulation show the counter’s result, making it much quicker to see and record the position of the de-chi tape, and also the current ten characters from the tape.
Once a possible crib position had been found, the results were sent to the Testery, so the break could be extended by hand back to the start of the tape, giving the exact start positions of the Psi wheels for this message. With these, along with the original Chi and Mu wheel start positions, the message could be run on a Tunny machine to complete the final decode.