The Alan Turing Cryptography Competition

2019 edition. From the people behind the MathsBombe Competition.
Home Archive

Solutions

Chapter 1

Timesucker's competition requires Mike and Ellie to solve a code involving six puzzle pieces. Overlaying cards of the same colour and the reading in the order of the numbers on the cards (or thinking about traffic light colours) reveals the message:

Data is a precious thing.
and the 5th word is 'thing'.

This is the start of the quotation 'Data is a precious thing and will last longer than the systems themselves', said by Tim Berners-Lee, the inventor of the World Wide Web, in 'A Framework for Web Science'.

Chapter 2

Dr A's tablet displays a coded message. The message is transcribed using the International Phonetic Alphabet in which each symbol represents a sound made in normal speech. Unlike normal written English, each symbols always represents the same sound.

The plaintext is

Every human's voice sounds different. This makes voice recognition a difficult problem. Speak now to confirm that you understand this. If you stay quiet then you will get hurt.
and the 24th word is 'quiet'.

The names of Drs A, B, C are not accidental.

  • Dr A - Dr Alice Hopper - references Rear Admiral Dr Grace Hopper (1906-1992), one of the pioneers of computer science. She popularised the idea of a machine-independent programming language (this was a revolutionary idea in the late 1940s-early 1950s where the (handful) of programmable computers all had their bespoke programming languages). You can read about her remarkable life on Wikipedia here.
  • Dr B - Dr Bayan Al-Mahmali - references Sutayta al-Mahmali (died 377H/987CE). Sutayta al-Mahmali (also spelled al-Mahamali) lived in Baghdad and was considered an expert in both legal matters and mathematics, particularly algebra and number theory. You can read about her life here.
  • Dr C - Dr Casey Easley - references Annie Easley (1933-2011). Annie Easley was a computer scientist, mathematician and rocket-scientist. She worked for NASA, initially as a computer (in the days before calculators/electronic computers were commonplace a 'computer' is somebody who computes, just as a 'baker' is somebody who bakes) before moving onto rocket design and energy storage. You can read about her life here.

Chapter 3

Mike has found a folded piece of paper on the seat of Dr B's car. The paper appears to be an advert for a new self-driving car, but it contains a hidden message. The message can be found by taking the first letter of each word (apart from the title) in the text, which reveals

Self-driving cars must have a manual brake to avoid fatalities. Push the blue button.
and the 14th word is 'button'.

One thing that made this a little bit more tricky was that you had to be very careful about the word count. In English hyphenated words count as one word. Self-driving, as an adjective, is a hyphenated word, as shown explicitly in the title of the advert.

This type of code is actually very hard to write without having phrases that sound like advertising speak. Consequently, we decided to turn what had been a hand-written note in our original story draft, into an advertising leaflet.

Chapter 4

Ellie sends Mike a text asking for help, but it appears to be a random collection of emoji. The text is actually a substitution cipher, but some of the most common letters can be represented by two different symbols to make frequency analysis a bit harder.

There are several ways to start deciphering this message. Once you notice that there are more than 26 different characters, you should expect that one letter in the plaintext is represented by multiple characters in the ciphertext. There are several three letter words beginning 'Ye'; there are also several longer words also beginning 'Ye'. This suggests that 'Ye' stands for 'th' in the plaintext and that the three letter words are all 'the'. There is also a word ending in an apostrophe followed by a single character; this is likely to be an 's'. Once you've identified these letters, then you can start making educated guesses on the remainder. There are a few sneaky traps in the ciphertext: the only single-lettered words in common English are 'a' and 'I', but in this ciphertext, Dr C is referred to and this may lead you to incorrectly assume that the symbol for 'C' represents 'a' or 'I'.

You can see the ciphertext and plaintext below.

The plaintext is
Things are very wrong at TimeSucker. Dr C is in danger and Suri has been threatening his staff. I will open a window on the first floor of the torus. Climb the tree next to it and you should be able to get back inside. There is a cleaner's closet near the window. Meet me there in one hour.
The 31st word is 'climb'.

Chapter 5

Ellie and Mike see some strange symbols open in an editor on the screen of Dr C's computer. The final three lines appear to be a coded message. If you take these letters and apply frequency analysis, you'll find that the frequency matches that of English, which hints that this could be a permutation cipher. In other words, the letters have been moved around but not substitution has been applied. How can we find out which permutation of the letters have been applied?

In fact, the first six lines on the screen are written in a programming language called APL (A Programming Language). You can find details of the meaning of the symbols here. These lines describe the permutation that has been applied.

