Playfair Cipher With Examples
Playfair Cipher With Examples
The Playfair cipher was the first practical digraph substitution cipher. The scheme
was invented in 1854 by Charles Wheatstone but was named after Lord Playfair who
promoted the use of the cipher. In playfair cipher unlike traditional cipher we encrypt
a pair of alphabets(digraphs) instead of a single alphabet.
It was used for tactical purposes by British forces in the Second Boer War and in
World War I and for the same purpose by the Australians during World War II. This
was because Playfair is reasonably fast to use and requires no special equipment.
Encryption Technique
For the encryption process let us consider the following example:
If both the letters are in the same row: Take the letter to the right of each one
(going back to the leftmost if at the rightmost position).
For example:
Diagraph: "st"
Encrypted Text: tl
Encryption:
s -> t
t -> l
If neither of the above rules is true: Form a rectangle with the two letters and
take the letters on the horizontal opposite corner of the rectangle.
For example:
Diagraph: "nt"
Encrypted Text: rq
Encryption:
n -> r
t -> q