<<

BSFC Mathematics: Challenge 2020

Can you keep a secret?

It seems that secrets are part of human nature and, like them or loathe them, they are crucial to conducting many aspects of life from internet banking and shopping to warfare both ancient and modern. How can you communicate with a friend or ally in a way that a foe would not understand? Equally, how can you understand a foe’s coded message to their friends?

This challenge, written by the Maths department here at BSFC, will explore some of the main mathematical concepts in the development of cryptography and , the study of secret codes, and perhaps inspire you to take it further. If something relevant grabs your interest along the way, feel free to go off at a tangent and explore.

All answers to the main tasks are given near the end of the booklet so that you can check your understanding. The actual competition is on a separate sheet of 10 questions.

!kcul dooG

Page 1

Section One: Keywords

In this , you first write down the . Below this you write down the keyword (which must not have duplicate letters) followed by the remaining unused letters of the alphabet. For example, using the keyword ELVIS you get:

Plaintext A B C D E F G H I J K L M N O P Q R S T U V W X Y Z E L V I S A B C D F G H J K M N O P Q R T U W X Y Z

Using this cipher, the plaintext word SECRET would be coded into the ciphertext word QSVPSR. Check that you see why.

1) Use the keyword RINGO to put this message into :

BEATLES

Plaintext A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Ciphertext

2) Use the keyword BRAIN to fill in the ciphertext

Plaintext A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Ciphertext

Now decode the message LM OQMRJNK WEBTSMNVNQ Page 2

Section Two: Substitution Ciphers

The keyword cipher is just one example of a – where each letter is replaced by a different letter.

Here is a more random substitution cipher:

Plaintext A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Ciphertext B F D Q G C W S U K N M T X P H R I V J O E Y L A Z

1) How would you code the message CODE?

2) What would the intercepted message FOVJGQ mean?

Section Three: The

Julius Caesar popularised this form of cryptography around 2000 years ago. The basic idea is that all the letters in the alphabet are ‘shifted’ to the right by a set number of places. For example, using a shift of 3 places, the message

IT IS SUNNY TODAY becomes LW LV VXQQB WRGDB

To make using a Caesar Cipher easier, it is useful to have an alphabet strip which can be placed underneath the alphabet below and then shifted the required number of places.

You can cut out the alphabet strip on Page 5 and use it in the following section.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Put the following messages into code using the shift stated:

1) Shift 2 places

TODAY

Page 3

2) Shift 5 places

ZEBRA

Now try to unscramble these messages. (The shift that has been used is stated)

3) NWPEJ CV QPG (shift used: 2)

4) XLMW MW E WIGVIX QIWWEKI (shift used: 4)

5) ZHOO GRQH BRX (shift used: ?)

Page 4

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Page 5

Page 6

Section Four:

All the ciphers you have seen up until now have been substitution ciphers. This means that each letter of the alphabet is replaced by a different letter in the alphabet.

Without knowing the coding method used, at first glance it is very difficult to crack a substitution cipher.

1)a) How many ways are there to encode the letter ‘A’ in a substitution cipher? b) How many possible ways are there to encode the word HELP using a substitution method?

In theory there are 25! (pronounced ‘25 factorial’, meaning 25 x 24 x 23 x 22 x 21 x …) different substitution ciphers for the standard alphabet. It is practically impossible to check them all, even with a computer.

In the 9th century, Al Kindi eventually found a way round this. His inspired method works on the fact that some letters occur in language more often than others.

2) Do you know what the most common letter in English is? Copy and paste the article on pages 22-23 into the box here: https://www.simonsingh.net/The_Black_Chamber/letterfrequencies.html

Al Kindi’s method was based on the idea that some letters appear more often than others in written language. In fact, if a piece of text is reasonably long, the percentage of each letter becomes fairly predictable. For example, in written English, the letter T appears on average 9% of the time whilst the letter Z appears 0.1% of the time. It wasn’t straightforward and involved some guess work and trial and error, but it did work. Today, a computer can do it in seconds:

