Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CRYPTO CORNER HOME INTRODUCTION TO CRYPTOGRAPHY MONOALPHABETIC SUBSTITUTION CIPHERS SIMPLE TRANSPOSITION CIPHERS MORE...

Columnar Transposition Cipher

Cipher Activity
Introduction
Encryption
Decryption
Discussion
Exercise

Alphabet:
Standard
abcdefghijklmnopqrstuvwxyz

Key:
Random Key Random Key Length: 5
Plaintext:

Encrypt

Slow Encrypt
Ciphertext:

Decrypt

Slow Decrypt
Options:
Remove all Characters not in alphabet (except spaces)
Show Grid Reset Remove Spaces
Put ciphertext in blocks of 5
Include Nulls and use this: X
Iterations: 1
Crypto Corner © Daniel Rodriguez-Clark 2017

Columnar Transposition involves writing the plaintext out in rows, and then reading the ciphertext o in columns. In its simplest form, it is the Route
Cipher where the route is to read down each column in order. For example, the plaintext "a simple transposition" with 5 columns looks like the grid below

If we now read down each column we get the ciphertext "ALNISESTITPIMROOPASN".

Plaintext written across 5 columns.

So far this is no di erent to a speci c route cipher. Columnar Transposition builds in a keyword to order the way we read the columns, as well as to
ascertain how many columns to use.

Encryption
We rst pick a keyword for our encryption. We write the plaintext out in a grid where the number of columns is the number of letters in the keyword. We
then title each column with the respective letter from the keyword. We take the letters in the keyword in alphabetical order, and read down the columns
in this order. If a letter is repeated, we do the one that appears rst, then the next and so on.

As an example, let's encrypt the message "The tomato is a plant in the nightshade family" using the keyword tomato. We get the grid given below.

We have written the keyword above the grid of the plaintext, and also the
numbers telling us which order to read the columns in. Notice that the rst
"O" is 3 and the second "O" is 4, and the same thing for the two "T"s.

The plaintext is written in a grid beneath the keyword. The numbers represent the
alphabetical order of the keyword, and so the order in which the columns will be
read.

Starting with the column headed by "A", our ciphertext begins "TINESAX" from this column. We now move to the column headed by "M", and so on
through the letters of the keyword in alphabetical order to get the ciphertext "TINESAX / EOAHTFX / HTLTHEY / MAIIAIX / TAPNGDL / OSTNHMX"
(where the / tells you where a new column starts). The nal ciphertext is thus "TINES AXEOA HTFXH TLTHE YMAII AIXTA PNGDL OSTNH MX".

Decryption
The decryption process is signi cantly easier if nulls have been used to pad out the message in the encryption process. Below we shall talk about how to
go about decrypting a message in both scenarios.

Firstly, if nulls have been used, then you start by writing out the keyword and the alphabetical order of the letters of the keyword. You must then divide
the length of the ciphertext by the length of the keyword. The answer to this is the number of rows you need to add to the grid. You then write the
ciphertext down the rst column until you reach the last row. The next letter becomes the rst letter in the second column (by the alphabetical order of
the keyword), and so on.

As an example, we shall decrypt the ciphertext "ARESA SXOST HEYLO IIAIE XPENG DLLTA HTFAX TENHM WX" given the keyword potato. We start by
writing out the keyword and the order of the letters. There are 42 letters in the ciphertext, and the keyword has six letters, so we need 42 ÷ 6 = 7 rows.

We have the keyword and the order of the letters in the keyword. We also know there are 7 rows.

Now we start by lling in the columns in the order given by the


alphabetical order of the keyword, starting with the column headed by
"A". After the rst column is entered we have the grid shown to the right.

We continue to add columns in the order speci ed by the keyword.

After inserting the second column. After inserting the third column. The completely reconstructed grid.

Now we read o the plaintext row at a time to get "potatoes are in the nightshade family as well".

When no nulls have been used we have to do a slightly di erent calculation. We divide the length of the ciphertext by the length of the keyword, but this
is likely to not be a whole number. If this is the case, then we round the answer up to the next whole number. We then multiply this number by the length
of the keyword, to nd out how many boxes there are in total in the grid. Finally, we take the length of the ciphertext away from this answer. Thie
number (which should be less than the length of the key) is how many nulls there would have been if used, so we need to black out these last few boxes,
so we don't put letters in them whilst decrypting.

