Transposition Cipher
Suppose we want to encrypt the following message: “Now run along and don't get into mischief, I'm going out.” from “Peter Rabbit” by Beatrix Potter
Start by removing the punctuation and the spaces between the words: nowrunalonganddontget intomischiefimgoingout
Add 4 extra padding characters at the end, to take the message up to 48 characters: nowrunalonganddontgetin tomischiefimgoingoutxxxx
Write this message in 4 rows, each 12 letters long: nowrunalonga nddontgetint omischiefiam goingoutxxxx
Read the letters in order down the columns, instead of along the rows: nowrunalonga nddontgetint omischiefiam goingoutxxxx nnogodmowdiiroshuncgntho agiuleetotfxniixgnaxatmx
Suppose the enemy intercepts and wants to decipher our message. What might they do?
48 characters can be encoded using grids of one of these dimensions: 1×4848×1 2×2424×2 3×1616×3 4×1212×4 6×88×6
n nogodmowdiirosnuncgntho a giuleetotfxniIxgnaxatmx 1×48 doesn't rearrange the message at all. 2×24 gives: Reading down the columns gives "nangoigu...."
Next we try a 3×16 grid. And then a 4×12 grid. And then …
n nog o dmo w dii r osn u ncg n tho a giu l eet o tfx n iIx g nax a tmx Eventually we get to the 12×4 grid. This time, reading down the columns gives us the original message!