Unlike many of the other ciphers covered in this site, the Playfair Cipher uses a unique and puzzle-like method of encryption. It was developed by Sir Charles Wheatstone in 1854, but is the namesake of Lord Playfair, who popularized its use. It takes advantage of a 5 x 5 grid of letters and pairs of letters when encrypting/decrypting. Playfair was used by British forces in the Zulu Wars, World War I, and World War II. It was chosen as the central British cipher to use due to its relative simplicity: It's easy to teach and it only requires paper and pencil. However, in the heat of battle, simple subsitution ciphers and code-words became more commonplace in the trenches.
Playfair messages are rather easy to explain and describe. First, to create a grid, use a word as the key. For our case, we are going to use the keyword "CRYPTO". Begin to build a 5 x 5 grid with the individual letters of the keyword as the first few letters. In a Playfair key grid, every letter only shows up once. Luckily, we don't have any repeated letters in our key, so we can add CRYPTO as is. If we had a keyword with repeated letters, such as "HELLO", our grid would begin with the letters H E L O. After that, finish the grid with the rest of the alphabet, remembering to skip letters that have already been used in the keyword.
You may have noticed that a 5 x 5 grid would only prodcuce 25 spaces for letters, but there are 26 letters in the alphabet. In the Playfair cipher, we essentially combine I and J into one letter. For simplicity, we will be showing this combination as just "I". But remember that it represents both I and J.
From here, the following steps can be taken:
PR OG RA MM IN G
PR OG RA MX MI NG
Completing out the rest of the text, CRYPTOLOGY IS COOL becomes RYPTCEUFHR KQ OFFU.
Much like other ciphers, decryption of an encrypted message is relatively simple as we can simply follow the steps backwards to get the plaintext. However, just follow the encryption step backwards:
Without a computer, the key length of a Playfair cipher can also be determined by an analysis of repeated pairs of letters - similar to Vigenère. Or, theoretically, if one knows the frequency of pairs of letters in the ciphertext language, one can use a form of frequency analysis to possibly break a Playfair cipher. With a computer, a user could do what is called hill climbing as a method of finding the Playfair cipher. This works by having a computer pseudo-evolve a Playfair table. It initially generates a randomized table, and then checks it against the ciphertext; it then incrementally improves the table to create a key that recreates the plaintext or something close to it.
C R Y P T
O A B D E
F G H I K
L M N Q S
U V W X Z
Plaintext: CR YP TO LO GY IS CO OL
Ciphertext: RY PT CE UF HR KQ OF FU
Example 1: Using the CRYPTO Playfair table, encrypt the message: ATTACK THE HILL AFTER DAWN Example 2: Using a Playfair table with the key "APPLE", encrypt the message: AN APPLE A DAY KEEPS THE DOCTOR AWAY Example 3: Using the CRYPTO Playfair table, decrypt the message: MOQB FL FBTD BMA IUFYP Example 4: Using a Playfair table with the key "LONDON", decrypt the message: QMC SPCMQ ILDNQSLGNB ONTO HADZGDRW"
Paragraph: Using a Playfair table with the key "CITY", decrypt the paragraph:
TY ZTQ ALB DFQA RB YTLFP, AE TGZ CLL TPSQA RB YTLFP, AE TGZ CLG TBF RB VTPGRH, TY ZTQ ALB GNB QN NVVKTONLGUU,
TY ZTQ ALB DQUBO UG DLQTDD, YE TGZ CLM MQPBO RB AKYOFEWHTYA, TE TGZ CLG QGTOPH SE MADLC, TY ZTQ ALB QGGZSH RB GIPMLGUU,
TY ZTQ ALB OQPYSN RB OUQD, TY ZTQ ALB VTLAFQ RB EFOQCTQ, XB LIG DWFQAYKCSN DFBRQF ZO, TL NCG KQCKCSN DFBRQF ZO,
TL TLQF TNN EPCSN KDQFIY CQ LBIZGL, TL TLQF TNN EPCSN KDQFIY CLB QCLFQ ZTA
TS ZOUQY, CLD QFQCPE VGZ OP GYQ MDPL ELB QSGQGLI QFQCPE, INCA QRHB QD YAQ HSAPTDQA CZCLPSTYTDP ASZAPELB PK AAQ DFAKF SBTDTWDE,
GPS BSPB PS BRQ FIDK, TL ALB OZQDQMCYDIF EFBQFB QB YRHSIPYOPH SHMFY
This application to come soon