More on Code Breaking

Following the surprising amount of interest in my recent code-breaking activity publicised by the BBC and the Daily Telegraph, here is a little background.

Some years ago I was invited to take part in a historical event held at Mont Orgueil Castle in Jersey. My character for the week was to be the spymaster Philippe d’Auvergne. I was provided with a small look-out post at the top of the tower and a telescope. The weather was not the best and I decided to restrict my outdoor forays to a minimum, and prepared instead to display period code-breaking activities based on the story of George Scovell, who cracked the code used by Napoleon’s armies in Spain and Portugal during the Peninsular War.  For the benefit of visiting youngsters a set of simple cyphers was prepared for them to try their skill.

First I needed some coded documents. I wrote a computer program that would mimic the French coding system. The basis of the coding was that a single letter could be represented by up to half a dozen numbers of one, two or three digits. A number could also represent an entire word or group of commonly used letters forming part of a word.

I found some historical reports from the period in French and fed them into the program without reading them first. All I knew was the subject matter of the reports. I armed myself with pens, pencils, a notebook and an original 1791 French/English dictionary, as seen here:

Code breaker

Over the course of four days I managed to decode and translate one long document of about two pages and parts of several shorter ones that I used as cross-references. Sadly I have not been able to find any of the documents, but here from my notebook is a sample of my working:

My code-breaking notebook
The right hand page records the deciphered numbers, while the left hand page contains all the relevant notes.

I found this a most satisfying exercise, and I have recently used the same coding in my Peninsular War wargame campaign where the players requested messages to be in code.

A bit of a challenge (updated)

Some years ago I studied Mark Urban’s wonderful book “The Man Who Broke Napoleon’s Codes”.  I then put the theory into use by devising a computer programme to reproduce in a simplified way the coding system for use as an intellectual exercise and also for reenactment purposes.

I spent a week in Jersey posing as a British code breaker in the 1790s deciphering a blind text in French that my programme had encoded for me.  This was most satisfying for me, quite interesting for the visiting public and totally boring for my wife, who shared the same cold, damp room.  She was engaged in sewing, and my other task during the week was to retrieve dropped needles, for she was unable to bend in her period corset.

A couple of days ago, the BBC’s programme “Antiques Roadshow” featured a small patch box dating from 1785 with an encoded message that they were unable to decipher.  It was too much of a challenge to resist:

The top of the box.  Image supplied by and copyright BBC Antiques Roadshow.
The top of the box. Image supplied by and copyright BBC Antiques Roadshow.

Here is my working on the code:

At first sight the code appears to be

663- 5446- 45- 5-9288 166- 8503 45- 288

I noticed that some numbers have a line above them, and the dashes are actually a mark like a sideways comma. Rendering these symbols with an apostrophe for the “comma” mark and an asterisk for the overscore, and if I read it correctly, the code reads:

66’3 54*46’ 4*5’ 5’92*88 16*6’ 85*03* 4*5’ 2*88

My first clue was that there was also a scrollwork in English on the box. Since the top also read “Anno Domini 1785” there was a chance that it could be Latin.

The engraving (in English) around the box side.  Image supplied by and copyright BBC Antiques Roadshow.
The engraving (in English) around the box side. Image supplied by and copyright BBC Antiques Roadshow.

Starting with English and surmising that the double 8s were probably double Ls (other possibilities in English are E,F,O,S and T), I quickly – well, after a couple of hours of brain-bending – found out that the overscored numbers 2*,3*,4*,5*,6* are the vowels A,E,I,O,U. If 4* is I then 5’ has to be F, S or T, because it is used in a two letter word (IF, IT or IS).

Although there was only one sentence to work with, the lucky part was that two groups of letters were repeated (4*5′ and 2*88).  After I had worked out that the final 4*5’2*88 was actually two words it was easy.  I tried all two letter words as possibilities for 4*5′, and then a comparison of three and five letter words ending in the same double letter and achieved:

??? ?I?? IS SMALL ?U? LO?E IS ALL

Here I ran into a problem.   The only word that makes sense for 16*6’ using the remaining available letters is “BUT”.   If that is correct I have:

?T? ?I?T IS SMALL BUT LOVE IS ALL. Possibly the second word is “GIFT”, but I cannot find a three letter word with T in the middle and no vowels. Could there be some carving errors, or did I mistake the carving?

From my logic above, if the first word is “THE”, it should be rendered as 6’63*   not 66’3.

To be fair, I have seen in 18th century texts the word “the” spelt as “hte” and this would make sense if I missed the overscore on the 3. I was working with a still image from a video representation.

So my conclusion is that the message probably:

THE GIFT IS SMALL BUT LOVE IS ALL

