Transposition cipher uses an algorithm to rearrange the letters of a plaintext, forming the ciphertext.
The purpose of the columnar transposition encryption method is to change the positions of the characters without changing their identities. It can be applied by using a password or simply by changing the row column. In the columnar transposition encryption method, while the text to be encrypted with a C value is inserted into the table, the number of columns to be in the table is determined. Let’s try to encrypt ‘AN INFORMATION SECURITY BLOG’ without a key, and assuming C = 5;
A | N | I | N | F |
O | R | M | A | T |
I | O | N | S | E |
C | U | R | I | T |
Y | B | L | O | G |
Without a Key:
The ciphertext becomes;
AOICYNROUBIMNRLNASIOFTETG
Since we used C = 5, the output of the ciphertext will become as;
AOICY NROUB IMNRL NASIO FTETG
With a Key:
Let’s assume we want to encrypt this sentence with ‘BESEC’ key. We are again creating the same table with the key at the top;
B | E | S | E | C |
A | N | I | N | F |
O | R | M | A | T |
I | O | N | S | E |
C | U | R | I | T |
Y | B | L | O | G |
Then we number the letters of the key in alphabetical order;
B | E | S | E | C |
1 | 3 | 5 | 4 | 2 |
A | N | I | N | F |
O | R | M | A | T |
I | O | N | S | E |
C | U | R | I | T |
Y | B | L | O | G |
Because the letter e occurs twice in the word, we numbered the first one as 3, and the other one as 4. Now, we write the ciphertext according to column number;
AOICYFTETGNROUBNASIOIMNRL
And the output will become;
AOICY FTETG NROUB NASIO IMNRL