# Monoalphabetic Cipher Key

I am not sure how to get the key for the following Monoalphabetic Cipher question. This is a textbook question and I know the answer, but I juts dont know how they got the key.

Question:

Decrypt the following Cipher texts, and give the key. (Note that the correct key is the Encryption key, so if F changes to H and F is the plaintext, then the key is “C”):

(a) YRRYAIYRMLAC (b) DOBXQPZELLI

Answer: a) Text:ATTACKATONCE Key = X b) Text: GREATSCHOOL Key = A

Can somone please explain to me how to determine the key?

You try all 26 possibilities, and check which of them results in an English-looking test. In principle you can do the latter statistically, but in this case there are only 26 possibilities, so you might as well just look at all of them manually.

• But how I would I identify what the key is? I am unsure how to determing the key. Eg: in a) the key was X and for b) it was A
– Tom
Commented Apr 18, 2016 at 20:17

Instead of trying the 26 possibilities, you can use some statistics about the most common letter combinations (see e.g. http://scottbryce.com/cryptograms/stats.htm). The text are short for statistics, but have some double letters RR for (a) and LL for (b). The most common (and almost only) letter repetitions in English are SS, EE, TT, FF, LL, MM, OO, which reduces the number of trials to 7.

For the first 4 letters of (a), YRRY, mapping RR

• to SS leads to ZSSZ..ZS.... : obviously bad
• to EE leads to LEEL..LE.... : why not ? But transcribing the next letter A gives the bad LEELN.LE..N. which doesn’t look very English
• to TT gives the promising ATTA..AT...., which leads to the good decipherment.

That said, on so short text, it is difficult to make statistics, and you may end up testing all the 26 keys

• But how I would I identify what the key is? I am unsure how to determing the key. Eg: in a) the key was X and for b) it was A
– Tom
Commented Apr 18, 2016 at 20:19
• The example tells C corresponds to F>H=F+2. In that example, A would be encoded as C. This gives Y for (a) and X for (b), which is indeed inconsistent. I suspect a mistake in the textbook Commented Apr 18, 2016 at 20:28