How to play, and the history

How to read today's intercept, how the machine works under the bonnet, and a short history, with sources, of how Bletchley Park broke it.

This is a game. The cam patterns, the QEP book and the messages are made up for it, and nothing here is a real intercept. Not affiliated with or endorsed by Bletchley Park, The National Museum of Computing or the Crypto Museum.

How to play

  1. Press Play today's round. Everyone gets the same intercept on the same UTC day, and a new one arrives at 00:00 UTC.
  2. Read the QEP number at the top. That's the number the German operator sent in clear before the message.
  3. Find that number in the QEP book page. Its line gives the start position for each of the twelve wheels, in the same order as they stand on the machine: five psi, two motor, five chi.
  4. Set the twelve wheels to match. Click the arrows, drag a number up or down, or type it in. The arrow keys work too.
  5. Press Decode the tape (or the D key). The tape runs through, the wheels turn, and the teleprinter prints what comes out.

To see how it works, set the teleprinter speed to Visual demonstration. The first few characters go through one step at a time: the character's five bits, the chi bits added, the psi bits added (and whether the motor let the psi wheels step), then what comes out. It's drawn on the machine itself, with a panel above the chi wheels, the motor wheels and the psi wheels, and the wheels step as each character goes through. Then the rest of the message speeds up. The whole run takes about 13 seconds. With reduced motion on, each step just appears with no movement.

The book got damp. On some lines one tens figure is smudged, so all you can read is the last figure. If your line has a smudge, try the positions that end in that figure. A wrong guess prints garbage and costs points, so think before you run the tape.

A tip: if the first few letters come out right and then it turns to garbage, the chi and psi wheels are probably fine and a motor wheel is out. That's because the motors only decide when the psi wheels move.

Scoring and hints

A correct decode is worth 1,000 points. Each wrong try takes off 150, but running the exact same wrong settings again is free. You never get less than 100 for a decode. Hints are paid for with points, which are shared with Skywave, so they don't touch your score: checking whether one wheel is right costs 20 points and reading the smudge costs 50. Decoding today's round earns you 100 points, and a practice round earns 20. Your score is shown as you go, so you know what a decode is worth right now.

Decode the daily round on consecutive UTC days to build a streak. It's kept in this browser only. Practice rounds never touch it. When you decode, a card shows the sum, the tape runs off at speed and the score counts up. With reduced motion on, in settings or on your device, the card and score just appear.

Hard mode

Pick Hard on the title screen, then Play today's round. It's the same intercept as normal mode that day: the same message, the same QEP number, the same start positions and the same smudge. What changes is how much I do for you. Hard and Realistic are the whole job as the operators did it: read the QEP off the tape, find today's page, set the wheel pins from the pattern sheet, set the start positions, read the tape and send a reply. Hard has you prove each step once and fills in the rest; Realistic leaves all of it to you.

Hard mode has two more hints, paid with points like the others: revealing the QEP costs 40 and each character of the message you reveal costs 10. Checking a wheel is 20 and reading the smudge is 50. Reading today's hard round earns you 250 points. You never get less than 100 for the score. Hard mode keeps its own score and streak, apart from normal mode's, and the result you share is marked HARD. The page dates are real calendar dates around today, but the pages themselves are made up, like the rest of the book.

Reading the message isn't the end of a hard round. You then send a short reply back: it's shown under the tape, it's the same for everyone that day, and it names the message you read. Leave the wheels on the settings you read the message with, type the reply, and the machine enciphers it and punches the tape. If the tape reads as the reply at the other end, the round is done. The reply has its own score: 300, less 100 for each wrong tape, never less than 50. Today's reply also earns 100 points.

To read the tape quicker, use the reading aid. It highlights one row of the tape at a time. Tap the five hole positions to copy that row, and the matching line lights up on the cheat sheet. The shift is up to you: the Letter shift button switches the highlight to the figures column and back, because the machine never changes shift for you. Then type what you read in the answer box. Next and Previous move along the tape.

