Cryptography: Learn It 3

Transposition Ciphers

Another approach to cryptography is transposition cipher.

transposition cipher

A transposition cipher is one in which the order of characters is changed to obscure the message.

A scytale, a stick with a strip of paper wrapped around it several times.An early version of a transposition cipher was a Scytale[1], in which paper was wrapped around a stick and the message was written. Once unwrapped, the message would be unreadable until the message was wrapped around a same-sized stick again.

One modern transposition cipher is done by writing the message in rows, then forming the encrypted message from the text in the columns. Let’s try an example.

Encrypt the message “Meet at First and Pine at midnight” using rows [latex]8[/latex] characters long.

More complex versions of this rows-and-column based transposition cipher can be created by specifying an order in which the columns should be recorded. For example, the method could specify that after writing the message out in rows that you should record the third column, then the fourth, then the first, then the fifth, then the second. This adds additional complexity that would make it harder to make a brute-force attack.

To make the encryption key easier to remember, a word could be used. For example, if the key word was “[latex]MONEY[/latex]”, it would specify that rows should have [latex]5[/latex] characters each. The order of the letters in the alphabet would dictate which order to read the columns in. Since [latex]E[/latex], the [latex]4[/latex]th letter in the word, is the earliest letter in the alphabet from the word [latex]MONEY[/latex], the [latex]4[/latex]th column would be used first, followed by the [latex]1[/latex]st column ([latex]M[/latex]), the [latex]3[/latex]rd column ([latex]N[/latex]), the [latex]2[/latex]nd column ([latex]O[/latex]), and the [latex]5[/latex]th column ([latex]Y[/latex]).

Encrypt the message [latex]BUY\: SOME\: MILK\: AND\: EGGS[/latex] using a transposition cipher with key word [latex]MONEY[/latex].

To decrypt a keyword-based transposition cipher, we’d reverse the process.

Decrypt the message [latex]RHA\: VTN\: USR\: EDE\: AIE\: RIK\: ATS\: OQR[/latex] using a row-and-column transposition cipher with keyword [latex]PRIZED[/latex].

Unfortunately, since the transposition cipher does not change the frequency of individual letters, it is still susceptible to frequency analysis, though the transposition does eliminate information from letter pairs.