Frequently Asked Questions

What is a shuffle/transposition cipher?

Transposition systems are fundamentally different to substitution systems in that they do not change the characters in the plain text for other characters, but they change the actual position of the characters in the message. Sometimes they are called shuffling ciphers.

Most transposition systems make use of a matrix. For example, the message CAN YOU READ THIS, which contains 14 letters, could be arranged in a grid measuring 7×2 and written across the rows:


Then the cipher text CEAANDYTOHUIRS is formed by reading down the columns. The message is decoded by placing the cipher text in the same sized grid, but writing it in columns rather than rows.

If the message contains an awkward number of letters, for example a prime number or a number that does not factor easily, random characters can be added – they will be identified and removed once the text has been decoded. We could have added a letter to our message so as to form a 5×3 grid.

A similar, but slightly more secure system, makes use of keywords. As will be seen, it is an extension of the matrix method, but it allows columns to be read in a less predictable order. For example, using the keyword, ZEBRA, we create the following grid.


The numbers, below ZEBRA, represent the alphabetical order of the letters in our keyword and becomes our numerical key. That is, A is the first letter, B is the 2nd letter, E is the 3rd letter, R is the 4th and Z is the 5th. The message is then written below this and, if necessary, random (null) letters are added at the end to fill the grid. Always select commonly used letters when inserting nulls, as the use of X, Q and Z would be a giveaway to a code breaker.

Finally we use the numberical key, 53241, to provide the order in which we read down columns: ODF, NEI, ARH, YAS and CUT. To add depth to this method, and confuse a potential code breaker, we could write the cipher in three groups of five, ODFNE IARHY ASCUT.

The message is decoded by simply dividing the number of letters in the cipher text by the number of letters in the keyword, as this tells us how many characters are in each column. We then write the keyword, with its numerical key below it, and fill in the columns in the order determined by the numerical key.

Generally, transposition systems offer endless possibilities and can create quite a headache for a code breaker. However, they will eventually work it out, as they are dealing with nothing more than an anagram of the original message – powerful computers could make easy work of your most elaborate system. If transposition systems are used at all, they are normally used alongside a substitution cipher.