2 Symmetric cipher model, substitution techniques-Ceasar cipher, Monoalphabetic ciphers, playfair cipher

Hiteishi Diwanji

epgp books

Symmetric Cipher Model – Key Terms

 

  • Plaintext – Original message or Data that is input to the algorithm.
  • Encryption Algorithm – The algorithm that generates text by performing substitution or permutation.
  • Secret Key – Key that decides substitution and transformation that is to be applied to the algorithm.
  • Ciphertext – The substituted or permuted message which is produced by inputting plaintext and key to algorithm.
  • Decryption Algorithm –The algorithm takes ciphertext and key as input and generates plaintext.

For secure communication using encryption following requirements must be satisfied:

  • Strong encryption algorithm – Given the algorithm and one or more ciphertexts attacker can neither decrypt the ciphertext nor find key.
  • The key must be exchanged in secret manner by communicating entities.

Symmetric Encryption Model :

Symmetric Encryption Scheme :

  • Input is, Message P and the encryption key K – Algorithm forms the Ciphertext C denoted as C=E(K,P) .
  • The receiver has key K. P = D(K,C)

Three dimensions specify characteristics of Cryptographic systems:

  • The form of operations used for converting plaintext to ciphertext
  • The number of key used
  • The method used to process plaintext – block cipher, stream cipher

Substitution Technique:

  • Each letter of the plaintext is replaced by other letter or by number or by symbol.
  • Plaintext is bit sequence, ciphertext is also bit sequence

 

  • C = E(3, P)

=(p + 3) mod 26

  • General form,

C = E(K,P) = (P+K) mod 26 P = D(K,C) = (C-K) mod 26

 

Permutation:

 

·         Each element of set with finite elements can be arranged in the other controlled of all the elements of S where the element appears only once.

·         n elements can have n! permutations.

·         In Caesar cipher, if permutation of 26 alphabetic characters is done , then 26! Keys are possible.

 

Monoalphabetic Substitution Cipher:

 

·         If per message different substitutions are done.

·         Single plaintext alphabet to ciphertext alphabet mapping is done.

·         This approach is monoalphabetic substitution cipher.

·         This would make brute force cryptanalysis difficult.

 

Is monoalphabetic substitution secure?

 

·         Frequency of letters can be checked in the ciphertext and can be compared to a standard frequency distribution in English language

·         In the ciphertext, if S occurs for highest times, it is equivalent to e. That way letters with high frequency can be mapped with letters mapped to the set {a,I,o,n}. The letters having lower frequencies can be mapped with letters from the set {b,q,v,x}

 

Frequency analysis monoalphabetic substitution :

  • ·         Use two letter combinations – known as digrams.
  • ·         The most common digrams in English language is “th” – so if in ciphertext “SY” appears maximum time , it can be mapped to “SY”.
  • ·         If “SYR” occurs maximum time, it can be mapped to “the”.

To avoid frequency analysis – Two methods are used:

 

1.      Encrypt multiple letters of plaintext. – Playfair cipher

2.      Use multiple cipher alphabets. – Hill cipher

 

Playfair cipher

 

·         It works on digrams of plaintext and substitutes these by digrams pertaining to ciphertext.

·         The playfair algorithm works with 5×5 matrix which is constructed using a keyword.

  • Rules for the Playfair cipher
  1. Two letters of plaintext are encrypted at the same time. Group of two letters are formed.
  2. If pair contains same letters, they can be separated by any filler letter. For example, tree would be trexex

RW is substituted by WI.

  1. If not 3,4 then from pair, each pair of plaintext is replaced by the letter at intersection point of its own row and column pertaining to the other letter in the plaintext. WD is replaced by ZI.

Strength of Playfair cipher:

  • Frequency analysis reveals structure that can be worked upon by cryptanalyst.
you can view video on Symmetric cipher model, substitution techniques-Ceasar cipher, Monoalphabetic ciphers, playfair cipher

Suggested Reading:

 

  1. Cryptography and Network Security Principles and Practice by William Stallings, sixth Edition, PEARSON.
  2. Security in Computing by Charles Pfleeger & Shari Lawrence Pfleeger, fourth Edition, PEARSON.
  3. Network Security by Charlie Kaufman, Radia Perlman, Mike Speciner, second Edition, PHI.
  4. The Complete Reference – Network Security by Roberta Bragg, Mark Rhodes-Ousley & Keith Strassberg, Tata McGraw Hill
  5. Network Security Bible by Eric Cole, Ronald Krutz, James Conley, Wiley
  6. Hacking 6 Exposed by Stuart McClure, Joel Scambray & George Kurtz , Tata McGraw Hill .
  7. www.snort.org
  8. https://nmap.org