Expt 9 Simple Columnar Transposition
Expt 9 Simple Columnar Transposition
6
Implementation of simple columnar transposition technique
The name of the cipher comes after the operations on a matrix that are performed
during both, encryption and decryption. The number of columns of the matrix is
determined by the secret key.
The secret key is usually a word (or just a sequence of letters). It has to be converted
into a sequence of numbers. The numbers are defined by an alphabetical order of the
letters in the keyword. The letter which is first in the alphabet will be the number 1,
the second letter in the alphabetical order will be 2, and so on.
If there are multiple identical letters in the keyword, each next occurrence of the
same letter should be converted into a number that is equal to the number for the
previous occurrence increased by one.
Encryption Algorithm
In a transposition cipher, the order of the alphabets is re-arranged to obtain the cipher-
text.
1. The message is written out in rows of a fixed length, and then read out again
column by column, and the columns are chosen in some scrambled order.
2. Width of the rows and the permutation of the columns are usually defined by a
keyword.
3. For example, the word HACK is of length 4 (so the rows are of length 4), and the
permutation is defined by the alphabetical order of the letters in the keyword. In
this case, the order would be “3 1 2 4”.
4. Any spare spaces can be filled with nulls or left blank or replaced by a any
character (Example: _) here
5. Finally, the message is read off in columns, in the order specified by the keyword.
Another example for Simple columnar transposition technique:
1. Write the plain text message row-by-row in grids of rectangle of a pre-defined size.
2. Read the message column by column. However, it need not be in the order of
column 1,2,3,4,5,6 etc. It can be any random order such as 2, 6, 4, 3, 5, and 1.
3. After this operation message obtain is cipher text message.
4. Simple columnar transposition technique simple arranges the plain text as a
sequence of row of rectangle that is read in column randomly.
5. Simple columnar transposition technique is also quite simple to break after trying
some permutation combinations of column orders to get original plain text. To make
this encryption more complex we can perform more than one round of transposition
using same technique.
6. Let’s see an example. Suppose we have plain text HELLO YOU ARE READING
THIS ON MY BSC IT. If we perform Simple columnar transposition technique
operation on this text in column order of 2, 6, 4, 3, 5, and 1 then encrypted text will
be EUAHYYRGNILRISSLADIBOENOCHOETMT as shown below.