Introduction To Codes, Ciphers, & Codebreaking
by Greg Goebel
[1.3] SIMPLE TRANSPOSITIONS
* For an example of a transposition, suppose Alice wants to send Bob the message:
meet me near the clock tower at twelve midnight tonite
One way to transpose this message is for Alice to "write in" the words vertically in five rows without any spaces as follows:
m e e t m
e n e a r
t h e c l
o c k t o
w e r a t
t w e l v
e m i d n
i g h t t
o n i t e
-- and then "read off" each column, top to bottom, as follows:
metowteio enhcewmgn eeekreihi tactaldtt mrlotvnte
METOWTEIOENHCEWMGNEEEKREI
HITACTALDTTMRLOTVNTE
Bob then "writes in" the message in five parts:
M E T O W T E I O
E N H C E W M G N
E E E K R E I H I
T A C T A L D T T
M R L O T V N T E
-- and then "reads off" the message from the columns:
MEETM ENEAR THECL OCKTO WERAT TWELV EMIDN IGHTT ONITE
MEETMENEARTHECLOCKTOWERAT
TWELVEMIDNIGHTTONITE
meet me near the clock tower at twelve midnight tonite
The ancient Spartans used a form of transposition cipher, in which a strip of parchment was wound in a spiral around a wooden cylinder known as a "scytale", and a message was written down the length of the cylinder. The strip was unwound, sent to the recipient, and then wound around a scytale of the same diameter to be read.
* A transposition of the form shown above is extremely easy to crack. Holmes just writes down the letters of the transposition in rows, increasing the length of the rows until he sees something that makes sense. For example, Holmes could take the transposition given above:
METOWTEIOENHCEWMGNEEEKREI
HITACTALDTTMRLOTVNTE
-- and chop it into rows that are, say, seven letters long:
M E T O W T E
I O E N H C E
W M G N E E E
K R E I H I T
A C T A L D T
T M R L O T V
N T E
This doesn't make any sense, so he tries rows of eight letters instead:
M E T O W T E I
O E N H C E W M
G N E E E K R E
I H I T A C T A
L D T T M R L O
T V N T E
This doesn't work either, though he does notice that by reading diagonally he can pick out words like "THE", which gives him a hint that he should try rows of nine letters:
M E T O W T E I O
E N H C E W M G N
E E E K R E I H I
T A C T A L D T T
M R L O T V N T E
This is the same result as Bob gets, and Holmes can now read the message down by columns just as Bob does.
There are ways to complicate the transposition. For example, Alice read off the transposition using top-to-bottom or "down" order. Reading it off in "up" order wouldn't complicate matters very much for Holmes, since he reads in different directions while he is trying to sort out a transposition and he would spot the same text, just written backwards.
But Alice could give Holmes a bigger headache by reading off columns in an alternating "down" and "up" fashion, or by reading off the transposition in a "spiral" pattern -- "down" on the left side, "right" across the bottom, "up" on the right side, "left" across the top to the second-to-left column, "down" again, and so on until all letters were transposed. Even more sophisticated transpositions use a "checkerboard" pattern. One scheme is a "knight's tour", a grid of numbers that specify the sequence of movements of a chess knight across the grid:
top>