Presentation is loading. Please wait.

Presentation is loading. Please wait.

National Cipher Challenge

Similar presentations


Presentation on theme: "National Cipher Challenge"— Presentation transcript:

1 National Cipher Challenge
A beginner’s guide to codes and ciphers Part 5, the keyword cipher

2 While mathematics can provide some very powerful ciphers, the two we have seen are not very strong. The problem is the keyspace. There are only 26 keys for the Caesar shift cipher and only 312 keys for the affine shift. A modern cipher has two components, an algorithm and a key. For the Caesar shift the algorithm is “rotate the alphabet” and the key is the amount of rotation, measured by where the letter A moves to. For the affine shift x -> ax +b, the key has two parts a, b. We saw in the last lesson that a has to be an odd number other than 13 and between 1 and 25, so there are only 12 choices. This gives a keyspace of size 12*26 = 312.

3 A long time ago the spies invented a much better system.
It had to be: Strong – there had to be a lot of different keys. Memorable and easy to use – spies work under pressure and they don’t want to make mistakes.

4 The keyword cipher The key can be any word or name, or even phrase that you choose. You write it down, missing out repeated letters. Then complete the alphabet in order starting with the first missing letter. The keyword here is EXAMPLE. Note that for keyword substitution and column transposition ciphers we omit repeated letters from the keyword to avoid ambiguity, so here we have omitted the second E. In Vigenere ciphers this is not necessary. See the Beginner’s Guide to Codebreaking notes for more details. A B C D E F G H I J K L M X P N O Q R S T U V W Y Z

5 Now we just encrypt the message one letter at a time.
The submarine will pick up the agent on Friday dop cfxuebqvp hqtt yqas fy dop enpvd wv lbqmej Do an example with the group. Let them choose the keyword – best to be around 7 letters long without repeats, but if there is a repeat miss it out the second time it appears etc. If the keyword was Example then the cipher alphabet would be E X A M P L N O Q R S T U V W Y Z B C D F G H I J K

6 Leaving the word structure intact like this does weaken the cipher as we saw in the earlier lessons.
We can try guessing that DOP stands for THE. dop cfxuebqvp hqtt yqas fy dop enpvT wv lbqmej A B C D E F G H I J K L M P O N Q R S T U V W X Y Z

7 But that really doesn’t get us very far!
THE cfxuebqvE hqtt yqas fy THE enEvT wv lbqmej A B C D E F G H I J K L M ? P O N Q R S T U V W X Y Z

8 A CRIB can be enormous help.
THE cfxuebqvE hqtt yqas fy THE enEvT wv lbqmej A B C D E F G H I J K L M ? P O N Q R S T U V W X Y Z If we are expecting a message about a submarine for example we might look for that.

9 Submarine hunter THE cfxuebqvE hqtt yqas fy SUBMARINE?
THE enEvT wv lbqmej A B C D E F G H I J K L M X P O Q U N R S T V W Y Z

10 Submarine hunter DOP cfxuebqvP hqtt yqas fy THE SUBMARINE I I U
DOP enPvD wv lbqmej THE A ENT N RI A A B C D E F G H I J K L M X P O Q U N R S T V W Y Z

11 This is looking good! DOP cfxuebqvP hqtt yqas fy THE SUBMARINE I I U
DOP enPvD wv lbqmej THE A ENT N RI A Now think like a crossword addict! Five letter word, something about spycraft, A_ENT. It has to be agent. A B C D E F G H I J K L M X P O Q U N R S T V W Y Z

12 This is looking better than good!
DOP cfxuebqvP hqtt yqas fy THE SUBMARINE I I U DOP enPvD wv lbqmej THE AGENT N RI A A B C D E F G H I J K L M X P N O Q U R S T V W Y Z

13 This is looking excellent!
DOP cfxuebqvP hqtt yqas fy THE SUBMARINE I I U DOP enPvD wv lbqmej THE AGENT N RI A The way the cipher works we should have RST in the three blanks between Q and U. A B C D E F G H I J K L M X P N O Q R S T U V W Y Z

14 Wow we are good at this! DOP cfxuebqvP hqtt yqas fy
THE SUBMARINE ILL I K U DOP enPvD wv lbqmej THE AGENT N RI A The way the cipher works we should have RST in the three blanks between Q and U. A B C D E F G H I J K L M X P N O Q R S T U V W Y Z

15 This agent is as good as caught!
DOP cfxuebqvP hqtt yqas fy THE SUBMARINE ILL I K U DOP enPvD wv lbqmej THE AGENT N RI A THE SUBMARINE _ILL? Maybe H stands for W? In which case G must go in the gap between F and H so G stands for V. A B C D E F G H I J K L M X P N O Q R S T U V W Y Z

16 Hmm, getting trickier now!
DOP cfxuebqvP hqtt yqas fy THE SUBMARINE WILL I K U DOP enPvD wv lbqmej THE AGENT N RI A THE SUBMARINE WILL _i__ U_ THE AGENT? What do submarines do to agents? Drop them off and pick them up! So YQAS =PICK? A B C D E F G H I J K L M X P N O Q R S T U V W Y Z

17 Ah that’s better! DOP cfxuebqvP hqtt yqas fy
THE SUBMARINE WILL PICK UP DOP enPvD wv lbqmej THE AGENT N RI A THE SUBMARINE WILL PICK UP THE AGENT _N? IN? or ON? It can’t be IN because Q (and not W) stands for I. A B C D E F G H I J K L M X P N O Q R S T U V W Y Z

18 Got you now! DOP cfxuebqvP hqtt yqas fy THE SUBMARINE WILL PICK UP
DOP enPvD wv lbqmej THE AGENT ON RI A THE SUBMARINE WILL PICK UP THE AGENT _N? IN? or ON? It can’t be IN because Q (and not W) stands for I. And we could have spotted that the single gap between V and Y in the table can’t have X in it as that is under B, so it must be W! A B C D E F G H I J K L M X P N O Q R S T U V W Y Z

19 In the bag! DOP cfxuebqvP hqtt yqas fy THE SUBMARINE WILL PICK UP
DOP enPvD wv lbqmej THE AGENT ON FRIDAY THE SUBMARINE WILL PICK UP THE AGENT ON _RI_AY? It must be FRIDAY! So now we can complete our table and crack any other messages encrypted with the same cipher. A B C D E F G H I J K L M X P N O Q R S T U V W Y Z

20 We are the best! DOP cfxuebqvP hqtt yqas fy THE SUBMARINE WILL PICK UP
DOP enPvD wv lbqmej THE AGENT ON FRIDAY THE SUBMARINE WILL PICK UP THE AGENT ON _RI_AY? It must be FRIDAY! So now we can complete our table and crack any other messages encrypted with the same cipher. A B C D E F G H I J K L M X P N O Q R S T U V W Y Z

21 Uh oh!


Download ppt "National Cipher Challenge"

Similar presentations


Ads by Google