Hello dear friends! how are you? I hope all of you are doing well. Today we are going to discuss another information system security post. So the topic we are going to discuss is the types of ciphers for encryption. I hope all of you have a sound of knowledge about encryption. If you don’t have a basic knowledge about key concepts of encryption, please visit our introduction to cryptography article.
Introduction to Ciphers
Let’s have a brief introduction about ciphers first. The encryption is used to change the information format. Because of that either the attackers steal it they can’t read or modify the information. The description is done by using an encryption algorithm. These encryption algorithms are known as ciphers. There are many ciphers available these days. Apart from that, those ciphers can categorize into different types. So now we are going to learn about those ciphers.
The ciphers can divide into substitution ciphers and transposition. There is another way of dividing that is block ciphers and stream ciphers. There are many examples of those two types. So now we are going to discuss those examples.
Substitution Ciphers
There are many synonyms for substitution ciphers. They are monoalphabetic cipher and simple substitution. In the substitution ciphers, one letter in the plain text is substituted by another letter and creates the cipher text. There are three ciphers we can take as examples for substitution cipher. They are caser cipher, vigenere tableau, and vernam cipher.
The Ceaser cipher
There is a reason for calling this cipher a Ceaser cipher. That is because this was used by Julius Ceaser. The mechanism of this cipher is changing a letter after a fixed number of places after it in the alphabet. The fixed number can change from time to time. It is not a fixed one for all the instances. Yet it is fixed for the one encryption text. C = E(p+3). Here we take the places we are shifting as 3. Let’s see an example. Assume we want to encrypt the word, “Hello” using Ceaser cipher. The shifting is 3. First, we want to identify the replaceable letter. That is the letters after three places from letters in the word Hello. Three places after H we find the letter K. Three places after e we find the letter H.
Plain text | H | E | L | L | O |
Numeric value | 8 | 5 | 12 | 12 | 15 |
= value +3 | 11 | 8 | 15 | 15 | 18 |
Cipher text | K | H | O | O | R |
Plain Text – HELLO
Cipher Text – KHOOR
Vigenere Tableau
Vigenere tableau is known as a polyalphabetic cipher. That means it uses more than one alphabet for encryption. This mechanism is done using a tabular format. All the letters in the alphabet are listed down on both the X and Y axis. You can refer to the below table. Then starting from the AA location, the alphabet will write down until the ZZ location repeatedly. Let’s take an example and understand this concept. We assume we want to encrypt the word “HELLO”. This encryption also uses a key. The key is “ESC”. For the encryption, we want to write the plain text and key in two lines.
We can repeat the key. You need to remember this. When creating the cipher text we take the corresponding letter from the X axis and Y axis. As the first letter in the cipher text, we check the collision point. From X we take H, and From Y we take E we check what the letter of those two points meets. That is L. Refer to the table for the letter colored in red. Likewise, we continue the encryption. The output is LGDPQ.
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
A | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
B | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A |
C | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B |
D | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C |
E | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D |
F | ||||||||||||||||||||||||||
G | ||||||||||||||||||||||||||
H | ||||||||||||||||||||||||||
I | ||||||||||||||||||||||||||
J | ||||||||||||||||||||||||||
K | ||||||||||||||||||||||||||
L | ||||||||||||||||||||||||||
M | ||||||||||||||||||||||||||
N | ||||||||||||||||||||||||||
O | ||||||||||||||||||||||||||
P | ||||||||||||||||||||||||||
Q | ||||||||||||||||||||||||||
R | ||||||||||||||||||||||||||
S | ||||||||||||||||||||||||||
T | ||||||||||||||||||||||||||
U | ||||||||||||||||||||||||||
V | ||||||||||||||||||||||||||
w | ||||||||||||||||||||||||||
X | ||||||||||||||||||||||||||
Y | ||||||||||||||||||||||||||
Z |
Plain Text | H | E | L | L | O |
Key | E | S | C | E | S |
Cipher Text | L | G | D | P | Q |
Vernam Cipher
The next substitution type or the cipher we are going to discuss is vernam cipher. It is also known as the perfect substitution type. Vernam cipher is an example of a one-time pad cipher. Let’s see now how the encryption process is happening. Firstly the plain text will match with corresponding numeric equivalents. If we take the plain text as “HELLO”, H is the 8 th character of the alphabet. E is in the 5 th place. So on we have to take the corresponding numeric equivalents.
Then we generate random numbers. That is the second step. So we have to allocate random numbers. Then the sum mod 26 value will calculate. As an example For H let’s take a random number that is 20, Then 20+8 = 28. X = 28 mod 26. The x is equal to 2. The equivalent alphabet value to 2 is C. The first letter of cipher text is letter C. Here there is something you have to keep remembering. That is we take 0 as A. That’s why the equivalent of 2 is C. You know in modules we can have 0. Therefore we take A as the 0.
Plain Text | H | E | L | L | O |
Numeric Equivalent | 8 | 5 | 12 | 12 | 15 |
Random Number | 20 | 60 | 30 | 15 | 8 |
Sum | 28 | 65 | 42 | 27 | 23 |
= Sum mod 26 | 2 | 13 | 16 | 1 | 23 |
Cipher Text | C | L | Q | B | X |
Transpositions
The second topic we are going to discuss is transpositions. The goal of transpositions is to confuse. Let’s later talk about confusion and diffusion. The mechanism used in transposition is to rearrange the letters in plain text. They try to break the patterns. Now we can discuss the example of transposition which is a columnar transposition. In columnar transposition rearrange the characters in the plain text into columns. Let’s see an example. This is an example of five column transposition. The plain text is arranged in 5 columns and many rows until the message ends. As you can see below the table. Then cipher text create as five by five letters in the columns. You can refer below to this table.
T | H | I | S | I |
S | A | M | E | S |
S | A | G | E | I |
N | P | L | A | I |
N | T | E | X | T |
Plain Text – This is a message in plain text
Cipher Text – TSSNN HAAPT IMGLE SEEAX ISIIT
There is another extended version of this. Here we create a key. That key is not having repeating characters. Let’s assume the key is megab. Then we write the key above the plain text. Then we take the equivalent numeric values of the key. According to that order, we arrange the columns of plain text to cipher text. If we got empty spaces we fill them with the alphabet.
M | E | G | A | B |
5 | 3 | 4 | 1 | 2 |
T | H | I | S | I |
S | A | M | E | S |
S | A | G | E | I |
N | P | L | A | I |
N | T | E | X | T |
Plain Text – This is a message in plain text
Cipher Text – SEEAX ISIIT HAAPT IMGLE TSSNN
Conclusion
With this, I am going to conclude this article. I hope you are able to understand about different ciphers now. These are the basic ciphers. We have many advanced ciphers these days. From this, we’re going to discuss them. So after here, we can discuss public and private key algorithms. If you have any comments regarding this please comment and let us know. And also please don’t forget to share as well. So let’s meet with another video. Until goodbye!
If a person takes the time to read all of these articles, you can get a detailed knowledge of this topic. This website did an excellent job mirroring the principles it taught. Thank you so much for your valuable effort.
Thank you so much Sanka. Our strength is your opinions. It makes up strong. Please keep reading us. Good luck!