NOVA Online (click here for NOVA home)
Decoding Nazi Secrets
Site Map

The Double Playfair Cipher
Back to Crack the Ciphers

The Double Playfair is an extension of the Playfair to use two separate keys and to encipher each pair of letters twice. The German police made the mistake in late 1941 of switching from the rather strong Double Transposition cipher to the more accessible Double Playfair, and for over a year Bletchley Park was able to use these decrypts to gain intelligence in areas not covered by Enigma or other broken systems.

Like the Playfair, the Double Playfair cipher uses 5x5 squares. In this case two keywords are chosen, and each square is filled in the same way as the Playfair. For keywords HAMBURG and NEWYORK written in rows and a spiral, respectively, we have the squares:

	H  A  M  B  U        N  L I/J H  G
	R  G  C  D  E        E  M  X  V  F
	F I/J K  L  N        W  P  Z  U  D
	O  P  Q  S  T        Y  Q  S  T  C
	V  W  X  Y  Z        O  R  K  A  B


Given the message "MY HOVERCRAFT IS FULL OF EELS," we begin by choosing a period or number of letters (say, seven), then breaking the message into groups of seven letters, with the second below the first, the fourth below the third, and so on. If the last group is incomplete, break it into equal pieces. If it has an odd number of letters, add an X to fill it out.

	MYHOVER FULLO
	CRAFTIS FEELS


We encipher each vertical pair. Find the first letter of each pair in the first square and the second letter in the second square. The next step is to find the letters at the opposite corners of the rectangle formed by the plaintext pair, starting with the ciphertext letter in the second square. For the first pair MC, the result of this step is GQ:

	.  .  M  .  .        .  .  .  .  G
	.  .  .  .  .        .  .  .  .  .
	.  .  .  .  .        .  .  .  .  .
	.  .  Q  .  .        .  .  .  .  C
	.  .  .  .  .        .  .  .  .  .


The second step is like the first: Encrypt GQ by finding G in the first square and Q in the second; MP are at the opposite corners. Remember to take the first letter of the ciphertext from the second key square, and the second letter of ciphertext from the first key square. This completes the encryption of the pair MC.

	.  .  .  .  .        .  .  .  .  .
	.  G  .  .  .        .  M  .  .  .
	.  .  .  .  .        .  .  .  .  .
	.  P  .  .  .        .  Q  .  .  .
	.  .  .  .  .        .  .  .  .  .

	MYHOVER FULLO
	CRAFTIS FEELS

	M
	P


The next plaintext pair, YR, is on the same row. In this case we take the letters to the left of each plaintext letter, again taking the first letter from the second key square and the second letter from the first key square, giving OX. The OX is then run through the same process, resulting in SR.

	MYHOVER FULLO
	CRAFTIS FEELS

	MS
	PR


There are no other special cases, and the result is:

	MYHOVER FULLO
	CRAFTIS FEELS

	MSHMNAB MWBCS
	PRRXWKW YEIWP


For transmission the ciphertext is written in groups of five:

	MPSRH RMXNW AKBWM YWEBI CWSP


To decipher this, run each step backwards, paying close attention to the order of each pair.

Double Playfair Hint
Back to Crack the Ciphers



Crack the Ciphers | Send a Coded Message | A Simple Cipher
Are Web Transactions Safe? | Mind of a Codebreaker | How the Enigma Works
Resources | Teacher's Guide | Transcript | Site Map | Decoding Nazi Secrets Home

Editor's Picks | Previous Sites | Join Us/E-mail | TV/Web Schedule
About NOVA | Teachers | Site Map | Shop | Jobs | Search | To print
PBS Online | NOVA Online | WGBH

© | Updated November 2000