Singingbanana.com



-----------------------

How the code works: Reverse the alphabet so a becomes Z, b becomes Y, c becomes X, and so on.

Decode this message:

SV DZH Z EVIB XOVEVI NZM

Atbash Cipher

The Enigma Project

Historical Footnote: Atbash was originally used in Hebrew. The name comes from the first and last letters in Hebrew, aleph and tav, and the second and second to last letters, beth and shin. Some Hebrew religious texts use atbash to turn wnd to last letters, beth and shin. Some Hebrew religious texts use atbash to turn words into other words. For example, in English the word ‘hold’ becomes ‘slow’, and ‘grog’ becomes ‘tilt’.

The Atbash Cipher in Hebrew

|ת |

|a |11000 |h |00101 |o |

|1 |1 |0 |1 |0 |

These instructions tell you to add the numbers 667, 334, and 670 (and to not add the numbers 335 and 340) to make the secret code 1671. This method is called the public key.

To decode the message, you could reverse the public key – but that would be quite difficult. Instead we multiply the code by the secret number 3.

In this case we get 3 × 1671 = 5013 – we are only interested in the last two digits of the result, the number 13. Finally, find the instructions to make 13 using the following numbers:

|1 |2 |5 |10 |20 |

|1 |1 |0 |1 |0 |

Notice these numbers are much smaller and easier to use! Also notice the instructions are 11010 – the same instructions to make the letter j. The letter is decoded!

Decode this message:

1672 1004 667 1676 1336 667 1005 1339 1342 335 1001 1005 1001 674 1342 1002 669 1002

Historical Footnote: It is called the Knapsack Cipher because you can use the numbers above as weights in a bag, which means you can send a secret message by how heavy the bag is. In practice, you would make this code much harder to reverse by using even bigger numbers. This sort of idea is used to send codes on the internet. For example, a bank will publish a public key. If you want to send the bank a message you will use its public key. This key is very hard to reverse, so no one can read the message. Only the bank can decode the message using its secret private key.

Knapsack Cipher

The Enigma Project

Please do not write on this worksheet

Railfence Cipher

The Enigma Project

How the code works: Make a block of letters by writing the message in rows. The number of rows is your key. The columns of the block are your coded message.

Example: I will form a block of letters by writing this is a railfence cipher in two rows.

|t |h |i |s |i |s |a |

|as numbers: |16 |10 |20 |22 |17 |12 |

|C(c – B): |54 |0 |90 |108 |63 |18 |

|remainder: |2 |0 |12 |4 |11 |18 |

|plaintext: |c |a |m |e |l |s |

Example: Let’s send the word ‘camels’ using the numbers A = 3 and B = 10:

|plaintext: |c |a |m |e |l |s |

|as numbers: |2 |0 |12 |4 |11 |18 |

|Ap + B: |16 |10 |46 |22 |43 |64 |

|remainder: |16 |10 |20 |22 |17 |12 |

|ciphertext: |Q |K |U |W |R |M |

How the code works: To send a message, first turn all the letters into numbers using this:

|a |b |c |d |e |

|I |R |C |H |E |

|B |D |G |K |M |

|N |O |Q |S |T |

|U |V |W |X |Z |

Write your message into pairs of letters.

For example, the message some mammoth becomes so me ma mx ot hx.

We added an x to the double m to make it a pair, and another x to the unpaired letter h at the end.

To send a code there are three rules:

|If two letters in a pair are in the same row move each letter one place to the right. So |P |

|so becomes TQ. Letters at the end of the row wrap back to the start, so ot becomes QN. |L |

| |A |

| |Y |

| |F |

| | |

| |I |

| |R |

| |C |

| |H |

| |E |

| | |

| |B |

| |D |

| |G |

| |K |

| |M |

| | |

| |N |

| |O |

| |Q |

| |S |

| |T |

| | |

| |U |

| |V |

| |W |

| |X |

| |Z |

| | |

|If two letters in a pair are in the same column move each letter one place down. So me |P |

|becomes TM. Letters at the bottom of the column wrap back to the top, so hx becomes KY. |L |

| |A |

| |Y |

| |F |

| | |

| |I |

| |R |

| |C |

| |H |

| |E |

| | |

| |B |

| |D |

| |G |

| |K |

| |M |

| | |

| |N |

| |O |

| |Q |

| |S |

| |T |

| | |

| |U |

| |V |

| |W |

| |X |

| |Z |

| | |

|Otherwise, a pair will form two corners of a box. Each letter will become the other corner|P |

|in the same row. So ma will become GF, while mx will become KZ. |L |

| |A |

| |Y |

| |F |

| | |

| |I |

| |R |

| |C |

| |H |

| |E |

| | |

| |B |

| |D |

| |G |

| |K |

| |M |

| | |

| |N |

| |O |

| |Q |

| |S |

| |T |

| | |

| |U |

| |V |

| |W |

| |X |

| |Z |

| | |

So altogether, the message some mammoth became TQ TM GF KZ QN KY.

Dancing Men

The Enigma Project

|Historical Footnote: This code was devised by the author Sir Arthur Conan |[pic] |

