In: Computer Science
c. When the PT-109 American patrol boat, under the command of Lieutenant John F. Kennedy, was sunk by a Japanese destroyer, a message was received at an Australian wireless station in Playfair code:
KXJEY UREBE ZWEHE WRYTU HEYFS KREHE GOYFI WTTTU OLKSY CAJPO BOTEI ZONTX BYBNT GONEY CUZWR GDSON SXBOU YWRHE BAAHY USEDQ
The key used was royal new zealand navy. Decrypt the message. Translate TT into tt.
SOLUTION-
Key = ROYALNEWZEALANDNAVY.
So Initially we have to represent the given key in a 5x5 matrix form without repetition of letters. After that, we fill the matrix with remaining left over letters in A-Z in alphabetical order. Remember that I/J has to repsented in the same box.The matrix looks like:
Now we take two letters at a time and follow the below rules to decrpyt the given message:
1) If the same letter appears twice, represent the letter one time as it is. For example, TT will be decrypted as T.
2) If two letters appear on the same row, replace each letter by the letter which is immediately to the left of it.
3) If two letters appear on the same column, replace each letter by the letter which is immediately to the above of it.
4) Otherwise, form a rectangle for which the two letters are at two opposite corners. Then replace each letter with the letter that forms other corner of the rectangle in the same row.
Given code: KXJEY UREBE ZWEHE WRYTU HEYFS
KREHE GOYFI WTTTU OLKSY CAJPO
BOTEI ZONTX BYBNT GONEY CUZWR
GDSON SXBOU YWRHE BAAHY USEDQ
Take two letters at a time and decrypt using the above rules.Take KX and check them in the matrix. We can see that they form a rectangle. So replace K and X with the letters that form the corners of the rectangle i.e P and T.
Now take J and E. We can see that J and E are located on the same column. So replace each letter with the letter that is immediately above it. Replace J with B and E with O.
Take Y and U. We can see that they are forming a rectangle. So replace them with letters that form other corners of the rectangle. Replace Y with A and U with T.
Take R and E. We can see that they are forming a rectangle. So replace them with letters that form other corners of the rectangle. Replace R with O and E with N.
Take B and E. We can see that B and E are located on the same column. So replace each letter with the letter that is immediately above it. Replace B with E and E with O.
Take Z and W. We can see that Z and W are located on the same row. So replace each letter with the letter that is immediately to the left of it. Replace Z with W and W with E.
Repeat the above process until all the letters are decrypted. Then form a meaningful sentence out of it. Therefore, the given message after decryption is:
PT BOAT ONE OWE NINE LOST IN ACTION IN BLACKETT STRAIT TWO MILES SW MERESU COVE X CREW OF TWELVE X REQUEST ANY INFORMATION
IF YOU HAVE ANY DOUBT PLEASE COMMENT DOWN BELOW I
WILL SOLVE IT FOR YOU:)
----------------PLEASE RATE THE ANSWER-----------THANK
YOU!!!!!!!!----------