• copy and paste the coded passage below into the Ciphertext section of https://www.simonsingh.net/The_Black_Chamber/substitutioncrackingtool.html:

VEP HYXHLVHTP MO AWFJYFLT H RFNEPS HJNEHAPV FL VEFU ZHC FU VEHV FV FU PHUC VM KPKMSFUP VEP IPCZMSY MS IPCNESHUP,HLY EPLRP VEP RFNEPS HJNEHAPV. VEFU FU FKNMSVHLV, APRHWUP FO VEP UPLYPS EHU VM IPPN VEP RFNEPS HJNEHAPV ML H NFPRP MO NHNPS, VEP PLPKC RHL RHNVWSP VEP NHNPS, YFURMXPS VEP IPC, HLY SPHY HLC RMKKWLFRHVFMLU VEHV EHXP APPL PLRSCNVPY ZFVE FV. EMZPXPS FO VEP IPC RHL AP RMKKFVVPY VM KPKMSC FV FU JPUU JFIPJC VM OHJJ FLVM PLPKC EHLYU.

• Click “Frequency of Individual Letters” just below the text box for analysis. The resulting pop up window graph shows that the most common letter in the passage is “P”. So hopefully “P” translates as “e”.

Plaintext A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Ciphertext P

Page 7

• We can start to test this by typing E next to P in the columns and noticing that the passage then appears in the Plaintext box above with all the P’s changed to E! You can see from the graph that the 2nd most common letter in English is “T” and that in the passage it is “V” so type T next to the V. The first word in the passage is VEP and so we presumably have t_e. This would seem to suggest VEP is “the” so type H next to E and watch the words start to form.

Plaintext A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Ciphertext P E V

• Also, the cipher H appears by itself several times in the cipher text so could be I or A. Testing this in shows A gives the word THAT. The word after THAT is probably IT so test Plaintext I against Ciphertext F. The 9th word looks likely it will be THIS. So put S next to U. Things are shaping up nicely now. Keep testing! You don’t even need the whole letter set worked out – you should get:

THE ADVANTAGE OF BUILDING A CIPHER ALPHABET IN THIS WAY IS THAT IT IS EASY TO MEMORISE THE KEYWORD OR KEYPHRASE AND HENCE THE CIPHER ALPHABET. THIS IS IMPORTANT BECAUSE IF THE SENDER HAS TO KEEP THE CIPHER ALPHABET ON A PIECE OF PAPER THE ENEMY CAN CAPTURE THE PAPER DISCOVER THE AND READ ANY COMMUNICATIONS THAT HAVE BEEN ENCRYPTED WITH IT. HOWEVER IF THE KEY CAN BE COMMITTED TO MEMORY IT IS LESS LIKELY TO FALL INTO ENEMY HANDS

Can you use the substitution cracking tool to crack the new message below, encoded with a different substitution cipher?

