Friday, July 17, 2015

Playfair

Playfair is an encoding device used to add solving complexity to advanced cryptic crosswords.

How Playfair encoding works

Playfair encoding is based on

  • A codeword or phrase, in which no letter recurs [1]
  • A 5x5 arrangement of letters (called word square or key table)

Before encoding, the letters of the alphabet are written in the word square, starting with the codeword, combining I and J into a single unit. This arrangement accommodates 26 letters of the alphabet in a 25-character square.

For example, if the codeword is ORANGESTICK (that's the word Azed uses with instructions in his Playfair puzzles), the Playfair word square would look like this:

Playfair Word Square 

The word to be encoded in Playfair is split into letter pairs (also called digraphs). So, the word BREAKING is split as {BR, EA, KI, NG}. To each letter pair after this split, an encoding rule is applied according to its position in the word square:

  Letter Pair Position Encoding Rule
(1) Both letters are in the same row Replace them with letters one place to the right of each. If one of the letters is at the extreme right, replace it with the letter at the beginning of the row.
(2) Both letters are in the same column Replace them with letters one place below each. If one of the letters is at the bottom, replace it with the letter at the top of the column.
(3) Neither of the above Replace them with letters at diagonally opposite corners of the rectangle formed by the letter pair. [To encode the first letter, look along its row till you reach the column of the second letter; pick this letter. To encode the second letter, look along its row till you reach the column of the first letter; pick this letter.]

Example: Applying Playfair encoding on the word BREAKING, with ORANGESTICK as the codeword, we get MSTOFEGO as below. (The number in brackets stands for the letter pair position.)

Playfair Encoding  

Playfair in cryptic crosswords

Barred grid cryptics like the Azed and Listener carry Playfair puzzles occasionally – in these, a few answers are Playfair-encoded before being placed in the grid.

To finish the puzzle, the solver needs to work out the Playfair codeword. This can be done by matching the plaintext answers (found by cold-solving the clues) with the encoded answer portions (found by solving the crossing clues). With the letter pairs before and after encoding, the solver can construct the word square, which would reveal the codeword.

Azed usually invites solvers to send in a cryptic clue to the codeword, along with the prize puzzle solution.

To make things more accessible for the solver, Playfair crosswords provide a few cues:

  • Clues with encoded answers are marked in some way. They may be italicized and/or have a common theme linking them.

  • The codeword may be related to the theme of the encoded answers and/or to the title of the puzzle. For example, in Listener 3993 titled Argentum, the encoded entries were HINT, TALK, NEWS, SIGN. Note that all the encoded entries can be defined as 'word', and the puzzle title is an anagram of ARGUMENT. The codeword turned out to be MINCE WORDS.

  • Playfair-encoded entries in the grid contain no repeating letters as a pair, and have an even letter count. Since Playfair crossword rules do not mention how to resolve repeating letter pairs or a single final letter, one can safely infer that these scenarios will not arise in the crossword. (To know how this is handled in actual Playfair messages, see note [2] at the end of the post.)

  • The encoded answers are designed to be relatively easy to solve without checkers.

This blog post about Azed 2164 has helpful tips on the approach for solving a Playfair puzzle.

Why only barred grids? Can't Playfair be used with blocked grid crosswords?

The main hurdle with applying Playfair to blocked grid puzzles is low grid checking. With only about 50% interlocked cells, it would be hard for the solver to construct the word square from before/after letter pairs, since after letter pairs (i.e. those obtained from checking) would be scanty.

What if the setter gives a strong alternate route to the codeword? Say, a subset of the answers when jumbled give the codeword, or a theme derived from the clues leads to the codeword. With less reliance on checking, blocked grid Playfair puzzles might be workable – though I have not seen this done in practice so far. Perhaps there isn't enough interest in this device among blocked grid solvers, or perhaps newspapers would not be willing to allocate extra space for the long preamble necessary to explain Playfair!

History of the Playfair cipher

Playfair was invented by English scientist Charles Wheatstone (1802-1875) and named after Scottish scientist/politician Lyon Playfair (1818-1898) who popularised its use. According to Simon Singh's The Code Book, the two men were neighbours and often met to share their ideas on cryptography.

The cipher was adopted by the British War Office and used first probably in the Boer War.

In its time, Playfair was a deft, dependable way of enciphering messages. It had no elaborate key mapping to memorize or reference, no special equipment needs; the recipient could simply draw the word square based on the codeword and decrypt the message.

Playfair is not vulnerable to obvious letter frequency analysis as every letter is not encoded the same way every time in a message. The code can be broken with digraph frequency analysis, of course - a task made simpler with Playfair Breaker applications which do that for you within seconds.

Notes:

[1] In general Playfair encoding, a codeword with recurring letters *could* be chosen with some patching: by omitting repetitions before entering the codeword in the word square. So, COMMUNICATE would become COMUNIATE. I haven't come across an example of this in Playfair crosswords, though – setters seem to pick lengthy codewords with unique letters. Warning: don't rely completely on this trend – as Azed points out here: "Ximenes once, rather wickedly, used CAB, resulting in only one letter in the word square being misplaced!"

[2] The two letters in each digraph must be different for Playfair encoding to work. If a letter is repeated in a digraph, an extra X is inserted between them to resolve the repetition. So, SUNNY gets split as {SU, NX, NY} before encoding. Similarly an X is tagged to the end of a word to pair up a single final letter. So, SHADY gets split as {SH, AD, YX}.

[Many thanks to setter Alberich for his inputs for this article.]

Related Posts:

If you wish to keep track of further articles on Crossword Unclued, you can subscribe to it in a reader via RSS Feed. You can also subscribe by email and have articles delivered to your inbox, or follow me on twitter to get notified of new links.

4 comments

PaulT said...

Listener 4147 "OZ and WR" was a particularly good Playfair puzzle, thoroughly justifying the use of the device

http://www.listenercrossword.com/Years/Puzzles/L4/L41/L4147.html (spoilers)

Shuchi said...

@PaulT: Thanks for the link. Great to see that Sanskrit word after a long time.

Anonymous said...

Why is the letter E omitted from the keyword?

Shuchi said...

@Anonymous: Oversight. Thank you for spotting it. Now fixed.