﻿ Playfair Cipher — Keep Talking and Nobody Explodes Module

## On the Subject of Playfair Cipher

Encrypting secrets since 1854, exploding bombs since 2018.

Your purpose is to decrypt an encrypted message. Find the key, decrypt the message and press the correct button sequence. Easy, right?

### Obtaining the Key

Find the two key parts using the following two tables. In each table, stop at the first rule that applies.

#### Part 1

It’s Monday* PLAY HIDDEN SECRET CIPHER FAIL PARTYHARD BECOZY * If a lit BOB indicator is present on the bomb, use the following day. BOB hates odd-numbered days (except Sunday).

#### Part 2

Screen Text Color Magenta Blue Orange SAFE EFAS MESSAGE GROOVE CODE EDOC QUIET ETIUQ GROOVE EVOORG TEIUQ QUITE MESSAGE EGASSEM SAFE EDOC

### Modifying the key

• If the serial number doesn’t contain a vowel, swap the parts.
• If you have one or more strikes, add a third part:
• For one strike, add "ONE".
• For two strikes, add "TWO".
• For more strikes, add "MANY".
• If the sum of digits in serial number is a prime number, reverse the complete key. (Prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47)

### Decrypting the message

• Create a a 5×5 matrix of letters. Start with your keyword and fill the rest with the unused letters of the alphabet. Each letter must occur only once in the matrix, so only add the first occurrence. ‘J’ and ‘I’ are interchangeable.
• Split the message into character pairs. For each pair:
• If the letters appear on the same row of your matrix, replace them with the letters to their immediate left respectively, wrapping around to the right side of the row if necessary.
• If the letters are on the same column of your matrix, replace them with the letters immediately above, wrapping to the bottom if necessary.
• If the letters are on different rows and columns, replace each of them with the letter on the same row but in the column of the other letter in the original pair.
• Drop any Xs that don’t make sense and locate any Is that should be Js.
Screen Text Color Magenta Blue Orange ABCD CDAB BADC DABC BCDA DACB ADCB ABCD CDAB ACBD DCBA BCDA DABC CBDA CBAD CDAB ABDC BDAC BACD DACB BDCA DBCA ACDB ACBD CABD BCAD CDBA CBDA DCAB CADB DBAC BDAC