The History and Mathematics of Codes and Code Breaking

Month: August 2019 Page 2 of 3

Weak or Bust: Why the Strength of an Encryption Matters

There are two reasons as to why a weak encryption can be worse than no encryption at all: the first being a sense of overconfidence that can prove fatal if the encryption is decrypted and the second tipping off decryptors who often become more cautious and further scrutinize your messages. As explicitly outlined in the book, Mary Queen of Scot’s overconfidence clearly demonstrates the negatives of not creating a strong cipher. By disregarding caution and placing misguided faith in a weak cipher, she inadvertently revealed more information than she would have had she exercised caution. It’s also necessary to note that Mary Queen believed she had a strong cipher, thus providing one more reason as to why caution must always be exercised even if you believe your code to be unbreakable. This strain of thought can actually be applied to a multitude of situations: when engaging in a secretive activity or one that you would not prefer others to know of, it’s better to err on the side of caution.

But perhaps more importantly, a bad cipher may warn the enemy of an impending code. A seemingly legible message that holds a deeper meaning may be more deeply scrutinized if the decryptor suspects a cipher at play. This can be even more dangerous as a heightened sense of awareness and caution could lead to both direct and indirect long-term effects for sender and recipient. Thus, no encryption can often be more effective than a poorly-made one.

It’s necessary in an increasingly complex and secretive world that people realize that whatever codes they create can be broken by online tools accessible to billions. It is both important and necessary to exercise restraint and caution when sending hidden messages – failure to do so may result in harsher penalties than if you had not attempted to encode your message at all.

Yes, You’re Smarter than a(n Ancient) Fifth Grader

The first chapter of Simon Singh’s The Code Book introduces the historical roots of secret writing. Steganography, the practice of hiding the existence of messages, dates as far back as to the Greco-Persian Wars in the fifth century B.C. The practice of cryptography was a novel and unchartered concept for the early Greek, Roman and Chinese civilizations. Over the centuries, military conflicts and the increasing demand for national security begged for the obscuring the meaning of messages. Without knowledge of the key, encrypted messages were effectively indiscernible until the Arab development of cryptanalysis in the first century A.D. During a millennia in which literacy was a luxury of only the aristocracy, only the finest minds were tasked with the creation and cracking of codes.

Modern cryptography, however, takes on a much different form. The current state of science and technology is infinitely more advanced than it was in medieval times, and the invention of the internet has made information vastly more accessible. Amateur cryptanalysts today are capable of employing frequency analysis without having been previously exposed to it because they have knowledge of computing and problem solving unpossessed by the early world’s most brilliant minds. Exposure to modern technology, from encryption used by computers to the teachings of a high school algebra curriculum, means that the codebreakers of today are far more equipped to solve simple codes than their predecessors.

Singh wrote that “Cryptanalysis could not be invented until a civilization had reached a sufficiently sophisticated level of scholarship in several disciplines, including mathematics, statistics, and linguistics.” Ergo, the brightest minds of the early Arabs, in their invention of the practice, proved themselves to have mastered these pillars of scholarship. Each subsequent civilization has had the opportunity to employ and build upon this knowledge; now, almost two thousand years later, even the amateur cryptanalyst is capable of this once ingenious method, which then begs the question, where else will we go from here?

Inviting Suspicion

We generally don’t bother to encrypt messages if we have nothing to hide. By using a code or cipher, it’s implied that the contents are sensitive or illicit in nature. In fact, as Singh points out, they’re likely to be more explicit because the encryption lulls the sender into a false sense of security and they write more openly about their plans. So by putting too much faith in an easily breakable cipher, you risk incriminating yourself further.

In addition, by using a cipher or code that is easily identifiable as such, you automatically invite suspicion.  In her trial, Mary claimed she knew nothing about the plot, but even without decrypting the message, it was clear she was corresponding with conspirators. Also, the fact that she didn’t write her message in plain text implies she was concealing something. In situations like these, it may be better to stick to some sort of code that masks the message as something innocuous, or some sort of steganography that hides the secret message within another. By finding a way to hide a message in plain sight, it helps divert suspicion in the first place rather than relying on an imperfect cipher once you’ve drawn attention.

To Code or Not to Code

What Singh is implying to coders is that cryptographic messages of high importance should be done well. For instance, if the contents of the message are a correspondence between about a politician having an affair then; it would make sense for the code to be very strong so the politician’s job isn’t jeopardized. 

