# What are the main weaknesses, if any, of a Playfair cipher?

What are the main weaknesses, if any, of a Playfair cipher?

I know that they depend on none of the letters missing, but that is an easy fix if a letter gets dropped. Besides that, are there any other problems with it?

-

It's a quite a weak cipher, being better than a simple substitution cipher by only using digraphs instead of monographs.

An interesting weakness is the fact that a digraph in the ciphertext (AB) and it's reverse (BA) will have corresponding plaintexts like UR and RU (and also ciphertext UR and RU will correspond to plaintext AB and BA, i.e. the substitution is self-inverse). That can easily be exploited with the aid of frequency analysis, if the language of the plaintext is known.

Will chaining Playfair with a substitution cipher help? Nope... The (monoalphabetic) substitution cipher will act (almost completely) transparent against the frequency attack. Eventually, the Playfair cipher is a digraph substitution cipher itself. (But it will make the resulting cipher not self-inverse anymore.)

Well, polyalphabetic ciphers are a whole different case of course. It's still a play-toy for today's computers, but it'd completely render the text unbreakable in that era. But then again, we needed machines like Enigma to properly and acceptably implement it. The German Enigma, if I'm not mistaken, implemented a polyalphabetic cipher.

-

Some additions to the other answer: any given letter can only correspond to a fairly limited number of ciphertext letters: only the ones in the same column or row, and never to itself. So a highly frequent letter like E will still stick out in longer texts and then we will also find its row and column mates, which helps in reconstructing the square. There are quite a few techniques that allow square reconstructions from only about 10 identified digrams.

Highly frequent digrams are easily identified (like TH in English, EN in Dutch and German), and pattern words like "edited" ED / IT / ED will keep that pattern (first = third digram), and combining with the reverse digram rule: deed = DE / ED will correspond to XY YX for some X,Y.

In practice squares based on keywords are often used, and these have extra patterns (like XYZ at the end, often) that can also be exploited.

In WW I the cipher was only used when the message was meant to be valuable for a short time (like half an hour), with random squares, the were changed once every few hours, and for short messages only. For such tactical use it's sort of OK, and fast enough for a hand system.

-