A transposition cipher is a method of encryption by which the positions held by units of plaintext (which are commonly characters or groups of characters) are shifted according to a regular system, so that the ciphertext constitutes a permutation of the plaintext. That is, the order of the units is changed.
Transposed Text: HLOOLOLWRD
Side note: This is an example of a rail fence cipher. A rail fence cipher is computed as follows. Notice the words are spelled out in columns, starting at the top left:
HLOOL
ELWRD
HE
LL
OW
OR
LD
While this method is rather reliable, remember that you’re also relying on statistical pattern matching, which is always error prone to some degree.
Other methods for Transposition Cipher:
How the scytale cipher works
- Get a scytale and a strip of parchment.
- Wrap your parchment around your scytale until the stick is covered. Try to avoid overlapping and gaps.
- Write your message along the length of the stick, one character per pass of the paper. If you need more space, rotate the stick away from you and keep writing.
- Unwrap the scytale and send the scrambled message to a friend with the same-diameter stick.
- The friend then wraps his scytale with the encoded parchment. Since the diameters are the same, the message is clearly legible!
T | R | O | O | P | S | H | E | A | D |
I | N | G | W | E | S | T | N | E | E |
D | M | O | R | E | S | U | P | P | L |
I | E | S | S | E | N | D | G | E | N |
E | R | A | L | D | U | B | O | I | S |
M | E | N | T | O | A | I | D |
SSSNU AHTUD BIENP GODAE PEIDE LNS
- Count how many letters are in the ciphertext (for this example, assume the ciphertext is 99 letters long)
- Make all of the matrices that would fit such a length (e.g. 2x50, 3x33, 4x25, 5x20, 6x17, 7x15, 8x13, 9x11, 10x10). Use TWO of each size.
- For each size matrix, write out the ciphertext across the rows on one copy. On the other copy, write out the ciphertext down the columns.
- At each stage, see if you can find anything legible, reading perpendicular to how you put the ciphertext in.
- Count how many letters are in your ciphertext (for example, 75) and factor that number (75 =5*5*3).
- Create all of the possible matrices to fit this ciphertext (in our case, 3x25, 5x15, 15x5, 25x3).
- Write the ciphertext into these matrices down the columns.
- For each of your matrices, consider all of the possible permutations of the columns (for n columns, there are n! possible rearrangements). In our case, we hope that the message was enciphered using one of the last two matrices (the 15x5 and the 25x3), since in those cases, we have only 6 and 120 possibilites to check (3! = 6, 5! = 120, 15! ~ 1.31x10^12, 25! ~ 1.55x10^25).
- Rearrange each matrix to see if you get anything intelligible. Read the message off row-by-row. Note that this is much more easily done by a computer than by hand, but it is doable (for small matrices).