To decrypt the ciphertext "ARESA SOSTH EYLOI IAIEP ENGDL LTAHT FATEN HMW", we start similarly to above, by heading the columns with the keyword
potato. This time, to nd how many rows we need, we do 38 ÷ 6 = 6.3333. We round this up to the next number, which is 7, so we need 7 rows. Whe we
multiply 6 x 7 we get 42, and 42 - 38 = 4. Hence we need 4 placeholders in the last row. We get the grid below to the left. After pluggin the ciphertext
letters in, in the same way as above, we get the grid on the right.

We write the keyword and order as above, but block out the last 4 spaces as we After inserting the ciphertext column by column we get this grid.
know these are not needed from the calculations done above.

Finally, we read o the plaintext in rows, to reveal the same plaintext as the other example, "potatoes are in the nightshade family as well".

Discussion
Columnar Transposition has the security of a transposition cipher with the extra befe t of utilizing a keyword. This is easier to remember than some
complex route, and provides a better mixing e ect than the railfence cipher.

One of the key bene ts of a transposition cipher over a substitution cipher is that they can be applied more than once. For example, the Columnar
Transposition cipher could be applied twice on the plaintext. This is done by following the process above to produce some ciphertext, but then to use the
same (or a di erent) keyword and to plug this ciphertext into the grid and read o the rows again. Our example above would give us

We put the plaintext into the grid below the keyword tomato to get the ciphertext We now write the ciphertext retrieved from the grid to the left in the grid in rows as
"TINES AXEOA HTFXH TLTHE YMAII AIXTA PNGDL OSTNH MX" if it was the plaintext.

After this double transposition, we get the ciphertext "EATMX DHNOH YIGNI EXEAN TATTI AOXTX FHIPS SHLAT LM".

This double transposition increases the security of the cipher signi cantly. It could also be implemented with a di erent keyword for the second iteration
of the cipher. In fact, until the invention of the VIC Cipher, Double Transposition was seen as the most secure cipher for a eld agent to use reliably under
di cult circumstances.

For the first two questions, use the given alphabet to encrypt the message using
the Columnar Transposition Cipher. For the second two questions, use the
alphabet to decrypt the ciphertext.

Question 1
Alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Plaintext: The enemy are advancing fast

Key: enemy

Special Instructions: Include nulls in the encryption.

Ciphertext:
TEENF EYDIS EAVNT HMACA NRAGX

Check Answer Hide Answer

Question 2
Alphabet: " .,?!ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Plaintext: We have been victorious in this battle!

Key: battle

Special Instructions: Do not use nulls, and perform two iterations.

Ciphertext:
WLTTBTEESIH U I SOCNROTIEVEVA !AI NEBH

Check Answer Hide Answer

Question 3
Alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Ciphertext: TNRGD MEIRX ERWIX HAOTX EGNEX

Key: front

Special Instructions: Remove any nulls that have been used.

Plaintext:
the men are growing tired

Check Answer Hide Answer

Question 4
Alphabet: " .,?!ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Ciphertext: RPDGTDPN EYMNO EUDI,S .M LDOSERKFRLEU OEWOA IENAIU .NFMNI  OTN

Key: message

Special Instructions: 2 iterations were used to encrypt this message.

Plaintext:
we need more supplies of food, drink and ammunition. urgently.

Check Answer Hide Answer

Crypto Corner © Daniel Rodriguez-Clark 2019

PREVIOUS PAGE: ROUTE CIPHER NEXT PAGE: MYSZKOWSKI TRANSPOSITION CIPHER

Information Crypto Corner is a subsiduary of www.interactive- If you have found Crypto Corner
maths.com useful, then please help to keep it a
About Me
free site by donating using the button
Contact Me ©2013 - 2019 Daniel Rodriguez-Clark
All rights reserved
below. Thanks!
Legal
Glossary
Help with Activities
Educational Uses
Downloadble Resources

You might also like