Dragging a crib

Setting the PSI wheels

Now that we have our de-chi tape ready, the next step is to setup the PSI wheel settings for each of the five PSI wheels on the Lorenz SZ40/42. This means we need the pin settings for each wheel which have been already worked out by the Testery.

Each of the five PSI wheels has a different number of switches (or cams) around it's circumerance. PSI 1 = 43 cams, PSI 2 = 47 cams, PSI 3 = 51, PSI 4 = 53 and PSI 5 has 59. This is a total of 253 seperate cams to set although these settings were not changed per message but rather daily or weekly.

Each of the pins for each PSI wheel was represented on Dragon as switch, one per cam and grouped into 5 wheels, which could be either on or off. On Dragon, the switches are all numbered and marked with a + sign where the switch was on (in Bletchley Park terms, this was written as an X) and a blank where it was off (or · at Bletchley Park). In the case of a punched tape, the + or X is represented by a hole and the off or · by an untouched tape (no hole).

PSI 1 and PSI 2 are both on the far left rack marked BAY1. PSI 1 is the top section (BAUD A) while PSI 2 is below (BAUD B). PSI wheels 3, 4 and 5 are on seperate racks going from left to right marked BAUD C, D and E


BAY1 : BAUD A - the PSI 1 wheel cam settings

Setting the crib

Next, we need to setup the crib that we want to search the cipher text for. This is a piece of plaintext that we are hoping is likely to be found within the text. The crib is searching within the ITA2 code, not just the text itself, so most likely will include some control characters along with the letters. See The Lorenz Machine on lorenz.virtualcolossus.co.uk for more detail on how Lorenz encoded onto 5-hole punched tape.

The crib on Dragon can be up to 10 characters - it can run with less than 10, but as the length of the crib goes down, there is more possibility of finding false matches. Below is a few examples of cribs which were used on Dragon - you'll notice that they are grouped by the Lorenz links. The link between two Lorenz machines were given codenames by Bletchley Park, all named after fish (or at least sea animals!). What they discovered is that specific operators at each end of a link were consistant in the wording, their spacing and even how they typed the control codes and therefore, lists of common cribs were gathered per link end point.

Gurnard (Berlin end)
CribFrequency / monthLength 
89ROEM95658 
M89ARMEE648Armee = army
ANGRIFFE9379Angriff = attack
9DER9FEIND3410 
5M89GR5M892910 
M89PZ5M89289 
TAETIGKEIT2310Taetigkeit = activity

Jellyfish (Berlin end)
CribFrequency / monthLength 
89ROEM95618 
5M89KDO5M83810 
9ANGRIFF318 
9DG9HOSF952910 
5M89ROWM952710 
ABSCNITT239Abschnitt = section/sector
5M89D5M89209 
5M89A5M89209 

* Ref NARA 4628, Special Fish Report, Box 1417

The control codes used in ITA2 are not normally printable, but at Bletchley Park they used the following numbers to represent these special codes. 8 = Letter Shift, 5 = Figure Shift, 9 = Space

When in figure shift mode, any letters typed will be printed as the symbol or numeric value on the key. Therefore, 5M89 is go into figure shift mode, key M is a full stop, back into letter shift and then space.

How does Dragon find the crib?

When the start switch is thrown, Dragon begins reading in from the de-chi tape, ten characters at a time. Each of the five impulses from each character are read into a seperate series of relays (much like a shift-register). The ten characters are then added (using modulo-2 addition - also called XOR) to each of the characters of the crib. This gives a ten letter pattern which is the extended PSI, written PSI'.

To understand how Dragon works, we need to understand the difference between the PSI stream and the PSI extended stream. The PSI stream is the list of characters which are calculated by rotating the PSI wheels on the Lorenz around one step at a time and writing out the characters encoded on the five wheels. When the Lorenz actually runs though, the PSI wheels do not always step on for every character which is being enciphered but are moved using the results from the two MU (motor) wheels ( plus also the result of one or more of the other wheels on later models). If you write out the list of characters that actually comprise the key during an actual enciphering run, they will therefore appear to repeat letters which is due to the staggering motion of the PSI wheels. Therefore, a section of the PSI could be SCQLPM but the PSI' when run, and therefore the actual letters used in the enciphering of the data, could be SCCQLLLPM, the repeated letters being where the PSI wheels didn't move that time.

If you recall from the last page, we showed how our de-chi is the result of the plain text + the PSI, but in actual fact, it's not the PSI but PSI' (extended) that we are seeing in this sum.

Now if DE-CHI = PLAIN + PSI', we can see that if we add in our crib guess (which is in plain text), and we also guess it is in the correct place in the text, we will cancel the PLAIN from the formula. PLAIN + CRIB (these cancel out if equal) + PSI' leaves us with just the extended PSI'.

We are therefore very close to being able to check the result against our known values of the PSI wheels which are encoded on the banks of switches on Dragon. The problem is, we have the extended value of PSI' whereas our PSI wheel settings are just the pin settings on the wheels, just PSI

The assumption that Dragon made is that each of the repeated letters within our calculated PSI' is due to a stagger of the motor wheels and using a bank of relays, it contracts any duplicate letters to make an assumed PSI value. You may notice that it is quite possible for adjacent letters of the PSI wheels to actually be the same, in which case the PSI wheels may have stepped while still getting the same letter. This is something that Dragon could not cope with and would give a false positive result. Dragon 2, a later version that was built at Bletchley Park in the war could, by also keeping track of the MU and limitation wheels, only contract letters on real PSI wheel movements, which stopped this issue.

An example

DE-CHIVYPPA4RYB9Current ten characters read from tape input
CRIBSCHERENFERCrib set on plugboard
PSI'554QDDIOOCDE-CHI + CRIB = PSI'
PSI54QDIOCPSI' contracted (removing all duplicate letters) = possible PSI value

Finding the PSI wheels

The next step involves us needing to find if there is a pattern of cam settings on our PSI switches which exactly matches the sequence of PSI we've calculated. For the first PSI wheel, we want to check all of the first impulses for each character from our PSI result.

In our example, the first character 5 is equal to XX·XX in ITA2 code so we want to store an X. The second character is the number 4 which is ·X··· so we want the first ·, we then store these for each of the seven characters in our calculated PSI (54QDIOC) giving the result X·XX···.

To find if we have a match, the Dragon has relays to check in parallel these settings against all possible positions along our set PSI switches which are loaded into another bank of relays. The same is done for impulses 2-5, each PSI wheel being compared against the corresponding switch relays.

Continuing our example, should our PSI1 wheel settings for each of the 43 cams on wheel 1 be 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••

Finally, should a match be found on all five patterns, we have potentially found a wheel setting where our crib could be placed. The Dragon will stop and display the current values for the operator to write down.

If a result is not found, another letter is read from the DE-CHI tape and the process continues until we find a match or the end of the tape is read.

The result display

Once we have a match and the Dragon has stopped, we are given a number of displays which show the results of the work.

To allow someone to use the results of our crib search, we need to store a number of items. Firstly, we need to know where on the PSI wheels the pattern has been matched. Secondly, we need to know the current position we're reading of the DE-CHI tape we're reading in and lastly, it's useful to know which letters of the PSI' were contracted.

On each bay is a bank of lights (midway down the rack). These lights will show at which position of the stored PSI settings our current crib has fitted. The display on BAY1 has results for both PSI 1 and PSI 2 while the other racks just show their specific wheel.

The second item of information we need to know is which character is being read from the de-chi tape. I believe that on the original Dragon, this was just probably just read directly from the tape, the count being a manual count of tape characters. A later addition, built at Bletchley Park using British "3000 type" relays, was a scale-of-31 counter which is visible on GCCS photographs but not on earlier SSA photographs. The photographs are not entirely clear, and there does not appear to be any record of the exact nature of the display, but I have created my simulation display to show the result of the counter, making it much quicker to view and record the position of the de-chi tape, and also the current ten characters from the tape.


GCCS photo of Dragon 1, REF: TNA HW 25/26

Once a possible crib position had been found, the results would be sent to the Testery so the break could be extended manually back to the beginning of the tape, thereby giving the exact start positions of the PSI wheels for this message. Once this was known, along with the original CHI and MU wheel start positions, the message would then have been run on a Tunny machine which would complete the final decode.