The “Playfair for Three” is a manual cipher that works similar as the Playfair, but is based on trigraphs instead of digraphs. Can you solve a challenge cryptogram that has been made with this method?
As frequent readers of this blog know, the Playfair cipher is an interesting manual encryption system. It is easy to use and more secure than most methods of comparable complexity. Nevertheless, the Playfair can be broken today, if the ciphertext isn’t too short. Hill climbing has proven a powerful method for attacking the Playfair cipher.
For those who don’t know: the Playfair cipher is an encryption method that substitutes letter pairs (digraphs) based on a set of simple rules. Check here for a description of the method.
In recent years, I have published a number of Playfair challenges of my own design on this blog. All of them were based on random matrices (i.e., no password was involved), which prevented a dictionary attack. The shortest Playfair cryptogram of this kind that was broken by my readers consisted of 40 letters. It was solved by Nils Kopal with hill climbing.
The longest Playfair ciphertext that has withstood all codebreaking attempts so far has 30 letters. Considering that several skilled codebreakers, including Nils Kopal and George Lasry, couldn’t break this challenge, I assume that it is quite difficult to solve a 30 letter Playfair ciphertext, let alone a shorter one.
Playfair for Three
A question that is both obvious and interesting is the following: is it possible to create a cipher that is more secure than the Playfair if trigraphs (i.e., letter triples) instead of digraphs are used? I addressed this issue in a blog post I wrote last year. In this post I mentioned a trigraphic Playfair variant named Playfair for Three introduced by John Savard on his website, but I didn’t go into detail about it.
Now, almost a year later, I think it’s time to take another look at Playfair for Three. To explain the method, Savard uses the following matrix (apparently, it is not based on a keyword):
T X V H R L K M U P N Z O J E C G W Y A F B S D I
The Playfair for Three substitution rules are a little more complex than those of the standard Playfair, but still not very difficult:
If all three letters are the same, replace them by three repetitions of the letter diagonally below and to the right of that letter. Thus: MMM becomes JJJ in the square above. Below, and to the right, are always interpreted cyclically, so DDD becomes RRR, and PPP becomes NNN, and even III becomes TTT.
If two of the letters are the same, encipher the two letters as if they were part of a digraph to be enciphered with Playfair.
- If the two letters are in the same row, replace each one with the letter to its right. Thus: PKK becomes LMM, NON becomes ZJZ.
- If the two letters are in the same column, replace each one with the letter below it. Thus: HUH becomes UJU, ZZB becomes GGX.
- If the two letters are neither in the same row nor the same column, replace each letter with the letter that is in its own row, but in the column of the other letter. Thus: BOO becomes SZZ, MIM becomes PSP.
When all three letters are different, follow these rules:
- If all three letters are in the same row, replace each one with the letter to its right. Thus, CYG becomes GAW, ZEN becomes ONZ.
- If all three letters are in the same column, replace each one with the letter below it. Thus, MOW becomes OWS, KGB becomes ZBX.
- If two letters are in the same row, and one of those two is in the same column as the third letter, replace the letter that is in the same row as one other letter and the same column as the other other letter with the letter that is in the same column as the letter with which it shares a row, and in the same row as the letter with which it shares a column. Replace the two other letters by each other. Thus, YUK becomes KGY, WVY becomes HYV, POE becomes OPM, GAP becomes PKG.
- If two letters are in the same column, but the third letter is neither in that column nor in the same row as either of those two letters, replace each letter by the letter which is in its own row, but in the other column used by the three letters. Thus, TCO becomes VWN, TAN becomes RCE, HUG becomes XKY.
- If two letters are in the same row, but the third letter is neither in that row nor in the same column as either of those two letters, replace each letter by the letter which is in its own column, but in the other one of the two rows used by the letters. Thus, NED becomes FIJ, GAS becomes BIW, LOP becomes NME.
- If no two letters share either a row or column, each letter is replaced by the letter in its own row, but in the column of the next letter of the trigram, the first letter being the ‘next letter’ for the last one. Thus, TOY becomes VJC, LOB becomes MZF, GET becomes ANX.
Now, the question is: is the Playfair for Three more secure than the standard Playfair? As I don’t know the answer, I decided to create another challenge. I took an English text consisting of 96 letters and encrypted it with the Playfair for Three. Here’s the result:
BGM MYP TTC ZZG PBK CVM ETC CPL DYR BXC LFR WPJ UBH DKT GJN BGX RHE GJB ETC SNF FYJ PGA CBX BGX NXW HLR TCE WPJ BGX GAW ESA JCX
Can a reader decipher this challenge?
Considering that an ordinary Playfair cryptogram of this length can be solved quite easily with hill climbing, I assume that this challenge is breakable, too. If a reader comes up with a solution, I will certainly publish a shorter Playfair for Three challenge in the near future.
If it turns out that this ciphertext can’t be broken or at least that breaking it is very difficult, we can conclude that John Savard has invented a remarkable encryption system. Either way, the result will be interesting.
Further reading: My visit at the Cheltenham Listening Stones