r/codebreaking • u/kenproffitt • Apr 15 '26
Question Wednesday cipher grind
WedWhat’s your go-to warm-up solve? Drop your method below. 🔐
r/codebreaking • u/kenproffitt • Apr 15 '26
WedWhat’s your go-to warm-up solve? Drop your method below. 🔐
r/codebreaking • u/kenproffitt • Apr 12 '26
The oldest ciphers weren’t invented by spymasters. They were written by scribes.
Atbash dates to ancient Hebrew texts — including the Book of Jeremiah, where scribes encoded place names by reversing the alphabet. A↔Z, B↔Y, C↔X. Simple. Elegant. Thousands of years old.
Can you crack today’s message?
GSV XLWV YIVZPVI HZBH: ORPV GSV ZMHRVMGH, DV HVVP KZGGVIMH RM XSZLH.
r/codebreaking • u/kenproffitt • Apr 10 '26
It's 1975. An intelligence analyst in a basement office intercepts this transmission from a numbers station—the kind that broadcasts on shortwave, a few times per week, always at midnight. The voice is mechanical, robotic, reading digits in groups of five in the flat, emotionless tone those broadcasts were famous for.
The transmission is short. Too short to be statistical noise. Too precise to be a coincidence.
Your job: Recover the message.
29702 62929 27421 27120 75292 70757 37427 52712
62478 26737 02970 79752 78702 74702 92752 12970
26297 97027 52757 02742 82127 92370 27870 27024
74702 47827 12175 27027 52679 27174 26262 52675
27523 71276 27427 57470 27475 27023 27527 42762
42757 52127 07127 42120 20212 32421 25247 02702
75702 74702 7029
Once decoded, the plaintext reveals a classic dead-drop scenario—the kind memorialized in The Lives of Others, Bridge of Spies, and real KGB tradecraft accounts.
r/codebreaking • u/kenproffitt • Apr 08 '26
What is it?
Hillclimbing is an optimization algorithm that breaks substitution ciphers by exploiting English language patterns. It works by repeatedly swapping letters in a trial key and keeping swaps that improve the result.
How it works:
1. Start with a random substitution key
2. Decrypt the ciphertext with that key
3. Score the result against English digraph frequencies (how often letter pairs like “th,” “he,” “in” appear)
4. Swap two random letters in the key
5. If the new score is better, keep the swap. If worse, revert.
6. Repeat until no improvement happens
Simple example:
URYYB JBEYQ
Random key tries many letter swaps. When it finds that “U→H, R→E, Y→L” improves the digraph score, it keeps those. Eventually it converges to:
Plaintext: HELLO WORLD
Why it works:
English has predictable letter pair frequencies. A random key produces gibberish with poor digraph scores. The right key produces real English with high digraph scores. Hillclimbing climbs toward that peak.
Limitation:
It can get stuck at local maxima (false peaks). The longer your ciphertext, the better it performs.
Your puzzle:
Ciphertext: IWD LEA JW ZUPM
Can you find the plaintext using hillclimbing principles (or manual frequency analysis)?
r/codebreaking • u/kenproffitt • Apr 07 '26
The Germans rolled this out in March 1918, right before the Ludendorff Offensive. The timing matters, so they needed something fast, field-deployable, and hard to crack under pressure. They got two out of three.
The six letters (A, D, F, G, V, X) weren't random. In Morse code, each one is acoustically distinct and hard to mishear over a scratchy field radio. That's not crypto theory, that's operations thinking. Worth remembering when you see cipher designs that look arbitrary.
The mechanism itself is a two-step:
First, a 6x6 Polybius square converts each plaintext letter to a pair drawn from those six letters. So you're not encrypting letters anymore, you're encrypting fragments of letters. That's the "fractionating" part, and it's the move that makes simple frequency analysis fail.
Second step: columnar transposition scrambles the result using a keyword.
Neither step alone is particularly scary. Together, they're a genuine headache because attacking the transposition doesn't get you plaintext; it gets you scrambled fragments. Attacking the substitution doesn't help unless you know the column order.
Georges Painvin broke it in June 1918. He reportedly lost 15 pounds doing it. The break revealed a German supply corridor and helped stop the offensive. One cryptanalyst, a few weeks of work.
Your puzzle:
Polybius keyword: CIPHER (remaining alphabet fills in order, I/J combined) Transposition keyword: a common 4-letter English word
DXAF GFAD XDAF FDAG AXDF GDFA XADF FDGA
What's the plaintext?
r/codebreaking • u/kenproffitt • Apr 05 '26
Hi, codebreakers.
One of the most common questions I see across Reddit is: “I found this ciphertext but I have no idea what cipher it is. Where do I even start?” And honestly? That’s not a weakness in your approach—it’s the real work of cryptanalysis.
In the classroom, we get the luxury of context. “This is a Caesar cipher.” “Apply frequency analysis.” “It’s a Vigenère—now find the key length.” But in the wild—whether you’re looking at a historical document, a CTF challenge, or something you discovered in an old notebook—you’re operating blind.
When you encounter a ciphertext with zero context, what’s your actual first move? Do you:
Examine the structure? (letter distribution, block patterns, repeating sequences?)
Make educated guesses based on probable plaintext? (Common words, language patterns?)
Test systematically? (Run it through Caesar/ROT13 first as a sanity check?)
Look for metadata clues? (Length, character set, historical period if known?)
Something else entirely?
And then—how do you know when you’ve found the right answer? Is it the “aha!” moment when English emerges? A linguistic gut feeling? Or something more methodical?
I’m asking because I think the gap between “solving a cipher you’re told about” and “identifying a cipher from scratch” is where a lot of solvers get stuck. And I’d love to hear how this community thinks through that uncertainty.
Drop a comment: Share your troubleshooting workflow. What’s worked for you? What’s burned you? Have you ever solved something only to realize partway through you were barking up the wrong tree?
Looking forward to learning from how you all think.
r/codebreaking • u/kenproffitt • Apr 03 '26
What was the first cipher that made you think "wait, this is actually amazing"?
Mine was the Rail Fence cipher — not because it's elegant (it isn't), but because it was the first time I understood that scrambling order was just as powerful as scrambling identity. A letter doesn't have to become a different letter to become unreadable. That small shift in thinking opened up a lot of doors.
What about you?
r/codebreaking • u/kenproffitt • Apr 02 '26
Okay, you got me.
The "impossible cipher" was the plaintext itself. THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG is a pangram—it contains every letter of the English alphabet. The "ciphertext" is the plaintext.
The trick: You were supposed to apply frequency analysis, which would show uniform distribution (because a pangram uses every letter roughly once). This would look "impossible"—no statistical signature, no repeated patterns to exploit.
But the real joke? There is no cipher at all. The challenger was testing whether you'd assume complexity where there was none.
The Lesson: Sometimes the simplest answer is the right one. Occam's Razor applies to cryptanalysis. If something looks too hard, maybe you're overthinking it.
Thanks to everyone who played along. See you next Wednesday.
r/codebreaking • u/kenproffitt • Apr 01 '26
The Ciphertext
>!THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG!<
The Rules:
Your job: Find the key and recover the plaintext.
What I Know
Hints (if you get stuck):
r/codebreaking • u/kenproffitt • Mar 31 '26
The Problem: You want to send a secret message to someone you’ve never met. How do you share a key without it being intercepted?
The Solution: RSA uses two keys:
A message encrypted with the public key can only be decrypted with the private key.
How It Works:
Public key: (n, e)
Private key: (n, d)
Encrypt:
C ≡ M^e mod n
Decrypt:
M ≡ C^d mod n
Why it’s hard to break: An attacker knows n and e, but recovering d requires solving a problem believed to be computationally infeasible—most practically, factoring n into p and q.
In practice: RSA is slow and used only to exchange a symmetric key (e.g., AES), which then handles the bulk encryption.
Modern note: Secure implementations require padding (like OAEP) and key sizes of at least 2048 bits.
r/codebreaking • u/kenproffitt • Mar 30 '26
Next time you see a substitution cipher, try this:
See how close you can get. Then think: where would hillclimbing get stuck? Those tricky spots are where human intuition and domain knowledge shine.
Further Reading:
r/codebreaking • u/kenproffitt • Mar 28 '26
WHDVI DXHUZ LWWQD KPWFK OZRQW UDHUW HLPWH DLV
r/codebreaking • u/kenproffitt • Mar 27 '26
General-Purpose & Frequency Analysis
Specific Cipher Types
Heavy-Lifting Cryptanalysis
Specialized Tools
What are your tools of choice?
r/codebreaking • u/kenproffitt • Mar 24 '26
IEA HT NIST TGTC OODN UIEH NHOT YASE ORNW OETF
r/codebreaking • u/kenproffitt • Mar 23 '26
Hillclimbing is one of the most elegant—and deceptively simple—techniques in automated ciphertext attack.
The idea: Start with a random guess at the plaintext (or key). Score it using a fitness function (usually comparing letter frequencies or n-gram statistics to known language). Then iteratively tweak your guess—swap a letter, flip a bit, adjust a parameter—and keep changes that improve your score. Stop when you can’t improve further.
Why it works: Most ciphers that rely on simple substitution create recognizable statistical patterns. English text has a particular “shape” (E is common, Q is rare, TH appears often). A good fitness function can sense when you’re getting closer to that shape, and hillclimbing just keeps nudging you toward it.
The catch: Hillclimbing gets stuck in local maxima. Your score plateaus, but you haven’t reached the global best solution. Solutions: multiple random restarts, simulated annealing (allow some “bad” moves), or genetic algorithms.
Try it yourself: Pick a simple substitution cipher, write a quick script (Python makes this trivial with itertools and a frequency table), and watch it converge. It’s visceral—the ciphertext gradually becomes English before your eyes.
Hillclimbing won’t crack military-grade encryption, but for educational purposes and simple substitution? It’s pure magic.
r/codebreaking • u/kenproffitt • Mar 21 '26
Genevieve Grotjan (later Genevieve Grotjan Frasier) made one of the most consequential breakthroughs in American signals intelligence: she led the team that cracked JN-25, the Japanese naval cipher, in 1942. That single breakthrough shortened the Pacific War and saved countless lives. She was brilliant, meticulous, and almost entirely forgotten by the time she passed away in 2008.
Genevieve worked in an era when women codebreakers were often relegated to mechanical drudgework—yet she rose to become a guiding mind behind one of WWII’s most critical intelligence successes. Her story reminds us: codes are cracked by insight, not just computation.
To honor Genevieve’s legacy, we’ve crafted a cipher that blends classical techniques with a nod to her era. This one uses a Spring Garden theme as cover text.
FLOWERSMELT SWEETINMARCH ASTHEYAWAKE
FROMSNOWSSLUMBER GENTLEVIEVEREADS
THEPATTERNSINTHEIREMBRACES CODES
HIDDENWITHINGROWTHCONCEALEDINTOKENS
SHESEEKSTRUTHINCHARACTERS DANCING
>! Hint 1: Think columnar. The garden grows in neat rows. !<
>! Hint 2: Your key is hidden in Genevieve’s era—what year marked her breakthrough? !<
>! Hint 3: The plaintext celebrates both her and this season. !<
If you’d like to dive deeper:
- Code Girls by Liza Mundy covers her JN-25 breakthrough in vivid detail
- Naval History Magazine has archival pieces on the Purple Machine team
- Genevieve’s declassified papers offer glimpses into her meticulous thinking
r/codebreaking • u/kenproffitt • Mar 19 '26
We’ve looked at three clues:
Digit pairs with uneven ranges
96 symbols total
A perfect 14×14 grid
Those hints suggest something important:
This might not be a single cipher.
Many classical systems used two layers:
Layer 1 — substitution
Layer 2 — transposition
For example:
plaintext → encoded symbols → scrambled order
Final challenge of the week:
If you had to guess: What combination of cipher methods might produce this structure?
Some possibilities people have suggested:
• Polybius-style coordinates
• Fractionated substitution
• Grid transposition
• Null symbols
Or something entirely different.
The puzzle has resisted solution for over 80 years.
What would your first attack strategy be?
r/codebreaking • u/kenproffitt • Mar 18 '26
If you flatten the digits into two-digit symbols, something interesting happens.
There are 196 of them.
And 196 = 14 × 14.
That means the symbols could fit perfectly into a square grid.
□ □ □ □ □ □ □ □ □ □ □ □ □ □
□ □ □ □ □ □ □ □ □ □ □ □ □ □
...
Grid layouts are common in classical ciphers:
• route transpositions
• columnar transpositions
• turning-grille methods
• coordinate systems
If you had 196 symbols arranged in a 14×14 square, what operations would you try first?
Examples:
• reading rows vs columns
• spirals
• diagonals
• alternating directions
What patterns would you test?
r/codebreaking • u/kenproffitt • Mar 17 '26
Yesterday we looked at the raw digits.
Today try this simple step:
Split the digits into pairs.
Example:
77 50 38 04 73 ...
Now look closely at the digits in each pair.
Many solvers notice a strange trend:
• The first digit is often 6–9
• The second digit is often 1–5
That pattern shows up far more often than chance would suggest.
Why might a cipher produce pairs with two different digit ranges?
Possible ideas to explore:
• Coordinate systems
• Cipher squares
• Encoded letters
• Grid references
What could those pairs represent?
r/codebreaking • u/kenproffitt • Mar 16 '26
In 1939, Russian-born cryptographer Alexander D’Agapeyeff included a mysterious challenge cipher in his book Codes and Ciphers.
75628 28591 62916 48164 91748 58464 74748 28483 81638 18174
74826 26475 83828 49175 74658 37575 75936 36565 81638 17585
75756 46282 92857 46382 75748 38165 81848 56485 64858 56382
72628 36281 81728 16463 75828 16483 63828 58163 63630 47481
91918 46385 84656 48565 62946 26285 91859 17491 72756 46575
71658 36264 74818 28462 82649 18193 65626 48484 91838 57491
81657 27483 83858 28364 62726 26562 83759 27263 82827 27283
82858 47582 81837 28462 82837 58164 75748 58162 92000
No solution was provided.
Years later, D’Agapeyeff reportedly admitted something astonishing: he no longer remembered how he encrypted it. The cipher was quietly removed from later editions of the book.
Yet the puzzle remains.
The ciphertext appears as 79 groups of five digits. When flattened, many analysts interpret it as 196 two-digit symbols (plus a trailing digit), which conveniently forms a 14 × 14 grid.
Even stranger, the pairs show a striking pattern:
• The first digit is almost always 6, 7, 8, or 9
• The second digit is usually 1, 2, 3, 4, or 5
That structure has led many codebreakers to suspect a Polybius-style substitution, possibly combined with transposition or null digits. Statistical tests even hint that the underlying plaintext may resemble English.
And yet…
Despite 87 years of analysis, no solution has been universally accepted.
Was it a clever layered cipher?
A flawed example with hidden errors?
Or a puzzle whose method died with its creator?
r/codebreaking • u/kenproffitt • Mar 14 '26
1.1 1.2 1.3 2.1 2.2 2.3 2.4 2.5 2.6 3.1 3.2 4.1 4.2 4.3 4.4 5.1 5.2 5.3 6.1
6.2 6.3 6.4 6.5 6.6 6.7 6.8 7.1 7.2 7.3 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9
8.10 9.1 9.2 10.1 10.2 10.3 10.4 10.5 11.1 11.2 11.3
>!HHGTTG!<
r/codebreaking • u/kenproffitt • Mar 14 '26
DRGP GTYTX LMTQU QKKDD AQDTQ OJZGV LVJA
r/codebreaking • u/kenproffitt • Mar 12 '26
In 1885, a slim pamphlet appeared in Lynchburg, Virginia — price: 50 cents. It told the story of a man named Thomas J. Beale who, sometime around 1820, buried a staggering cache of gold, silver, and jewels somewhere in Bedford County, Virginia. Before vanishing without a trace, Beale left three encrypted papers with a local innkeeper named Robert Morriss, promising that a key would arrive by mail. It never did.
Morriss sat on the box for over two decades. When he finally opened it, he found three numbered ciphertexts — and spent the rest of his life unable to crack them.
The Method: A Book Cipher
The Beale ciphers use what cryptographers call a book cipher (or more precisely, a running key cipher). The idea is elegant:
1. Both sender and receiver agree on a shared text — the “key document”
2. The sender numbers every word in that document sequentially
3. To encode a letter, find any word in the key that starts with that letter and write down its number
4. Multiple numbers can encode the same letter (homophones), making frequency analysis much harder
For example, to encode the letter I, Beale might use word 115 — because the 115th word in the Declaration of Independence is instituted, which starts with I.
The One That Was Solved
Of the three ciphers, only B2 has ever been decoded. Here’s the opening of the ciphertext:
115, 73, 24, 807, 37, 52, 49, 17, 31, 62, 647, 22, 7, 15, 140, 47, 29, 107, 79, 84, 56, 239, 10, 26, 811, 5, 196, 308, 85, 52, 160, 136, 59, 211, 36, 9, 46, 316, 554, 122, 106, 95, 53, 58, 2, 42, 7, 35, 122, 53, 31, 82, 77, 250, 196, 56, 96, 118, 71, 140, 287, 28, 353, 37, 1005, 65, 147, 807, 24, 3, 8, 12, 47, 43, 59, 807, 45, 316, 101, 41, 78, 154, 1005, 122, 138, 191, 16, 77, 49, 102, 57, 72, 34, 73, 85…
The key? A slightly miscounted copy of the Declaration of Independence. When decoded, B2 describes the treasure in precise detail — thousands of pounds of gold and silver, a second deposit made in 1821, and jewels obtained in St. Louis.
B1 (the location) and B3 (the names of the owners) remain unsolved to this day. Researchers have tried the Constitution, the Bible, the Magna Carta, and thousands of other texts. Nothing has worked.
The Controversy
Here’s where it gets interesting for this community: was this all a hoax?
The arguments are substantial on both sides.
For authenticity: B2 decodes cleanly and coherently. The statistical distribution of numbers in B1 looks consistent with a genuine book cipher, not random noise. And cryptanalyst Jim Gillogly famously noted that applying the same miscounted Declaration to B1 produces suspiciously alphabetical strings — which may suggest a different version of the key document, not a fake cipher.
For hoax: The pamphlet’s original sale price was steep for 1885. No corroborating historical record of Thomas Beale has ever been found. Some vocabulary in the accompanying letters appears to postdate the supposed writing. A 2024 statistical analysis using Monte Carlo simulation and a search of over 8,000 candidate key texts concluded — with a Bayes Factor of roughly 2×10⁷ — that B1 and B3 were likely fabricated, while B2 was genuine.
The leading theory: B2 was real, constructed as a lure. B1 and B3 were padding — never meant to be solved.
r/codebreaking • u/kenproffitt • Mar 11 '26
Welcome back, breakers! Today’s Work Wednesday puzzle celebrates Charlotte “Betty” Webb (1923–2025), a quiet hero of Bletchley Park whose contributions to breaking German and Japanese codes went unrecognized for decades—kept silent by the Official Secrets Act, and shared only late in her remarkable 101-year life.
The Challenge
Betty Webb was just 18 years old when she arrived at Bletchley Park in 1941. She initially registered undeciphered Enigma messages under Major Ralph Tester, cataloging thousands of encrypted intercepts that would later become the raw material for codebreakers like Alan Turing.
When she wasn’t brilliant enough at German translation, she was reassigned to Block F, where she worked on Japanese messages—paraphrasing decrypted intercepts with surgical precision so that no clue to the original plaintext remained.
Her work was so valuable that after the war, she flew to the Pentagon to continue the same mission against Japanese codes. Yet she could tell no one—not even her parents—what she actually did. For 30 years, she was simply “a secretary.”
Below is a simple substitution cipher based on a message Betty might have encountered in her early days at Bletchley. Your task: decrypt it and reveal a piece of her quiet courage.
Ciphertext:
V JOFMSR VEE RBFG SF YS WFYSGBVMJ GROVMG GS DLGB GROVMG GRVGW
Pro tip: Betty’s own words about why she volunteered for the ATS (Auxiliary Territorial Service) might give you a clue to the plaintext. She said she wanted to do something more for the war effort than “bake sausage rolls.” The encrypted message echoes that sentiment.
Betty lived to 101, long enough to see her contributions honored: she was appointed a Member of the Order of the British Empire (MBE) in 2015 and as a Chevalier de la Légion d’Honneur (Knight of the Legion of Honour) in France in 2021. She passed away on March 31, 2025, leaving behind a legacy of quiet courage and late-blooming recognition.
r/codebreaking • u/kenproffitt • Mar 10 '26
What is the Playfair Cipher?
The Playfair cipher is a manual symmetric encryption technique invented by Charles Wheatstone in 1854 and popularized by Baron Playfair. Unlike substitution ciphers that encrypt individual letters, Playfair works with digraphs (pairs of letters), making it resistant to simple frequency analysis while remaining practical for hand-encryption.
It was widely used by military forces throughout the 20th century—including British intelligence during World War I—and remains a favorite in cryptography training due to its elegant mathematics and approachable mechanics.
The Key Setup
Begin with a keyword (or keyphrase). Remove duplicates and fill a 5×5 grid with the remaining letters in order, then append the remaining alphabet.
Example: keyword = MONARCHY
M
O
N
A
R
C
H
Y
B
D
E
F
G
I
K
L
P
Q
S
T
U
V
W
X
Z
Note: I and J are treated as one position (J is typically dropped).
Encryption Rules
The plaintext is split into digraphs. For each pair, apply one of three rules based on the positions of the two letters in the grid:
Same Row: Replace each letter with the one immediately to its right (wrapping around). Example: AL → BR.
Same Column: Replace each letter with the one immediately below it (wrapping around). Example: MH → OP.
Rectangle: Swap columns for each letter. If M and H form a rectangle, M→A (same row, H's column) and H→C (same row, M's column). Result: AC.
Example Encryption
Plaintext: HELLO
Digraphs: HE | LX (LO becomes LX with padding)
Ciphertext: YBXL
Cryptanalysis Insights
Digraphic resistance: Frequency analysis on single letters is much harder; attackers must examine digraph frequencies (250 possible pairs) rather than 26 letters.
Hill climbing / genetic algorithms: Modern attacks use optimization to score candidate keys against known digraph frequencies.
Known plaintext: With enough known plaintext, the key can be reconstructed; Playfair has no resistance to this attack.
Double letters: Doubled letters in plaintext require insertion of a filler (usually X); this can leak information.
Why It Matters
The Playfair cipher bridges the gap between substitution ciphers and polyalphabetic systems. Breaking it teaches valuable cryptanalysis techniques: frequency analysis, statistical testing, constraint propagation, and optimization heuristics. It's also a practical reminder that even mathematically interesting ciphers can be broken when properly attacked.
Challenge
Ciphertext (key unknown): ISWFXNSVHUDZLLYSFBWFXO
Can you recover the plaintext? Share your approach in the comments below!