A Way For Learning

Playfair Cipher

No comments

  • Has a key that is filled in the matrix form .If the Key has repeated words,then from the other that first time it is neglected while filling the matrix.
  • From the plain text,Certain rules are followed to decode it.
  • Then apply the following 4 rules, in order, to each pair of letters in the plain text:

  1. If both letters are the same (or only one letter is left), add an "X" after the first letter. Encrypt the new pair and continue. Some variants of Playfair use "Q" instead of "X", but any letter, itself uncommon as a repeated pair, will do.
  2. If the letters appear on the same row of your table, replace them with the letters to their immediate right respectively (wrapping around to the left side of the row if a letter in the original pair was on the right side of the row).
  3. If the letters appear on the same column of your table, replace them with the letters immediately below respectively (wrapping around to the top side of the column if a letter in the original pair was on the bottom side of the column).
  4. If the letters are not on the same row or column, replace them with the letters on the same row respectively but at the other pair of corners of the rectangle defined by the original pair. The order is important – the first letter of the encrypted pair is the one that lies on the same row as the first letter of the plaintext pair.





Reference:

No comments :

Post a Comment