The ALAN TURING
Cryptography Competition.
(edition 2014: #3).
The ALAN TURING
Cryptography Competition.
(edition 2014: #3).
You are reading the website of the 2014 edition of the competition, which ended on Wednesday 21st May at 11:59 pm. We are planning to run a new edition next year, to start in January 2015. The website for that new edition appears in December here. If you would like to receive a reminder around that time by email please look here. For any particular enquiries you can contact us on cryptography_competition@manchester.ac.uk.
 About For Home cryptography Register FAQ Rules teachers News Leaderboard Forum Map Archive
The Tale of the
The Tale of the
Lovell Legacy
Lovell Legacy
Due: is released!
Due: is released!
Due: is released!
Due: is released!
Due: is released!
Due: is released!
Due: is released!
Due: is released!
Solutions.
Solutions.

## Jodrell Bank

We're very grateful to Jodrell Bank for allowing us to use it as the setting for part of the story. Some features of Jodrell Bank mentioned are true (there is a `galaxy garden', the Discovery Centre does contain many interactive displays, and the radio telescopes are so sensitive that you must not use a mobile phone on the site). However, a great deal of artistic licence was taken. In particular, there are no rogue spies at Jodrell Bank, you won't be kidnapped in the garden, you can't climb on the telescope (and - alas! - there are no secret code-breaking devices buried underneath it!).

Bernard Lovell was the founder of the Jodrell Bank Observatory and was its director from 1945 to 1980. Although they worked at the University of Manchester at the same time, as far as we know Turing and Lovell never met.

## Chapter 1

Mike and Ellie are set a code-breaking challenge from MI5 that consists of a sequence of pictures and the occasional letter.

The message is revealed by "reading" the pictures:

 GOAT TWO JOG (-G) DRILL BANK ON SATURN (-N) DAY

Reading the words out loud and removing the letter G from JOG and the letter N from SATURN, the message becomes

GO TO JO-DRILL BANK ON SATUR-DAY,

which, with a little bit of creating reading, becomes:

GO TO JODRELL BANK ON SATURDAY.

The code words are the 3rd and 4th words and the answer is `jodrell bank'. (Some of you may have noticed that we were generous and gave people a second chance if they typed `jodrill bank').

This type of code (or puzzle) is a called a rebus and was common in heraldry in the middle ages. A particular type of design called a canting arms uses a rebus to indicate the name of a person or place. The form has been extensively used in games and as coded messages and was particularly popular in the 19th century. A rebus was even used as an advert for life insurance in 1869, see here. Modern examples are often set as puzzles in newspapers and magazines and in the board game Dingbats.

## Chapter 2

Mike and Ellie see someone acting suspiciously, retrieving a newspaper from a rubbish bin. After the man has looked at the newspaper, he tears it up and replaces it in the bin. Mike and Ellie investigate and discover a partially completed crossword with what looks like a code at the bottom.

The crossword can be solved as follows:

The code refers to letters in the crossword, for example C10 means the letter in column C and row 10. Spaces between words are indicated by the solid squares. The plaintext is:

THE LEGACY IS BURIED NEAR THE TELESCOPE

The code word is the 7th word and the answer is `telescope'.

Crosswords have a long association with cryptography. In 1942, when Bletchley Park were looking to recruit new codebreakers to help decipher enemy codes, they planted a cryptic crossword in the Daily Telegraph. Anyone who could solve the crossword was invited to a `competition', solving a crossword under exam conditions, and those who could complete it in under 12 minutes were invited to become a code-breaker at Bletchley Park. You can read the full story here.

During preparations for the D-Day landings in 1944 several codenames for the landing beaches, floating harbours, etc, appeared as words in the Daily Telegraph crossword. Was this information being leaked to the Nazis by a spy, or was there a more innocent explanation? You can read the story here.

Crossword compilers often use nicknames to hide their real identity. (In our opinion, one of the finest compilers was Araucaria, real name John Galbraith Graham, who used to set crosswords in the Guardian. Araucaria is the latin name for a genus of evergreen trees that include the monkey-puzzle tree, Araucaria araucana.) The nickname of the crossword compiler in Chapter 2 is Publius Enigma, a reference to an as-yet unsolved code from 1994 used to promote a Pink Floyd album; details are on Wikipedia.

## Chapter 3

Mike and Ellie go to the Manchester Museum to seek help from their friend Barquith. Barquith appears to have gone missing, but has left them a coded message.

This is a transposition cipher. The letters themselves are not changed (as they would be in a substitution cipher, for example), but the letters are transposed (moved about). In this case, you can tell that a substitution cipher has not been used by performing frequency analysis: the frequencies of the letters in the ciphertext are consistent with the frequency of letters in ordinary English. There are also some unusual letters (the odd capitalised letter, the number 5, and several occurrences of a capital X).

Barquith includes a note about making sure that Mike and Ellie are suitably primed, and the receptionist talks about Barquith's interest in factorising numbers. The message is 493 characters long, and 493 is 17 times 29. This suggests that if the message was originally written in an exact rectangle it would be 17 squares by 29 squares (or 493 squares by 1 square, but we already know that doesn't work).

