0
$\begingroup$

Is it possible to derive the key, for a playfair cipher, if both the message and cipher text are known?

$\endgroup$
2
  • 1
    $\begingroup$ Of course, you can. Wikipedia sentence Like most classical ciphers, the Playfair cipher can be easily cracked if there is enough text. Obtaining the key is relatively straightforward if both plaintext and ciphertext are known. $\endgroup$
    – kelalaka
    Mar 28 at 8:16
  • $\begingroup$ I might call this dupe of this. How to attack a classical cipher using known partial plaintext?. It turns out the OP was asking about PlayFair cipher. I simply foud out this by searching playfair known plaintext on our site. $\endgroup$
    – kelalaka
    Mar 28 at 10:31
0
$\begingroup$

There are two issues to be aware of.

Firstly if the message and cipher text are short, or lack variation in the usage of letters, there may not be enough information to recover a complete Playfair square,

Secondly, rotating all the rows or all the columns of a Playfair square gives an alternative square that encrypts in the same manner. Thus squares come in families of 25. If the “key” is a word or phrase, it is usually straightforward to recover the key used by the system. If the key is a “random” arrangement of 25 letters, then the precise key cannot be distinguished from the other 24 without more information.

If you're asking about the process for recovering the square given matched plain and cipher, this can be done manually and is relatively straightforward. Consider a common letter such as "E" and select all digraphs involving this letter. There are only 5 letters that can replace our chosen letter: the four with which it shares a row and the one directly beneath it. Suppose then we find that we find "E" can be encoded only as one of "ADFLX", now choose a common one of these an examine digraphs. For example we might find that "A" can only be encoded as "BEFLX", we can now conclude that one row contains the letters "AEFLX" and that "D" and "B" lie directly below "A" and "E" respectively. Now consider the letters apart from "ADFLX" that appear in digraphs with "E", within those digraphs these letters can only be encoded as either a letter that lies in the same column as "E", or a letter directly to the right. The ones encrypted to the right will share a column with "E" and "E" will be encoded to the same letter for each of these. These rules should allow you to reconstruct rows and columns of the square. The order of the rows and columns can only be inferred from encryptions of digraphs that share a row/column.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.