The Playfair Cipher: A Legacy of Cryptographic Innovation
Also known as Wheatstone-Playfair Cipher was the first literal digram substitution. It was invented by Charles Wheatstone (1854), but bears the name of Lyon Playfair, the first Baron Playfair of St. Andrews. Being a prominent figure in the British empire, he promoted the use of the cipher created by his friend.
Playfair demonstrated “Wheatstone’s newly discovered symmetrical cipher” at a dinner in January, 1854 given by Lord Granville, who was the President of the governing council, among the guests were Prince Albert (Queen Victoria’s husband) and Lord Palmerston. Although the cipher was initially rejected by British Foreign Office officials due to its complexity, it was used heavily in the Second Boer War and in World War I by the British Forces. During World War II, the Government of New Zealand used it for communication among New Zealand, Cautham Islands, and coastwatchers in Pacific Islands.
It was primarily used for messages that would be rendered useless after a certain period of time, so that by the time enemies decoded the message, it was already rendered useless.
Wheatstone used a keyword followed by the remaining alphabets to create a block. Wheatstone recognized that the cipher would work with rectangles and squares, but the cipher was soon aligned to use a 5x5 cipher block like Vigenère Square, which allowed for ease of use but reduced security. In the block, usually I and J share a single place.
For encryption, the plaintext is divided into digraphs (sets of 2 characters). If necessary, a null character such as q or x is added to make the length of the text even.
If there is a repeated alphabet within text that forms a digraph, then a null character is added, as there is no way to encrypt this occurrence in the cipher. Ex: ‘aac’ turns to ‘ax’ and ‘ac’
- If both letters are in the same row of the Playfair square, the next alphabet is taken sequentially. Example: AE->LP (Cycle back to the first row.)
- If both letters lie in the same column, then sequentially, the next letter is taken as a cipher letter. Example: TX->DL (cycle back if needed).
- In the remaining cases, draw a rectangle and use the cipher letter as the opposite edge. Example: SD->TC
Plaintext: EXCELSIOR
Keyword: PALMERSTON
Ciphertext: CZDSGCGI
The decryption process is similar to the encryption process, but it works in the opposite direction. Using the keyword, the receiver can generate the Playfair square.
- If both letters lie in the same row or column, then take the previous letter in the corresponding row or column.
- In the rest of the cases, form a rectangle and take the cipher letter as the opposite edge of the rectangle.
This cipher being digraphic, destroys single-letter frequencies. A monographic analysis of frequency cannot be done. For instance, EM-> DS, EC-> QR.
Cryptanalysis depends on digraph frequency. The difficulties of frequency analysis are much worse, as there are 600 possible bigrams with a 5x5 square.
During World War II, the German Army & the Sicherheitsdienst made use of a variation of the Playfair Cipher, known as Double Playfair.
In it, two squares were used, making the cipher such that reversed plaintext digraphs need not correspond to reversed cipher text digraphs. Example: ER>FI, RE>OL. Double letters can be encrypted without inserting a null, and this also enabled double letters to occur in the cipher text.
In 1901, French cryptologist Felix Marie Delastella documented a four-square cipher that consists of four playfair squares. It is mentioned in his book, “Traité élémentaire de cryptographie” In this cipher, the first letter is taken from the top left square and the second letter of the digraph is taken from the bottom right square. Forming a rectangle, the opposite letters are taken as cipher texts. It ensures more security for the message.
The first published solution to the Playfair Cipher was a 19 page pamphlet by Lt. Joseph O. Mauborgne (1914).
Try out Playfair Square!