Qcdjbp toy ictjbdjb aokh kltmsy qk hsofx tjn D qcdjf D rybdj qk pyy vctq vy jyyn qk nk Ckkfy dp igytogx djukguyn rsq vctq D nkjq fjkv dp vcyqcyo cy dp vkofdjb tgkjy ko vdqc pkhykjy ygpy Qcyoy toy lgyjqx ka itjndntqyp Qcy Osppdtj Htadt t jtqdkjtg pyisodqx tbyjix t hteko ikhlsqdjb ksqadq Htxry kjy ka qcy rtjfp Kjy qcdjb dp psoy D nkjq vtjq qk pdq cyoy tjn vtdq ako qcyh qk adjn hy Kj qcy kqcyo ctjn D nkjq fjkv ckv qk bk trksq adjndjb qcyh D bsypp dq dp pqdgg lkppdrgy qctq Ryj vtp vokjb tjn qcyoy dp jk agtv dj mstjqsh yjioxlqdkj Htxry qctq vksgn ry qcy rypq ksqikhy ako hy Jk agtv hytjp jk oytpkj qk odpf qoxdjb qk pdgyjiy hy D iksgn qsoj sl vdqc t atfy qtj tjn ptx D ctuy ryyj psoadjb dj Jyvmstx ako qcy gtpq qvk vyyfp tjn qcdp vckgy qcdjb iksgn espq rgkv kuyo Kj qcy kqcyo ctjn dq vkjq adw qcdjbp ako Ryj Ckkfy vkjq vtjq qk gytuy qctq qcoytn ntjbgdjb tjn pdjiy Ryj dp tgoytnx nytn qcyoy vdgg ry gdqqgy odpf ako Ckkfy dj qoxdjb qk adjdpc qcy ekr Ryjp iknyp toy byqqdjb hkoy pklcdpqditqyn Qcdp ikny dp ltq tjn D hdbcq spy dq hxpyga aokh qdhy qk qdhy

Page 8

Section Five: Tranposition ciphers

In a the letters in the message are not changed – they are simply rearranged. The next two ciphers are of this type.

Rail Fence Cipher In a , the message is written ‘downwards’ on the rails of an imaginary fence, starting a new column when the bottom is reached. For example, if you have three rails and a message of ‘This is a secret message’ you would write out:

T S A C T S G H I S R M S E I S E E E A J

The final letter J is chosen at random so that the last column is filled (if there are any unused columns, leave them empty). The cipher text is then read off horizontally with no gaps, so would become: TSACTSGHISRMSEISEEEAJ

Use the blank rails below to help you with these questions

1) Put this message into code using a rail fence with 3 rails

HAVE YOU GOT THE TIME

2) Put this message into code using a rail fence with 4 rails

MY CAR HAS BROKEN DOWN

Page 9

To decipher a message you must know the number of rails used to encipher it. For example, if 3 rails were used, you would split the cipher text into 3 equal groups. You then stack the groups on top of each other and read off the message vertically.

3) Decipher this message:

IAXROBARANPTDRKKMEECEEEF (Number of rails used = 3)

Columnar Transposition In this method, the message is written out in rows of a fixed length. The message is then read out column by column in a specific order. The number of columns and the order they are chosen is defined by a keyword.

For example, take the message WE ARE DISCOVERED FLEE AT ONCE and suppose the keyword is ZEBRA. The keyword has five letters so there are five columns. Each column is headed with one of the letters in the keyword.

Z E B R A W E A R E D I S C O V E R E D F L E E A T O N C E

If any rows are left partially filled, they are completed with random letters.

The columns are then rearranged so that the keyword’s letters are in :

A B E R Z E A E R W O S I C D D R E E V A E L E F E N O C T

So the code (reading vertically) is:

EODAE ASREN EIELO RCEEC WDVFT

(or EODAEASRENEIELORCEECWDVFT with no gaps)

Page 10

4) Put this message into code (without gaps) using the keyword MATHS

MAKE EVERY SECOND COUNT

5) This message has been put into code using the keyword DOMAIN

HNOTYEAWAAFSUOKEVPSMOWCE

Can you work out how to decipher it? (Hint: it may help to count the letters first)

Page 11

Section Six: Polyalphabetic Ciphers & Enigma

The Cipher Disc

A cipher disc allows quick use of a polyaphabetical coding method. In other words, more than one alphabet used at the same time.

Cut out the 2 biggest discs on the next leaf of paper and place one on top of the other, with a pencil or perhaps a drawing pin acting as a pivot.

1) Follow these steps to decode the message:

LMONCT where the keyword is FIB

• set the disc so that the outer A matches the inner F • decode the 1st letter of the message by looking it up on the inner disc and reading off the outer disc • set the inner disc so that I (instead of F) matches the outer A • decode the message’s 2nd letter • set the inner B to the outer A • decode the message’s 3rd letter • because our keyword is only 3 letters long, we go back to F now to decode the 4th letter • complete in this way till the message is decoded

