返回资讯中心
外部精选
软件工程
#开发者实时流

Breaking Ludwig's Unbreakable Code

Ludwig is a comedy-drama detective series from BBC One, centred around John Taylor (David Mitchell), a renowned puzzle-setter and author of popular puzzle books under the pen-name ‘Ludwig’.

Hacker News 最新mikehall3142026/10/27 · 今天22 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

BBC

David Mitchell

Cryptography

Cipher

Breaking Ludwig’s Unbreakable Code

Mike Hall

8 min read·

Oct 10, 2026

--

Ludwig is a comedy-drama detective series from BBC One, centred around John Taylor (David Mitchell), a renowned puzzle-setter and author of popular puzzle books under the pen-name ‘Ludwig’.

Promotional image for Ludwig. Photo credit: Colin Hutton.

When John’s twin brother James (a police detective) goes missing, his wife Lucy encourages John to take his place, masquerading as a police officer in an effort to find him. This leads to many comedy misadventures where the awkward and autistic-coded John turns out to be remarkably good at solving murders… provided he can reframe them as puzzles.

Towards the end of the second series, our heroes learn of an enciphered letter written by James, which John describes as ‘literally unbreakable’. While this is a narrative conceit, I was fascinated to see that the producers had actually gone to the trouble of making a real cipher.

A sample of the enciphered letter

(We are going to confuse ourselves with the repeated use of the word ‘letter’ here, since it could refer to both a letter of the alphabet, or the letter written by James. From this point on, I’ll refer to James’s letter as the document, and when I say ‘letter’ I mean from the alphabet.)

It’s made clear on screen that the document uses a form of substitution cipher. These are very common. For example, if you want to encipher the letter ‘E’, you might do that by replacing it with the letter ‘J’. Make similar substitutions across the rest of the alphabet and you finish up with a text which appears to be gibberish unless you know which letters substitute for which.

Substitution ciphers like this are vulnerable to an attack called frequency analysis. If we take an enciphered message (a ciphertext) and count how often each letter appears, we’ll see that some are far more common than others. For English text, the most common letter is usually E, so when a ciphertext contains more letter Js than anything else, we can conclude it’s almost certainly standing in for E. This toehold is often enough to allow a cryptanalyst, through a combination of inductive and deductive reasoning, to decipher the entire message.

The enciphered document from Ludwig uses Wingding-like doodles in place of letters, but it is still a substitution cipher. Far from being unbreakable, we should be able to figure out what the document really says.

The first thing to notice, before doing any other analysis, is a symbol which looks like a backwards letter P. It appears twice in the first word on the first page, and looking through the rest of the document it always appears in pairs. The character never appears on its own. In some cases, it even appears twice at the start of a word.

Since there are few English words beginning with a double letter (and this document is unlikely to be concerned with the fates of aardvarks named Aaron) we can fairly conclude that this double backwards P is substituting a single letter, not two.

The double backwards P also appears as a word by itself a few times, which suggests it is probably substituting an ‘A’ or an ‘I’. We don’t know for sure which at this stage, but I’m leaning toward ‘A’ because of how commonly it appears. That doesn’t rule out ‘I’, but does hint heavily away from it.

The next thing we might notice is the fourth row on the second page, where there is an inverted T repeated three times. There aren’t a huge number of words in English with three repeated letters and (looking through the rest of the document) the same inverted T only ever appears at the end of a word. We can conclude then that this is probably a full stop, so when repeated three times it’s an ellipsis.

This also tells us the punctuation has been enciphered. Spaces seem to be intact, but the full stops were enciphered so possibly other punctuation was too.

Next we can perform our frequency analysis, which reveals that the most common character by a long way is the little eyeball on a stick. That character appears around 100 times. (Helpfully, this deduction is explicitly mentioned on screen, so we know we’re on the right lines.)

The next most common is the double backwards P, which appears 71 times, and then a character which looks like two number threes stacked on top of each other, which appears 56 times. So the eyeball is probably the letter ‘E’, and the frequency of the backwards Ps supports our earlier guess about the letter ‘A’.