The first line is a comment and if you shift the letters one place backwards in the alphabet it reads 'APL CODE'. The next line is where all the action happens. It takes a variable PLAIN (the plaintext) converts it into an 11 x 11 array and then applys a series of array transformations. Line 4 converts the 11 x 11 array back into a single line of text and prints it to the screen. The output is given on lines 8 to 10. Line 6 is another comment that says 'OUTPUT' when you shift the letters backwards one place. In order to recover the plaintext you need to apply the inverse of all the array operations to the output.

In APL, the operations are applied from right to left, so to invert we need to apply from left to right. Firstly we need to arrange the letters in an 11 x 11 array.

CAURITRAIUA HRMECIBTSBN ETPCIEEMSJO CININNSEHEV KNOSETPNOCE YSWIUDOTUTR OUXOSAKBLTS ULXNETEUDOI RIXMSATTBHG SNXEPFRTEUH TMPPDAOEHSM

The last operation performed is 1⊖, which "rotates" the rows of the array by one, moving the top row to the bottom. In order to reverse this we need to move the bottom row to the top.

TMPPDAOEHSM CAURITRAIUA HRMECIBTSBN ETPCIEEMSJO CININNSEHEV KNOSETPNOCE YSWIUDOTUTR OUXOSAKBLTS ULXNETEUDOI RIXMSATTBHG SNXEPFRTEUH

The next operation is 3⌽, which "rotates" the columns of the array by moving the first first columns to the right-hand side. We undo this by moving the final three columns to the front.

HSMTMPPDAOE IUACAURITRA SBNHRMECIBT SJOETPCIEEM HEVCININNSE OCEKNOSETPN UTRYSWIUDOT LTSOUXOSAKB DOIULXNETEU BHGRIXMSATT EUHSNXEPFRT

The next operation ⍉ is a transpose, which means that you exchange the rows and columns of the array, i.e. reflect about the diagonal that runs from top left to bottom right.

HISSHOULDBE SUBJECTTOHU MANOVERSIGH TCHECKYOURS MARTINSULIN PUMPNOWXXXX PRECISIONME DICINEUSESP ATIENTDATAF ORBESPOKETR EATMENTBUTT

This now starts to look like English and make people guessed at this point that the plaintext started with the obvious sentence "Check your smart insulin pump"; BUT there is one more array operation to apply. The operation 5⊖ moves the top five rows to the bottom, so we must move the bottom five rows to the top.

PRECISIONME DICINEUSESP ATIENTDATAF ORBESPOKETR EATMENTBUTT HISSHOULDBE SUBJECTTOHU MANOVERSIGH TCHECKYOURS MARTINSULIN PUMPNOWXXXX

Converting this array back into one line and adding the spaces we have the final plaintext.

PRECISION MEDICINE USES PATIENT DATA FOR BESPOKE TREATMENT BUT THIS SHOULD BE SUBJECT TO HUMAN OVERSIGHT. CHECK YOUR SMART INSULIN PUMP NOW XXXX
The 15th word is 'human'.

APL was initially conceived as a mathematical notation, which is why it looks like maths, but was developed as a programming language by IBM. The main limitation at the time was that the special symbols in the language required special keyboards and display devices, which were not generally available.

Chapter 6

The self-aware Cid has been revealed as the mastermind behind the strange goings on at TimeSucker. It sets Mike and Ellie a challenging binary code to solve and the price of failure could be very unpleasant ... The code is a collection of binary numbers, both four bit (BInary digiT) and twelve bit. In binary, or base two, each digit can only be 0 or 1 and digits in different positions correspond to powers of 2. Thus the binary number 10 represents 2 and 11 represents 3. The code set by Cid is particularly hard to crack because it involves pairs in many different ways, as implied by Cid's strange choice of words. In fact, this might be the hardest code we've ever set.

Each twelve-bit number actually represents a pair of letters encoded by their numerical value in base 26. Let's take the first 12-bit number as an example to see how this works. The number is:

0000000101110101 = 1 + 4 + 16 + 32 + 64 + 256 = 373,

and we can write 373 as

373 = 14 x 26 + 9.

Thus 373 would be a two-digit number in base 26, one digit represents the number of twenty-sixes and the other the number of ones. In this case, we have 9 ones and 14 twenty-sixes. Converting these two numbers into letters using the standard method we have 'I' (the 9th letter of the alphabet) and 'N' (the 14th letter of the alphabet), which gives us the first word 'In'.

Proceeding in this way with all the 12-bit numbers will not reveal the plaintext because there is another complication: the 4-bit numbers. Each of these numbers represents a "shift", i.e. the number of digits of the plain binary text has been removed from the left-hand side and added to the right. Thus, we must un-shift all the 12-bit numbers before we can decode.

