# Cryptography | Traditional Symmetric Ciphers

The two types of traditional symmetric ciphers are **Substitution Cipher** and **Transposition Cipher**. The following flowchart categories the the traditional ciphers:

**1. Substitution Cipher:**

Substitution Ciphers are further divided into **Mono-alphabetic Cipher** and **Poly-alphabetic Cipher**.

First, let’s study about mono-alphabetic cipher.

**Mono-alphabetic Cipher –**

In mono-alphabetic ciphers, each symbol in plain-text (eg; ‘o’ in ‘follow’) is mapped to one cipher-text symbol. No matter how many times a symbol occurs in the plain-text, it will correspond to the same cipher-text symbol. For example, if the plain-text is ‘follow’ and the mapping is :

- f -> g
- o -> p
- l -> m
- w -> x

The cipher-text is ‘gpmmpx’.

Types of mono-alphabetic ciphers are:

**(a). Additive Cipher (Shift Cipher / Caesar Cipher) –**

The simplest mono-alphabetic cipher is additive cipher. It is also referred to as ‘Shift Cipher’ or ‘Caesar Cipher’. As the name suggests, ‘addition modulus 2’ operation is performed on the plain-text to obtain a cipher-text.C = (M + k) mod n

M = (C – k) mod nwhere,

C -> cipher-text

M -> message/plain-text

k -> keyThe key space is 26. Thus, it is not very secure. It can be broken by brute-force attack.

For more information and implementation see Caesar Cipher**(b). Multiplicative Cipher –**

The multiplicative cipher is similar to additive cipher except the fact that the key bit is multiplied to the plain-text symbol during encryption. Likewise, the cipher-text is multiplied by the multiplicative inverse of key for decryption to obtain back the plain-text.C = (M * k) mod n

M = (C * k^{-1}) mod nwhere,

k^{-1}-> multiplicative inverse of k (key)

The key space of multiplicative cipher is 12. Thus, it is also not very secure.

**(c). Affine Cipher –**

The affine cipher is a combination of additive cipher and multiplicative cipher. The key space is 26 * 12 (key space of additive * key space of multiplicative) i.e. 312. It is relatively secure than the above two as the key space is larger.

Here two keys k_{1}and k_{2}are used.C = [(M * k

_{1}) + k_{2}] mod n

M = [(C – k_{2}) * k_{1}^{-1}] mod nFor more information and implementation, see Affine Cipher

Now, let’s study about poly-alphabetic cipher.

**Poly-alphabetic Cipher –**

In poly-alphabetic ciphers, every symbol in plain-text is mapped to a different cipher-text symbol regardless of its occurrence. Every different occurrence of a symbol has different mapping to a cipher-text. For example, in the plain-text ‘follow’, the mapping is :f -> q

o -> w

l -> e

l -> r

o -> t

w -> yThus, the cipher text is ‘qwerty’.

Types of poly-alphabetic ciphers are:

**2. Transposition Cipher:**

The transposition cipher does not deal with substitution of one symbol with another. It focuses on changing the position of the symbol in the plain-text. A symbol in the first position in plain-text may occur in fifth position in cipher-text.

Two of the transposition ciphers are:

**Columnar Transposition Cipher –**

For information and implementation, see Columnar Transposition Cipher**Rail-Fence Cipher –**

For information and implementation, see Rail-Fence Cipher

## Recommended Posts:

- Custom Building Cryptography Algorithms (Hybrid Cryptography)
- Cryptography | Development of Cryptography
- Difference between AES and DES ciphers
- Traditional wireless mobile communication
- RSA Algorithm in Cryptography
- Quantum Cryptography
- Computer Network | DNA Cryptography
- Easy Key Management in Cryptography
- Cryptography | Introduction to Crypto-terminologies
- Cryptography | One Time Password (OTP) algorithm
- Computer Network | Cryptography Introduction
- Cyber Law (IT Law) in India
- Information Security | Digital Forensics
- Types of Virtual Private Network (VPN) and its Protocols

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.