[Cryptography] On improving the performance of the classical Playfair cipher

mok-kong shen mok-kong.shen at t-online.de
Wed Apr 6 16:55:46 EDT 2016


The classical Playfair cipher and its variant "two square cipher"
(employing two Playfair matrices, used in WWII) are obviously too weak
to be practically used today. We propose to examine whether some better
and useful variants could exist that are not entirely out of the bounds
of work that could feasibly be done by human operators in practice.

Two potential modifications suggest themselves: (1) Use multiple
rounds, (2) use more key materials.

After certain experimentations, the following variant seems to be a
fairly optimal one:

(1) The plaintext is natural language text in the lower-case alphabet,
     i.e. of size 26.

(2) The ciphertext alphabet is the lower-case alphabet plus e.g.
     "TSAMCI", i.e. of size 32.

(3) Four Playfair matrices of size 4*8 are used, being placed in two
     rows, one above the other. These contain pseudo-random permutations
     of the alphabet of (2) and are designated as matrix 1 - 4, counting
     from the upper-left matrix in clockwise direction.

(4) To encrypt a plaintext pair (u1, u2), one determines a straight
     line from u1 in matrix 1 to u2 in matrix 3 and find the
     corresponding straight line from v1 in matrix 2 to v2 in matrix 4
     such that they form the diagonals of a rectangle. (v1, v2) is then
     the ciphertext pair. (This is analogous to the general rule of the
     original Playfair.)

(5) In encryption processing, successive pairs are taken overlapped,
     with the encrpyted characters immediately replacing the original
     ones (with wrapping around at the end of the sequence). That is, if
     the input sequence is abcd...., one encrypts (a,b) to (A,B), then
     (B,c) to (B',C), then (C,d) to (C',D), ...., resulting in
     AB'C'D'.....

To test the performance of the scheme, we took the book "A Tale of Two
Cities" from Project Gutenberg and took out the alphabetical characters
(upper-case characters are converted to lower-case ones), obtaining
thus a plaintext sequence. Using the alphabet of (2), which is of size
32, each character was converted to 5 bits and the the bit sequence
resulting was subjected to Maurer's Universal Test. Next we obtained
the ciphertext sequence from the plaintext sequence according to the
scheme as described above for up to 8 rounds, the resulting sequences
were subjected to Maurer's Universal Test in the same manner as the
plaintext sequence.

The test statistics obtained are as follows (for L=8, rho=0.01 the
values should be in [7.178, 7.189]):

Plaintext: 6.716

Ciphertext (first row is the number of rounds done):

      1       2       3       4       5       6       7       8

    7.124   7.165   7.181   7.179   7.181   7.189   7.185   7.183

This indicates that with 3 rounds the encryption processing should be
practically satisfactory and means that, since in each round twice the
number of pairs are taken in comparison to the original Playfair, the
scheme necessitates 6 times the amount of work and 4 times the key
materials of the original Playfair (for 4*8 matrix).

M. K. Shen


More information about the cryptography mailing list