Wednesday, October 13, 2021

Columnar Transposition Cipher | Transposition Cipher


There are basically two types of symmetric cipher: Substitution Cipher, Transposition Cipher.

Substitution Cipher: A substitution is a technique in which each letter or bit of the plaintext is substituted or replaced by some other letter, number or symbol to produce cipher text. For Example, ABC  XYZ.

Types of Substitution Cipher: Caesar Cipher, Monoalphabetic Cipher, Vigenère Cipher, Playfair Cipher, One time pad cipher (Vernam cipher), Hill Cipher.

Transposition Cipher: In transposition technique, there is no replacement of alphabets or numbers occurs instead their positions are changed or reordering of position of plain text is done to produce cipher text. For Example, ABCDE    BADEC.

Types of Transposition Cipher: Rail Fence Cipher, Columnar Transposition Cipher.


Columnar Transposition Cipher

The Columnar Transposition Cipher is a form of transposition cipher in which plain text represent in matrix form. Columnar Transposition involves writing the plaintext out in rows, and then reading the ciphertext off in columns one by one. Here I have explained encryption and decryption process of columnar transposition cipher.


Rules of Encryption Process

Example: Plain Text: TREE IS GREEN, Key = HACK (Key length = 4)

Step-1: Width of the rows and the permutation of the columns are usually defined by a keyword.

Step-2: Keyword 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”.

Step-3: The message is written out in rows of a fixed length.

Step-4: Any spare spaces are filled with nulls or left blank or placed by a character (Example: _).

Step-5: Finally, the message is read off in columns, in the order specified by the keyword.

Rules of Decryption Process

As per above example:

Cipher Text: R I R _ E S E _ T _ G N E _ E _

Key = HACK (Key length = 4)

Step-1: To decipher it, the recipient has to work out the column lengths by dividing the message length by the key length.

Step-2: Then, write the cipher text in columns again, then re-order the columns by reforming the keyword. Read matrix row wise to get plain text.

To learn more about Columnar Transposition Cipher, Click here

        Watch more videos click here.

No comments:

Post a Comment