11-Permutation cipher

15.4K 108 19
                                    

           The Permutation Cipher is another form of Transposition Cipher. It is similar to Columnar Transposition in some ways, in that the columns are written in the same way, including how the keyword is used. However, the Permutation Cipher acts on blocks of letters (the lengths of the keyword), rather than the whole ciphertext.

Mathematically, a permutation is a rule that tells you how to rearrange a set of elements. For example, the permutation shown to the left (this is how we write a permutation mathematically), tells us that the first element is moved to the third position, the second element is moved to the first position and the third element is moved to the second position.

A simple permutation

If our set was the
        {Monday, Tuesday, Wednesday}
then after the permutation is applied we get
        {Tuesday, Wednesday, Monday}.

For sets bigger than the permutation, we apply the permutation to the smaller bits. For example, {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday} becomes {Tuesday, Wednesday, Monday, Friday, Saturday, Thursday} since we apply the permutation to the first 3 elements (as above), then to the second 3 elements, and join the results.

The Permutation Cipher works like this, acting on each block and reordering within the blocks.

Encryption
We choose a keyword, and split the plaintext into blocks that are the same length as the keyword. We write this in columns beneath the keyword. We then label each keyword letter in alphabetical order (if there are duplicates we take them in order of appearance). So far this is identical to Columnar Transposition. Now we reorder the columns, so that the numbers are in order (the letters of the keyword are in alphabetical order). We now read across the rows.

As an example we shall encrypt the plaintext "the quick brown fox jumped over the lazy dog" using the keyword BAD.

We start by creating a grid that has 3 columns (as the keyword has 3 letters). In this grid we write out the plaintext beneath the keyword. We add a row with the numbers representing the alphabetical order of the letters of the keyword.

We then reorder the columns so that the numbers are in order, like in the image to the below.

We then reorder the columns so that the numbers are in order, like in the image to the below

Oops! This image does not follow our content guidelines. To continue publishing, please remove it or upload a different image.

The grid filled with the plaintex, under the keyword bad, which has been labelled.

BOOK OF CODES AND CIPHERSWhere stories live. Discover now