4 polyalphabetic ciphers

Hiteishi Diwanji

epgp books

Homophonic substitution ciphers:

  • Homophonic substitution cipher maps a character to more than one code. For example, “A” could correspond to 3, 15, 23; while for “B” this could be 5, 17, 21.
  • This type of substitution makes cryptanalysis or brute force harder but it doesn’t hide all statistical properties.
  • With the help of powerful computer this can be broken in a few seconds.

Polyalphabetic Cipher:

  • Monoalphabetic substitution rules are used.
  • Key decides which monoalphabetic substitution is to be performed.

Vigenere Cipher:

  • P=p0p1p2……pn-1
  • K=k0k1k2……km-1
  • C=C0C1C2……Cn-1
  • C=E(K,P) = E[(k0k1k2……km-1, p0p1p2……pn-1)]

=(p0+k0) mod 26, (p1+k1) mod 26, …(pm-1+km-1) mod 26, (pm+k0) mod 26 … K is of length m. For m letters of plaintext , key is used. For the next m letters of plaintext, the key letters are repeated until all plaintext letters are used.

  • Pi=(Ci – ki mod m) mod 26

Vigenere Cipher:

  • Key : mask
  • Plaintext : meetmeatfield
  • Ciphertext :

 

Strength of Vigenere Cipher:

  • The letter frequency is masked. But key is repeated so for the same plaintext letter and key letter – same ciphertext letter is achieved.
  • For meet and me – me generates same ciphertext ye because key is repeated.

Autokey system:

  • Periodic nature of the keyword can be overcomed by nonrepeating keyword that is as long as an autokey system.
  • Key word is concatenated with plaintext to provide a running key.
  • Key : mask meet meatf
  • Plaintext : meetmeatfield
  • Ciphertext :

VERNAM cipher:

  • Cipher works on binary data(bits)
  • ci=pi ki

Where

Pi = ith binary digit of plaintext

Ki = ith binary digit of key

ci = ith binary digit of ciphertext

  • = exclusive – or (XOR) operation pi=ci Å ki

One – Time pad:

  • The key is used to encrypt and decrypt a single message, then key is discarded.
  • Each new message requires a new key of the same length as the new message. Such a scheme, is known as a one-time pad.
  • One time pad is unbreakable.
  • No statistical relationship to the plaintext.
  • Includes space so 27 characters scheme.

One – Time pad Example:

  • Plaintext : mr mustard
  • key : pxlmvmsydo
  • Ciphertext : ANKYODKYUR
  • Plaintext : miss scarl
  • Key : pftgpmiydg
  • Ciphertext : ANKYODKYUR

Cryptanalyst can find keys and can not decide which plaintext is true and which key is correct.

 

One Time pad – Difficulties in using:

  • Practically difficult to generate large quantities of random keys.
  • How to distribute key and protect them. Because for every message , equal length of key is to be sent to sender and receiver.

One time pad gives perfect secrecy. But limited use . Used only for highly secure low bandwidth channels.

 

Transposition Techniques. – permutation of plaintext letters :

 

Rail fence cipher:

 

Message “ all gather at lawn”.

 

Rail fence depth 2

 

Transposition Techniques. –– Complex scheme:

 

  • permutation of plaintext letters
  • Write the message row by row , read column by column. Permutation is done by order of the column.
  • Plaintext : discusstheformulainmeeting
  • Ciphertext : ssfuntxisemiegduhraenctolmiy
  • For key 3214, start with column labeled 1- column 3 in table. Write all the letters then column labeled 2 – column 2 in the table. Then column labeled 3 and 4.
  • This type of transposition cipher is not secure because letter frequencies in ciphertext are same as plaintext.
  • Cryptanalyst can put ciphertext in a matrix and play with column position.

Stegnography:

  • Plaintext message is hidden
  • Simple method – An arrangement of words or letters in the message can give real message.
  • Text : Driveon Road Open passage.
  • Hidden message : First letter of each word – DROP

Stegnography techniques:

  • Character Marking – Selected letters are overwritten in pencil and not visible unless hold at an angle to bright light
  • Invisible ink – leave no visible trace until heat or some chemical is applied to the paper.
  • Pin punctures – pin punctures on selected letters. Not visible unless the paper is held up in light.

Advantage : hide the secret communication

Disadvantage : Lot of overhead to hide few bits of information

 

you can view video on polyalphabetic ciphers

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