Smithy code

The Smithy code is a series of letters embedded, as a private amusement, within the April 2006 approved judgement of Mr Justice Peter Smith on The Da Vinci Code copyright case. It was first broken, in the same month, by Dan Tench, a lawyer who writes on media issues for The Guardian, after he received a series of email clues about it from Justice Smith.

How the code works 
The letters in question are part of the actual text of the judgement, but italicised in contrast to the rest of the text. The following sequence of unusually emphasised letters can be extracted from the judgement document:

The italicised letters only occur up to paragraph 43 (which is page 13 of a 71-page document). Meanwhile, paragraph 52 concludes with this sentence: "The key to solving the conundrum posed by this judgment is in reading HBHG and DVC." (These abbreviations are used by Smith throughout the judgement in referring to the books at issue, The Holy Blood and the Holy Grail and The Da Vinci Code.)

There are 70 sections in the judgement. The source words from the judgement for the letters (with intervening words removed):

Letter frequencies 
Excluding leading letters "s m i t h y c o d e", the letter frequencies are as follows:

 a – 4
 e – 3
 g, m, p, q, s, t – 2
 c, d, f, i, j, k, o, r, v, w, x, z – 1

Letter location 
Paragraph numbers for cipher letters:

 1 Claimant(s)
 2 
 3 
 4 
 5 f(o)r
 6 
 7 
 8 
 9 
 11 
 13 
 14 
 16 
 18 (t)he
 19 
 20 
 21 u(s)ed
 23 w(a)s
 25 
 26 
 27 
 29 
 30 
 31 o(f)
 34 (k)ey
 35 
 37 
 38 
 40 
 42 
 43

Hints
From article "'Da Vinci' judgement code puzzles lawyers":

Solution
The cipher was a type of polyalphabetic cipher known as a Variant Beaufort, using a keyword based on the Fibonacci sequence, namely AAYCEHMU. This is the reverse of the Vigenère cipher, which here enables decryption rather than encryption.

Assigning each letter its place in the alphabet, the keyword corresponds to 1, 1, 25, 3, 5, 8, 13, 21. It is possible that the reason 25 (Y) was included is to denote a backward step of 2 rather than a forward step. It is a twist drawn from The Holy Blood and the Holy Grail, and concerns the number 2 in the Fibonacci series, which becomes a requirement to count two letters back in the regular alphabet rather than a signal to use an alphabet that begins with B. For instance, the first E in the coded message, which corresponds to a 2 in the Fibonacci series, becomes a C in the answer.

The 10th ciphertext letter, T, should really be an H, and there should also be a Z at the end of the ciphertext.

The repetition of the digraph 'MQ', after 8 letters, suggested a key that was 8 letters long, which is in fact the case. (This type of attack on a cipher is known as a Kasiski test).

The full plaintext should read:

Although correct application of the cipher in reverse, to decrypt, actually yields:

The algorithm for generating the plaintext from the ciphertext is: repeating the eight-letter key, add the relevant key letter to each plaintext letter, and then take a step one letter back.

(Alternatively, as is done in a professional context, the letters of the alphabet may be numbered from 0, in which case the final step back does not have to be made).

Jackie Fisher was a British admiral. "He was a driving force behind the development of the fast, all big-gun battleship, and chairman of the Committee on Designs which produced the outline design for the first modern battleship, HMS Dreadnought."

References

External links 
 The complete text of the judgment was formerly available at http://www.hmcourts-service.gov.uk/images/judgment-files/baigent_v_rhg_0406.pdf.
The archived copy of this text from 5 December 2006 can be found here
, text of the judgment without the italics that mark out the cyphertext.
 Famous Unsolved Codes (lists the Smithy Code as solved)
 Kryptos Group report - analyzes how the code is put together, and contains a link to a mirrored copy of the PDF of the original judgment

Tool to crack the code

The Da Vinci Code
History of cryptography
Puzzles
2006 in British law
2006 in the United Kingdom