Unlicensed Playfair Cryptanalysis
Unlicensed Playfair Cryptanalysis
EU SM FV DO VC PB FC GX DZ SQ DY BA AQ OB
ZD AC OC ZD ZC UQ HA FK MH KC WD QC MH DZ
BF NT BP OF HA SI KE QA KA NH EC WN HT CX
SU HZ CS RF QS CX DB SF SI KE FP (106)
K Q H H B . A . Q C
D O P . B . A F P
E Q K Z O A F V . C . X S X
W Z Z . D . O Z Y Z B
K K . E . U C
S R O B . F . V C K P
. G . X
N M M . H . A A T Z
S S . IJ.
F . K . C E A E
. L .
S . M . H H
W . N . T H
D . O . B C F
F B . P . B
U A S . Q . C A S
. R . F
Q C . S . M Q I U F I
H N . T .
S E . U . Q
F . V . C
. W . D N
C C G . X .
D . Y .
H D D . Z . D D C
Cipher GX DZ SQ DY BA AQ OB ZD AC
Plain .. ER ON ED AY EN TE RE ..
1 2 3 4 5
er = DZ on = SQ ed = DY ay = BA en = AQ
------ ------- ------ ------- -------
E D R Z O S N Q E D Y Y A B E A N Q
D S D A A
R E D N O S Y B N E A
Z Z R Q Q N Q Q N
6
te = OB
-------
T O E B
O
E T O
B B E
Combine 1 and 3: E R D Z Y
Combine 2 and 5: O N S Q E A
2/h - 5/d 2/d - 5/h 2/d - 5/d
--------- --------- ---------
O S N Q E A N Q S O
A E S O N Q
A E
Arranged in a 5 X 5 square:
. . S T O
D Y A B E
. . . . .
. . N . Q
R . . . Z
----------
. . S T O| C
D Y A B E|
. . . . .|
. . N P Q|
R . . . Z| U V W X
C U S T O
D Y A B E
F G H I K
L M N P Q
R V W X Z
Written by Alex Biryukov (Weizmann Institute of Science, Rehovot, Israel) in 2001 for a
course taught there entitled Methods of Cryptanalysis
Lecture 3
"Cryptanalysis of the Classical Ciphers"
A quick look forward for those, who want some reading before the lecture.
Here are the lecture notes (ps, gzipped) written by Ilya Safro.
(Print with 600 or 1200 dpi to get better quality: lpr -P12laser11 lecture3.ps)
The 'after the lecture' notes are written in light green italic.
Meanwhile enjoy the following story (taken from LANAKI's course lecture 17,
historic part of which is in turn taken from Khan's book.) Interestingly, here
is the same story from a totally different angle.
29gps
/0930/2
Translation:
for
Encipherment
The Playfair is based on a 25 letter alphabet (omit J)
set up in a 5 X 5 square. A keyword is written in
horizontally into the top rows of the square and the
remaining letters follow in regular order. So for the
key = LOGARITHM, we have:
L O G A R
I T H M B
C D E F K
N P Q S U
V W X Y Z
In preparation for encipherment, the plaintext is
separated into pairs. Doubled letters such as SS or NN
are separated by a null.
CO ME QU IC KL YW EN EX ED HE LP
Plain Cipher
OP TW
IC CN
EX QG
Plain Cipher
CO DL
ME HF
KL CR
LP ON
1. It is a substitution cipher.
Peculiarities
1. No plaintext letter can be represented in the cipher
by itself.
EU SM FV DO VC PB FC GX DZ SQ DY BA AQ OB
ZD AC OC ZD ZC UQ HA FK MH KC WD QC MH DZ
BF NT BP OF HA SI KE QA KA NH EC WN HT CX
SU HZ CS RF QS CX DB SF SI KE FP (106)
K Q H H B . A . Q C
D O P . B . A F P
E Q K Z O A F V . C . X S X
W Z Z . D . O Z Y Z B
K K . E . U C
S R O B . F . V C K P
. G . X
N M M . H . A A T Z
S S . IJ.
F . K . C E A E
. L .
S . M . H H
W . N . T H
D . O . B C F
F B . P . B
U A S . Q . C A S
. R . F
Q C . S . M Q I U F I
H N . T .
S E . U . Q
F . V . C
. W . D N
C C G . X .
D . Y .
H D D . Z . D D C
Cipher GX DZ SQ DY BA AQ OB ZD AC
Plain .. ER ON ED AY EN TE RE ..
1 2 3 4 5
er = DZ on = SQ ed = DY ay = BA en = AQ
------ ------- ------ ------- -------
E D R Z O S N Q E D Y Y A B E A N Q
D S D A A
R E D N O S Y B N E A
Z Z R Q Q N Q Q N
6
te = OB
-------
T O E B
O
E T O
B B E
Combine 1 and 3: E R D Z Y
Combine 2 and 5: O N S Q E A
2/h - 5/d 2/d - 5/h 2/d - 5/d
--------- --------- ---------
O S N Q E A N Q S O
A E S O N Q
A E
Arranged in a 5 X 5 square:
. . S T O
D Y A B E
. . . . .
. . N . Q
R . . . Z
----------
. . S T O| C
D Y A B E|
. . . . .|
. . N P Q|
R . . . Z| U V W X
C U S T O
D Y A B E
F G H I K
L M N P Q
R V W X Z
SERIATED PLAYFAIR
Perhaps the best known variation of the Playfair system,
and one which adds greatly to its security, is called
the Seriated Playfair.
C O M E Q U E N E E D H M E D I A T
I C K L Y W (X)E L P I M E L Y T O M
L O G A R Cipher:
I T H M B N L B C S P Q Q C D C M H C F T R H
C D E F K C D F G X Z G C G Q T B F G W H G B
N P Q S U
V W X Y Z
S2
------- = Q & R
S2 - S1
A B C D E F G H I K L etc.
3 4 8 9 10 25 2
24 7 16 27 19 30
36 15 31 21 34
17 32
20 35
26
Period Letter S2 - S1 Q R Result
4 F 31 - 27 7 3 Eliminated-Case 1
5 C 20 - 15 4 0 Case 2
6 C 26 - 20 4 2 possible
7 H 34 - 30 Eliminate-last gp
8 D 16 - 8 2 0 Case 2
9 C 26 - 17 2 8 possible
G 19 - 10 2 1 possible
H 34 - 25 3 7 Case 1
10 C 17 - 7 1 7 Case 1
ed = IB
-I = UD, sn = TU, de = BI, ST = TY, to =FN, I- =ES
1 2 3 4 5
SN = TU DE = BI ST = TY TO = FN I- = ES
------- ------- ------ ------- -------
S T N U D B E I S T Y T F O N I E - S
T B T F E
N S T E D B Y O T F - I E
U U N I I E N N O S S -
6 7
-I = UD ED = IB
------- -------
- U I D E I D B
U I
I - U D E I
D D I B B D
check:
TO=FN+ + = yes
SN=TU+
ST=TY+ letters left: A C E G H K
I-=ES -=t IT =ES L M P Q R V
DE=BI+ W X Z
ED=IB+
-I=UD+