Cryptography Reference
In-Depth Information
4. Rewrite the modified plaintext in pairs of letters : Check to see whether there has
been a 'knock on' effect that has resulted in a new plaintext bigram consisting of
two identical letters. If this is the case then repeat the previous step until there
are no such bigrams.
5. If the final number of letters is odd then add Z to the end : This is done in order
to guarantee that the entire plaintext can be partitioned into bigrams. If there
is an odd number of letters then the last letter needs a partner in order to be
processed. Again, Z is used simply because it is an unpopular letter in English.
If the last plaintext letter is itself a Z then a different final character will need to
be used.
ENCRYPTION USING THE PLAYFAIR CIPHER
The Playfair Square, which forms the key of the Playfair Cipher, consists of a
five-by-five grid, where each entry contains a unique letter of the alphabet other
than J. Having preprocessed the plaintext according to the outlined procedure,
the plaintext is encrypted as follows:
1. If two plaintext bigram letters lie in the same row of the Playfair Square then
replace each letter by the letter on its right in the Playfair Square (if one of the
letters lies in the fifth entry of the row then replace it by the letter in the first
entry of the row).
2. If two plaintext bigram letters lie in the same column of the Playfair Square then
replace each letter by the letter beneath it in the Playfair Square (if one of the
letters lies in the fifth entry of the column then replace it by the letter in the first
entry of the column).
3. Otherwise:
a Replace the first plaintext bigram letter by the letter in the Playfair Square
occurring in
• the same row as the first bigram letter, and
• the same column as the second bigram letter.
b Replace the second plaintext bigram letter by the letter in the Playfair Square
occurring in
• the same column as the first bigram letter, and
• the same row as the second bigram letter.
EXAMPLE OF A PLAYFAIR CIPHER
An example is very useful for mastering the subtleties of the Playfair Cipher.
Figure 2.4 shows an example of a Playfair Square. We use this as the key
to encrypt the plaintext NATTERJACK TOAD. Ignoring the space between
the two words, we preprocess the plaintext in preparation for encryption, as
follows:
1. First, replace the single occurrence of J with an I, resulting inNATTERIACKTOAD.
Search WWH ::




Custom Search