Z | T | N | L | 5 | F |
E | 4 | K | M | S | Y |
X | R | 9 | J | 3 | D |
C | 2 | I | 8 | Q | W |
V | P | 7 | H | 1 | B |
A | 0 | G | 6 | O | U |
We then take a message and split it into two letter groups, so "Send 3 and 4 pence" comes out as "SE ND 3A ND 4P EN CE". If you then look up the letter pairs in the grid, they form the corners of a rectangle. "ND" form a rectangle with "F9" (same row order). "SE" are on the same line, so you select whatever is to the right, in this case "Y4". Similarly, "4P" are in the same column, so we select the next row down, "R0". Continue and we end up with "Y4 F9 XO F9 R0 KZ VX". The letters are wrapped, so "WC" comes out as "C2". Double letters, like "PP" have the second letter as "X", so "PX" comes out as "VR". This makes the decryption look a bit odd, but if you know "X" stands for the duplicate, it's obvious. You're unlikely to get "XX". Have a go at this:
M1 | 6Z | N8 | QA | 4H | 0X | 4Z | VM | 4Z | U0 | YO | EJ | 4X | Y3 | UE | |||
LP | UA | 0X | L4 | 03 | MZ | A1 | MZ | EU | F9 | S6 | X4 | Z4 | 4H | 4X | 0Z | XC | |
30 | A6 | B8 | 7K | 3Y | 3U | M1 | GE | 4Z | VM | XU | JT | 7K | U7 | FW | 35 | LY | UE |
GZ | 3Y | 6Y | S4 | 34 | ZM | OE | MV | 0Z | V6 | ZJ | 50 | 53 | 16 | 24 | UX | 0Z | XC |
(I've padded some lines out to even letters with an "X")
The advantage of this over other, simpler, substitution ciphers is that the normal frequency analysis (counting the amount of times a letter occurs) doesn't work as well as there are 36*35 letter pairs, rather than just 36. A weakness is that pairs can be the reverse: "BR" comes out as "PD", but "RB" comes out as "DP", a property which can be exploited by a cryptanalyst who knows that this cipher is being used.
Playfair wasn't particularly secure, but then it wasn't meant to be. It had to last just long enough for the information to be effective: by the time the enemy had broken the code, it was already too late! For this reason, it's sometimes known as a tactical cipher.
No comments:
Post a Comment