Codes and Breaking Lesson 8

Quiz

Here are the keys/steps for all the codes we learned. You can use these to revise and help you in the quiz.

Caesar

Morse Code

Pigpen Cipher

Playfair Cipher

Example: MEET ME AT NOON 1. Split the message into 2-letter blocks. ME ET ME AT NO ON

2. Start with the first block and look for the two letters in the grid. M and E are ​ ​ ​ ​ not in the same row or column, they are in the opposite corners of a rectangle. So to write these two letters in code we replace each one with the letter which is horizontally across from it in the rectangle. So, M becomes P ​ ​ E becomes B ​ ​ We can use the same rule for ET, ME and AT. But N and O are in the same ​ ​ ​ ​ ​ ​ ​ ​ row. For letters in the same row we replace each letter with the letter on its right. So, N becomes O ​ ​ O becomes P ​ ​ So, MEET ME AT NOON becomes PBDUPBDQOPPO If a pair of letters are in the same column, they must be replaced by the letter under them, for example SH would become XN. ​ ​ ​ ​

Remember: When deciphering you must go in the opposite direction! Letters in the ​ ​ ​ ​ same row should be replaced by the letter on their left and letters in the same ​ ​ column should be replaced by the letter above them. The rectangle rule stays the ​ ​ same (Can you explain why?).

Railfence Cipher

1. Write the message in a zig-zig, using stars for spaces. 2. Write the message in code by writing down the top row, then middle row, then bottom row.

Example:

Columnar Transposition

1. Write the numbers 1-5 in the top row of the grip in the wrong ​ order. 2. Fill the message into the grid. 3. Rearrange the grid so that the numbers are in the correct order. ​ ​ The column that had 1 on top in the first grid is the first column of the new grid, the column that had 2 on top in the first grid is the second column of the new grid, etc. 4. Write the message in code by writing the letters in the order that they are in the new grid as one long word.

becomes

Use the keys above to decode these messages and answer the questions:

1. a) Which code is this message written in? ​ ​ b) What does it say?

- ...... … / -- . … … .- --. . / .. ... / .. -. / -- --- .-. … . / -.-. --- -.. .

(Remember / means a space between words) ​ ​

2. a) Which code is this message written in? ​ ​ b) What does it say?

3. This message is written in . ​ ​ What does it say?

Ymnx hnumjw nx sfrji fkyjw Ozqnzx Hfjxfw bmt qnaji ns Fshnjsy Wtrj.

4. Write this in Morse Code ​ Morse Code is a very famous code

5. Write this in Caesar Cipher ​ Caesar Cipher is one of the earliest known

6. Write this in Pigpen Cipher ​ Pigpen Cipher is sometimes called Tic Tac Toe Cipher

7. This message is written in . ​ ​ What does it say? SIKUQFVIDFSBKOKCSQUCQCMWOI

8. This message is double encoded. It was first written in Caesar ​ Cipher, then in Morse Code. Work backwards to decode the ​ ​ ​ message. .. - --.. --. --.- .--- / .--- ...... - .. -. ... .-.. / -. -..- / .-. - .-- .--- / -..- .--- .... --.. .-- .---

9. Now think of your own message, a sentence with 5-6 words. Use the Railfence Cipher to write it in code. ​ ​

10. Encode the same message in a different way using Columnar ​ Transposition. ​

Answers:

The rectangle rule in the Playfair Cipher stays the same for the same for enciphering and deciphering because, once you identify the two letters in the corners across from each other, you just need to swap them and swapping doesn’t have an opposite direction. Once things are swapped, to undo the change, all you have to do is swap them again.

1. a) Morse Code b) This message is in Morse Code

2. a) Pigpen Cipher b) I can use lots of ciphers

3. This cipher is named after Julius Caesar who lived in Ancient Rome.

4. -- --- .-. ... . / -.-. --- -.. . / .. … / .- / ...- . .-. -.-- / ..-. .------..- ... / -.-. --- -.. .

5. Hfjxfw Hnumjw nx tsj tk ymj jfwqnjxy pstbs hnumjwx

6.

7. The Playfair Cipher uses a grid

8. Double encoding is more secure (Intermediate Code: Itzgqj jshtinsl nx rtwj xjhzwj)