A first visit · No previous experience needed

Your first codebreak

A book has been left in the wrong room. Read the notice, test a guess, and find out where to go.

Allow about 15 minutes for the first lesson. The three extensions can be explored separately. Every message here is an original, invented teaching exercise. Your work stays in this tab and resets when you reload.

1. Where is the book?

This notice uses a one-to-one substitution: each letter always becomes the same cipher letter. Spaces and punctuation were retained. Your task is to propose a partial key and check it across the whole notice.

The intercepted notice

Look for a clue

Count the cipher letters

A substitution preserves the counts but changes their labels. A particular text need not follow an average English frequency table.

Build your key

Enter a plaintext letter below a cipher letter. A dot means unknown. Lock a guess to preserve it; unlock it before changing it. The same plaintext letter cannot be assigned twice.

Your current reading

Help when you need it

A readable result needs a consistent key and supporting evidence. The check here compares your result with the answer to this invented exercise. It cannot authenticate a document or prove who wrote it.

Continue with your own message in the manual substitution desk, or try the Curator’s Sealed Letter to investigate what a recovered message can prove.

2. Follow a repeating key

This longer library dispatch uses repeating-key Vigenère. Only A–Z letters count toward the key position. Spaces and punctuation have been removed. The original exercise was written with recurring phrases so you can examine key alignment.

Find repeated fragments

Try a period

For a proposed period of four, column 1 contains letters 1, 5, 9…; column 2 contains 2, 6, 10… . If the period fits the key, each column uses one Caesar shift. Try key letters below and watch the columns and message change.

“Best English fit” minimizes chi-square against a fixed, rounded English letter-frequency reference. Lower is a closer fit, not a probability of correctness. Short columns and unusual language can mislead. Inspect every shift, then test the complete message.

Candidate key:

Explain why the repeating key creates useful groups. Why could a multiple of the true period also work? Continue to the Vigenère table and encryption trace and the cryptanalysis techniques.

3. Which language are you assuming?

Compare the letter counts, short words and within-word pairs in five small, original library messages. Change the language and inspect the sample that produced the numbers.

Letter counts and percentages

Most frequent within-word pairs

Words of one to three letters in this sample

All five samples are modern teaching prose, written in uppercase A–Z with accents omitted. Counts do not include spaces or punctuation; letter pairs do not cross word boundaries. These small samples are not representative language corpora or historical frequency tables.

Return to the notice: the most frequent ciphertext symbol represents O, not E. The subject and wording matter as well as the language. For historical work, explore the separately documented profiles and abstention rules in the Evidence Workbench.

4. Give a common letter more disguises

Use the same notice from lesson 1. First, every letter receives one numerical token. Then give its unusually frequent O several alternatives. The charts count whole three-digit tokens, not individual digits; both charts use the same scale.

One token per letter

O receives alternatives

Inspect the numerical ciphertext

Giving O extra symbols can reduce its individual peaks. Other letters still repeat, and sequences still carry structure. A flatter chart does not establish secure encryption.

This deliberately simple allocation adapts to one invented notice; it is not a historical key. Random choices use a teaching simulation, not a cryptographic random generator. Real proportional allocations must consider the wider alphabet and the expected message distribution.

Continue to Homophonic Substitution and the one-time pad to see why a statistical appearance and a secrecy proof are different things.

For a classroom or library group

Work in pairs: one person proposes a guess and the other tries to find a contradiction. Swap roles after the third clue. Use the first notice for a short session; add the Vigenère exercise for a longer workshop.

Printable activities, without answers · Separate facilitator’s answers · Classical topic guide

To exchange messages, each pair can use the Workbench to encrypt an original short notice. Give the other pair only the ciphertext and cipher family; retain a separate answer copy. These are puzzle ciphers, unsuitable for protecting private information.

Sources and scope

Simon Singh’s Black Chamber inspired the guided teaching format. See its hints and repeating-key explanation. These museum messages, lesson text and implementation are original.

Technical background: Al Sweigart, Cracking Codes with Python (2018), chapter 17, for word-pattern constraints; Menezes, van Oorschot and Vanstone, Handbook of Applied Cryptography (1997), §§7.3.2–7.3.3, for substitution and polyalphabetic systems. The English chi-square reference is a more coarsely rounded version of the museum Detective’s existing reference. Continue reading.