There are two possibilities: either 17 columns and 29 rows, or 29 columns and 17 rows. You could just try both possibilities, but it's possible to be smarter. In the ciphertext, there are several Xs. Often, a coded message is padded with Xs to make it the correct length. There are gaps of 29 letters between the Xs, which suggests that using 29 columns and 17 rows might be right. Writing the code out in a 29 by 17 grid gives:

tnoIitdyueetonremLeentnatesnB
hgstneoIrlrldgebiemcthdnitoea
ieuhgdftilsyeolosgwtteryntmdr
nrsifwtinttiTdldaaoihyetthetq
kIpnohhsgoothdByfcroecaehitou
yectmnLdesuaronaeIsoenatwmiet
leiheIoerkineiklrtffvbnmoenPh
ipoeIfvvshlcinIlthoMiryersglX
fsuytieiuidrsgtehirIceeslsheX
eesaarlcasAasohdena5eamsdaaaX
iemrlsledepconiLLkrTskaaIgssX
sieeltLtenpkmanuoLohoiigfeheX
innlshehdgaaetknvugetnleytahX
ngaotegaLirntJsgenuyhtasohpeX
dtnoaaatoneyhoorlgewaoneueplX

Reading down each column, you get the plaintext

I think my life is in danger. I keep seeing two suspicious men and I think they are looking for me. It all started when I first heard of the Lovell Legacy. It is a device that Turing persuaded Lovell to ask his engineers to build. Apparently it can crack any code. There is something odd going on at Jodrell Bank. I think somebody called Lungrem is after the Lovell Legacy. I think Lungrem works for a rogue section of MI5. They want the device so that they can break into and read any email and any text message sent in the world. If you get this message then something has happened to me. Please help. Barquith.

The code word is the 19th word and the answer is `looking'.

## Chapter 4

Mike finds a coded note from Ellie that consists of strange symbols instead of letters. In fact, the symbols are standard astronomical symbols for the planets and constellations of the zodiac. The code is a straightforward substitution cipher: each symbol only represents one letter. There was no particular logic to the choice of symbols and the key to the cipher is given below:

Using the nine planets, twelve signs of the zodiac and the symbols for the sun and moon gives a total of twenty-three symbols, which means that three letters were not used in the code: f, w and x.

The brute-force way to crack the cipher is to use frequency analysis, but if you guess that Ellie signed her name at the end, that gives away the letters e (Earth), l (Pisces) and i (Mars), which is enough to get you off to a good start. If you next look for patterns that could match words like `lovell', 'lungrem' and 'jodrell' then you get enough additional letters to crack the rest of the code. The plaintext is

i have been captured by lungrems men barquith is here in a disused shed behind the apiary barquith learnt that once lovell had built turings machine he hid it at jodrell bank barquith abducted three days ago because he got too close to discovering lungrems identity come and rescue us ellie

The code word is the 44th word, `discovering'.

## Chapter 5

Ellie and Mike watch Ellie's kidnapper send a coded message using an array of lights that represent a radar telescope array. The first challenge here was to transcribe the code which is easiest if you have some graph paper to hand! The code is actually another substitution cipher, but we've added a little `salt' to the message. In this case, the `salt' is random characters that are not part of the message, which is why there are more than twenty-six different symbols.

