Basic Ciphers in Cryptography

sTeam_BLade
3 min readSep 19, 2021

--

— In this blog i am going to discuss about some of the basic ciphers in cryptography and trust me they are going to be easy.

At first let me show you the types of cryptography…

classification of cryptography

As of now lets concentrate on Transposition cipher. where you can find this at the bottom left corner of above picture. I know it will be a bit confusing for you at this stage to learn Transposition ciphers without having a prior knowledge about symmetric key cryptography but the ciphers that I going to discuss are too basic and it all deals with art of maths.

In simple transposition cipher will jumble the letters of message to confuse the attacker .Their are many types in Transposition cipher but in this blog lets stick with some of the basic and easy types — Columnar , Keyword Columnar Transposition Ciphers and Double Transposition Cipher.

Keyword Columnar Transposition Cipher —

This involves writing the plaintext out in rows, and then reading the ciphertext off in columns one by one.

Steps:

  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 are filled with nulls or left blank or placed by a character (Example: _).
  5. Finally, the message is read off in columns, in the order specified by the keyword.
  6. To decipher it, the recipient has to work out the column lengths by dividing the message length by the key length.
  7. Then, write the message out in columns again, then re-order the columns by reforming the key word.

Columnar Transposition Cipher —

This is similar to keyword columnar but the only difference is here the key is the number of columns in an array(Eg : k=4).

Double Transposition Cipher —

Double Transposition consists of two applications of columnar transposition to a message. The two applications may use the same key for each of the two steps, or they may use different keys.

Steps:

  1. First pick a keyword, then write the message under it in rows.
  2. Now number the letters in the keyword in alphabetical order. Then read the cipher off by columns, starting with the lowest-numbered column. This completes the first columnar transposition.
  3. Next, select and number a second keyword, and write this intermediate ciphertext under it in rows.
  4. Finally, take it off by columns again.
  5. To decrypt a double transposition, construct a block with the right number of rows under the keyword, blocking off the short columns. Write the cipher in by columns, and read it out by rows. Lather, rinse, repeat.

--

--