In a transposition cipher, the ciphertext is a permutation of the plaintext. There are different types of transposition cipher. In a simple columnar transposition cipher, the plaintext is written row-wise in a table. The key is an integer that specifies the number of letters in a row in the table. The table is then read column-wise.
For example, let’s say the plaintext is “attack at dawn” and the key is 4. The plaintext, in that case, is written in a table like the following:
1 2 3 4 a t t a c k a t d a w n
Please note that the table is a 4×4 table and the length of the plaintext is 14. So, the last two places in the table can be filled with spaces or nulls.
The table is then read column-wise to get the ciphertext. The ciphertext, in this case, is:
actwtk nt d aaa
In the above example, we used an integer as the key. But, the key can be a word also. For example, we can use the key “road”. The length of the key is 4. So, each row of the table will contain 4 letters. But, after writing the table, the columns are read as per the letters in the key. In our example, if the letters of the word ‘road’ is written alphabetically, then ‘a’ comes first, ‘d’ comes next, then ‘o’ and ‘r’ come. In other words, ‘a’ can be represented with ‘1’, ‘d’ with ‘2’, ‘o’ with ‘3’ and ‘r’ with ‘4’. So, the key ‘road’ now becomes 4312.
Thus, while generating the ciphertext, the fourth column is read first, then the third, first and second columns are read respectively. So, the ciphertext now becomes:
aaa t d actwtk n
A double transposition cipher is more complex. In that case, we firstly generate a ciphertext using the above method and then, the ciphertext is again encrypted with the same key or with a different key.
For example, in the above example, the ciphertext is ‘aaa t d actwtk n’ We can again encrypt this text …
0 Comments