In classical cryptology, a transposition cipher encodes a message by reordering the plaintext in some definite way. Mathematically, it can be described as applying some sort of bijective function. The receiver decodes the message using the reordering in the opposite way, setting the ordering right again. Mathematically this means using the inverse function of the original encoding function.
A simple kind of transposition cipher writes the message into a rectangle by rows and reads it out by columns.
Asimplekin doftranspo sitionciph erwritesth emessagein toarectang lebyrowsan dreadsitou tbycolumnsAdsee tldts oirmo erbif tweab eymti rsrya cproi serdo lanta cosle ncegt wiuks iseas tmipp tinao nnohh ngnus. This cipher is often complicated by permuting the rows and columns.
Another cipher uses a grille. This is a square with holes in it such that each cell in the square appears in no more than one position when the grille is rotated to each of its four positions. As much message as will fit in the grille is written, then it is turned to another position and more message is written.
Z | E | B | R | A | S |
W | E | A | R | E | D |
I | S | C | O | V | E |
R | E | D | F | L | E |
E | A | T | O | N | C |
E | Q | K | J | E | U |
EVLNE ACDTK ESEAQ ROFOJ DEECU WIREETo decipher it, the recipient has to work out the column lengths by dividing the message length by the key length. Then he can write the message out in columns again, then re-order the columns by reforming the key word.
Double transposition
A single columnar transpostion could be attacked by guessing possible column lengths, writing the message out in its columns (but in the wrong order, as the key is not yet known), and then looking for possible anagrams. Thus to make it stronger, a double transposition was often used. This is simply a columnar transposition applied twice, with two different keys of different (preferably relatively prime) length. Double transposition was generally regarded as the most complicated cipher that an agent could operate reliably under difficult field conditions. It was in actual use at least as late as World War II (e.g. see poem code).See also: