Dan Tench is a lawyer who writes on media issues for the Guardian. Here he describes how he became the first person to crack the secret message hidden within Mr Justice Peter Smith's judgment on the Da Vinci Code case, which pitted author Dan Brown against two writers who failed in their claim that he breached their copyright to create his bestselling novel.

Three weeks ago, while reading the judgment, I noticed something odd. Throughout the text, the occasional letter has been italicised. There was an "m" in the word claimant in the second paragraph, and an "i" and a "t" italicised in the next. I supposed it was simply a word processing fault.

The case centred on two books - one non-fiction, The Holy Blood and the Holy Grail, and one fiction, The Da Vinci Code - both dedicated to the subject of encryption and hidden messages, but I did not seriously consider that the judge could have implanted a hidden message in the judgment. High court judges simply do not do such things.

But it did seem ironic that a judgment in such a case should appear to have such an eccentricity running though it.

Then I received an email from Mr Justice Peter Smith. He told me to scrutinise paragraph one of the judgment more closely. This revealed that there was an italicised "s" and, reading carefully, the first 10 italicised letters spelled out "SMITHYCODE". Clearly there was a message here. The judge was laying a trail, denoting the code with his own name, in a style after The Da Vinci Code.

Reading further, the italicisation of random letters continued. This spelled a jumble: "JAEIEXTOST" and so on. We tried simply moving the letters ·forward and back a little in the alphabet, but this revealed no sensible phrase. Then the judge let on that the key to the code was based on the Fibonnaci sequence - the mathematical progression which is based on adding the two preceding numbers in the series: 1, 1, 2, 3, 5, 8, 13 and so on. The Fibonnaci sequence was an essential part of the plot of The Da Vinci Code.

After much trial and error, we found a formula which fitted. This revealed (disregarding a few slips by the judge) the slightly perplexing script "JACKIEFISHERWHOAREYOUDREADNOUGHT", which is presumably to be rendered: "Jackie Fisher, who are you? Dreadnought". This must be taken as a doubtless riposte by the judge, who lists the study of the early 20th century admiral, Jackie Fisher, as a main interest. When asked who was Jackie Fisher, how many times must he have answered that Admiral Fisher conceived of the great battleship HMS Dreadnought?

Yesterday the judge sent a message: "Brilliant. You got it all ... You can rightly claim that you started it and got there first. I thought it had been missed until you found it."

Was this improper? Mr Justice Peter Smith's judgment is authoritative, his findings of fact sensible and his legal reasoning unimpeachable. If he has shown that our high court judges have a sense of humour and intrigue and rehabilitated an old hero, what harm can he be said to have done?

· Dan Tench is a media partner at Olswang solicitors.