Cryptography

The History and Mathematics of Codes and Code Breaking

Month: September 2014 Page 3 of 6

Telegraph Security

Telegraph SecurityHere’s the telegraph security diagram I shared in class today. To better understand it, consider the following scenarios.

Scenario 1a – Messages Sent via Horses, Agent C Decrypts Messages

In this scenario, once Agent C intercepts the ciphertext as it travels via messenger between Agents A and B, he’ll decrypt it, then get on his own horse and travel to Agent B’s location to cause trouble. (There is no Agent D in this scenario.)  How much time does Agent B have to act on the message before Agent C shows up? Assuming Agent C and the messenger are riding horses with equal speeds, Agent B has precisely as much time as it takes Agent C to decrypt the message.

Scenario 1b – Messages Sent via Telegraph, Agent C Decrypts Messages

Now, after Agent C intercepts and decrypts the message, he sends it along via telegraph to Agent E, who then causes trouble with Agent B. How much time does Agent B have to act on the message before Agent E shows up? Again, precisely as much time as it takes Agent C to decrypt the message. Switching from horses to telegraphs doesn’t make Agents A and B any more vulnerable.

Scenario 2a – Messages Sent via Horses, Agent D Decrypts Messages

Now suppose that Agent C merely intercepts the message and gets to Agent D. Agent D decrypts it, then travels via horse to Agent E, who causes trouble for Agent B. How much time does Agent B have to act before Agent E shows up? That would be the time it takes to decrypt the message and the travel time between Agents C and D and Agents D and E. Assuming Agent D isn’t located along the A-B route, this means that Agent B has more time than in Scenarios 1a or 1b.

Scenario 2b – Messages Sent via Telegraph, Agent D Decrypts Messages

Same thing, but with telegraphs. Now there’s no travel time involved, so Agent B is back to having only the time it takes to decrypt the message as his lead time.

What’s the takeaway here? If you’re Agent A, then the advent of the telegraph means your buddy Agent B has less time to act on your messages, assuming the other side has to get their intercepted messages to Agent D for decryption. If there’s no Agent D, then it doesn’t matter if you’re sending messages via horses or telegraph, but if there is an Agent D, then you’ll want stronger encryption than you used to have.

Academic Integrity Resources

Victory!Some links relevant to our discussion of academic integrity and plagiarism:

Image: “Victory!“, Jannis Andrija Schnitzer, Flickr (CC-BY-SA)

A World That Wanted Privacy

As more and more people gained knowledge of the existence of cryptography, the possibility of more secure communications wouldn’t have been all that unappealing a prospect to the common man. In the later 1800’s, education would have been more prevalent so literacy rates would have gone up significantly. A more educated population could better see the benefit of secure communications and records. Information like business secrets could be encoded to give some degree of deterrence to thieves, and messages sent through an easily intercepted medium such as the postal service would be more secure.

Additionally, with the invention and widespread use of the telegraph, the number of communications greatly increased. Of course, due to the nature of the telegraph, unless you had your own relay and message station, all messages had to be sent out through an operator. The idea that all telegrams would be read without it even being intercepted by a third party would be unnerving for many. This doesn’t even account for the possibility that a telegraph operator might be paid to reveal important messages despite their being sworn to secrecy. Even a simple level of encryption would prevent nearly every instance of a private message being intercepted, barring a third-party interception through the telegraph line.

Today, there is also an interest in ciphers among younger people in trying to keep short messages secret. However, for most people, a simple encryption of a message takes time, and deciphering it is very easy with the invention of digital computers (along with the hundreds of web tools that can decipher a message in seconds). I feel the general public today are more interested in the overall security of a communication method and not necessarily the mechanism behind its action. For example, while many people might know an “https” means a secure connection, they might not care about the mechanisms of the public key encryption used to ensure that security. In general, they are more focused on the end result of various security measures, and knowing the overall degree of protection given.

Power of The Great Cipher

There exists a never ending battle in the field of cryptography between those coming up with encryption methods and encrypting messages to those trying to break these ciphers. This back and forth is an ongoing and fairly quick process with each side constantly making advancements. However, the 2nd chapter of Singh discussed “The Great Cipher” which was the cipher used by Louis XIV, which remained unbroken for 200 years. The obvious question is then, what made this particular cipher so difficult and take so long to crack?

There are multiple reasons for this, starting with the complexity of the code itself. The code was comprised of 587 unique numbers with thousands of numbers altogether. This alone makes it very difficult to decipher as if you were assuming these numbers corresponded to letters or a set number of letters, as there would have to be repeated elements of the cipher text corresponding to the same thing in the plain text, which would render frequency analysis practically useless. This leads into the next reason why the cipher was so secure, which is that the numbers corresponded to syllables instead of letters or groups of letters. The majority of the ciphers up till this point revolved around changing something into individual letters, so this not being the case probably threw off many would be deciphers of the text.

Lastly, one of the main reasons this code was so secure is the technology that was available at the time. Nowadays with our computers, excel files, other programs and whatnot it is fairly simple and straightforward to do things such as frequency analysis or substituting in sequences in the cipher text for what we assume it to be in plain text. However, back in the 17th and 18th centuries performing these tasks by hand (especially with a text thousands of characters long) would be an incredibly daunting task. The sheer time commitment it would take to decipher a text of this length would be enormous and this probably discouraged many people from attempting to decipher it.

Agony columns the old version of love notes

There was increased interest in cryptography and this interest still persists today. Part of the drive in this interest was the telegraph. This is due to the need to protect and hide personal or private information that would be sent over the telegraph. An example of the increased awareness and use of encryption was shown in the “agony columns” in some newspapers. Forbidden lovers used these columns quite often during the Victorian era in England. This greatly reminds me of Romeo and Juliet except quite a long time later. This would have been a more efficient and safe way of communicating for them but that didn’t happen. These columns did spark the curiosity and interest of cryptanalysis. Because lets be real who wouldn’t want to see the secret messages of forbidden lovers. These columns would be like Victorian reality TV for those who decipher the codes. Lovers did not only use these columns, they were also used to create challenging ciphers for others to solve. I guess people would do this just for funsies since there is probably nothing else do in the Victorian era. These columns were also used to criticize political figures. During this era, speaking out against public officials was greatly frowned upon so this was a way to get some freedom of expression.

Environments that promote or discourage confidence in codes

Before the development of the Vigenère cipher, those sending encrypted messages understood that if the message was found, any good codebreaker would be able to decipher it. Mary Queen of Scots experienced a very different environment. She had total faith in her cipher and never guessed that anyone would be able to decipher her messages if they were intercepted. Because of this, Mary Queen of Scots did not bother to write discretely about her plans with her aides.
Before the Vigenère cipher was developed, those that wrote and sent encrypted knew the risk of interception did not speak so plainly about the topic of the message as someone that had confidence in their encryption would. This kind of environment that fostered insecurity was complete with numerous Black Chambers. Black Chambers were centers where messages intercepted through the mail system were then analyzed and attempted to be deciphered. Through this, valuable messages that had been deciphered could be then given or sold to various European powers as crucial intelligence.
Due to these kinds of operations, there was no way for people to be totally confident in their ciphers, something that got Mary Queen of Scots executed. The development of Vigenère cipher allowed for a greater confidence in the security of people’s messages.

Be vague and Roman Numerals

After the execution of Mary Queen of Scots but prior to the development of more complex ciphers, like the Vigenère cipher, “anybody sending an encrypted message had to accept that an expert enemy codebreaker might intercept and decipher their most precious secrets.” (Singh, p. 45) Because of this, it is safe to assume people writing the encrypted messages would still be very careful with what they were actually saying, and how the things that they wrote could potentially incriminate them. Messages would have been written in vague enough language that even if the text were to be deciphered, the cryptanalysts would either not be able to tell what the exact plan was or, even if they could figure it out, would not be obvious enough to be used in a court of law. (I don’t know how the rules for this worked in that time but today people can claim the way a message is interpreted is completely wrong.)

Going off in a completely different direction now, as I was reading I was thinking of different types of ciphers. When I the name Louis XIV, I fixated on the Roman Numerals. It made me curious about the use of Roman Numerals in cipher alphabets. I think it would add a layer of complexity because the cryptanalysts would have to try to figure out which combinations of letters would represent a number, and then which letter was represented by that number. One weakness, however, would be that it would be very easily identifiable as Roman Numerals because of the small number of letters used in Roman Numerals. I tried to look up Roman Numeral ciphers but nothing came up on a quick Google search.

Temptation and Treasure

Although thousands of intelligent, well-trained people have attempted to break the Beale ciphers, they remain a mystery. However, the defeats of the past do not deter the many people who still try to crack the code. Some of these people are driven by the thought of the treasure buried by Beale years ago. A potential reward of $20 million can be highly motivating. For most, though, it is likely more than that—after all, trying to break an unbreakable code is sort of terrible as a get-rich-quick scheme. Instead, it is the tale itself that is the draw. A mysterious stranger, buried treasure, coded notes—it all reads like an adventure story, and that’s something people want to be a part of.  We are surrounded by stories like this our whole lives, and as children we play at being pirates following a map to the buried chest of gold. Attempting to solve the Beale ciphers makes this childhood game a reality.

Additionally, some cryptographers reason that someone has to eventually come up with a solution—so why not them? We often think that we will be able to be the one who solves a problem even if we’ve seen many people fail at the same task. This can be commonly seen in simple everyday tasks. If one person in a group tries to open a door and gives up, saying it’s locked or stuck, often others will test the handle for themselves. Even if they don’t consciously realize it, they believe that they will be able to do better than the first person—somehow if they jiggle the handle differently or apply enough pressure the door will open for them. The Beale ciphers are a locked door behind which lies the answer to a hundred-year-old mystery. It’s just too much to resist.

Persistence is the “key”

New things can seem very challenging at first. For example, a question seems so much simpler when we already have an answer to it. However, the question without the answer can seem very daunting, making it seem too difficult to even attempt. This is very similar to how the pattern of ciphering worked. First there was the shift cipher. When people realized what it was, it was extremely simple to decipher. Then there was the substitution cipher. This took a while for people to decipher. Some gave up, but then the Arabs developed frequency analysis. Once people understood frequency analysis, it was relatively easy to break.

Then came the Vigenere cipher. People were baffled. They didn’t understand how to break it, so many gave up in the process. They understood the concept but did not understand how to cryptanalyze it. Because people did not have a known way of breaking into the cipher, they simply gave up. However, it took cunning and persistence from Babbage to finally crack it. Once the way to crack it became relatively well known, people could easily decipher Vigenere ciphers with a little bit of time.

The reason why people gave up so easily is not because they did not want to break it but because they did not know where to start. With a new cipher, the cryptographers have the advantage over the cryptanalysts. The cryptanalysts were so used to frequency analysis that when a new “unbreakable” cipher came out, they did not know how or where to tackle it from. This led to lots of confusion and most of them simply giving up rather than persistently experimenting with different techniques.

Unbreakable Cipher

The Great Cipher used by Louis XIV remained unbroken for 200 years.  What were the factors that led to such a secure cipher?

The Great Cipher, invented by Antoine and Bonaventure Rossignol, was one of the toughest codes to decipher. There are some very important factors to consider when trying to understand why it may have taken so long for someone to crack it. First of all, Antoine got his recognition for deciphering the letter that resulted in a victory for the French. With his work in cryptanalysis he and his son were appointed to the senior positions in the court, so by this time he has already established his reputation as being one of the best cryptanalysts in Europe. His expertise gives him an advantage because he can recognize the weaknesses in ciphers, therefore when he has to create his own, he would know how to make it indecipherable. Of course, this is relative because ciphers can only stay indecipherable for so long before new methods are developed by cryptanalysts to break them. Second, it is usually a weakness to have a long cipher text because it gives the other person a better chance to recognize patterns, however, this cipher had thousands of symbols with only 587 of them being different. This only makes it a lot more difficult for someone to decipher it because it gives them too much information to work with which instead of showing a pattern, creates confusion. Finally, the more time that passes, the harder it is for someone to decipher a text because of lack of contextual clues. When it is the same time period, there is a better chance to crack a cipher text because you would be fully immersed in the linguistics of that society. Since language evolves over time it is best to try to decipher a code as soon as possible. Because of the complexity of the Great Cipher it did take a lot of dedication and persistence for Bazeries to finally crack it after 200 years.

Page 3 of 6

Powered by WordPress & Theme by Anders Norén