The Playfair Cipher can be seen featured in the 2007 movie of National Treasure: The Book of Secrets. This film is the sequel to the box office success National Treasure which was released in 2004. That film featured the Ottendorf Cipher in part of its story line. Both of these movies are great adventures to watch and can be purchased on Amazon. I loved them.
The Playfair Cipher was the first literal diagram substitution cipher and was invented by Charles Wheatstone in 1854. However, because it was Wheatstone’s friend, Lord Playfair, who first explained the cipher system to Lord Palmerston at Lord Granville’s dinner party, and both of these gentlemen later applied the cipher in short letters back to Playfair, the system became known as the Playfair Cipher.
Instead of encrypting single letters, as what is done in a simple substitution cipher, the Playfair encrypts a pair of letters or digrams at once. This method is considerably more difficult to break since there are profoundly more paired letters to conduct a frequency analysis test on. Preforming frequency analysis on a simple substitution cipher can usually crack its code. Not so much with a short message using the Playfair technique. It can be rather secure.
The Playfair uses a 5×5 grid, like the Polybius Square, but this grid is applied differently.
To encrypt a phrase using the Playfair method there are a few steps.
First, select a keyword and fill the 5×5 grid, without duplicating letters, with the keyword first and then the remaining alphabet. Because the alphabet is 26 letters, the I/J usually shares a space, or sometimes the Q (least used letter) is omitted. In the example below, the I/J share a space.
We’ve chosen the keyword ‘MysteriousWritings’ and filled the grid accordingly, as shown.
Next, pair letters in the phrase you want to encrypt. For instance if the phrase to be encrypted was ‘Meet me in the mountains north of Santa Fe’, the letters would be paired as such. Take note that whenever a double letter appears, an X is used to separate them. An X is also used if the last letter needs to be made a pair.
ME XE TM EI NT HE MO UN TA IN SN OR TH OF SA NT AF EX
Using the filled Grid with a Keyword MYSTERIOUS WRITNGS these digrams are encrypted by using the opposing letters of a rectangle, or if the digrams are found on the same line or column by using other special rules.
All rules are as follows.
M | Y | S | T | E |
R | I/J | O | U | W |
N | G | A | B | C |
D | F | H | K | L |
P | Q | V | X | Z |
ME would be encrypted by YM. (letters in the same row are replaced by letters to their immediate right (wrapping around if needed)
XE = ZT (opposing letters, forming a rectangle, replace the XE)
TM= EY
EI=YW
NT=BM
HE=LS
MO=SR
UN=RB
TA=SB
IN=RG
SN=MA
OR=UI
TH=SK
OF=IH
SA=OH (letters in the same column are encrypted by letters immediate below them (wrapping around if needed)
NT=BM
AF=GH
EX=TZ
This would give the ciphertext of:
YMZTEYYWBMLSSRRBSBRGMAUISKIHOHBMGHTZ
To decrypt, the reverse is applied.
Watch a short clip of National Treasure: Book of Secrets where it is used:
MUSCTOWMSKSCHPMCUBWM!
Wow, that’s super hard. I got the first part with mysterious writings in the rectangle, but after that it becomes too complicated and I could figure out and the meet me in the mountains li es with the x in it
Just don’t forget to Treasure the Adventure and play fair!