What is the decrypted message?

2) Decode this message: QB D VQZO with keyword CODE

3) Now put the word MESSAGE into code using keyword CODE

(Don’t forget to rotate the disc after each letter!)

The beauty of this cipher is that each letter is coded with a different alphabet, making it very hard to analyse unless you know the keyword. A 3-letter keyword could take 263 = 17 576 attempts to guess, while to guess a 10-letter keyword could take 2610 , well over 100 trillion attempts.

There is a potential weakness, however. If we suspect the keyword is 3 letters, we could try frequency analysis on the 1st, 4th, 7th, 10th, 13th, etc. letters. This may well reveal what the first letter of the keyword was. Repeat this for 2nd, 5th, 8th, etc and the message may be decrypted.

Page 12

Page 13

Page 14

Enigma – a very brief history

Enigma means ‘mystery’. And a mystery machine it was. There is a wealth of detail about the Enigma on the internet as well as films including The Imitation Game (2012) as well as an eponymous 1999 film. It was used in World War II by the German military to encrypt messages. It was a landmark in enciphering. A very, very, very, very, strong machine. However, it was eventually cracked by the allies.

It worked on a similar basis to the cipher discs except that it • was mechanised and so was fast • had 3 discs instead of 1 so that the cipher text was enciphered again, and then again! • enciphered and deciphered via a keyboard and the Germans, who invented it, used a different keyword every day. There are lots of enigma emulators you can search online for such as this one: https://www.101computing.net/enigma- machine-emulator/

Page 15

Section Seven – Public Key Cryptography

Enigma, sophisticated as it was, was solved for a combination of a number of reasons, one of them being its reliance on keywords. No matter how complex the rules are to encrypt a message, if the keyword is known by an attacker, the message is at risk of being cracked. In the latter half of the 20th century, attention focused on trying to tackle this problem. Say hello to Alice, Bob and the ever-listening Eve…

Alice Eve Bob

Alice is trying to send a secret message over the internet to Bob without Eve eavesdropping and without meeting up or relying on it not being intercepted by mail or phone etc. She can scramble the message with ciphers like Railfence or Enigma but this relies on Alice and Bob agreeing on a keyword in advance. How do they get that keyword to each other in the first place? For thousands of years, it seemed an impossibility to send a keyword without fear of it being intercepted. Then as recently as the 1970s, this long-held assumption was overturned by the notion of a public key. Two different methods were developed, both still used as the basis of internet security. They’re both quite complicated but the basic ideas can be described:

Method 1 The Diffie-Hellman method (named after its creators in 1976)

This is an outline of how this algorithm produces a keyword that Alice and Bob can use without Eve ever knowing. It needs some background Maths first:

• Mod (modular) arithmetic basically outputs remainders. Eg 16 mod 7 = 2 because the remainder when 16 is divided by 7 is 2. Or 40 mod 15 = 5 because the remainder when 40 is divided by 15 is 5.

i) Calculate:

a. 20 mod 3

b. 10 mod 7

c. 120 mod 11

Page 16

d. 5 mod 5

e. 11 mod 3

f. 42 mod 5

g. 54 mod 11

h. 58 mod 11

ii) What do you notice about parts (g) and (h)?

• Alice wants to create a keyword to use in sending messages to Bob • Alice and Bob publically agree on the mathematical function 5x mod23. They don’t care if Eve knows this as it won’t help her. • Next, Alice choose a secret number, say A=4, secret even from Bob • Bob chooses a secret number, say B=3, secret even from Alice • Alice puts A into the function 5x mod23 and Bob puts B in

iii) What number does Alice get out? Call it α. iv) What number does Bob get out? Call it β.

• Alice sends α to Bob and Bob sends β to Alice without caring if Eve eavesdrops; in fact, Alice and Bob can go a step further and put these public keys on a website for anyone to look up!