I mentioned before that the double P often appears on its own. The other character which appears on its own looks sort of like a little shark. I’m not sure what this squiggle is meant to be; most of the symbols are recognisable to some extent, but this one is weird. Regardless, given the double P is probably the ‘A’, the little sharkie is likely the other single-character word, so that will be our letter ‘I’.

There is a three-character combination which appears ten times throughout the document. It consists of a celtic cross, followed by a number 3 that has fallen over, and the eyeball on a stick at the end. Since this combination appears frequently, sometimes as a word on its own, and we know the final character is ‘E’, we can reasonably guess that it represents the word ‘THE’. Which means the celtic cross is our ‘T’ and the fallen 3 is our ‘H’.

From there, we can also get to the letter ‘O’. The celtic cross commonly appears alongside this twisted helix character, sometimes as a whole word. That word can only be ‘TO’, which means the helix is our ‘O’. So now we know A, E, H, I, T, and O.

On the sixth line of page one there is a five-letter word we have mostly deciphered already. The last four letters are ‘EATH’, and the first letter is like a little greater-than sign. There are relatively few words this could be. It can’t be ‘HEATH’ because then the first character would also be a fallen 3. Perhaps it is ‘NEATH’, but that’s not all that common a word. A better fit here is ‘DEATH’, especially since this is a show about a murder mystery. The greater-than character is probably our letter ‘D’.

Following immediately from that, there is a six-letter word later in the document which starts with ‘DEATH’ followed by an unknown symbol. It could be punctuation, but it’s also very common: forty-six appearances throughout the document, often at the start of words. We can probably conclude that this is our letter ‘S’, making ‘DEATHS’.

Now we’re starting to see partial sentences. For example:

Even without looking too closely, we can read ‘AS ARE THE DEATHS OF SIX OTHER PEOPLE’, which gives us the symbols for ‘R’, ‘F’, ‘X’, ‘P’, and ‘L’ all in one go.

There is a two-letter word beginning with ‘O’ (the little helix), followed by two number threes stacked on top of each other. We know from the frequency analysis that this is the third most common character, after ‘E’ and ‘A’. Two-letter words beginning with O: we’re looking perhaps at OF, ON, OH, and OR. We know F from ‘OF SIX OTHER PEOPLE’ so we can rule out ‘OF’. We also know the ‘R’ and the ‘H’ from other deductions. So the stacked threes is likely the ‘N’. This fits with our frequency analysis, as N is one of the most common letters in English text.

A six-letter word with a single missing character, ‘SE-OND’, gives us the C. An eight-letter word, ‘THO-SAND’, gives us the U. A pair of words, ‘-URDER FRO-’ where the first and last symbols are the same, gives us the M. A fancy L character (actually the L from the show’s logo) always appears at the end of words, never in the middle. We know punctuation is enciphered here, so that is probably our comma.

I won’t go through the rest of the solution as it’s mostly the same deductions. Once we have enough letters broken, we can almost fill them in from just the context. It took me a little under 40 minutes to break the unbreakable cipher and reveal the document’s spoilery content.

I discovered three things after deciphering the document. First, when read aloud on screen, the final line is:

I love you. Always have. Always will. James.

However, in the document prop, the final ‘James’ is omitted.

Second, there seems to be a typo in the document prop. The line spoken in the show is ‘she will escape justice’. The written document says ‘he will escape justice’. That might indicate that the gender of the villain was switched during production, but since they use she/her pronouns for this character elsewhere in the document it is probably just a typo.

Finally, in the spoken version of the document, we hear the line ‘as are the deaths of three more people’. The written document, as we have established, says ‘of six other people’. What happened between the prop department being given the text to make this document, and the recording of the line, to change ‘six other’ to ‘three more’? A rewrite? A plot twist?

Or maybe that’s a spoiler for the exciting third series of Ludwig.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →