Playfair Cipher & Variants
Playfair Cipher
A mixed alphabet is generated and used
to fill a table. The table may be filled line by line or
column
by column:
If the alphabet doesn't permit square tables - like the 27 letter alphabet
- you may chose to transpose the table, e.g. use 9 x 3 instead 3
x 9.
For example, the key word KEY applied to the 27 letter alphabet
gives the following table:
K |
E |
Y |
A |
B |
C |
D |
F |
G |
H |
I |
J |
L |
M |
N |
O |
P |
Q |
R |
S |
T |
U |
V |
W |
X |
Z |
& |
To encipher the text, is is split into groups of tow letter. If the number
of the letters in the text is odd, a random letter must be appended (CipherClerk's
Applet appends the first letter of the message): MESSAGE becomes
ME
SX SA GE
-
If the two letters found in the in the same row of the table, they are
replace by the letters found right of them.
-
If the two letters are found in the column, they are replaced by the letters
found below of them.
-
If the two letters are neither in the same row nor in the same column each
letter is replaced by the letter found in the same row in the column of
the other letter: ME becomes IB (not BI!)
Double letters (like the SS from MESSAGE) must be separated
by nulls. CipherClerk's Applet does this automatically, it needs
at least two different letters, the first and second must be different.
Seriated Playfair Cipher
The Playfair cipher may improved by seriating its input text: The
text is written in groups of N letters in two lines. For example,
the text THIS IS A TOP SECRET MESSAGE becomes, when seriated in
groups of 5 letters:
T H I S I
S E C R E A G
S A T O P
T M E S S E X
Now, vertical pairs of letters are enciphered as described above. When
seriating, nulls are inserted to suppress pairs of equal letters. In addition
to the parameters for the Playfair cipher, you must specify the number
of letters per group:

Doppelkastenschlüssel
This cipher is a german field cipher used in WWII.
Originally, two 5 x 5 tables with a randomly mixed alphabet where used.
CipherClerk's Applet derives the mixed alphabet from two key words.
F
|
I
|
R
|
S
|
T
|
|
|
|
S
|
E
|
C
|
O
|
N
|
K
|
E
|
Y
|
A
|
B
|
|
|
|
D
|
K
|
Y
|
A
|
B
|
C
|
D
|
G
|
H
|
L
|
|
|
|
F
|
G
|
H
|
I
|
L
|
M
|
N
|
O
|
P
|
Q
|
|
|
|
M
|
P
|
Q
|
R
|
T
|
U
|
V
|
W
|
X
|
Z
|
|
|
|
U
|
V
|
W
|
X
|
Z
|
At first, the text was seriated in groups of 21 letters (see above). A
pair of letters is enciphered in the following way:
-
If the letters are on the diagonals of a rectangle, each letter is replaced
by the one found in the same row in the other table above or below the
other letter: FZ would be replaced by NU.
-
If the letters are found in the same row, they are replaced on the left
side: IO would be replaced by FC.
Originally, this procedure was done twice with each pair. Later in the
war, it was done only once.
To proceed, you may