On the other hand, if it is a playful message being sent between friends with no real significance then the consequences of it being coded are not drastic. It doesn’t make a difference how strong the code is. If the stakes of being caught are high, then make a strongly coded message that nobody will figure out.

Singh means that if instead of a message being poorly coded and it was just straight up then it would be more of a; “Yeah, this is hard evidence against you and there’s no denying it.” Then it would be used and that would be that. But because it was supposed to be hidden it adds an extra layer of distrust to the case and provides further justification for conviction. In Mary Queen of Scots situation, she was doing the most incriminating offense possible towards the Crown and the fact that she made a code to hide her plans hurts her legacy in the end. 

The Ubiquity of Cryptography

In the opening pages of the Simon Singh’s The Code Book, he asserts that cryptanalysis – the science of de-encrypting encrypted messages and text – was only possible once the upper echelons of society had reached a sufficient level of mastery in mathematics, statistics, and linguistics. This argument is predicated on the idea that the very practice of encryption in and of itself was fairly new; an example of the rudimentary nature of the practice is the frequent use of simple substitution and shift ciphers, both of which intrinsically limit the number of possible permutations of the encrypted message i.e. the 25 possibilities for a shift cipher. In that sense, the encryption techniques of yesteryear were on the bleeding edge of espionage, and thus demanded the most qualified minds of the time to ponder and decipher them.

However, this ultimately begs the question of how modernity has rendered some of the most complex ciphers of the past obsolete, mere puzzles to occupy one’s time on a long flight or car ride; even a grade-school child could decode a simple shift cipher in a reasonable amount of time.

The reason for this paradigm shift is two-fold. Firstly, modern media is inundated and saturated with puzzles for people to solve. The advent of technology has turned codebreaking into a game, a passtime, one that millions upon millions of people enjoy on a day-to-day basis. Some of the highest grossing apps on both iTunes and Google Play in recent years have involved unscrambling words or connecting certain images to keywords. Altogether, everyone from children to adults are nigh constantly training themselves in rudimentary codebreaking, unconsciously creating heuristics and algorithms to solve any other such puzzles that may come their way. In that sense, amateur codebreakers have, unknowingly or not, likely already been through an intensive training program in cryptanalysis.

Secondly, for codes that escape the powers of the human mind, there exists the accessibility of the modern computer. With billions upon billions transistors available to anyone with the monetary capital, the bulk of the mathematical and statistical expertise has been outsourced to the raw computing power of the computer. Able to test millions of cases in the fraction of a second, amateur codebreakers with a powerful enough processor and a bit of creativity are able to decode messages that would have taken the scholars of the past days or weeks in a matter of minutes.

Technology and the ubiquity of cryptography has thus made cryptanalysis into a hobby of sorts, turning a tool of high stakes espionage into a low stakes passtime.

Weak Encryption VS No Encryption

The meaning of the sentence is that the consequence which is caused by weak encryption is worse than that of no encryption. First of all, a weak encryption can be easily deciphered. Once it has been deciphered, the enemy will get to know the hiding information and know the secret between lines. In the scenario, it causes the failure of Babington’s plan and causes the death of the members and Mary Queen of Scots. Secondly, the weak encryption creates an illusory secure. This means that both Babington and Mary Queen of Scots think their plan will not be reached by their enemy. With this feeling, they just keep on using the same method without doubting the possibility of exposing information to Walsingham. Finally, weak encryption creates secrets compared to no encryption. The enemy will spend more time on decoding it in order to get to the secret and get prepared for the scheme of their enemy.

For the people who want to hide their communications, they must use strong and new cryptographic methods to keep their information from deciphering easily by their enemies. In this story, the method of using frequency of the symbols has already applied at that time. Although Babington uses new symbols and kind of different encryption, Phelippes just uses the frequency method to decipher it. The methods of encryption decide whether the secrets can be easily got by enemy or not. What’s more, the sender and the recipient need to change their encryption from time to time and they also need to make sure the person who send the message is not a spy. With all of these, the possibility of divulging a secret will decrease and creates a safer environment for transfering the secrets.

Cryptography Changes History

In Chapter 1 of The Code Book, author Simon Signh introduces the reader to the concept of cryptography. In this chapter, Signh gives explanations for what codes and ciphers are, examples of specific codes and ciphers, and many examples in which codes and ciphers were used. Many of the examples Signh uses in which cryptography was used are from long ago and involve political and military leaders and major events in history. This begs the question of why Signh chose these examples to talk about the concealing of messages. It seems that he used them not because they are the only examples that have survived or because cryptography requires exceptional resources. I believe that Signh used these examples because he had to start at the beginning of the history of cryptography and at the same time try to sell cryptography as an interesting concept. 

