Crib Solver
Statistics need a lot of ciphertext. A crib needs only a guess: one word you believe is hiding in the message — a name, a greeting, “weather” in a forecast. This tool drags your guessed word along the ciphertext and keeps every position where it could sit without contradicting itself. At the true position, a substitution cipher surrenders part of its alphabet; a Vigenère cipher surrenders its key.
A crib is a fragment of plaintext you know or guess is inside a ciphertext. A crib solver tests it at every position (“slide-and-test”): for substitution it keeps positions where the implied letter mapping stays one-to-one; for Vigenère, positions where the implied key stream looks like a repeating key. Survivors are ranked by the readable text they reveal.
The method Bletchley Park industrialised against Enigma. No crib in mind? The cryptogram solver and Vigenère solver attack without one.
Slide your crib
Slide-and-test: patience, mechanised
Write your crib on a strip of paper. Lay it under the ciphertext at the first letter and ask: could the message read this way here? Then move it one letter along and ask again. That is the whole method — the strip is a cheat sheet smuggled into the exam. What changes between cipher families is the meaning of “could”.
Against a substitution cipher: the mapping must not contradict itself
A substitution alphabet is one-to-one: each cipher letter always means the same plain letter, and no two cipher letters share a meaning. So if your crib says cipher S means W at one letter and E three letters later, that position is impossible — cross it off. If two cipher letters would both have to mean A, cross it off. A third rule in newspaper cryptograms: a letter never stands for itself, so a self-mapping position is suspect. Most positions die within a few letters. Survivors earn a second look: apply their partial alphabet to the whole message and see whether other words surface. The tool ranks by exactly that.
Against Vigenère: the crib spells the key
For Vigenère the arithmetic is the prize. Cipher letter minus plain letter equals key letter, so a true crib laid under the ciphertext reads the key stream straight off the page. Slide “WEATHER” along a message keyed with LEMON and at the true position the subtraction spells ONLEMON… — the key itself, read from where the fragment sits in its cycle. A crib at least as long as the key gives the whole key away; a shorter one still marks the spot if its stream repeats or contains a plausible key word.
Choosing a good crib
- Long beats short. Every extra letter kills false positions exponentially; seven letters is a working minimum, ten is comfortable.
- Repeated letters are gold. A crib whose letters repeat — the double T in “LETTER”, the pattern of “BANANA” — constrains far more than its length suggests, because its internal repeats must match repeats in the ciphertext. A patternless word like “WEATHER” still constrains through seven distinct letters.
- Guess from the ritual, not the content. Greetings, sign-offs, place names, “report”, “weather”, the recipient's name — messages are formulaic at their edges, which is why cribs live there.
- A crib that fits nowhere is information too. The word is absent, or the cipher is not the family you assumed.
Bletchley Park ran on other people's routines
Cribs are as old as guessed plaintext, but their golden age was the Second World War. German Enigma traffic was vast, daily and — fatally — formulaic. Weather stations sent reports in rigid formats at rigid times, so Bletchley Park's analysts could guess whole stretches: WETTERBERICHT (weather report) itself, or the gloriously empty KEINE BESONDEREN EREIGNISSE — “no special occurrences”. A guessed phrase laid against the day's intercepts told Alan Turing's Bombes where not to look: any wheel setting that forced a letter to encrypt as itself, or contradicted the crib's implied wiring, was discarded, and the machines raced through the rest. The British even manufactured cribs — “gardening” meant planting mines in known waters so the inevitable German reports would name the location in enciphered form. The lesson is permanent: a cipher is rarely beaten in its mathematics; it is beaten in the habits of its users. (Sources: Bletchley Park Trust; Singh, The Code Book.)
One slide, read closely
This worked fragment — from Example 1, where the crib WEATHER truly sits — shows what a fit looks like on the tool's stage:
Read the columns: V→W, A→E, Z→A, S→T, F→H, P→R. No cipher letter means two things, no plain letter is claimed twice — and because A→E now holds everywhere, every A in the message lights up as E. Consistency across the whole ciphertext, not just under the crib, is the real test.
The same word, two different prizes
Example 1 — substitution (load it above)
The crib WEATHER is tested at 105 positions; only 8 survive the one-to-one test, and the true one — at the 4th letter — wins because its partial alphabet reveals THE at the start and E's throughout. From that beachhead the cryptogram solver, or your own pencil, finishes the alphabet.
Example 2 — Vigenère (load it above)
Same plaintext, same crib, different prize: here the winning subtraction spells ONLEMON — the key LEMON caught mid-cycle — and the message falls at once. Against substitution a crib buys alphabet; against Vigenère, the key.
When the slide finds nothing
- Zero surviving positions means the crib is not there in that form — check spelling and language, try a shorter fragment, or question the cipher family. Against a transposition cipher no crib fits letter-by-letter: the letters were moved, not replaced. The transposition solver is the right room.
- Dozens of survivors means the crib is too short or too patternless for the text's length. Lengthen it, or let the full solver arbitrate between the top few.
- Playfair is a special case. Cribs apply, but in pairs: Playfair encrypts digraphs, so you slide two letters at a time and test pair-mappings. The principle is identical; this tool slides single letters, so for Playfair use the crib to fix pairs by hand on the Playfair page.
- A self-mapping warning is not a verdict. Newspaper cryptograms forbid a letter standing for itself, but not every setter follows the convention — the tool flags self-mappings rather than silently deleting those positions.
Cribs among the other attacks
| Attack | What it needs | Reach for it when |
|---|---|---|
| Crib (this page) | One guessed word | You know the message's habits — a name, a formula |
| Frequency & hill-climbing | Text only | No guess available: the cryptogram solver |
| Key-length statistics | A paragraph of Vigenère | The Vigenère solver — no crib required |
| Known plaintext (full) | A whole known message | The deluxe case: key or alphabet by direct subtraction, no sliding needed |
The human attack
Every other solver here treats ciphertext as mathematics. The crib treats it as behaviour: somebody wrote this message, on a routine, with formulas they did not vary because varying them was not their job. That is why analysts still call a guessed fragment a crib, and CTF players open with “the flag probably contains the event name”. If you learn one cryptanalytic habit, learn to ask what the sender must have said.
One slide to run yourself
Practice — find the bridge
Paste it into the tool, choose Substitution, and slide the crib BRIDGE. Before you look: how many positions will a six-letter crib leave standing on a short message?
Reveal the answer
BRIDGE sits at the 4th letter (TBE = THE gives it away to a human eye first). The message reads “THE BRIDGE IS CLOSED AT NIGHT SO THE FERRY LEAVES FROM THE NORTH PIER AFTER ALL.” Short texts let more impostors survive — hence the ranking by revealed words.
Frequently asked questions
Where do cribs come from in real puzzles?
From the frame of the message: titles, dates, “dear sir”, the setter's name, stock phrases of the genre. In CTFs, the flag format itself is a crib. In newspaper cryptograms, one-letter words and apostrophes are cribs in disguise.
How long should a crib be?
Long enough to be nearly unique. Four letters fit in many places by luck; seven or more, especially with a repeated letter inside, usually fit in one.
What is the difference between a crib and known plaintext?
Scale and certainty. Known plaintext is a whole passage you are sure of; a crib is a short fragment you are only betting on, whose position is unknown — hence the sliding and testing.
Can I use a crib against a transposition cipher?
Not letter-by-letter: transposition moves letters without changing them, so adjacency — the thing a slide tests — is destroyed. That is the transposition solver's territory.
The winning position reveals gibberish elsewhere. What went wrong?
The crib fitted by coincidence — common with short cribs on long texts. Cross-check by extending the alphabet a few letters by hand: a true position keeps giving; a false one starts contradicting itself.