
BSFC Mathematics: Cryptography 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 ciphers, 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 cipher, you first write down the alphabet. 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 Ciphertext 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 code: 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 substitution cipher – 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 Caesar Cipher 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: Frequency analysis 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 KEY 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 transposition cipher the letters in the message are not changed – they are simply rearranged.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages23 Page
-
File Size-