Once again, you can proceed by frequency analysis, but this code has a very definite logic. Observing the patterns you should notice that only the six rightmost and the top left lights are used. The top left light indicates whether the symbol is part of the message or not. If the top left light is not illuminated then the symbol should be ignored. That leaves the 3x2 array of lights on the right.

Many people have heard of binary (base two) which uses the numbers 1 and 0. This code is in ternary (base three), which uses only the numbers 0, 1 and 2. Counting up the illuminated lights gives 0, 1 or 2 in each column and the three columns correspond (reading from left to right) to nines (3x3), threes and units. In our familiar base 10 counting system (with ten symbols), the columns correspond to hundreds (10x10), tens and units. For three columns in a ternary system 3x3x3 = 27 numbers can be represented. The code is then a straightforward translation between the number in ternary and the corresponding letter, although it takes a little while to get used to it.

 A = 1 B = 2 C = 3 D = 4 E = 5 F = 6 G = 7 H = 8 I = 9 J = 10 K = 11 L = 12 M = 13 N = 14 O = 15 P = 16 Q = 17 R = 18 S = 19 T = 20 U = 21 V = 22 W = 23 X = 24 Y = 25 Z = 26

Note that there is some redundancy in this system, there are actually four possibilities for each column: A) no lights on, B) top light on, C) bottom light on and D) both lights on. We could have made the code more complicated (and harder to crack with frequency analysis) by using both cases B) and C) to represent the number 1 in each column. This would lead to a code in which multiple symbols represent the same letter. Alternatively, we could have used base 4 (quaternary), but we would still have needed the three columns to get to twenty-six letters.

The plaintext is

LOVELL LEGACY LOCATED READY FOR TRANSMISSION TWO PM TOMORROW FREQUENCY FOURTEEN FOUR EIGHT SEVEN KHZ

The code words are the 6th and 7th words, `transmission two'.

## Chapter 6

Mike, Ellie and Barquith listen in to a radio broadcast. After Barquith has tuned in the radio (they hear snippet of a radio play and some classical music) they hear an electronic voice reading out a code, interspersed with The Teddy Bears' Picnic (which, whilst kidnapped, Barquith also overheard his guard whistling).

This is a running key cipher (essentially a Vigenère cipher, but where the keytext is the same length as the plaintext). You can read an explanation of the running key cipher on Wikipedia. The key is formed from the notes of The Teddy Bears' Picnic. You can guess that there is some link between the music and the code because each of the four segments of code in the broadcast contains the same number of letters as there are notes in the preceding clip of music.

The first 8 bars of The Teddy Bears' Picnic comprises the notes

A D F E F E D F E F D E F E F D C F A G F G F A G A F G A G A F.

Using this as a key in the running cipher, the first part of the code deciphers as

Dig it up you idiot. I will be there at six...

At this point, you can either work out the rest of the music by ear, or realise that there are only 8 possible letters used in the keytext and proceed by trial and error (you might guess that the next word in the plaintext could be o'clock, PM, tonight, or tomorrow).

The plaintext is

Dig it up you idiot. I will be there at six tonight no matter what the weather.

The code word is the 17th word, and the answer is `weather'.

The code in this chapter was inspired by a real-life way in which spies communicate known as numbers stations. Numbers stations are often broadcast on shortwave radio and - although their origin and purpose are officially unknown - it is thought highly likely that they are run by governments to communicate with spies in the field. You can read more about numbers stations on Wikipedia.

The most famous numbers station was the Lincolnshire Poacher, named after the piece of folk music that was played at the start of each broadcast to identify it. This station was believed to be run by the UK government. Although it is no longer active, you can hear a recording of it here. In homage to this, the numbers station that Lungrem broadcasts uses the same frequency (see Chapter 5) as the Lincolnshire Poacher.

As Barquith is tuning in the radio, you can hear a clip of an audio play and some classical music. The play is a Sherlock Holmes story, The Adventure of the Red-Headed League. Codes play a crucial role in another Sherlock Holmes story, The Adventure of the Dancing Men.

## Epilogue

Lungrem appears to have hacked Mike's TIMEsucker account, seemingly from beyond the grave, and left him a coded message. The message is a book cipher using the story that forms the competition. n.m refers the mth word of Chapter n (with E denoting the Epilogue). The plaintext is
Mike and Ellie will be back in a new cryptography competition soon.
 This competition is organised by: and sponsored by: