Monoalphabetic Cipher

Learn via video courses
Topics Covered

Overview

Monoalphabetic cipher is a type of encryption technique in cryptography where each character of the plain text is mapped to another fixed character of the cipher text. Monoalphabetic cipher is a type of simple substitution cipher.

The relationship between the plain text character and the cipher text character is one-to-one.

For example:
If a plain text character 'a' is mapped to a character 'z', a plain text word which contains 'a' anywhere will be substituted with 'z' when creating the cipher text.

Types of Monoalphabetic Ciphers

There are four types of monoalphabetic ciphers:

  1. Additive Cipher:
    Additive cipher is a type of monoalphabetic cipher where every character of plain text is mapped to some other character in the cipher text depending on the value of the key being used.

    For example, if the plain text has a character 'a' and the value of the key is 5, then 'a' will be substituted with 'f' because 'f' is 5 characters from 'a' as per the key used for the additive monoalphabetic cipher process.

    The mathematical representation of the additive cipher is:

    • Encryption process:
      The formula for encryption of plain text to cipher text in additive monoalphabetic cipher is: C=(P+k) mod 26C = (P + k)\ mod\ 26 Here, PP is the character in plain text, kk is the key being used for defining the encryption process, and CC is the required cipher text.
    • Decryption process:
      The formula for the decryption process of cipher text to plain text in additive cipher is: P=(Ck) mod 26P = (C - k)\ mod\ 26 Here, PP is the plain text, CC is the cipher text from which we need to convert to plain text and kk is the key.

    For example, if the plain text is: 'this is encryption.' with the key being 4, then the cipher text becomes: 'Lipps, xlmw mw irgvctxmsr'.

    working of additive cipher

  2. Caeser Cipher:
    Caeser cipher is a type of monoalphabetic cipher where every character of plain text is mapped to another character by a distance of 3. It is essentially a type of additive cipher where the key value is always 3.

    For example, if the plain text has a character 'a' then the value of its cipher text counterpart will be 'd' since the value of the key is 3 in the Caeser cipher.

    The mathematical representation of the Caeser cipher is:

    • Encryption process:
      The formula for encryption of plain text to cipher text in Caeser cipher is C=(P+3) mod 26C = (P + 3)\ mod\ 26.

      Here, PP is the plain text, CC is the cipher text and 33 is the key because it always remains the same in the Caeser cipher.

    • Decryption process:
      The formula for the decryption process of cipher text to plain text in Caeser cipher is P=(C3) mod 26P = (C - 3)\ mod\ 26.

      Here, PP and CC are plain text and cipher text respectively, and 3 is the key.

    For example, if the plain text is: 'hello world', then the cipher text as per Caeser cipher is: 'khoor zruog'.

    working of caeser cipher

  3. Multiplicative cipher:
    Multiplicative cipher is a type of monoalphabetic cipher where a character in the plain text is multiplied by the key after which the modulus function is applied.

    For example, if the plain text has a character 'h' and if the key is set to 4, then the value of the cipher text is 'x'.

    The mathematical representation of multiplicative cipher is:

    • Encryption process:
      The formula for encryption of plain text to cipher text in multiplicative cipher is C=(Pk) mod 26C = (P * k)\ mod\ 26. Here, PP is plain text, CC is cipher text and kk is the key.

    • Decryption process:
      The formula for decryption of cipher text to plain text in multiplicative cipher is P=(Cmultiplicative inverse of k) mod 26P = (C * multiplicative\ inverse\ of\ k)\ mod\ 26.

    For example, if the plain text has 'hello world' as the plain text with the key being 5, then the cipher text becomes: 'judds gshdp'.

    working of multiplicative cipher

  4. Affine cipher:
    Affine cipher is one of the strongest monoalphabetic ciphers. Affine cipher has two keys, and it uses a combination of additive and multiplicative cipher to create the cipher text from plain text.

    The mathematical representation of affine cipher is:

    • Encryption process:
      The formula for encryption of plain text to cipher text in affine cipher is C=(Pk1+k2) mod 26C = (P * k1 + k2)\ mod\ 26. Here, CC represents cipher text, PP represents plain text and k1k1 and k2k2 are the two keys used in affine cipher.
    • Decryption process:
      The formula for decrypting cipher text to plain text in affine cipher is: P=((Ck2)/k1) mod 26P = ((C - k2) / k1)\ mod\ 26

    For example, if the plain text is 'hello world', then the cipher text as per affine cipher is: 'jkzzy eyxzt'.

    working of affine cipher

Conclusion

  • Monoalphabetic cipher is a type of substitution cipher technique in cryptography where each character of the plain text is mapped to another fixed character of the cipher text.
  • The relationship between the plain text character and the cipher text character is one-to-one.
  • The four main types of monoalphabetic cipher are:
    • Additive cipher
    • Caeser cipher
    • Multiplicative cipher
    • Affine cipher