By examining the letters and numbers in order, here is my best guess at the whole code.  Numbers and letters in bold are those used in the sample:

1 b   1′ n
2 c 2* a 2′ p
3 d 3* e 3′ q
4 f 4* i 4′ r
5 g 5* o 5′ s
6 h 6* u 6′ t
7 k 7* y? 7′ w or y
8 l   8′ x
9 m 0 v 9′ z

If you can add anything to this, please let me know by adding a comment to this post.

The TV programme is  available until 7th February 2016 to British residents at http://www.bbc.co.uk/iplayer/episode/b06wcfgc/antiques-roadshow-series-38-18-bowood-house-2

11th June 1808. Marshall Bessières’ HQ gets to work

11th June 1808:  General Order from M. Bessieres to all forces under command.
“All French forces are to treat our noble Spanish allies with courtesy and respect. All efforts are to be made to work with local town and regional authorities to secure goodwill and fraternal relations. All supplies and requisitions required by our forces are to be documented and to be paid for with Official Certificates of Military Payment redeemable at the Marshals pleasure.”

He also sent 3 dispatch riders with cavalry escorts of 12 men each to Bayonne, Madrid and Barcelona.  They carried coded messages, the meaning of which cannot yet be revealed, but as a mental challenge to anyone with a few days to spare here are the messages, based on a coding system in use by the French in the Peninsula.  This version translates to English, not French.

Message 1 to Bayonne
51, 144, 48, 33, 109, 15, 146, 120, 81, 136, 128, 48, 147, 99, 79, 136, 110, 118, 37, 142, 120, 6, 135, 48, 73, 148, 85, 13, 11, 39, 11, 25, 99, 128, 32, 6, 109, 89, 35, 9, 16, 43, 111, 48, 109, 77, 124, 145, 55, 38, 120, 48, 14, 16, 118, 108, 32, 7, 117, 120, 11, 32, 42, 26, 29, 8, 79, 136, 11, 37, 7, 16, 12, 50, 15, 7, 101, 47, 81, 81, 64, 148, 14, 25, 128, 6, 95, 32, 122, 110, 148, 38, 81, 81, 9, 14, 42, 26, 120, 81, 117, 92, 120, 51, 35, 132, 8, 26, 145, 110, 81, 127, 73, 101, 40, 55, 44, 122, 15, 79, 102, 33, 77, 29, 79, 75, 21, 118, 35, 47, 57, 54, 95, 120, 117, 128, 11, 118, 103, 75, 11, 131, 21, 81, 25, 9, 75, 33, 35, 9, 132, 146, 43, 6, 8, 8, 45, 103, 92, 146, 21, 101, 37, 75, 29, 29, 55, 6, 145, 146, 21, 33, 7, 47, 110, 101, 146, 29, 101, 55, 138, 6, 104, 11, 37, 7, 133, 24, 145, 131, 117, 50, 6, 75, 136, 110, 133, 11, 146, 67, 117, 117, 7, 136, 73, 135, 29, 12, 7, 109, 148, 3, 35, 128, 142, 136, 26, 31, 15, 146, 21, 26, 26, 117, 29, 42, 6, 128, 8, 146, 109, 108, 51, 13, 107, 11, 32, 148, 3, 75, 120, 142, 132, 48, 6, 41, 148, 136, 79, 146, 69, 117, 29, 79, 14, 9, 109, 122, 75, 31, 79, 44, 128, 6, 33, 109, 81, 64, 117, 75, 33, 110, 95, 120, 80, 35, 127, 51, 13, 95, 145, 110, 75, 11, 33, 11, 117, 114, 48, 131, 80, 24, 41, 67, 75, 109, 148, 114, 32, 35, 101, 104, 80, 132, 133, 75, 54, 114, 35, 127, 44, 35.

Message 2 to Madrid
40, 25, 146, 33, 109, 12, 81, 29, 79, 109, 120, 81, 74, 99, 81, 118, 110, 33, 131, 138, 60, 50, 81, 57, 148, 128, 146, 77, 24, 29, 111, 60, 117, 118, 92, 111, 45, 75, 110, 80, 60, 11, 40, 7, 142, 120, 12, 52, 101, 53, 81, 146, 143, 39, 75, 18, 77, 120, 7, 55, 81, 21, 67, 128, 79, 14, 16, 35, 44, 73, 15, 30, 92, 110, 149, 118, 103, 124, 127, 55, 71, 29, 79, 14, 133, 136, 108, 137, 7, 117, 128, 11, 131, 121, 24, 29, 44, 146, 109, 11, 32, 7, 133, 15, 125, 12, 75, 101, 47, 81, 48, 52, 148, 14, 141, 114, 26, 99, 37, 71, 110, 148, 71, 79, 48, 16, 14, 102, 6, 114, 79, 117, 12, 29, 51, 75, 133, 125, 60, 34, 79, 41, 110, 101, 40, 55, 8, 38, 92, 79, 54, 136, 143, 29, 79, 75, 142, 109, 35, 145, 56, 102, 135, 114, 117, 29, 11, 109, 143, 75, 11, 131, 21, 146, 90, 132, 124, 136, 124, 133, 16, 79, 43, 24, 50, 44, 135, 143, 80, 81, 21, 101, 137, 35, 120, 128, 55, 6, 47, 146, 52, 109, 75, 145, 111, 101, 48, 29, 101, 55, 51, 13, 30, 11, 37, 75, 132, 60, 37, 117, 8, 24, 124, 33, 73, 9, 11, 48, 67, 117, 117, 75, 136, 73, 135, 120, 92, 124, 33, 148, 123, 7, 114, 64, 33, 24, 104, 15, 81, 52, 13, 26, 117, 114, 42, 13, 114, 50, 79, 118, 108, 65, 24, 30, 11, 32, 148, 86, 75, 120, 142, 16, 146, 60, 148, 118, 48, 81, 69, 117, 120, 48, 14, 133, 109, 38, 75, 31, 81, 8, 128, 26, 109, 33, 79, 21, 117, 124, 33, 110, 45, 128, 12, 75, 145, 65, 24, 95, 47, 73, 124, 11, 33, 11, 117, 29, 79, 37, 15, 60, 67, 35, 33, 148, 29, 37, 124, 101, 31, 92, 9, 16, 75, 102, 120, 7, 47, 44, 124.

Message 3 to Barcelona
40, 141, 146, 109, 33, 15, 48, 29, 146, 118, 128, 146, 74, 45, 146, 136, 34, 118, 32, 21, 135, 122, 81, 118, 51, 146, 148, 120, 146, 143, 13, 114, 110, 60, 117, 136, 15, 110, 135, 75, 73, 12, 60, 11, 8, 124, 34, 75, 133, 60, 80, 75, 101, 130, 79, 79, 103, 39, 124, 18, 143, 29, 75, 55, 81, 64, 67, 120, 79, 14, 9, 7, 44, 73, 12, 30, 92, 34, 149, 33, 77, 75, 47, 55, 71, 29, 81, 14, 16, 33, 108, 131, 75, 117, 128, 11, 137, 42, 13, 120, 125, 48, 33, 11, 32, 124, 133, 80, 50, 12, 124, 101, 145, 81, 146, 64, 148, 14, 25, 120, 26, 95, 32, 68, 34, 148, 68, 146, 146, 16, 14, 42, 13, 120, 81, 117, 12, 114, 51, 124, 133, 50, 60, 73, 81, 127, 110, 101, 40, 55, 8, 122, 15, 146, 42, 118, 143, 120, 79, 35, 142, 118, 124, 127, 57, 121, 135, 114, 117, 29, 11, 136, 103, 7, 11, 37, 64, 48, 90, 16, 7, 109, 7, 9, 133, 79, 43, 24, 8, 50, 135, 18, 80, 146, 142, 101, 137, 7, 114, 120, 55, 6, 41, 81, 64, 136, 35, 127, 34, 101, 79, 114, 101, 55, 40, 13, 107, 11, 37, 75, 132, 60, 32, 117, 8, 13, 75, 118, 111, 9, 11, 146, 67, 117, 117, 35, 33, 73, 95, 29, 80, 75, 109, 148, 123, 7, 114, 52, 136, 26, 104, 12, 48, 21, 26, 6, 117, 114, 102, 13, 114, 44, 146, 33, 108, 40, 24, 107, 11, 37, 148, 3, 75, 120, 21, 9, 79, 60, 148, 33, 79, 146, 69, 117, 128, 81, 14, 133, 118, 38, 35, 30, 48, 44, 114, 6, 33, 136, 146, 21, 117, 124, 118, 111, 99, 29, 15, 35, 127, 65, 13, 135, 41, 110, 75, 11, 136, 11, 117, 120, 81, 37, 92, 60, 67, 124, 136, 148, 128, 137, 75, 101, 31, 15, 133, 9, 35, 54, 128, 124, 145, 50, 7.

The system is well described by Mark Urban in his book, “The Man Who Broke Napoleon’s Codes” (ISBN 0-571-20538-0) and I am indebted to Mark for his research. It is a substitution code, but each letter may have several numeric equivalents and sometimes a single number may represent a commonly used word or group of letters.

As an example of sloppy staff work which opens the first key to the code, all three messages begin with “M. Bessieres”