PLAYFAIR CIPHER

 

Review of Playfair Cipher:

 

In 1854, Sir Charles Wheatstone invented the cipher known as "Playfair," named for his friend Lyon Playfair, first Baron Playfair of St. Andrews, who popularized and promoted the cipher. Its simplicity and its cryptographic strength compared to simple substitution and Vigènere (a polyalphabetic substitution cipher) made it an immediate success as a field cipher, used by the British in the Boer War and the First World War, and by several armed forces as an emergency back-up cipher in the Second World War. When Lt. John F. Kennedy's PT-109 was sunk by a Japanese cruiser in the Solomon Islands, for instance, he made it to shore on Japanese-controlled Plum Pudding Island and was able to send an emergency message in Playfair from an Allied coast-watcher's hut to arrange the rescue of the survivors from his crew.

To encipher a message in Playfair, pick a keyword and write it into a five-by-five square, omitting repeated letters and combining I and J in one cell. In this example, we use the keyword MANCHESTER and write it into the square by rows. It may be written in any other

pattern; other popular choices include writing it by columns or writing it in a spiral starting at one corner and ending in the center. Follow the keyword with the rest of the alphabet's letters in alphabetical order.

 

M A N C H

E S T R B

D F G I/J K

L O P Q U

V W X Y Z

First we need to prepare the plaintext message for encryption. To encrypt "THIS SECRET MESSAGE IS ENCRYPTED," break it up into two-letter groups. If both letters in a pair are the same, insert an X between them. If there is only one letter in the last group, add

an X to it.

TH IS SE CR ET ME SX SA GE IS EN CR YP TE DX

Now we encrypt each two-letter group. Find the T and H in the square and locate the letters at opposite corners of the rectangle they form:

 

. . N . H

. . T . B

. . . . .

. . . . .

. . . . .

Replace TH with those letters, starting with the letter on the same row as the first letter of the pair: TH becomes BN. Continue this process with each pair of letters:

TH IS SE CR ET ME SX SA GE IS EN CR YP TE DX

BN FR

Notice that S and E are in the same row. In this case we take

 

. . . . .

E S T . .

. . . . .

. . . . .

. . . . .

the letter immediately to the right of each letter of the pair, so that SE becomes TS.

TH IS SE CR ET ME SX SA GE IS EN CR YP TE DX

BN FR TS

Now we see that C and R are in the same column. Use the letter

 

. . . C .

. . . R .

. . . I/J .

. . . . .

. . . . .

immediately below each of these letters, so that CR becomes RI. This is the last special case, and the encryption proceeds without further incident.

TH IS SE CR ET ME SX SA GE IS EN CR YP TE DX

BN FR TS RI SR ED TW FS DT FR TM RI XQ RS GV

To decrypt the message, simply reverse the process: If the two letters are in different rows and columns, take the letters in the opposite corners of their rectangle. If they are in the same row,

take the letters to the left. If they are in the same column, take the letters above each of them.

HOMEWORK PROBLEMS

1) use the previous example (the square created with the keyword MANCHESTER) to encrypt

MEET AT NOON TOMORROW.

What do you notice about the encryption on NOON?

2) Explain why a letter will never be encrypted as itself.

3) Decrypt the message AN BN DE NS QR TW using the MANCHESTER square.

4) A different square was used to encrypt a message, you know the following relationships between plain text and cipher text (plain text is on the left and cipher text is on the right)

MA-NG AT-BY YV-RW

CA-YO FT-KY EN-FM

DA-FO UT-ZC IW-FX

PA-YH MT-SR QU-LX

TA-YB XT -ZP PH-HI

That is, MA was encrypted as NG.

Find the arrangement of the original playfair square. Hint: the first column should tell you something about which letters are in the same row as A, and the second column should tell you which letters are in the same row as T. Then you should be able to deduce the arrangement of the rest of the letters.

5) Break the message in the pseudo-story below.

To: Col. Tiltman, Bletchley Park

This message was received by an intercept station in Scotland. The frequency and format indicate that it is a most urgent message from one of our agents who landed a week ago in Norway. His controllers have been unable to read it. Although it clearly uses his backup cipher, the Playfair, the keys assigned to him do not work. We cannot reach him before his normal scheduled transmission in two weeks, so we urgently request that you attempt to decrypt this and let us know the contents. In case it helps, he is carrying materials to assist a previously dropped team in their work regarding the Norsk Hydro facility at Rjukan. His recognition code should appear in the message: It is either "beware ice weasels" or "red penguin frenzy" depending on whether or not he is operating under duress. He will use "STOP" between sentences and "END" at the end.

Received message:

VYTES YEDLU TERVL FNVUH DWARD LCFFB SDEWN PXKIC

FTREO LKALZ YLSLT OBKEV LYARM KRBOD NALDY PLAET

OLQAD FHSFZ WNAID SMURU OLHRY LLOTW FYLDI CVLUS

VSSFZ YLUNF FXLKT GBCDO BFALE WRPFY WLHUL DARLI

TFLAB FFZCY FUUFB GXXXX

Hint:

Because it is a two letter block cipher, you must look for features among pairs of letters…

Either BEWARE ICE WEASELS is grouped

BE WA RE IC EW EA SE LS

Or it is grouped as

…B EW AR EI CE WE AS EL S…

Either way there are patterns to look for.

Also, it will either be followed by STOP or END (only if it is at the end of the message) and will be preceded by STOP unless it is at the beginning of the message.

If none of the patterns match up with patterns in the text, try the same for

 

RED PENGUIN FRENZY