Codes and how to break them

Cryptography refers to both the practice and study of hiding information. Modern cryptography is a field in which the disciplines of mathematics, computer science, and electrical engineering meet and its applications include ATM cards, computer passwords, and electronic commerce. According to Wikipedia, the earliest known use of cryptography is found in non-standard hieroglyphs carved into monuments from Egypt’s Old Kingdom some 4500 years ago. These were probably not serious attempts at secret communication; they seem to have been attempts at mystery, or they may have just been challenging those who saw to decipher it

However, cryptography, should not be seen as a game or some arcane discipline. Codes have decided wars and changed the course of history. They have been the subject of movies like Mercury Rising, U-571 and Windtalkers. These movies tend to be disappointing and far less interesting than reality.  Many writers have been fascinated by the world of cryptography. We have The Gold Bug, by Edgar Allan Poe, the Sherlock Holmes mystery, The Adventure of the Dancing Men, Cryptonomicon, by Neal Stephenson, Enigma by Robert Harris and of course more recently in The Da Vinci Code by Dan Brown. Michael Drosnin’s, The Bible Code is supposed to be non-fiction. It purported to prove that the Holy Book had predicted historical events such as the assassination of President Kennedy This is a case of mathematical seek and ye shall find. It is inevitable that computers will be able to find patterns in a large text, especially when you don’t set out what you are looking for in advance, or the gap between the letters is not established. Without such constraints, any pattern you wish to find is likely to be there. Drosnin, sick of the book’s detractors issued a challenge to his critics:

When my critics find a message about the assassination of a prime minister encrypted in Moby Dick, I’ll believe them.’”  That was an unwise move as mathematicians immediately set to work examining Herman Melville’s magnum opus and found references to the assassinations of Indira Gandhi, Leon Trotsky and John F. Kennedy.

An important part of the history of codes is steganography, the art and science of writing hidden messages in such a way that they can only be understood by the sender and the intended recipient. This can be done in a number of ways. One classic method used by the ancient Greeks was to shave the messenger’s head, tattoo a message on it and then allow the hair to grow back. The Ancient Chinese were big on steganography because in Chinese each character represents a word or a concept, which makes it difficult to hide the content. They would write their secret message on a piece of fine silk, which they would make into a little ball. This would be covered with wax and then swallowed by the messenger. Steganography was not confined to the ancient world. The period between the two word wars saw the invention of microdot technology, in which a text or image is substantially reduced in size so that it can be put on to a 1mm disc. It could be used to pass messages through insecure postal channels. Invisible ink is another steganographic technique. This may sound like something that schoolboys get up to but it is still relevant today. British Muslim, Rangzieb Ahmed, who was allegedly the highest ranking Al-Qaeda operative in the United Kingdom, was arrested in 2005. He had a diary in his possession which contained Al-Qaeda contacts, some of which were written in invisible ink. Today Steganography is still used to hide secret messages on the Internet.

While steganography was about hiding the existence of the message cryptography involves scrambling the message up so that it becomes unreadable.  It was linked to the spread of literacy, the invention of the alphabet and the rise of large empires, where safe communication across great landmasses was at a premium. The Romans made an important contribution to cryptography – the Caesar shift cipher, a technique used by Julius Caesar to communicate with his generals. This would form the basis of cryptography for the next 900 years. The next important jump was down to serendipity. Arabic scholars in their quest to understand the Qur’an better engaged in sophisticated, in-depth study. This led them to see patterns and from this frequency analysis, a key tool in early cryptanalysis, was born. This analysis is based on the fact that, in any given page of written language, certain letters and combinations of letters occur with varying frequencies. For example, if E represents 12% of the original message, it should also appear approximately 12% of the time in the coded message in the guise of another letter. You also play with the fact that vowels are very promiscuous and can go with almost any letter, whereas consonants tend be more strait-laced and combine less frequently. By doing a frequency analysis of the coded message, you will be able to establish what each letter represents and thus break the code.

The next case I want to look at is the famous German Enigma machine. Its messages were broken by the boffins at Bletchley Park. A key figure here was Alan Turing, one of the founders of modern computing. Sadly Turing didn’t get the recognition he deserved. In 1952, when he was reporting a burglary to the police, he revealed that he was having a homosexual relationship. The police arrested him and he was charged with gross indecency. The subsequent trial and conviction were humiliating for Turing. His security clearance was withdrawn and he was forced to undergo hormone treatment, which made him impotent and obese. On June 7, 1954, at the age of 40, Turing he committed suicide by eating an apple that had been dipped in cyanide. One shudders to think what would have happen if his homosexuality had been discovered during the war.

One famous use of codes were the so-called code talkers, Native Americans serving in the United States Marine Corps whose primary job was the transmission of secret tactical messages. The most important contribution was from bilingual Navajo speakers. It was the idea of Phillip Johnston, the son of a Protestant missionary, a civilian who was living in California. Johnston, who had grown up on the Navajo reservation, was fluent in the language. He realised that its hideous complexity, typical of many tribal languages that have relatively few speakers, would be perfect for bamboozling the enemy. Verbs incorporate adverbs and reflect whether or not the speaker has experienced what they are talking about, or whether it is hearsay. A single verb can be equivalent to a whole sentence, making it virtually impossible for foreigners to extract the meaning. It was to become one of the only unbroken codes in modern military history, completely baffling the Japanese in the Pacific. Native Americans from the Choctaw tribe had been used during World War I. Although the enemy was unable to understand the language, there was a major drawback – the Choctaw had no lexis for modern military jargon. This made efficient unambiguous communication very hard. Having learned from their previous experience, the Marine Corps built a lexicon of 274 Navajo terms to replace otherwise untranslatable English words, thus removing any ambiguities. They used words from the natural world.  Here are a few examples:

fighter plane   da-he-tih-hi    humming bird

submarine   besh-lo  iron fish

battleship      lo-tso    whale

In just eight weeks trainee code talkers were able to learn the entire lexicon and alphabet. Words that were neither in the natural Navajo vocabulary nor in the list of 274 authorized codewords had to be spelled out using the special alphabet. Because they had an oral culture they were used to memorising folk stories prayers songs and family histories they had few difficulties. This proved to be a great advantage because they didn’t need codebooks, which could easily have been captured by the enemy. There were some 420 Navajo code talkers and their special role in securing communications was classified information and like the codebreakers at Bletchley Park they were unable to reveal their amazing contribution. It was only in 1982 that they received the recognition they deserve; the U.S. Government named August 14 National Navajo Code Talkers Day.

The 1970s saw a watershed in cryptography – thanks to some pioneering work done by American cryptographers, the knowledge and techniques necessary for encoding or scrambling speech and writing are no longer the sole preserve of government intelligence agencies. The end of the near monopoly enjoyed by governments on high quality cryptography has made the authorities uneasy. States generally like to be able to monitor and gather evidence about their citizens, and have traditionally relied on the wiretap to gather evidence of criminal activity. J. Edgar Hoover used evidence gathered in this way to harass political dissenters and activists. He amassed a huge collection of secret files on political figures. What would happen if the state  could no longer do this? If everything is encrypted, the security services may be unable to recover any useful information. This worry has led the U.S. government to lobby for legislation against the use of cryptography. This story does not generally hit the headlines. It seems esoteric – codes and ciphers are the stuff of spies. But it raises important questions about government powers and our right to privacy. What is so fascinating about this scenario is that it is the opposite of dystopias like 1984. In these nightmare worlds the government knew everything about us. We may be facing an entirely different problem.  So far U.S. governments have been relatively successful in suppressing the spread of encryption technologies both at home and abroad. Will they be able to stop the genie getting out of the bottle? What seems clear is that codes and cryptography will continue to play a vital role in our world for many years to come.

Advertisements

One Response to Codes and how to break them

  1. Alberto says:

    Abe Slaney, from Chicago…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: