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 n
where,
C -> cipher-text
M -> message/plain-text
k -> key
The 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 n
where,
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 k1 and k2 are used.
C = [(M * k1) + k2] mod n
M = [(C – k2) * k1-1 ] mod n
For more information and implementation, see Affine Cipher
Now, let’s study about poly-alphabetic cipher.