Serendipity Enigmatic variations

HAVING just written a book on the history of cryptography, I wondered if serendipity had ever resulted in the unravelling of a secret code. Nothing came to mind immediately, but eventually I realised that one of the milestones in the history of codebreaking occurred when theologians stumbled upon a technique that destroyed a hitherto uncrackable code.

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

Suggested Topics
Arts and Entertainment
Wonder.land Musical by Damon Albarn

Theatre

Arts and Entertainment

Film review

Arts and Entertainment
Innocent victim: Oli, a 13-year-old from Cornwall, featured in ‘Kids in Crisis?’
TV review
News
Northern exposure: social housing in Edinburgh, where Hassiba now works in a takeaway
books An Algerian scientist adjusts to life working in a kebab shop
Arts and Entertainment
Terminator Genisys: Arnie remains doggedly true to his word as the man who said 'I'll be back', returning once more to protect Sarah Connor in a new instalment

 

film review
Arts and Entertainment

festivals
Arts and Entertainment

Final Top Gear review

TV
Have you tried new the Independent Digital Edition apps?
Arts and Entertainment

ebooksNow available in paperback
Arts and Entertainment

ebooks
Arts and Entertainment

music
Arts and Entertainment
Pete Doherty and Carl Barat perform at Glastonbury 2015

music
Arts and Entertainment
Lionel Richie performs live on the Pyramid stage during the third day of Glastonbury Festival

music
Arts and Entertainment
Buying a stairway to Hubbard: the Scientology centre in Los Angeles
film review Chilling inside views on a secretive church
Arts and Entertainment
Jason Williamson, left, and Andrew Fearn of Sleaford Mods
musicYou are nobody in public life until you have been soundly insulted by Sleaford Mods
Arts and Entertainment
Natalie Dew (Jess) in Bend It Like Beckham The Musical
theatreReview: Bend It Like Beckham hits back of the net on opening night
Arts and Entertainment
The young sea-faring Charles Darwin – seen here in an 1809 portrait – is to be portrayed as an Indiana Jones-style adventurer
film
Latest stories from i100
Have you tried new the Independent Digital Edition apps?

ES Rentals

    Independent Dating
    and  

    By clicking 'Search' you
    are agreeing to our
    Terms of Use.

    The Greek referendum exposes a gaping hole at the heart of the European Union – its distinct lack of any genuine popular legitimacy

    Gaping hole at the heart of the European Union

    Treatment of Greece has shown up a lack of genuine legitimacy
    Number of young homeless in Britain 'more than three times the official figures'

    'Everything changed when I went to the hostel'

    Number of young homeless people in Britain is 'more than three times the official figures'
    Compton Cricket Club

    Compton Cricket Club

    Portraits of LA cricketers from notorious suburb to be displayed in London
    London now the global money-laundering centre for the drug trade, says crime expert

    Wlecome to London, drug money-laundering centre for the world

    'Mexico is its heart and London is its head'
    The Buddhist temple minutes from Centre Court that helps a winner keep on winning

    The Buddhist temple minutes from Centre Court

    It helps a winner keep on winning
    Is this the future of flying: battery-powered planes made of plastic, and without flight decks?

    Is this the future of flying?

    Battery-powered planes made of plastic, and without flight decks
    Isis are barbarians – but the Caliphate is a dream at the heart of all Muslim traditions

    Isis are barbarians

    but the Caliphate is an ancient Muslim ideal
    The Brink's-Mat curse strikes again: three tons of stolen gold that brought only grief

    Curse of Brink's Mat strikes again

    Death of John 'Goldfinger' Palmer the latest killing related to 1983 heist
    Greece debt crisis: 'The ministers talk to us about miracles' – why Greeks are cynical ahead of the bailout referendum

    'The ministers talk to us about miracles'

    Why Greeks are cynical ahead of the bailout referendum
    Call of the wild: How science is learning to decode the way animals communicate

    Call of the wild

    How science is learning to decode the way animals communicate
    Greece debt crisis: What happened to democracy when it’s a case of 'Vote Yes or else'?

    'The economic collapse has happened. What is at risk now is democracy...'

    If it doesn’t work in Europe, how is it supposed to work in India or the Middle East, asks Robert Fisk
    The science of swearing: What lies behind the use of four-letter words?

    The science of swearing

    What lies behind the use of four-letter words?
    The Real Stories of Migrant Britain: Clive fled from Zimbabwe - now it won't have him back

    The Real Stories of Migrant Britain

    Clive fled from Zimbabwe - now it won’t have him back
    Africa on the menu: Three foodie friends want to popularise dishes from the continent

    Africa on the menu

    Three foodie friends want to popularise dishes from the hot new continent
    Donna Karan is stepping down after 30 years - so who will fill the DKNY creator's boots?

    Who will fill Donna Karan's boots?

    The designer is stepping down as Chief Designer of DKNY after 30 years. Alexander Fury looks back at the career of 'America's Chanel'