In: Computer Science
Construct a Playfair matrix with the key RHYME
Use the playfair matrix you just constructed and decrypt the following message: "PEYFQUGVHSMFPURHPERESUTG". Make sure you use your knowledge of the plaintext language and decide whether to use I or J in the decrypted message. Remove all filler letters, separate out the words when writing the final answer.
Note: Place I and J in the same cell and assume filler letter is X.
Key : RHYME
Playfair matrix
R | H | Y | M | E |
A | B | C | D | F |
G | I/J | K | L | N |
O | P | Q | S | T |
U | V | W | X | Z |
Encrypted Message : "PEYFQUGVHSMFPURHPERESUTG"
Grouping the encrypted message as a pair of two letters each , the following will be the result :
PE YF QU GV HS MF PU RH PE RE SU TG
To decrypt the cipher we need to consider each pair mentioned above in reference with the playfair matrix.
PE - to decrypt this pair , first consider P’s row and E’s column which will encounter the cell that contains “T”.
Next consider the opposite i.e.; E’s row an P’s column which will encounter the cell that contains “H”.
Therefore PE =TH
R | H | Y | M | E |
A | B | C | D | F |
G | I/J | K | L | N |
O | P | Q | S | T |
U | V | W | X | Z |
R | H | Y | M | E |
A | B | C | D | F |
G | I/J | K | L | N |
O | P | Q | S | T |
U | V | W | X | Z |
YF - to decrypt this pair , first consider Y’s row and F’s column which will encounter the cell that contains “E”. Next consider the opposite i.e.; F’s row and Y’s column which will encounter the cell that contains “C”.
Therefore PF =EC
QU -
Q’s row and U’s column=“O”.
U’s row and Q’s column =“W”.
Therefore QU =OW
GV -
G’s row and V’s column=“I” (Here you can take either J or I, but after complete decryption the message should make some sense)
V’s row and G’s column =“U”.
Therefore GV =IU
Likewise we need to decrypt each and every pair. In doing so the following pairs are decrypted as :
RH =
Here,R and H come in the same row. Now in this case , take the letter to the left of each one (going back to the rightmost if at the leftmost position).
The letter to the left of R is “E” and to the left of H is “R”
Therefore “RH” is decrypted as “ER”
R | H | Y | M | E |
A | B | C | D | F |
G | I/J | K | L | N |
O | P | Q | S | T |
U | V | W | X | Z |
R | H | Y | M | E |
A | B | C | D | F |
G | I/J | K | L | N |
O | P | Q | S | T |
U | V | W | X | Z |
RE comes in the same row as well . So , take the letter to the left of each one (going back to the rightmost if at the leftmost position).
The letter to the left of R is “E” and to the left of E is “M”
Therefore “RE” is decrypted as “EM”
The decrypted letters are : " THECOWIUMPEDOVERTHEMOXON "
Arranging the letters into meaningful words : " THE COW IUMPED OVER THE MOXON"
Now the above decrypted message seems similar to " The cow jumped over the moon"
So instead of taking "I" in the decrypted message , we need to take " J "
And It is given in the question that , all filler letter need to be removed which is " X " here.
Therefore our decrypted message is :
" THE COW JUMPED OVER THE MOON "
NOTE : In the playfair matrices shown, the blue coloured letter is used to indicate the selected row and column, while the red coloured elements are the corresponding decrypted letters.