You are on page 1of 1

3.3.

Playfair cipher

The playfair cipher starts with creating a key table. The key table is a 5×5 grid
of letters that will act as the key for encrypting the plaintext. Each of the 25
letters must be unique and one letter of the alphabet (usually I or J) is omitted
from the table (as there are 25 spots and 26 letters in the alphabet).
Let’s say we wanted to use the phrase “Hello World” as our key. The first
characters (going left to right) in the table will be the phrase, with duplicate
letters removed. The rest of the table will be filled with the remaining letters of
the alphabet, in order. Our key table would look like this:
H E L O W
R D A B C
F G I K M
N P Q S T
U V X Y Z

Now for the actual encryption process. The Playfair cipher uses a few simple rules
relating to where the letters of each digraph are in relation to each other. The
rules are:
• If both letters are in the same column, take the letter below each one (going
back to the top if at the bottom)
• If both letters are in the same row, take the letter to the right of each one
(going back to the left if at the farthest right)
• If neither of the preceding two rules are true, form a rectangle with the two
letters and take the letters on the horizontal opposite corner of the rectangle
• If two letters are same add X . e.g. college becomes co lx le ge, also if the
last unit has only one letter left, add X. E.g house becomes ho us ex

Plaintext = meet me at the school house


Splitting two letters as a unit => me et me at th es ch
ox ol ho us ex
Corresponding cipher text => GW WP GW CQ NW OP RW LY WO EW YN LV

Strength of playfair cipher


Playfair cipher is a great advance over simple mono alphabetic ciphers. Since there
are 26 letters, 26x26 = 676 diagrams are possible, so identification of individual
diagram is more difficult.

You might also like