Saturday, October 9, 2010

Transposition ciphers

Transposition ciphers keep all of the original letters intact, but mix up their order. Since both the sender and receiver of a transposed ciphertext must agree on and remember the method for enciphering and deciphering, something easy would be nice. Since geometrical figures are easy to remember, they serve as the basis for a whole class of transposition ciphers. Our secret message for this example will be “x marks the spot to dig for the loot”. Let's put our message into the shape of a box. Since there are 28 characters, we'll add two dummy characters ("N and O") to make 30 and write the message in a six by five box. (In this configuration you read the message moving across)

We can now transcribe the message by moving down the columns instead of across the rows. Once again we'll break the characters into groups of five to give no clues about word sizes. The result looks like this :

XTTFL   MHTOO   AEORO   RSDTT   KPIHN   SOGEO

For one to be able to read the ciphered text, they simply need to write the first five letter group as one column, the second five letter group as the second column, and so on; then read the message across in rows.

The real variety begins when you realize that you don't have to write your plaintext into the box row by row. Instead, you can follow a pattern that zig-zags horizontally, vertically or diagonally, or one that spirals in or spirals out (clockwise or counterclockwise), or many other variations.

Once you've put the text in the chosen form using one route, you can then encipher it by choosing a different route through the text. You and your partner just have to agree on the reading route, the transcription (enciphering) route, and the starting point to have yourselves a system. These systems are called route transcriptions.
Here's our message again. The reading route spirals counterclockwise inward, starting at the lower right corner.

The transcription route will just be columns again The ciphertext becomes:

SEHTS   PEHTK   OLORR   TONOA   TOTFM   ODIGX

To decipher, you fill the in box following the column route and read the message using the spiral route.

Another type of transposition cipher uses a key word or phrase to mix up the columns. This is called columnar transposition. It works like this: First, think of a secret key word. Ours will be the word SECRET. Next, write it above the columns of letters in the square, and number the letters of the key word as they would fall if we placed them in alphabetical order. (If there are duplicate letters, like the "E", they are numbered from left to right.)

Now write the columns down in the order indicated by the numbers. The resulting ciphertext looking like this:

AEORO   MHTOO   KPIHN   RSDTT   XTTFL   SOGEO

As you can see, this is just a different arrangement of the previous ciphertext, but at least it isn't in some regular pattern. We could have easily made it a little more difficult by filling the square following a more complicated path. We could also use a geometric shape other than a rectangle and combine substitution and transposition. The only problem that might occur is that the deciphering may become so complicated that it will remain a secret at the receiving end forever!

No comments:

Post a Comment