Archive for cipher

Playfair

Posted in Crosswords with tags , , , , on February 12, 2010 by telescoper

It’s been a while since I’ve blogged about my passion for crosswords, but this Sunday’s Azed puzzle in the Observer was one of my favourite kind so I thought I’d mention it briefly here.

Azed is the pseudonym used by Jonathan Crowther who has been setting the Observer crossword since 1972; this week’s was number 1967. His  puzzles are usually standard cryptic crosswords which, though quite difficult as such things go, are nevertheless set in a fairly straightforward style. Every now and again, however,  he puts together a different type of puzzle that makes a different set of demands on the solver.  To be honest, I don’t always like these “funny” ones as they sometimes seem to me to be contrived and inelegant, but this last one was a type I really like as it combines the normal cryptic crossword style with another interest of mine, which is  codes and codebreaking.

The interesting aspect of this particular puzzle, which is laid out on a normal crossword grid, is that it involves a type of code called a Playfair cipher. In fact, this particular scheme was invented by the scientist Charles Wheatstone whom most physicists will have heard of through “Wheatstone Bridge“. It was, however, subsequently popularized by Lord Playfair, whose name stuck rather than its inventor’s.

The Playfair scheme is built around the choice of a code word, which must have the special property that no letter occurs twice within it.  Other than that, and the fact that the more letters in the codeword the better the code, there aren’t any real constraints on the choice. The particular example used by Azed to illustrate how it works is ORANGESTICK.

The codeword is used to construct a Playfair square which is a 5×5 arrangement of letters involving the codeword first and then afterwards the rest of the alphabet not used in the codeword,  in alphabetical order. Obviously, there are 26 letters altogether and the square only holds 25 characters,  so we need to ditch one: the usual choice is to make I stand for both I and J, doing double duty, which rarely causes ambiguity in the deciphering process. The Playfair square formed from ORANGESTICK is thus

This square is then used as the basis of a literal digraph substitution cipher, as follows. To encode a word it must first be split into pairs of letters e.g. CR IT IC AL. Each pair is then seen as forming the diagonally opposite corners of a rectangle within the word square, the other two corner letters being the encoded form. Thus, in the example shown, CR gives SG (not GS, which RC would give).

Where a pair of letters appears in the same row or column in the word square, its encoded form is produced from the letters immediately to the right of or below each respectively. For the last letters in a row or column the first letters in the same row or column become the encoded forms. Thus IC is encoded as CE. When all the pairs are encoded, the word is joined up again, thus CRITICAL is encoded as SGCICEOP.

The advantage of this over simpler methods of encipherment is that a given letter in the plain text is not always rendered as the same letter in the encrypted form: that depends on what other letter is next to it in the digraph.

Obviously, to decipher encrypted text into plain one simply inverts the process.

Now, what does this have to do with a crossword? Well, in a Playfair puzzle like the one I’m talking about a certain number of answers – in this case four – have to be encrypted before they will fit in the diagram. These “special” clues, however, are to the unencrypted form of the answer words. The codeword is not given, but must be deduced. We are, however, told that the answers to these special clues and the codeword are “semantically linked”.

What one has to do, therefore, is to solve the clues for the unencrypted words, then solve all the other clues that intersect with them on the grid. Given a sufficient number of digraphs in both plain text and encrypted form one can infer the codeword and hence encrypt the remaining (unchecked) letters for the special answers.

It probably sounds very convoluted, but in this puzzle it isn’t so bad because the four special clues weren’t so difficult. These are the following “across” clues:

1.  Footman having to plough yard (6)

which gives “FLUNKY” – “plough” in university slang, meaning “fail” or “flunk” + y (standard abbreviation for yard).

18. Wallaby No. 2 in penalty infringement, right? (8)

has to be “OFFSIDER”, Australian slang for a deputy and hence Wallaby No. 2,  with the cryptic allusion “OFFSIDE” for “penalty infringement” and R for “right”.

19. Staff inadequately blunder – many will conceal this (8)

this is the easiest – straightforward hidden word “UNDERMAN”, meaning “staff inadequately”.

32. Younger mussels one goes for in jar (6)

I think this is the best of this quartet of clues. The answer is “JUNIOR”, with “UNIO” (the genus of mussels) replacing the “a” (i.e. one) in JAR.

This set of answers clearly suggests the common theme that links them to the codeword. Moreover, the geometry of the grid along with the answers to the rest of the clues gives us ten digraphs in plain and encrypted form.

What has to be done then is to try to work out the Playfair square from the letter pairs, work out the codeword and then complete the unchecked letters in the specials in their encrypted form. It isn’t actually all that difficult to find the codeword in this example, by a mixture of induction and deduction. It turns out to be “SUBORDINATELY”, a fine candidate for a Playfair codeword as it is thirteen letters long and doesn’t feature any letter twice.

To enter the monthly Azed competition, however, one generally has to supply a clue as well as solving the puzzle. I’m really not very good at this aspect of crosswords- I much prefer solving the puzzles to setting ones of my own – which is why I’m quite a long way down the annual Azed Honours Table, in 29th place as of this month.

In the “Plain” competition puzzles, one has to supply a clue to replace one which is given as a straight definition.  In this case a clue was requested to the codeword, but I think  I’ll keep my attempt at  “SUBORDINATELY” to myself unless and until I win at least an honourable mention!

 

Advertisements