substitution technique
hash function

Substitution Techniques in Cryptography

As we have already learnt about cryptography, let us learn more about substitution technique. Firstly, Substitution Techniques is a way of encrypting the message where characters or symbols replaces the original plaintext.

substitution technique

Let us study in detail about these techniques.

  1. Caesar Cipher
  2. Monoalphabetic Cipher
  3. Playfair Cipher
  4. Hill Cipher
  5. Polyalphabetic Cipher
  6. One Time Pad

Caesar Cipher ( First Substitution Technique)

Firstly, Caesar Cipher is the simplest substitution technique. Secondly, In this method to encrypt plaintext, each letter replaces itself by three places further it. And for decryption, it replaces itself by three places before it.

Formula is as follows:

Encryption, Cipher = (plaintext + 3) mod 26

Decryption, plaintext = (Cipher – 3) mod 26

For instance, plaintext = meet me, then ciphertext = phhw ph. So in this case, ‘m’ is replaced by ‘p’, ‘e’ by ‘h’ and so on.

Note : If ‘z’ is there, consider next letter after ‘z’ as ‘a’.

Monoalphabetic Cipher (Second Substitution Technique)

In monoalphabetic cipher, there is fix cipher text for each plaintext with some permutation.

For instance, for plaintext ‘a’, ‘b’, ‘c’…. and so on, resultant ciphertext is ‘y’, ‘n’, ‘l’ respectively, So here, ‘y’ can replace ‘a’, ‘n’ replaces ‘b’ respectively.

Playfair Cipher

This technique involves creating a 5×5 matrix from keyword.

Rules for generating ciphertext in Playfair Cipher:

  • Firstly, create a 5×5 matrix from given keyword.
  • Secondly, create pairs of alphabets, if same letters are there in pair, add ‘x’ in between.
  • Thirdly, if pair appears in same row, shift the letter with immediate right letter.
  • If pair appears in same column, replace it with the letter below it.
  • In case pairs are in different rows and columns, replace it with the letters on corner of same row.

For instance, Keyword: OCCURENCE, Plaintext: TALL TREES. Here, resultant pair will be: TA LX LT RE ES. Keyword matrix is as follows:

OCURE
NABDF
GHI/JKL
MPQST
VWXYZ
5×5 matrix in Playfair Cipher

Hence, here ‘TA’ are in different rows and columns, so replace it by ‘PF’. Thus, ciphertext = PF IZ TZ EO RT

Hill Cipher

Firstly, in hill cipher, we create a square matrix of key and we also form a matrix of plaintext. Secondly, the general equation is as follows:

Hence, for encryption, Cipher = PKmod26, here P = plaintext and K = Key.

Moreover, for decryption, Plaintext = CK-1 mod26. For instance, keyword = HILL and Plaintext = EXAM, we create a 2×2 matrix of HILL and 2×1 matrix of (EX) and (AM) respectively.

Similarly, for decryption we need to find inverse of K and then multiply it by cipher value. Lastly, we need to calculate mod 26.

Polyalphabetic Cipher

Firstly, Polyalphabetic cipher is more secure than monoalphabetic cipher. Monoalphabetic cipher maps one ciphertext with one plaintext. Comparatively, polyalphabetic cipher replaces plaintext with different ciphertext.

Summary for Substitution Techniques

In conclusion, we have learnt in brief about the various substitution techniques. We have also seen various examples for encryption of plaintext to get ciphertext.

About the author

Drishti Patel

View all posts
4 4 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments