Transposition Ciphers

# Transposition Ciphers

This activity will introduce you to a selection of transposition ciphers.

The aim is to start building an understanding of encryption and decryption on a basic level before moving on to the more complex forms required for computing.

## What is transposition?

Transposition is the act of rearranging objects.

We could rearrange the letters in a word to create an anagram, this would be a basic example of letter transposition.

Exercise: Can you solve the below anagrams? Rearrange the letters to create a word related to computing.

1. Eco Trump
2. Bakery do
3. Tin Room
4. Emu So
5. Ark Seeps
6. Neomorphic
1. Eco Trump -----> Computer
2. Bakery do -----> Keyboard
3. Tin Room -----> Monitor
4. Emu So -----> Mouse
5. Ark Seeps -----> Speakers
6. Neomorphic -----> Microphone

### So, what is a transposition cipher?

To make the transposition of letters a cipher, it has to be done to a regular system or pattern known to both the sender and receiver of the message.

The above exercise was to highlight that one worded or short messages using any form of transposition cipher could be easily intercepted and read by a third party. Therefore, the message needs to be put into larger blocks of text to increase the difficulty of someone else reading it without knowing the system used.

We shall now look at a selection of different transposition ciphers

## The Rail Fence Cipher

The Rail Fence cipher involves putting this message on a fence like structure, see below

 T . . . a . . . t . . . n . . . m . . . P . . . s . . . v . . . a . . . o . . h . t . r . e . i . o . t . e . o . e . l . a . e . d . i . e . c . i . n . . e . . . g . . . s . . . h . . . v . . . e . . . a . . . s . . . t . . .

Notice how the message travels in a zig-zag across three rows or 'rails' in a fence-like pattern.

The next step is to then read off the letters to produce the following:

TatnmPsvaohtreioteoelaediecinegshveast

It is good practice to but code into easier to read blocks to avoid missing letters during decryption at the other end. So what we will send is this message:

Tatnm Psvao htrei oteoe laedi ecine gshve ast

For the receiver to decrypt this message they will need to know how many rails were used to reorganise the letters back to the original message.

#### Exercise:

1. Use the Rail Fence cipher to encrypt the following using the number of rails specified in the brackets.

1. I really like this cipher (4)
2. I think this will impress my friends (5)
3. The rail fence cipher is fun (3)
2. Use the Rail Fence cipher to decrypt the following using the number of rails specified in the brackets.

1. Pessn hlimd aeyla eedep meitl (2)
2. Wecrl teerd soeef eaoca ivden (3)
3. Ytdoe toaug iotsa engti rgh (5)

Extension challenge:

Decrypt the following by putting it through a 3 rail cipher, twice. The underscores represent spaces in the original message.

Ys_oo   thfpw   ehaa_   rcr__   _ar__   lncee   mfi_n   tir_o   aeuee

1. 1. Encryption
1. I really like this cipher (4) -----> Iyhhr lltip eelie sirak c
2. I think this will impress my friends (5) -----> Iiprt hsmrf ihtwi eyeik ilsmn snlsd
3. The rail fence cipher is fun (3) -----> Taece fhrif neihr suelc pin

2. 2. Decryption
1. Pessn hlimd aeyla eedep meitl (2) -----> Please send help immediately
2. Wecrl teerd soeef eaoca ivden (3) -----> We are discovered Flee at once
3. Ytdoe toaug iotsa engti rgh (5) -----> You are getting good at this

Extension:

Ys_oo   thfpw   ehaa_   rcr__   _ar__   lncee   mfi_n   tir_o   aeuee -----> You_are_now_a_master_of_the_rail_fence_cipher

## The Scytale Cipher

This is an ancient cipher technique recorded as being used by the Military of Greece and Sparta

It involved wrapping a strap of leather around a rod of a set thickness/number of sides to encrypt and decrypt messages on it

So if you needed to write the message 'We are surrounded Send reinforcements fast' using a four sided scytale (this is what the rod was called), you would wrap the leather around the scytale and write the message along each side. See below:

 | | | | | | | | | | | | W | e | a | r | e | s | u | r | r | | _ | o | u | n | d | e | d | S | e | n | _ | | | d | r | e | i | n | f | o | r | c | | | m | e | n | t | s | f | a | s | t | | | | | | | | | | | |

Then, when you unwrap the leather the message strip reads: "WodmeureanenrditeenssdffuSoarersrnct".

This cipher is not rewritten into blocks for simplification because then, the cipher would not work.

This method was good for high speed messages in military conflicts, however they were easy to identify as using the Scytale Cipher. This meant officers would have to vary the size and sides of their scytales regularly to stop messages being intercepted and decrypted too easily.

#### Exercise:

1. Encrypt each of the below messages using the number in the brackets to tell you how many sides the scytale has:
1. Send cavalry round to flank the enemy infantry (3)
2. Bring in the siege engines at dawn (4)
3. Prisoners are being relocated to the west (7)

2. Decrypt each of the below messages using the number in the brackets to tell you how many sides the scytale has:
1. Wsrdetesveohaoeffwkbdesansinoleensul (6)
2. Deeiessdcteurdeatacotthtiieodmnepnrt (3)
3. Eihonneegpruaimvgnarecne (4)

Extension Activity

These exercises show the theory behind the Scytale Cipher. Now, let's try it in practice. Get some long strips of paper and something to wrap them around to produce your own messages and then look at how easy or hard it is to find a different object that would allow your message to be read. How could you make it harder for the message to be cracked by someone else?

1. Encryption
1. Send cavalry round to flank the enemy infantry (3) -----> Sueennndedtmcoyafivlnaaflnarknyttrhroey
2. Bring in the siege engines at dawn (4) -----> Btesrheaientnsgdgiiaienwngen
3. Prisoners are being relocated to the west (7) -----> Pnrnodereegctwirbraoesseettsoaileht

2. Decryption
1. Wsrdetesveohaoeffwkbdesansinoleensul (6) -----> Weakness observed in defense of south wall
2. Deeiessdcteurdeatacotthtiieodmnepnrt (3) -----> Distraction needed to hide rescue attempt
3. Eihonneegpruaimvgnarecne (4) -----> Engage in pincher manoeuvre

Coming Soon: Route cipher, Columnar transposition and Myszkowski transposition.