Signh’s goal in this chapter is to introduce cryptography and its history, so naturally he will start with early examples of cryptography. Yet he doesn’t just pick any early examples; he picks the ones that had the biggest impact on major events. The first example of hidden messages in history Signh uses is Demaratus and the battle between Persia and Greece. In this example, Demartus, a greek living in Persia, took the wax off of a table, wrote a message warning the Greeks of Persia’s plan to attack on the wood, rewaxed the table, and transported this table to the Greeks. The Greeks were able to find and read Demartus’ hidden message, allowing them to prepare for the attack. I believe that Signh used this example not to demonstrate that only a few examples of hidden messages throughout history have survived, nor to demonstrate that hiding messages requires advanced resources (all that was needed was a table), but because this example entices the reader into the subject of cryptography and explains how impactful it can be. Hiding messages is one thing, but hiding messages that change the outcome of entire wars, that is exciting and important. 

Signh’s use of these examples as his first examples in his book casts meaning on what he sees as the purpose of cryptography in today’s world. Sign doesn’t just value code making and code breaking for their own sake. He understands that they are, today and in the future, tools that can change history.

The Cryptographic Needs of the Common Man

It is said that history is written by the winners, but many forget the second part of of that statement, that history is also written about only the powerful and important. The examples of cryptography that survived throughout the ages were those that caused great uproar, such as the beheading of Mary Queen of Scots.

Besides, the common man did not have much need for cryptography before the invention of modern technology. Unless communicating about a potential insurgency plot, most people did not need any form of secret keeping. It was often unnecessary to require a secret address to the nearby woods where their secret stash of gold was buried.

The primary difference between the times then and now, is the amount of information on a person that could be used with malicious intent. Compared to the 16th century, where a person’s identity was comprised of a family name, some heirlooms and the land upon which they lived, today every person is a collection of numbers and electronic impulses. Whether it is Social Security, bank account numbers, credit card numbers or even account passwords, today there is every possibility for the threat of theft.

As society continued to advance away from the tyrannical rule of the monarchies that was so well documented in chapter 1, people began to look towards their right to privacy. In the 16th century the only reason to conceal common correspondence was usually an indication that there was something to be concealed in the message. Today however, people use encrypted communication for every day conversations, to ensure their privacy, no matter the message. Electronic communication means that almost any message could be at least intercept, an impossible task with physical messages. The importance of encryption for the common man has grown tenfold.

The Consequences of Weak Encryption

One may assume that any type of encryption is better than no encryption, but for many situations, that may not be the case. Take the story of Mary Queen of Scots. Her weakly encrypted correspondence with Babington was interpreted by expert cryptanalysis Phelippes, leading to her eventual execution. Mary and Babington were so confident in their substitution cypher that they explicitly spoke about their plans to assassinate Queen Elizabeth. Unbeknownst to them, there had been huge advances in the field of cypher-breaking. Had Mary and Babington possessed an accurate sense in the weakness of their cypher, their conversation would have been far more discreet, taking care to discuss their plans in a more cautious manner.

This form of explicit versus discreet communication can be seen in everyday situations where cyphers are not involved. For example, if a group of bilingual people want to talk about someone nearby without their knowledge, the group will most likely switch to the second, less widely-spoken language. They would talk about said person without any filters, as they’d assume that no one around them would be able to understand what they are saying. However, if the group of people aren’t lucky enough to have a second language to fall back on, they will probably communicate in a more discreet manner, with facial expressions and gestures, rather than clearly spoken words.

The case of Mary Queen of Scots could be a lesson to anyone who wishes to communicate through encryption- communicate as if your cypher is breakable, no matter how secure you might think it is.


Blog Assignment #1

For your first blog assignment, write a post between 200 and 400 words that responds to one of the reading questions for Singh Chapter 1.

Please give your post a descriptive title, and use the “Student Posts” category for your post. Also, give your post at least three tags, where each tag is a word or very short phrase (no more than three words) that describe the post’s content. You’re encouraged to use tags already in the system if they apply to your post.

Your post is due by 9:00 a.m. on Monday, August 26th. If you have any questions about sharing your first post here on the blog, don’t hesitate to ask.

Here are some basic instructions for posting to WordPress that you might find useful. Also, via xkcd, here’s the secret to using any kind of computer technology.

Page 2 of 3

Powered by WordPress & Theme by Anders Norén