Serendipity Enigmatic variations
Simon Singh is an author, journalist and TV producer, specialising in science and Mathematics. His latest book is "Trick or Treatment? Alternative Medicine on Trial", co-authored with Edzard Ernst, the world’s first professor of complementary medicine.
Sunday 12 September 1999
One of the oldest secret codes is the substitution cipher, which turns the original message into an enciphered message by substituting each letter with a different one. So every A in the original message might be replaced with P, every B with K, and so on. There are over 400 million million million million ways of substituting the letters of the alphabet, and so a codebreaker cannot hope to decipher an intercepted message by checking every possible set of substitutions - even if it was possible to check one set of substitutions every second, it would still take roughly a billion times the age of the universe to check them all.
For over a millennium, the substitution cipher was considered unbreakable, but in the 8th-century AD, Islamic scholars made a crucial observation. Theologians were interested in establishing the chronology of the revelations contained in the Koran, and they did this by counting the frequencies of words contained in each revelation. The theory was that certain words had evolved relatively recently, and so if a revelation contained a high number of these words, then it probably belonged to the latter part of the chronology.
Significantly, the religious scholars did not stop their scrutiny at the level of words. They also analysed letters and discovered that some are more common than others. This led to the first great breakthrough in codebreaking, as documented by the Arabic polymath Al-Kindi, "the philosopher of the Arabs".
In A Manuscript on Deciphering Cryptographic Messages, Al-Kindi advised codebreakers to look for the most common letter in the encrypted text. If the original message was in English, and if the most common letter in the encrypted text is W, then this probably represents the letter E, because E is the most common letter in English. Similarly, if the second most common letter in the encrypted text is Q, then this probably represents T, because T is the second most common letter in English. And so on.
This technique, known as frequency analysis, destroyed the security of the substitution cipher. However, it needs to be applied with some care, because the frequencies in some texts are highly unusual. In 1969, the French author Georges Perec wrote La Disparition, a 200-page novel that did not use words containing the letter "e".
Simon Singh is the author of `The Code Book - the Science of Secrecy from Ancient Egypt to Quantum Cryptography', Fourth Estate, pounds 16.99
Grace Dent on TV The Secret Life of the Pub is sexist, ageist and a breath of fresh air
Art Megumi Igarashi criticises Japan's 'backwards' attitude to women's sexual expression
tv Singer could become the most unlikely star of Westeros
Ray Davies' Sunny Afternoon scoops the most awardsTheatre
Grace DentChannel 4 show proves there's no app for happiness
Arts & Ents blogs
- 1 BBC election debate: The one photo that summed up the whole 90-minute leaders debate
- 2 18th century sex toy found in 'toilet of sword fighting school' in Poland
- 3 US? China? India? The 10 biggest economies in 2030 will be...
- 4 'I wish my teacher knew...': Young students share their 'heartbreaking' worries in notes
- 5 Rebecca Francis accuses Ricky Gervais of using 'influence' to target female hunters after receiving barrage of death threats
Better Call Saul creator Peter Gould on the creative concerns of a prequel, season 2 and the mind-numbing realities of the small courts
Britain's Got Talent 2015: RSPCA investigating Marc Metral's miming dog after cruelty complaints
Star Wars 7: The Force Awakens trailer: The most extreme fan reactions on Twitter
Doctor Who film will definitely happen, leaked Sony emails reveal
The Batman v Superman: Dawn of Justice trailer has leaked – watch
The only black face in the Ukip manifesto is on the page about overseas aid
If I’m being racially abused I don’t need a stranger with a saviour complex to rescue me
Ukip is the only main political party to not address LGBT rights in its manifesto
Food banks: One million Britons will soon be using them, according to Trussell Trust
BBC election debate: The one photo that summed up the whole 90-minute leaders debate
Religion isn't growing, it is becoming vigorous in its demise, says philosopher AC Grayling