[Cryptography] Unicity distance of Playfair

Ray Dillinger bear at sonic.net
Wed Mar 23 22:47:05 EDT 2016



On 03/22/2016 11:14 AM, mok-kong shen wrote:
> Anyway, I should appreciate it very much, if someone could privide
> me a terse recipe, listing which computations are to be done in order
> to obtain the unicity-distance of Playfair. (I am attempting to
> determine whether a certain suggested variant of Playfair provide
> performance advantages or not and suppose that the unicity-distance
> could be a useful measure for that purpose.)


Okay, here's your terse recipe:

Keybits/Redundancy = Unicity.

Keybits = number of bits required to count all the possible keys.

Redundancy = RepBits - InfoBits

RepBits = Number of bits required to count the units of the encoding
InfoBits = Amount of information conveyed by each unit of the encoding

Using Playfair we either can't distinguish IJ, or we can't
distinguish YZ.  That makes it a 25-character alphabet.

Log2 of 25 is RepBits, the number of bits required to count the
units of encoding.  It's about 4.64.

InfoBits is the number of bits of information conveyed per unit
of the alphabet used.  In English, it's estimated to be about 1.5.
This is unaffected by the indistinguishability of an IJ pair
or a YZ pair because there are approximately no words you could
confuse for each other due to ambiguity between those pairs -
ie, those particular distinctions don't measurably _contribute_
to the information conveyed per character.

Redundancy = (RepBits - InfoBits) = (4.64 - 1.4) = 3.24.

Playfair has 25! possible keys because there are 25 different
boxes in the grid to fill with letters (one of them gets to be
both I and J, or else one of them gets to be both Y and Z).  It
takes about 83.7 bits to count 25! different keys, so keybits
is 83.7.

83.7 / 3.24 = about 25.8333.  Rounding to the nearest whole
number, therefore Playfair has about 26 character Unicity
distance.

This means that, *on average*, given a Playfair key and 26
letters of ciphertext, you can tell whether or not it's the
right key.

Given the ciphertext, though, it's a lot harder to *find* the
correct key with Playfair than it is with a number of other
'hand' ciphers whose Unicity distance is larger. Unicity
distance is not a measure of security.

				Bear







-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://www.metzdowd.com/pipermail/cryptography/attachments/20160323/74fca840/attachment.sig>


More information about the cryptography mailing list