Tool to decrypt/encrypt with Playfair cipher, a symmetrical encryption process based on a polygrammic substitution, created in 1854 by Charles Weatstone.
PlayFair Cipher - dCode
Tag(s) : Polygrammic Cipher
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Playfair encryption uses a grid, which can be generated by a key word.
Example: Crypt DCODE with the grid:
- if the 2 letters are identical (or if there is only one remaining) insert another letter (for example a X or a Q) after the first letter and cipher the new bigram thus formed
Example: AABCD becomes AXABCD
- if the 2 letters are on the same line, replace them by the ones on their right (loop to the left if the edge of the grid is reached),
Example: C and D are coded DE
- if the 2 letters are on the same column, replace them by the ones directly under (loop to the top if the bottom of the grid is reached),
Example: A and F are coded FK
Example: AG is crypted BF, FB is crypted GA
Playfair decryption requires a grid, which can be generated by a key word.
Example: Decrypt DCODE with the grid:
- if the 2 letters are on the same line, replace them by the ones on their left (loop to the right if the edge of the grid is reached),
Example: DE is decrypted CD.
- if the 2 letters are on the same column, replace them by the ones directly above (loop to the bottom if the top of the grid is reached),
Example: FK is decrypted AF.
Example: BF is decrypted AG, GA is decrypted FB
The ciphered message has an even number of letters.
The message may have 25 distinct letters at most (the number of letters in the grid)
It is impossible to find a bigram composed of 2 identical letters
It is impossible that a letter is crypted by itself. (Thanks to LeSingeMalicieux)
All references to games and fair play are clues.
PlayFair can be cracked using a known plaintext attack in order to discover a part of the grid.
Several squares can be used for the same decryption of Playfair, in fact, once a square grid of 25 is found, other squares obtained from the previous by rotating rows and / or columns gives the same result.
Multiple variants can be found when encrypting bigrams. When letters are in column or in lines, it is possible to cipher with the on on the right or on the left, or above or below. Again, when the letters are diagonally positioned, it is possible to write letter1-letter2 or letter2-letter1
1854 by Charles Wheatstone, after the name of one of his friends Lord Playfair.