Substitution Cipher


A substitution cipher involves replacing characters or blocks in the plaintext with different elements to generate a ciphertext.

  • e.g.,
    • rotate or scramble letters of the alphabet

Alphabet is a set of elements, which may be letters, words, or any other form of bit strings that are used to generate plaintexts and ciphertexts.

Types

monoalphabetic cipher is a cipher in which the letters of the plaintext are mapped to ciphertext letters based on a single substitution key and each letter is always replaced by the same letter.

  • transformation is bijective

polyalphabetic cipher is a cipher, which makes use of multiple alphabets and a letter may be replaced by many other letters depending on its position in the plaintext.

  • makes use of multiple keys
  • transformation is not bijective

shift cipher is a substitution cipher which replaces a plaintext’s letter by a letter that is a fixed number of positions to the right of the letter in the alphabet.

  • the fixed number of positions is the encryption key

The Caesar cipher is a shift cipher which shifts each plaintext’s letter by 3 positions to the right.

  • encryption key is 3

The ROT13 cipher is a monoalphabetic substitution cipher which rotates each letter of a plaintext 13 places to the right in the alphabet.

  • encryption key is 13