v) Use (ii) to explain why they don’t care if Eve knows their public keys.

Now here’s the magic part:

vi) Alice calculates βA mod23 but keeps the result secret:

a. What does she get?

b. Why can’t Eve work this out?

vii) Bob calculates αB mod23 but keeps the result secret:

a. What does he get ?

b. Why can’t Eve work this out?

What you notice about the answers to (vi)a and (vii)a is not coincidence. Provided some of the choices are made carefully (to do with primes), it’s got to be the same: for a proof, you’ll need to carefully follow some tricky proofs, easily searchable on the internet.

So this is a system that has given Alice and Bob a , namely 18, that Eve has no way of knowing. 18 isn’t the message itself (and it’s short because we chose small numbers) but it can be used as a keyword for instance for the , eliminating the weakness of having to share the keyword insecurely. Page 17

Method 2 The RSA method (named after its creators, Rivest, Shamir and Adleman in 1977)

It’s similar to Diffie-Hellman in that it uses a public key and modular arithmetic but is a little trickier to describe. However, the main element is the idea of factorising which we’ll take a look at now.

10 is the product of two primes and can be written so: 2 x 5

i) Write 15 as the product of two primes

ii) Write 35 as the product of two primes

iii) Write 91 as the product of two primes

iv) Write 1517 as the product of two primes

v) Write 9622043 as the product of two primes

Hopefully, you struggled once it got past 91, and perhaps even with 91.  This illustrates the key idea that products of primes are really quite hard to factorise.

The RSA method (read slowly and several times while pennies are allowed to drop):

• Alice wants to send the message HELP to Bob

• Bob has to do some prep first (but only once):

. he chooses two prime numbers, p and q, and finds n = pq; let’s say Bob chooses 5 and 11 so n=55; in practice p and q are huge so n is incredibly large (and we struggled with 91  )

. he then must find φ = (p-1)(q-1) so φ = 4 x 10 = 40

. he next chooses an value, e, which has to have no common factors with φ ; 7 has no common factors with 40 so he decides to choose e = 7

. now the tricky bit: Bob has to find a decryption value, d, where de = 1 modφ; so he has to find d where 7d = 1 mod 40; there is a way to do this (the Extended Euclidean Algorithm but that’s another story) so after a little figuring out with a calculator, Bob finds d = 23, since 7 x 23 = 161 and 161 mod 40 is 1

. Hugely important point now: Bob keeps d=23 a secret from everyone, including Alice

. Instead, he publishes the two values (e, n), i.e. (7, 55); notice that Eve can’t use these to find d as she can’t work out what φ Bob used (she can if she can work out p and q but that’s the point: it’s too hard as it’s way bigger than 55 in practice)

• Now Alice can send her HELP message; for simplicity, we’ll look at just the first letter of Alice’s message (otherwise we into very large numbers very soon), H, and covert it to m = 8 as it’s the 8th letter in the alphabet (m just stands for message)

Page 18