If you look very carefully, you can just about see that the pattern of '1's in the shifts spells out "XII bit shift of pair", which is a big clue to what's going on. Even if you didn't spot this. Thinking about pairs in base 26 means that the maximum number needed is 26 x 26 = 676, which only needs 10 bits to encode. Thus, once we have done all the shifting correctly the first two bits of the 12-bit number should all be zero. The final shifted 12-bit numbers, the decimal representation and the corresponding two letters are shown in the table below.

000101110101 = 373 → In 000010010110 = 150 → te 000101100000 = 352 → nm 000101110101 = 373 → in 001000011101 = 541 → ut 000111110011 = 499 → es 001001011111 = 607 → Iw 000101000001 = 321 → il 000000100110 = 038 → la 001000001011 = 523 → ct 001001000101 = 581 → iv 001000001001 = 521 → at 001000001101 = 525 → et 000010001010 = 138 → he 000000011101 = 029 → ca 000001000110 = 070 → rb 000101111011 = 379 → on 000011101110 = 238 → di 001001111111 = 639 → ox 000001110001 = 113 → id 000001101101 = 109 → ed 000101100111 = 359 → um 001000011000 = 536 → pt 000000100010 = 034 → ha 000011111110 = 254 → ti 000110110011 = 435 → sp 000111010101 = 469 → ar 000110011010 = 410 → to 001000001110 = 526 → ft 000010001010 = 138 → he 000011110000 = 240 → fi 000010010100 = 148 → re 000100111001 = 313 → al 000111010101 = 469 → ar 000111111011 = 507 → ms 001000000111 = 519 → ys 000010010110 = 150 → te 001010010111 = 663 → mY 001000110001 = 561 → ou 000000011101 = 029 → ca 000111111100 = 508 → ns 001000101010 = 554 → hu 001000011100 = 540 → tt 000011110010 = 242 → hi 000001111011 = 123 → sd 001001100101 = 613 → ow 000001000010 = 066 → nb 000001100111 = 103 → yc 001000011101 = 541 → ut 000011111110 = 254 → ti 000011000100 = 196 → ng 000011100100 = 228 → th 000111011001 = 473 → er 000001101101 = 109 → ed 000000011101 = 029 → ca 000100111010 = 314 → bl 000110001011 = 395 → eo 001000010110 = 534 → nt 000010001010 = 138 → he 000010001110 = 142 → le 001000001110 = 526 → ft 000000110001 = 049 → wa 000101000100 = 324 → ll 000101101101 = 365 → an 000110001010 = 394 → do 000010010010 = 146 → pe 001000010110 = 534 → nt 000010001010 = 138 → he 000000100111 = 039 → ma 000101110101 = 373 → in 000110001010 = 394 → do 000111100011 = 483 → or 001010001100 = 652 → by 001000100101 = 549 → cu 001000011100 = 540 → tt 000101110101 = 373 → in 001000001111 = 527 → gt 000010001010 = 138 → he 000100111010 = 314 → bl 000010010111 = 151 → ue 000000011101 = 029 → ca 000100111010 = 314 → bl 000101110001 = 369 → en 001001110101 = 629 → ex 001000011100 = 540 → tt 000011111001 = 249 → oi 000000010100 = 020 → t

Arranging the resulting pairs in the usual linear order and adding spaces between words, we arrive at the plaintext.

In ten minutes I will activate the carbon dioxide dump that is part of the fire alarm system. You can shut this down by cutting the red cable on the left wall and open the main door by cutting the blue cable next to it.
The 42nd word is 'cable'.

The image in the code contains an Easter egg. Cid was created by S. Falken and R. Chandra. Both are fictional computer scientists who created rogue artificial intelligence. Stephen Falken was a fictional character in the 1980s film 'WarGames'. Dr Chandra was a fictional character in the film '2010: Odyssey Two' based on Arthur C Clarke's novel of the same name and the sequel to '2001: A Space Odyssey'. Dr Chandra created HAL-9000 (which in turn was the inspiration for us to create Cid), an artificial intellgence whose programming leads him into conflict.

Chapter Epilogue

Cid briefly splutters back into life and displays a final message. It is a simple substitution cipher, with a two-digit number representing each letter. The substitution is given below (note that not all letters were used in the plaintext).

Plaintext A B C D E F G H I J K L M
Ciphertext 16 23 06 11 13 07 21 08 24 12 02 17 01
Plaintext N O P Q R S T U V W X Y Z
Ciphertext 25 22 09 19 03 14 26 20 04 15 05 10 18

The plaintext is

A calculator is a tool for humans to do mathematics more quickly than they could do before. Artificial intelligence, machine learning and big data allows computers to analyse data more quickly than they could do before. It is then up to humans to use this information wisely to revolutionise society.
The 49th word is 'revolutionise'.
Alan Turing Cryptography Competition 2019 is organised by the The Department of Mathematics at The University of Manchester.
© The University of Manchester 2012–2019, All Rights Reserved
Contact us | Privacy notice