Realistic mode is all by hand: every pin on all twelve wheels, every character of the message and of the reply. There's no mark on a pin that differs, no word count after a wrong reading, and no Reveal a character or Check a wheel hint. Only the QEP tells you when it's right. You learn whether the rest is right when you send the whole reading. Realistic has its own score (1,500 to start), its own streak and 400 points a day, the most of the three.

Both walk you through the job in four steps: read the QEP, set the pins, set the start positions and run the tape. Once the QEP is right the earlier panels fold away and the wheels turn to face you; Set start positions takes you on, and Back to setting pins takes you back to fix things. The page remembers which step you were on. Every pin has to be right, and you have to read the tape from a run on your own pins.

Every panel has a Hide button, and the page remembers what you've hidden. While a wheel is face on the panels fold away, any one comes back with Show, and Back puts them as they were.

With Hard or Realistic picked, Practice gives you rounds of that mode too, on random settings: a fresh book, preamble and message every time, the page to find is the one dated today, and the answer check is the same. Practice never touches your score or streak.

Practice

Practice has three tabs. Random settings gives you a fresh intercept as often as you like, on the SZ40 or the SZ42A. Encipher lets you type your own message and get a tape out, using today's cam patterns and whatever wheel settings you choose. Run that tape back in with the same settings and you get your message back. Chi only is below.

Chi only mode, which matches the printable model

Chi only uses just the five chi wheels (41, 31, 29, 26 and 23 cams), with no psi or motor wheels, so the key for each character is the chi on its own. It's there because I've made a simplified printable model of the chi wheels, and this mode works the same way as that model. You can type your own cam pattern for each chi wheel and set the start positions, then encipher or decipher.

The conventions are the same as the model's, so your paper workings, the model and the screen all agree:

A worked example, using the key on the model's fixed wheels (the Worked example button loads it). It's an example key made up for the model, not a wartime one. With all five wheels at 01 the first cams read 0 1 0 1 0, which is R. The first letter is H (00101). Adding them, a 0 where they're the same and a 1 where they differ, gives 01111, which is V. Keep going and HELLO enciphers to VNTDH. Three more to try on the model: ATTACK AT DAWN at 05 12 07 20 03 gives AIX4XKOXF9QFCX, BLETCHLEY PARK at 41 31 29 26 23 gives 4ONLYOMTOW9W4T, and TUTTE at 17 03 22 09 11 gives A9SVO.

Reading the tape

Each row across the tape is one character, five holes wide. A small sprocket hole runs between holes 2 and 3, two on one side and three on the other, which is how 5 hole teleprinter tape was laid out. The letter under each row is what the teleprinter printed. The arrows mark the shift characters, and ␣ is a space.

Intercepts are written the way Bletchley Park wrote them: letters for letters, and figures for the characters that aren't letters. 9 is a space, 3 a carriage return, 4 a line feed, 5 the shift to figures, 8 the shift back to letters, and / is blank tape. So a full stop goes out as 5M8, because M in figure shift is a full stop.

The full teleprinter alphabet
The 32 teleprinter characters
ValueImpulses 1 to 5Bletchley nameLetter shiftFigure shift
0...../blanksame
1....xTT5
2...x.3carriage returnsame
3...xxOO9
4..x..9spacesame
5..x.xHH£
6..xx.NN,
7..xxxMM.
8.x...4line feedsame
9.x..xLL)
10.x.x.RR4
11.x.xxGG@
12.xx..II8
13.xx.xPP0
14.xxx.CC:
15.xxxxVV=
16x....EE3
17x...xZZ+
18x..x.DDWho are you? (WRU)
19x..xxBB?
20x.x..SS'
21x.x.xYY6
22x.xx.FF%
23x.xxxXX/
24xx...AAdash (-)
25xx..xWW2
26xx.x.JJBell
27xx.xx5figure shiftsame
28xxx..UU7
29xxx.xQQ1
30xxxx.KK(
31xxxxx8letter shiftsame

How the machine works

The SZ40 and SZ42 were cipher attachments that sat between a teleprinter and the radio. Each character's five impulses were added, impulse by impulse, to five impulses of key. Adding is simple: two the same gives a dot, two different gives a cross. Add the same key twice and you're back where you started, so one machine with the same settings both enciphers and deciphers.

The key came from twelve pinwheels, each with a different number of cams that could be set raised or lowered. Standing in a row, left to right, there were five psi wheels (43, 47, 51, 53 and 59 cams), two motor wheels (37 and 61) and five chi wheels (41, 31, 29, 26 and 23). The 3D view shows them in that order, with raised cams sticking out. It's simplified: I've sized the wheels by cam count so they're easy to tell apart, and it isn't a scale model.

For every character, this is exactly what the game does:

  1. Read every wheel at its current position. Nothing has moved yet.
  2. The key is the five chi cams added to the five psi cams.
  3. The basic motor is the cam on the 37 wheel. On the SZ40 the psi wheels move on after this character only if the basic motor is a cross.
  4. Then everything steps. All five chi wheels move on one, every time. The psi wheels all move on one together, or all stay put. The 37 wheel moves on one if the 61 wheel's cam was a cross. The 61 wheel moves on one every time.

On the motor wheels a cross means go and a dot means stop. Because the psi wheels sometimes stood still, they often added the same letter several times in a row. Bletchley called that the extended psi, and it turned out to be the machine's big weakness.

The SZ42A, introduced in February 1943, added what Bletchley called a limitation. The one in this game is chi 2 one back: the psi wheels stand still only when the basic motor is a dot and the chi 2 cam read for the previous character is a cross. Otherwise they move. For the very first character the game uses the chi 2 cam one place back on the wheel, which is the same cam. Later limitations brought in the plaintext itself (for example the fifth impulse two characters back), which made depths much harder to use. I haven't put those in.

The QEP book

At first the sending operator told the other end where to set the wheels with a 12 letter indicator, sent in clear, one letter per wheel. From October 1942 that changed. Both ends had the same QEP book, a list of a hundred or more wheel settings. The operator sent QEP and a number, both ends set their wheels from that line, and once every line had been used the book was replaced. Settings weren't supposed to be used twice. In the game the QEP number points at a line of twelve start positions, which is how it worked, but the book page, its layout and the smudges are mine.

What's real and what's made up

The history, briefly

Tunny was Bletchley Park's name for the Lorenz SZ machines and their traffic. The Germans used them for high level messages between the High Command and army commanders across Europe, sent as enciphered teleprinter signals by radio. An experimental link started in June 1941, and by 1944 the British knew of 26 links.

On 30 August 1941 an operator sent a message of about 4,000 characters, was asked to send it again, and did so on the same wheel settings, with small changes to the text. Two messages on the same key is called a depth. John Tiltman spent about ten days teasing the two texts apart, and that gave him the key itself.

Bill Tutte, a young Cambridge graduate in the Research Section, took that key and found a repeat every 41 characters in its first impulse. By January 1942, working with the rest of the section, he had worked out the logical structure of the whole machine. Nobody at Bletchley saw a real Lorenz machine until the end of the war.

From July 1942 a section under Major Ralph Tester, the Testery, broke messages by hand. When the QEP books arrived in October 1942 they had to rely on depths, which got rarer. In November 1942 Tutte found a statistical way to find the chi settings without a depth, but it needed far too much counting to do by hand.

Max Newman's section, the Newmanry, set out to do the counting by machine. Its first, Heath Robinson, was working in June 1943. It ran two paper tapes that had to stay in step, which they often didn't. Tommy Flowers, an engineer at the Post Office Research Station at Dollis Hill, proposed an electronic machine that generated the wheel patterns itself and read just one tape. That was Colossus. The first one arrived at Bletchley Park on 18 January 1944 and did its first job on 5 February 1944. The first Mark 2 was working on 1 June 1944, days before D Day, and ten were in use by the end of the war.

Colossus didn't print German. It counted, to find the wheel settings. The plaintext came off British Tunny machines, built at Dollis Hill to copy the logic Tutte had worked out.

Sources

Spotted something I've got wrong? Email me: hello@dexmlabs.app