• Alice then has to work out a scrambled version of m = 8 by calculating me mod n so that’s 87 mod 55 which is 2097152 mod 55 which is 2 (try it with pen, paper and calculator if you like; so the message Alice sends is simply c = 2 (c means coded message)

• Bob receives the message 2 and works out cd mod n which is 223 mod 55 so this is 8388608 mod 55 which is 8 so he now knows the first letter of the message is H

Hard work, eh? Well, no. Internet software does all the maths and the sending for Alice and Bob but, crucially, no computer in the world can ever find for Eve that elusive 23 Bob chose because he chose it based on p and q, the huge primes that are too huge to find if we only know their product.

You have a go in this new scenario:

Bob chooses p=3 and q=7 Alice wants to send Bob a message, BEWARE; for just the single letter B

1. What is the value of Bob’s n?

2. What is the value of φ?

3. Explain why Bob can choose e=5

4. Write down Bob’s public key: use bracket notation (like in the final square bullet point on the previous page)

5. Explain why Bob can then choose d=5

6. What is the value of Alice’s m?

7. What is the value of Alice’s c?

8. Explain how Bob then finds Alice’s message of B

And to close… the article on the next page explores what might happen if computers were able to factorise Alice and Bob’s large numbers.

Page 19

Will advances in quantum computing affect internet security? (James Naughton, The Guardian, 28.9.19)

Something intriguing happened last week. A paper about quantum computing by a Google researcher making a startling claim appeared on a Nasa website – and then disappeared shortly afterwards. Conspiracy theorists immediately suspected that something sinister involving the National Security Agency was afoot. Spiritualists thought that it confirmed what they’ve always suspected about quantum phenomena. (It was, as one wag put it to me, a clear case of “Schrödinger’s Paper”.) Adherents of the cock-up theory of history (this columnist included) concluded that someone had just pushed the “publish” button prematurely, a suspicion apparently confirmed later by stories that the paper was intended for a major scientific journal before being published on the web.

Why was the elusive paper’s claim startling? It was because – according to the Financial Times – it asserted that a quantum computer built by Google could perform a calculation “in three minutes and 20 seconds that would take today’s most advanced classical computer … approximately 10,000 years”. As someone once said of the book of Genesis, this would be “important if true”. A more mischievous thought was: how would the researchers check that the quantum machine’s calculation was correct?

A quantum computer is one that harnesses phenomena from quantum physics, the study of the behaviour of subatomic particles, which is one of the most arcane specialisms known to humankind. We all inhabit – and intuitively understand – a world governed by Newtonian physics – which explains the behaviour of tangible things such as billiard balls, planets and falling apples. But it turns out that Newton’s laws don’t apply to subatomic particles; quantum theory evolved to explain what goes on in that strange space. The polite term for what goes on there is “counter- intuitive”. The less polite term is “weird”. In certain situations, for example, quantum theory says that one subatomic particle’s behaviour is bound up with that of another, even if the second one is on the other side of the galaxy. This is known as “entanglement”. Another principle is that a particle can be in two different states at the same time – as with Schrödinger’s imaginary cat, who was both alive and dead at the same time. This is known in the jargon as “superposition”. Superposition is at the heart of quantum computing. Ordinary computers work with bits that can be either on or off – coded as zero or one. But quantum computers work with qubits, which can have a value of 0, 1 or both! Thus two qubits can represent four states simultaneously (00, 01, 10, 11) – which apparently means that 100 qubits can represent 1.3 quadrillion quadrillion states. This means that a quantum computer would be much faster and efficient at some kinds of computation than would be a classic computer, which has to chunter along with bits that are only on or off – and it explains why the mysterious Google machine might represent a working model of “quantum supremacy” in action.

Why might this be important? Because the security of our networked world depends on public- key cryptography – the encryption that protects communications, bank accounts and other sensitive data. At the core of this approach is the fact that factoring very large numbers takes a long time. In 2016, for example, it took several hundred computers two years to crack a message encrypted with a key that was 768 bits long. The same process for material encrypted with a

Page 20

1,024-bit key would take 1,000 times longer, and cracking anything encrypted with the current highest standard 4,096-bit key would possibly outlast the presence of life on earth. So our security depends on the speed of computers.

In principle, industrial-scale quantum computers could make a mockery of all this – but that’s in theory. In practice, quantum supremacy is still a long way off, as Scott Aaronson, a leading academic in the field, points out in a post on his blog. There are, he says, two big obstacles. The first is that a quantum machine capable of tackling current encryption methods would need several thousand logical qubits: “With known error-correction methods, that could easily translate into millions of physical qubits, and those probably of a higher quality than any that exist today. I don’t think anyone is close to that, and we have no idea how long it will take”.

The second caveat is that quantum machines would be able to crack some codes but not all possible codes. The public-key codes that would be vulnerable happen to be the ones we use to secure online transactions and to protect data. But private-key encryption will probably still be invulnerable. And researchers have been working on new types of public-key crypto that no one knows how to break – even in principle – after two decades of trying.

When the Google paper does emerge, it will be interesting for all kinds of reasons – not least as evidence that the researchers have actually built a working 53-qubit machine. But as a harbinger of crypto-apocalypse it’s likely to be a disappointment. At best, it’ll be a proof of concept; at worst, it’ll be the canary in the crypto-mine.

Page 21

ANSWERS

Section One 1) IORTHOS 2) NO PROBLEM WHATSOEVER

