**Substitution Techniques**

Again Substitution Techniques are the important topic of the Information & Network Security.

Various conventional encryption schemes or substitution techniques are as under:

**What is Caesar Cipher?**

- The encryption rule is simple; replace each letter of the alphabet with the letter standing 3 places further down the alphabet.
- The alphabet is wrapped around so that Z follows A.
- Example:

Plaintext: MEET ME AFTER THE PARTY

Ciphertext: PHHW PH DIWHU WKH SDUWB

- Here, the key is 3. If the different key is used, the different substitution techniques will be obtained.

- Mathematically, starting from a=0, b=1 and so on, Caesar cipher can be written as:

E(p) = *(p + **k) *mod (26)

D(C) = (C — *k) *mod (26)

- This cipher can be broken
- If we know one plaintext-ciphertext pair since the difference will be same.
- By applying Brute Force attack as there are only 26 possible keys.

**Monoalphabetic Substitution Cipher: Substitution Techniques**

- Instead of shifting alphabets by the fixed amount as in Caesar cipher, any random permutation is assigned to the alphabets. This type of encryption called monoalphabetic substitution cipher.
- For example, A replaced by Q, B by D, C by T etc. then it will be comparatively stronger than Caesar
- The number of alternative keys possible now becomes 26!.
- Thus, Brute Force attack is impractical in this case.
- However, another attack is possible. Human languages redundant i.e. certain characters used more frequently than others. This fact can be exploited.
- In English ‘e’ the most common letter followed by ‘t’, ‘r’, ‘n’, ‘o’, ‘a’ etc. Letters like ‘q’, ‘x’, ‘j’ less frequently used.
- Moreover, diagrams like ith’ and trigrams like ‘the’ also more frequent.
- Tables of a frequency of these letters exist. These can use to guess the plaintext if the plaintext in uncompressed English language.

**Playfair Cipher: Substitution Techniques**

- In this technique, multiple (2) letters encrypted at a time.
- This technique uses a 5 X 5 matrix which also called the key matrix.

- The plaintext encrypted
**two letters at a time:** - Moreover, Break the plaintext into pairs of two consecutive letters.
- If a pair a repeated letter, insert a filler like ‘X’in the plaintext, eg. “Balloon” treated as “ba Ix lo on”
- If both letters fall in the same row of the key matrix, replace each with the letter to its right (wrapping back to start from end), eg. “AR” encrypts as “RM”.
- If both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom), eg. “MU” encrypts to “CM”.
- Otherwise, each letter replaced by the one in its row in the column of the other letter of the pair, eg. “HS” encrypts to “BP”, and “EA” to “IM” or “JM” (as desired)
- Security much improved over monoalphabetic as here two letters are encrypted at a time and hence there are 26 X 26 =676 diagrams and hence it needs a 676 entry frequency table.
- However, it can break even if a few hundred letters known as much of plaintext structure retained in the ciphertext.

**Related Terms**

Information and Network Security, Cryptography, Security Attacks, Symmetric Cipher Model

## Leave a Reply