|Doyle for his Sherlock Holmes story ‘The Adventure of the Dancing Men’. In|Holmes examining the drawing |

|the story, Holmes is approached by a man whose wife is being terrified by | |

|a series of mysterious notes containing stick figures. Holmes deduces it | |

|is a code and breaks the cipher using frequency analysis. When the code is| |

|broken he realises his client is in danger and rushes to his house, only | |

|to find him shot dead with his wife seriously injured. Holmes decides to | |

|send a message using the same code. When a man arrives at the house it | |

|confirms he was the villain as only the murderer could have read the | |

|message. | |

How the code works: Each letter is replaced with a stick figure:

|[pic] |[pic] |[pic] |[pic] |[pic] |[pic] |[pic] |[pic] |

|Write in numbers: |1 |0 |3 |2 |7 |4 |5 |

|Raise to the power E = 3: |1 |0 |27 |8 |343 |64 |125 |

|Find remainder after division by m = 10: |1 |0 |7 |8 |3 |4 |5 |

How the code works: To send a message you need two prime numbers x and y.

We also need their product m = xy, and a number E that is coprime* to (x-1)(y-1).

The numbers E and m are your public key.

To send a message:

• First, replace the letters for numbers, (a=0, b=1, c=2, …, z=25)

• Raise all numbers to the power E

• Find their remainder after division by m

*two numbers are coprime if they share no common factors (except 1).

For example, 15 and 24 are not coprime because they are both divisible by 3, but 15 and 26 are coprime.

Historical Footnote: This method is widely used today for internet encryption. The public key is published for anyone to use, but only the person who made the public key knows the secret private key - so only they may decode the message. This code relies on the fact that making the public key by multiplying two prime numbers is easy, but breaking the code by factorising the public key is hard. The larger the prime numbers, the more difficult it is to break. In reality, the letters of the message are combined to form blocks that hides the frequencies of individual letters. RSA stands for Rivest, Shamir and Adleman, who first publicly described the method in 1978.

Break this code: We know the message below was sent using the public key E = 27 and m = 55. Work out the original prime numbers and use them to find D to decode:

18 9 23 5 15 24 2 7 41

To decode the message we perform the exact same procedure, but with a number D to replace E such that (E × D) − 1 is a multiple of (x-1)(y-1). The number D is your private key.

For example, to decode the message above we can use D = 7 because (3 × 7) – 1 = 20, which is a multiple of 4.

|Code, in numbers: |1 |0 |7 |8 |3 |4 |5 |

|Raise to the power D = 7: |1 |0 |823543 |2097152 |2187 |16384 |78125 |

|Find remainder after division by m = 10: |1 |0 |3 |2 |7 |4 |5 |

|Original message: |b |a |d |c |h |e |f |

Please do not write on this worksheet

Morse Code

Example: In Morse Code the distress signal SOS is:

|[pic] | |[pic] | |[pic] |

|5 dots | |11 dots | |5 dots |

S is equal to 5 dots. O is equal to 11 dots. Including pauses, SOS is equal to 27 dots

Historical Footnote: Morse Code is a way to transmit messages using light or tones. It is a code but it is not a secret code. It was invented in 1844 by three Americans, Samuel Morse, Joseph Henry and Alfred Vail. Morse Code was vital in World War II. Notice common letters like ‘e’ are short, while rare letters are the longest.

The Enigma Project

Please do not write on this worksheet

How the code works: Morse code turns letters into dots and dashes. The length of each letter is counted in dots, such that;

1. A dash is equal to three dots.

2. A gap between dots and dashes is equal to one dot.

3. A pause between two letters is equal to three dots.

4. A space between two words is equal to seven dots.

[pic]

Break this code: The message below was lost on transmission.

We know the length of each letter, and that the total message was equal to 71 dots.

Use this information to work out the message below.

| | | | | | | |

|5 dots| |3 dots| |5 dots| |3 dots|

|e |1 |0 |0 |0 |0 |1 |

|n |0 |0 |1 |1 |0 |0 |

|i |0 |1 |1 |0 |0 |0 |

|s |1 |0 |1 |0 |0 |1 |

|s |1 |0 |1 |0 |0 |0 |

| |1 |1 |0 |0 |1 | |

How the code works: This code is in binary. Here is the alphabet in binary (also called Baudot).

|a |11000 |h |00101 |o |00011 |v |

|a |1 |1 |0 |0 |0 |0 |

|u |1 |1 |1 |0 |0 |1 |

|d |1 |0 |0 |1 |0 |0 |

|o |0 |0 |0 |1 |1 |0 |

|t |0 |0 |0 |0 |1 |1 |

| |0 |0 |1 |1 |1 | |

The number at the end of each row (or column) is the sum of the digits in that row (or column). Digits are added in the normal way, except 1 + 1 = 0.

The extra row and column allow us to find mistakes. If they don’t add up then there is a mistake.

For example, if we changed one of the red digits in the third row we would get a different letter. Notice the digits of the third row, and the second column, no longer add up correctly. The intersection of this row and column helps you find which of the red digits has been changed.

|b |1 |0 |0 |1 |1 |

|A |q |a |z |w |s |

|D |x |e |d |c |r |

|F |f |v |t |g |b |

|G |y |h |n |u |i/j |

|X |m |k |l |o |p |

Step 1: Coordinates: ADFGX are used like coordinates to give the position of each letter (always rows first, columns second). For example, this is how to write the message ‘hello world’;

|h |e |l |l |

|G |D |D |D |

|X |F |X |F |

|X |G |A |G |

|X |G |D |X |

|X |F |D |F |

Step 3: Swap the columns: Finally, the code maker swaps the columns of the grid. He does this by putting the letters of the keyword in alphabetical order:

|a |d |n |w |

|D |G |D |D |

|F |X |F |X |

|G |X |G |A |

|G |X |X |D |

|F |X |F |D |

Reading across, the code becomes: DGDDFXFXGXGAGXXDFXFD

The Enigma Project

Decode this message: Reverse the procedure to decode the message below. It was sent using the same secret square of letters at the top of the page, but this time the keyword was tiger.

GXXDFXFGFXXADFADGDDFFFFGGGXDAG

Please do not write on this worksheet

Historical Footnote: This code was used by the German army during World War I. The letters A, D, F, G, and X were used because they sound very different in Morse Code, thus reducing mistakes. Later the letter V was added to make a 6 x 6 grid that included the whole alphabet and the numbers 0 to 9. The Germans thought the code was unbreakable. Eventually it was broken by a man in the French army called Georges Painvin.

How the code works: To use this code you need a keyword and the following table:

[pic]

To send a message: Find the first letter of the keyword (down the left side) and the first letter of the message (along the top). Where they meet in the middle is the first letter of the code. Continue in this way for each letter of the message. Repeat the keyword if necessary.

Example: Let’s send the message ‘shaken not stirred’ using the keyword BOND. Use the table to find where B and s meet in the middle – this is the first letter of the code. It is the letter T.

The rest of the message looks like this:

B |O |N |D |B |O |N |D |B |O |N |D |B |O |N |D | |s |h |a |k |e |n |n |o |t |s |t |i |r |r |e |d | |T |V |N |N |F |B |A |R |U |G |G |L |S |F |R |G | |

Historical Footnote: This code is named after a sixteenth century French diplomat called Blaise de Vigenère. Because it was so difficult to break, the code became known as ‘le chiffre indéchiffrable’ (French for ‘the indecipherable cipher’). It was first broken by the famous English engineer Charles Babbage in 1854. He realised that if substitution codes are broken by looking for the most common letters, the Vigenère code could be broken by looking for the most common words.

Vigenère Cipher

The Enigma Project

Complete this code: Work out the keyword and complete this message:

|N |I | | | | |N | | | | | | | | | |A | |N |I | | | | |N | | | | |o | |s | | |i | |i |s | |m | |t | |e | | | |i | |i | | | |J |N |U |U |G |S |F |E |Q |Z |U |S |L |Z |I |Z |T |E |Q |N |B |O |O |I |E |A | |

Please do not write on this worksheet

Make sure you collect the Pocket Enigma CD case that comes with this code.

How the code works: To decode a message you need to know which rotor to use (there is a different rotor printed on each side) and the starting position (where the big arrow starts).

[pic]

1. Follow the connections to change one letter into another

2. After decoding each letter, move the rotor one place clockwise

In the example above, we are using Rotor I and starting position W. The word ok becomes QL.

Break this code: This code was sent using Rotor I.

This time we don’t know the rotor starting position, but we think the first three letters of the message is the word ‘the’. Use this as a clue to decode the rest of the message:

ZCCZRTVBLBBJKPA

Historical Footnote: The Pocket Enigma works like an Enigma Machine because the code is different each time you move the rotor. The real Enigma Machine uses three rotors, otherwise the pattern would repeat every 26 letters. Like the Pocket Enigma, the real Enigma Machine turns the 26 letters of the alphabet into 13 pairs, making it easy to code and decode. Clues like we used here are called ‘cribs’.

Pocket Enigma

The Enigma Project

Please do not write on this worksheet

Break this code: I was stood behind the flag waver and this is what I saw. What is the message?

[pic]

How the code works: This code is a way to send messages over large distances using flags:

[pic]

Historical Footnote: Semaphore flags are used by the navy to send messages between ships. It has proved to be useful during battle, most famously at the Battle of Trafalgar during the Napoleonic Wars. The downside is there is no secrecy because everyone within visual distance can see the message.

Semaphore

The Enigma Project

Please do not write on this worksheet

Dots and Pinpricks

The Enigma Project

Historical Footnote: In Victorian times, posting a letter cost a shilling for every hundred miles – but newspapers could be post for free! So instead of writing a letter, the cunning Victorian could send a message using dots or pinpricks above the letters of a newspaper article. This is an example of a hidden message. It is not a code but another form of secret message.

Find the secret message: In this Victorian advert the words “Brooke’s Soap” are written in the staircase. Can you find another secret message hidden in the article below the picture? Read the historical footnote for more information.

[pic]

Please do not write on this worksheet

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download