Playfair

from Wikipedia, the free encyclopedia
The inventor of Playfair encryption, Sir Charles Wheatstone

The Playfair encryption is a 1854 by Charles Wheatstone invented classical encryption method in which each pair of letters of the plaintext is replaced by another pair of letters. It belongs to the class of bigraphic methods. It became famous under the name of a good friend of Wheatstone, Lyon Playfair , who recommended this method for use by the British military. Playfair encryption was first used in the Crimean War and was in use until the First World War , and in a modified form even during the Second World War .

At the time of its invention, Playfair encryption was a very secure process compared to the methods based on the encryption of single characters that were customary at the time . However, that changed in the early 20th century. From mid-1915 onwards, messages encrypted by the British using Playfair could often be deciphered by the other German side ; conversely , British code breakers in Bletchley Park, England , broke the Playfair encryption, which was somewhat modified by the German military, during World War II.

Procedure

Lyon Playfair, under whose name this encryption method became known

The Playfair method is a substitution that is monoalphabetic and bigraphic , which means that only a single ( mono from the Greek monos for "alone" or "only") fixed alphabet is used (opposite: polyalphabetic substitution ) and bigrams , i.e. a pair (two) letters each, are used as symbols to be encrypted (opposite: monographic procedures based on single characters).

Preparation of the plain text

As an example, an English plain text is encrypted that comes from the American film The Legacy of the Secret Book . It reads:

" Laboulaye lady will lead to Cibola temples of gold ".

(German: "The Laboulaye - Dame is [you] to the Cibola lead -Tempeln of gold.")

The above plain text is written in bigrams for encryption purposes. Only capital letters are used, any umlauts are resolved and spaces and punctuation marks are omitted. "J" is converted to "I". When forming the bigrams, care is taken to ensure that no two identical letters are created, such as "LL". To avoid this, an “X” is inserted if necessary. If there is a single letter at the end of the text, it can be expanded to form a bigram by adding another "X". The plain text prepared for encryption has the following form:

LA BO UL AY EL AD YW IL LX LE AD TO CI BO LA TE MP LE SO FG OL DX

Playfair square

A permuted alphabet with 25 letters (without J) is obtained from a key word (or key phrase ). To do this, the key is entered letter by letter, starting from the top left, line by line in a 5 × 5 matrix . Then the missing letters are added in alphabetical order. This results in a square arrangement of all 25 letters, called the Playfair square.

The keyword " DEATH " is used here as an example for generating a Playfair square .

Schlüssel: DEATH
D E A T H  ← Eintragen des Schlüsselworts
B C F G I  ← Danach Auffüllen durch die restlichen Buchstaben
K L M N O
P Q R S U
V W X Y Z

Encryption

The basis for the encryption is the Playfair square generated using the password (here: DEATH) and the plain text broken down into bigrams. Plaintext bigrams are always converted into ciphertext bigrams, i.e. letter pairs are encrypted as letter pairs.

If both letters are in the same column or line, the lower or right neighbor letters are used as secret letters. If the letters are on the edge of the Playfair square, simply continue on the other edge. The square is therefore to be assumed to be connected on the left and right as well as above and below, i.e. to be thought of topologically wound on a torus .

As can be seen below, the plaintext bigram EL becomes the ciphertext bigam CQ (the two lower neighbors of E and L). Analogously, AD is encoded as TE (the two right-hand letters adjacent to A and D).

* E * * *         D E A T *
* C * * *         * * * * *
* L * * *         * * * * *
* Q * * *         * * * * *
* * * * *         * * * * *
EL → CQ           AD → TE

If, on the other hand, the two letters of the plain text bigram are in different rows and columns, the first plain letter is replaced by the one in the same line but in the column of the second. The second plain letter is replaced by the one in the same line but in the column of the first plain letter. The plaintext pair thus forms the diagonally opposite corners of a rectangle. The ciphertext pair is generated from the other two corners of this rectangle. For example, the first two letters LA of the plain text in the Playfair square, as can be seen below, form two corners of a rectangle with the letters M and E in the other two corners. These are the ciphertext letters you are looking for.

* E A * *
* * * * *
* L M * *
* * * * *
* * * * *
LA → ME

Overall, the following Playfair encryption results in the example:

Klartext:   LA BO UL AY EL AD YW IL LX LE AD TO CI BO LA TE MP LE SO FG OL DX
Geheimtext: ME IK QO TX CQ TE ZX CO MW QC TE HN FB IK ME HA KR QC UN GI KM AV

Decryption

The decryption is the reverse of encryption. Just like the encryptor, the decryptor also generates the identical Playfair square using the password it knows and which represents the key. The same method is then used to decrypt the ciphertext as is used to encrypt the plaintext. In cases where both ciphertext letters are in the same column or row of the square, the upper or left neighbor is selected in order to reverse the encryption step. In the case of the crossover step, the procedure for decryption is identical to encryption.

Decipherment

The Playfair encryption is a substitution for letter pairs . It is a bigraphic monoalphabetic method. Similar to simple (monographic) letter substitution, methods for deciphering Playfair are essentially based on an analysis of the frequency distribution here of the letter pairs (bigrams). In the German language, for example, the bigrams “er”, “en” and “ch” are very common. In the example text, the “ Doppler ” (ie bigram repetitions) ME… ME, IK… IK, QC… QC and TE… TE as well as the “reverses” (repetition of an upside down bigram) CQ… QC are noticeable, which are in the same way in find English plain text.

Since no letter is paired with itself, there are only 600 (25 × 24) possible letter combinations that are substituted. There are also a number of symmetries, some of which can already be seen in the example text above. The mentioned plaintext-ciphertext connection EL ↔ CQ and LE ↔ QC helps with breaking the text. If a bigram is cracked, then the reverse (flipped) bigram is known immediately. In the cases of the crossover step, there are also further relationships between the four letters that appear in the type (see, for example, upper left corner of the square) DC ↔ EB, CD ↔ BE, EB ↔ DC and BE ↔ CD, which are the Attackers can use to decipher. Furthermore, the described method for generating the Playfair square also has weaknesses, because it often ends - as in the example - in "XYZ".

Playfair encryption is thus far removed from a general bigraphic method with completely arbitrary assignment of the letter pairs and is no longer a secure encryption method today. So even relatively short Playfair texts can be broken in a very short time with modern means .

The first publication to decipher Playfair dates back to 1914 and was written by the American cryptanalyst Joseph O. Mauborgne .

A literary representation of the Playfair encryption and its deciphering can be found in the detective novel " Have His Carcase " (German: "At the hour in question") by Dorothy L. Sayers .

literature

  • Rudolf Kippenhahn : Encrypted messages. Secret writing , Enigma and chip card (= Rororo 60807 non-fiction book. Rororo science ). Rowohlt-Taschenbuch-Verlag, Reinbek near Hamburg 1999, ISBN 3-499-60807-3 .
  • Fred B. Wrixon: Codes, Ciphers & Other Secret Languages. From the Egyptian hieroglyphs to computer cryptology. Könemann, Cologne 2000, ISBN 3-8290-3888-7 , p. 217ff.

Web links

  • US Army Manual 34-40-2 also contains Chapter 7 instructions for deciphering Playfair encryption and related procedures