♪  Devil In The Detail  by Paul Mottram
John Dee was a polymath
and one of his interests was cryptography,
the science of code-making
and code-breaking.
That's one of my interests as well,
so it's great to be able to see
John Dee's collection.
In particular, there's a book called
Polygraphie  by Trithemius,
which is a landmark book
in the history of encryption
because, for obvious reasons,
people who had ideas about encryption
didn't document them.
You wanted to keep your ideas secret
so you could break other people's secrets.
But this is a lovely book. It's...
It's not just important but it's clever.
There are things called cipher wheels
or cipher discs.
You can put the letters of the plain text,
what you want to write,
around the outside of the wheel
and on the inside are the symbols or
letters that you're going to encode into.
Then you can rotate the wheel according to
how you're going to encrypt your message.
Now, the book actually contains
cipher wheels embedded within the pages.
It's done seamlessly,
and if you see the exhibition,
you'll see the book opened to a page
where there is a cipher wheel.
It's a beautiful book, but it's not
actually the first book about encryption.
That was written by
an Arabic mathematician or philosopher,
a chap called Al-Kindi.
About 1,000 years ago, in Baghdad,
he wrote a book which was the first book,
or the first document,
that explained how you would break a code.
Al-Kindi said that, typically,
the way you encode something
is that you swap a letter for a symbol.
So you swap A with a square,
B with a triangle and so on.
Now, Al-Kindi said
that if you swap E with a cross,
E is very common so the cross
will be very, very common,
if your message is in English, say.
Then you can use what's called
'frequency analysis' —
the most common symbol must be an E,
the second most common is probably a T,
the third most common symbol
is probably an A.
If one symbol always follows
another symbol, that must be Q and U,
things like that.
If you have three symbols in a row
very often, that's probably T-H-E,
which is the most common three-letter word
in English, and so on.
Using this frequency analysis
of individual words —
individual letters, sorry, pairs
of letters or  three letters in a row,
you can crack these codes very,
very rapidly.
By the time we get to John Dee's era,
and the Elizabethan era of spies
and plotting and intrigue,
codes have become a bit more advanced.
You see people suggesting that,
instead of swapping E with a cross,
swap E with a variety of symbols.
If you swap E with 13 different symbols,
E occurs about 13%...
13% of letters in English are Es.
So if you represent them with 13 symbols,
each symbol only appears 1% of the time
and you're flattening out the pattern.
You're getting rid of the spikes
that would be obvious to a code-breaker.
Those are the kinds of things that
were happening during the Elizabethan era,
the sort of things that would have
interested John Dee.
You can see how important code-making
and code-breaking is in this era
by looking at the story
of Mary, Queen of Scots.
Mary, Queen of Scots was a Catholic.
She wanted to take the English throne
away from Elizabeth.
Elizabeth knew this,
so she imprisoned Mary
to keep her out of the way,
keep her out of trouble.
But even while Mary was in prison,
she was plotting to overthrow Elizabeth.
She was writing secret messages, encoded,
which she would smuggle out
in beer barrels to her conspirators,
people like Babington.
Babington was trying to encourage a plot
from Spain, an invasion from Spain,
and ultimately put Mary on the throne.
That's what was written in these letters
that Mary was smuggling out to Babington.
When these messages were intercepted,
they were given to Elizabeth's
chief code-breaker,
a chap called Thomas Phelippes.
Phelippes broke the code very easily
because Mary was using a very
old-fashioned simple form of cipher.
The messages were decoded.
Elizabeth was presented with the evidence
that Mary was plotting treason.
Mary was put on trial.
She was found guilty
on the evidence of these coded letters.
Then she was executed in 1587, so you can
see how the making and breaking of codes
is a matter of life and death.
