You are on page 1of 9

B.

Tech CSE/CST

Instructor:
Dr Mohammad Wazid
Associate Professor, Department of CSE
Graphic Era (Deemed to be University), Dehradun, India
Email: wazidkec2005@gmail.com
Homepage: https://sites.google.com/site/mwazidiiith/home
Playfair cipher
• The Playfair cipher is a digraph substitution cipher.
• It employs a table where letters are arranged in a 5x5 grid.
• Typically, the I/J letters are placed together.
• A key word, for example, MONARCHY is filled in first, and
the remaining unused letters of the alphabet are entered in
their lexicographic order.
Playfair cipher

Key matrix
Playfair cipher
• Encryption process:
• When the two letters are in different rows and columns, each is replaced
by the letter that is in the same row but in the other column; i.e., to
encrypt WE, W is replaced by U and E by G.
• When A and R are in the same row, A is encrypted as R and R (reading
the row cyclically) as M.
• When I and S are in the same column, I is encrypted as S and S as X.
• When a double letter occurs, a spurious symbol, say X, is introduced so
that the MM in SUMMER is encrypted as AU for MX and CL for ME.
• An X is appended to the end of the plaintext if necessary to give the
plaintext an even number of letters.
Playfair cipher
• Encryption process:
• Suppose we have to encrypt: WELCOME TO GEU
• Solution:
• First of all you have to make diagraphs from the alphabets of the plaintext
letters. Omit spaces in between the letters.
• WE LC OM ET OG EU
• Now perform the encryption using the key matrix.
• Cipher text will be: UGUENOKLNFLM
Playfair cipher
• Decryption process:
• When the two letters are in different rows and columns, each is
replaced by the letter that is in the same row but in the other
column; i.e., to encrypt WE, W is replaced by U and E by G.
• When A and R are in the same row, A is decrypted as N and R as
A.
• When L and U are in the same column, L is decrypted as E and U
as L.
• Remove the appended letter X, if you have added that in the
plaintext at the sender's end.
Playfair cipher
• Decryption process:
• Suppose we have to decrypt: UGUENOKLNFLM
• Solution:
• First of all you have to make diagraphs from the alphabets of the ciphertext
letters.
• UG UE NO KL NF LM
• Now perform the decryption using the key matrix.
• Plaintext will be:
• WE LC OM ET OG EU
• After removing the spaces: WELCOME TO GEU
Security analysis of playfair cipher
• Cryptanalysis of the playfair cipher is much more difficult than
normal simple substitution ciphers, because digraphs (pairs of
letters) are being substituted instead of monographs (single
letters).
• If we use frequency analysis of english digraphs, we can use this
information in the same way as we used the monograph
frequencies, however, there are ~600 digraphs and only 26
monographs.
• We need far more ciphertext for the digraphic system to make
reliable key choices compared to the monographic system.
• Therefore, it is more secure than other monographic encryption
schemes like, affine cipher.
Important references:
1. Textbook: Cryptography and Network Security: Principles
and Practice by William Stallings

You might also like