Section Two 1) DPQG 2) BUSTED

Section Three 1) VQFCA 2) EJGWF 3) LUNCH AT ONE 4) THIS IS A SECRET

5) WELL DONE YOU

Section Four 1) a) 25 b) 30 3600

2) THINGS ARE CHANGING FROM OPAQUE TO MURKY AND I THINK I BEGIN TO SEE WHAT WE NEED TO DO HOOKE IS CLEARLY INVOLVED BUT WHAT I DONT KNOW IS WHETHER HE IS WORKING ALONE OR WITH SOMEONE ELSE THERE ARE PLENTY OF CANDIDATES THE RUSSIAN MAFIA A NATIONAL SECURITY AGENCY A MAJOR COMPUTING OUTFIT MAYBE ONE OF THE BANKS ONE THING IS SURE I DONT WANT TO SIT HERE AND WAIT FOR THEM TO FIND ME ON THE OTHER HAND I DONT KNOW HOW TO GO ABOUT FINDING THEM I GUESS IT IS STILL POSSIBLE THAT BEN WAS WRONG AND THERE IS NO FLAW IN QUANTUM ENCRYPTION MAYBE THAT WOULD BE THE BEST OUTCOME FOR ME NO FLAW MEANS NO REASON TO RISK TRYING TO SILENCE ME I COULD TURN UP WITH A FAKE TAN AND SAY IHAVE BEEN SURFING IN NEWQUAY FOR THE LAST TWO WEEKS AND THIS WHOLE THING COULD JUST BLOW OVER ON THE OTHER HAND IT WONT FIX THINGS FOR BEN HOOKE WONT WANT TO LEAVE THAT THREAD DANGLING AND SINCE BEN IS ALREADY DEAD THERE WILL BE LITTLE RISK FOR HOOKE IN TRYING TO FINISH THE JOB BENS CODES ARE GETTING MORE SOPHISTICATED THIS CODE IS PAT AND I MIGHT USE IT MYSELF FROM TIME TO TIME

Section Five 1) HEUTEMAYGTTEVOOHIJ

2) MRBEWYHRNNCAODJASKOL

3) I AM AN EXPERT CODE BREAKER

4) AECOEYNNMVECESDTKROU

5) YOU HAVE WON A PACK OF SWEETS

Page 22

Section Six (cipher disc) 1) GENIUS 2) ON A ROLL 3) OSVWCUH

Section Seven

METHOD 1 i) a) 2 b) 3 c) 9 d) 0 e) 2 f) 1 g) 4 g) 4 ii) same values (so outputs are not unique) iii) 4 iv) 10 v) Though the outputs are published, they’re not unique so A could be lots of plausible values vi) a) 18 b) she doesn’t know the A value vii) a) 18 b) she doesn’t know the B value

METHOD 2 i) 3 x 5 ii) 5 x 7 iii) 7 x 13 iv) 37 x 41 v) 3083 x 3121

1. 21 2. 12 3. 5 and 12 have no common factor 4. (5, 12) 5. We have to have ed mod φ = 1 That is, 5d mod 12 = 1 If d=5 then 5d mod 12 = 25 mod 12 = 1 6. B is second letter so m = 2 7. 11 8. cd mod n = 115 mod 21 = 161051 mod 21 = 2 so 2nd letter so B

Page 23