See Films Differently Momo Notices
How to Crack a Simple Cipher: Two Puzzles to Try
Learn how to crack a simple cipher with two puzzles, step-by-step hints and answers. Follow Mary Stuart’s decoded letters, then meet Sherlock Holmes.
A page of strange symbols is an excellent invitation to look clever. The difficulty is getting the symbols to cooperate.
Codebreakers start by looking for constraints: repeated patterns, possible languages, likely words and clues to the system used. They propose a key, see what else it predicts, and keep checking. A promising phrase is a beginning. The rest of the message gets a vote.
If you already have the key, you can decrypt the message by applying it. Cryptanalysis is the attempt to recover information without being given that key. The readable message is the plaintext; its encrypted form is the ciphertext. Knowing the method and knowing its particular key are different things. CrypTool’s introduction makes that distinction through the different information a codebreaker might have.
Let’s try two small puzzles: a Caesar cipher, which shifts the alphabet, and a fixed substitution, which swaps letters consistently. The hints and answers are optional: open whichever you fancy, or carry straight on. I’m providing a mystery, not supervising an exam. These exercises concern simple historical-style ciphers, not a shortcut through properly implemented modern encryption.
Puzzle 1: crack a Caesar cipher
Here’s an English sentence in disguise:
YMJ PJD NX NS YMJ GTC
Every letter has been shifted by the same number of places through the 26-letter alphabet, A–Z, wrapping round at the end. Spaces and word boundaries have stayed where they were. You know the method, but I haven’t told you the shift.
Can you find the sentence? What would you try first, and how would you check it?
Hint 1: look for something that repeats
The same three-letter group occurs twice. Under this rule, it must stand for the same word both times. That gives you somewhere to start.
Hint 2: try a word, provisionally
What if YMJ stands for THE? A common word is a useful candidate, but it still has to obey the stated rule.
Hint 3: test all three letters
Count backwards from Y to T. Does moving M to H require the same shift? What about J to E? If all three agree, try that movement on the other groups.
Answer and the working
The intended sentence is THE KEY IS IN THE BOX.
The encryption moves each letter five places forwards; decryption moves it five places backwards.
Trying YMJ as THE gives Y→T, M→H and J→E. Each move is five places backwards. The hypothesis therefore survives its first check.
Now use the same rule everywhere:
| Ciphertext | Decrypted text |
|---|---|
| YMJ | THE |
| PJD | KEY |
| NX | IS |
| NS | IN |
| YMJ | THE |
| GTC | BOX |
D→Y wraps past the beginning of the alphabet. You don’t get to give that letter a special rule because it looks awkward.
Finally, encrypt THE KEY IS IN THE BOX by moving every letter five places forwards. You recover YMJ PJD NX NS YMJ GTC, including its spaces.
The round trip checks the arithmetic; the complete English sentence gives us a reason to prefer this shift.
If the first guess never occurred to you, try every shift. There are 26, including zero, or 25 if you exclude leaving the letters unchanged. This is a pleasantly small search space.
The useful move was making a guess that had consequences beyond the bit that suggested it. Once you choose a shift, it governs the whole sentence. You can’t collect the attractive words and discreetly abandon the inconvenient letters.
Counting letters can help too, but a short message needn’t resemble average English. Its most frequent letter isn’t obliged to be E. A clue suggests a test; it doesn’t get promoted to certainty merely for arriving first.
A queen’s letters required rather more work
Real manuscripts don’t come with my helpful paragraph specifying the rules. First, someone has to decide which handwritten marks are the same symbol. Then there’s the system itself. In a homophonic cipher, several symbols can represent one letter; other symbols may represent whole words or parts of words. A single alphabet-shift guess won’t cover that. George Lasry’s CrypTool Transcriber & Solver documentation shows why transcription, tentative decoding and corrections need to be reviewed together.
In 2023, Lasry, Norbert Biermann and Satoshi Tomokiyo identified encrypted letters as Mary Stuart’s correspondence. They transcribed the symbols, keeping added marks distinct. An Italian-language hypothesis failed; French produced readable fragments. Their original study, particularly section 4, describes the process.
The program tried changing which letters the symbols represented, scoring the resulting text. Its search used simulated annealing: it could accept temporarily worse keys to escape a dead end. Scores used five-letter sequence frequencies from historical French texts, together with letter counts. Symbols with added marks were excluded from the letter search; word-symbols needed manual interpretation. Appendix A and section 4.4
Here’s one small success from section 4.5. I’ll call its unknown symbol [S1], my label. After a phrase meaning “the upcoming arrival”, the researchers tried de, French for “of” here. Elsewhere, [S1] before CA could make deça, “over here”. The reading also fitted other occurrences, including in other letters.
Seven surviving plaintext copies provided independent comparisons, confirming the letters’ origin and helping validate symbol meanings. This was iterative work; the paper’s orderly stages simplify that process. Sections 1, 4 and 4.6
I like the modesty of that little word. An arrival suggests something to try; another occurrence gives the guess another chance to fail. The persuasive part is the agreement across places where the same symbol appears. An explanation earns its keep by handling more than the example that made it look good.
That also explains why a computer’s language score needs checking. A measure of how language-like a result looks is useful for choosing what to investigate. Establishing who wrote a letter requires evidence about that letter. Those are different jobs.
Puzzle 2: spot the wrong substitution
Different puzzle, different rule. This time each ciphertext letter always stands for one fixed plaintext letter, and different ciphertext letters stand for different plaintext letters. It’s a one-to-one substitution, with English plaintext and unchanged spaces. There are no typos, disposable symbols or changes of key.
ABBC DC EFFE
Two proposed answers:
A. MEET AT NOON
B. MEET AT NINE
Both are perfectly reasonable things to put in a message. Which can you rule out, and why?
Hint 1: temporarily ignore the meaning
Look at EFFE. Its first and fourth letters match. Its second and third letters match. The decoded word must preserve both relationships.
Hint 2: write down each proposed assignment
For each candidate, line up E F F E above the proposed last word. Does each ciphertext letter keep the same meaning all the way across?
Answer and the working
B, MEET AT NINE, breaks the rule.
To turn EFFE into NINE, the first E must mean N, but the last E must mean E. The first F must mean I, but the second F must mean N. Neither ciphertext letter keeps a fixed value.
There’s another clash across the sentence: ABBC→MEET has already assigned B→E. Assigning the last E→E would give two different ciphertext letters the same plaintext value, which this puzzle also forbids.
A, MEET AT NOON, is consistent:
| Ciphertext letter | Plaintext letter |
|---|---|
| A | M |
| B | E |
| C | T |
| D | A |
| E | N |
| F | O |
Apply that mapping and ABBC DC EFFE becomes MEET AT NOON. Reverse it and you recover the exact ciphertext.
A is the intended answer, and the only consistent one of these two candidates. Eliminating B doesn’t prove that A is the only possible English plaintext under every permitted substitution. It shows that one proposed reading survives checks which the other fails.
The sentence can sound entirely sensible and still be the wrong answer. Its meaning doesn’t repair a broken mapping.
Notice that this puzzle’s one-to-one rule differs from the homophonic system above. You have to check a solution against the rules of the actual cipher. Importing stricter rules from an easier exercise would create false contradictions.
Nor should “perhaps it’s an error” become a universal escape hatch. Historical records can contain mistakes, and transcriptions can need correction. A correction needs a reason you can explain and check. Otherwise you’re editing the evidence until it agrees with you.
A useful habit, even without a royal correspondence
Imagine a note containing the dates 03/04, 05/04 and 17/04. The first two fit either day/month or month/day. If you assume all three use one ordinary calendar format, the third rules out month/day: there is no seventeenth month.
You now have a reason to check the original document for a consistent day/month format. One ambiguous date invited a guess; another entry put that guess under pressure.
That’s the everyday habit I’d take from codebreaking: ask what else would have to be true if your explanation were right. Then look there. A date format is a manageable place to practise keeping an assumption separate from a finding.
Holmes can take it from here
Now, I have a film for you. You’ve dealt with the letters; someone else can deal with Moriarty.
Sherlock Holmes and the Secret Weapon (1943), directed by Roy William Neill, is a black-and-white wartime adventure with Basil Rathbone as Holmes and Nigel Bruce as Watson. A scientist’s bombsight and a coded message draw Holmes into a contest with Moriarty. It includes abduction and torture, so expect a thriller rather than a cosy puzzle evening. AFI’s film record
The useful point to watch for is a partial success. AFI’s synopsis describes Holmes and Watson solving part of a message while a remaining line still resists. I’ll leave its solution alone. As you watch, keep an eye on what the deciphered portion actually establishes, what remains open, and what further checking the story shows—or lets you take for granted.
That makes the cipher more interesting than a prop labelled “genius”. Getting something readable is an event in the story; deciding how much it warrants is something you can do alongside it.
For another evening of clues and competing explanations, try our classic mystery film selection. Or follow the distinction between a plausible story and evidence in our guide to likelihood.
Enjoy the moment the answer arrives. Then give the remaining letters a look. They may have a small objection.
References & Further Reading
- CrypTool contributors. “What is Cryptanalysis?” CrypTool Online. Introduction and worked exercise.
- Lasry, George. “CrypTool Transcriber & Solver.” CrypToolProject/CTTS, project documentation; documentation identifies its basis as version 3.2, 10 May 2022. Sections on transcription review, decryption keys and built-in cryptanalysis. Documentation.
- Lasry, George, Norbert Biermann and Satoshi Tomokiyo. 2023. “Deciphering Mary Stuart’s lost letters from 1578–1584.” Cryptologia 47(2): 101–202. doi:10.1080/01611194.2022.2160677. Especially sections 1 and 4, and Appendix A. Published PDF, hosted by Friends of Sheffield Castle.
- American Film Institute. “Sherlock Holmes and the Secret Weapon.” AFI Catalog of Feature Films. Credits, synopsis and release information. Film record. AFI records a 1943 release and a 1942 copyright, accounting for the two dates readers may encounter.
On screen
Films discussed
- Sherlock Holmes and the Secret Weapon (1943) · Roy William Neill
Want a recommendation shaped around your evening? Ask Momo what to watch next →