# Cryptography

#### Tag: cipher

In the previous chapter of The Code Book, Singh discussed cryptography during the time of Mary Queen of Scotts. During her time, cryptographers needed to be highly skilled and educated people who spent time dedicating themselves to the art of code breaking. The average person could not decipher encrypted messages. As I mentioned in an earlier blog post, the education level of the average person was very low. An educated person was one who was extremely privileged. Because of this, certain ciphers used during the time were generally not difficult to decode, but still required a specialist.

Cryptography became more widely used after Mary Queen of Scots, which meant that more and more people were learning the art of reading cipher text. Because of this, a more complicated form of cryptography needed to be created. Fortunately, Vigenere cipher was in the process of being perfected. Vingenere ciphers uses two or more alphabets instead of one, meaning each letter is equivalent to two (or more) cipher letters. This substitution cipher could be extremely confusing, which is why keywords were used to assist in discovering the alphabet. The addition of keywords made it so that only the people who had communicated with the author of the text had access to its cipher alphabets.

People say love is the most powerful force on Earth, and if that is the case, then the lure of money is an extremely close second. The Beale Papers basically gave an open invitation to a \$20 million treasure (over \$500 million in today’s money!) just with a catch– decipher some unbreakable ciphers. With that much money at stake and enough desperation, no task seems too large.

I agree with Singh’s conjecture that the entire story could be a made up ploy to profit off other’s greed. If this scenario were the case, the anonymous author would be humored to learn that in the 21st century, there are still individuals attempting to break the Beale Ciphers.

If professional cryptanalysts have been unable to decipher Beale’s message, what would cause the average Joe to believe he can? It’s not only the desire to find a gigantic sum of money, but also lust to be “first” or “special” or the best at something. One may be thinking If I decipher Beale’s code, I’ll be rich, AND everyone will know me as the smartest person ever! In addition, people often have a heightened sense of themselves, especially their personal skills. As a result, you get amateur and probably first time-codebreakers undertaking a task far beyond their abilities. It is important to realize when something is outside your limits. You can’t do calculus before knowing how to add, you can’t run a marathon without knowing how to walk, and you certainly can’t break an “unbreakable” cipher without extensive knowledge and practice with the subject.

On page 41 of Simon Singh’s The Code Book, Singh makes the interesting assertion that “a weak encryption can be worse than no encryption at all.” This seemingly paradoxical statement reveals how hubris can be the downfall of any great cryptographic scheme. Best exemplified in the case of Mary Queen of Scots, when two parties deem a cipher or code secure and therefore write their messages freely with no fear of discovery, this overconfidence can ultimately result in their downfall. Had Mary’s messages not been so explicitly linked to the assassination plot of Queen Elizabeth, and instead been deliberately vague, the evidence against her would have been weak enough to possibly save her life.

The beheading of Mary Queen of Scots should serve as a cautionary tale to any modern cryptographer to remember the possibility that your enemy has already cracked your code, or that another part of the world is already much advanced in the art of code breaking. A good cryptographist should take extra precautions when crafting their message to ensure that, if the encryption fails, the implications of their message, should it land in the wrong hands, are as limited as possible. No code should be deemed unbreakable by its creators, and stenography and subtlety of language are just as crucial in encryption as a strong cipher or nomenclature.

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.

Based on the rapid development of the entire planet in all aspects of the nineteenth century, it is not just industry, art, religion, and politics. The most important thing is that the war broke out more and more frequently.

For an example，throughout the war, password deciphering may be the most protected secret of the United States after the atomic bomb. Even those working in the Naval Communications Building have very few people who know the existence of these machines and their uses. These machines, which are hidden deep in the chamber, look strange, mostly composed of gears, rotors, sprocket teeth, electric lights and dials. Their official name is “Rapid Analytical Machine” (RAM), but in private they have mysterious and quirky nicknames, such as the copper snake, gypsy, and nuisance. For the few people who are fortunate enough to understand their uses and principles, these machines represent the core secrets of the United States, that is, to decipher the complex passwords of Japan and Germany, the most secret is to decipher the password of the Soviet Union. In the 1840s, they took computing power to the limit.

Until the WW2, with the boring of the computer, the era of brute force cracking is coming, and mathematicians dominate the password war. Leading to the loss of the Atlantic battle in Germany, the card was seen by the Allies. The information age was opened after the war.

Now, although the computers’ calculate ability are very mature, but there are also many ciphers need to be decoded, such as the Beale Cipher. Most of the ciphers we used today are helpful for us to protect our privacy, and only a little part of people decipher those ciphers. Usually, some ciphers are made for practice human’s brain nowadays.

The only records we have of cryptography used in the past come from people with the resources and technical skills to encrypt and decrypt messages, whether they were World War II spies, Arab scholars, or Greek military leaders. Although not all of the encryption methods mentioned by Singh in Chapter 1 required exceptional resources (the Spartan scytale method used only a staff and parchment), they all required an understanding of the concept of encryption, which was a largely unused technique prior to the development of each cultures’ breakthrough cryptography methods. Additionally, it’s a reasonable assumption that cryptographers would have wanted to keep their methods secret from the general public, as knowledge of the code would have weakened the encryption. Therefore, I believe that the reason so few records of cryptography exist outside of well-resourced people is because they closely guarded the secrets to their specific codes after development, which, once revealed, often turned out to be simple and did not require exceptional resources.

However, this only applies to encryption and the building of ciphers. The techniques the Arabs developed for the decryption of substitution ciphers required extensive knowledge on linguistics and math, as frequency analysis only works if the cryptanalyst is familiar with the mechanics of a language.

Over time, techniques for encryption and decryption have been constantly improved in an arms race to create more secure codes and ways to break them. Nowadays, the most secure encryptions are created using supercomputers and unique encryption keys, which arguably requires more exceptional resources than simply deciding on a certain substitution cipher. However, the most significant difference between cryptography now and then is that very secure encryption is available to the general public, while people in the past who weren’t involved in the encryption and decryption process had very limited access to effective cryptography. Although only the developers of specific encryptions know the specific mechanics, they are made available for anyone to use.

The quote “weak encryption can be worse than no encryption at all” describes the phenomenon in which sender of an encrypted message is more likely to state clearly and in detail his or her intentions than when writing a unencrypted message with full knowledge the enemy will be inspecting the text. When writing an unencrypted message, the sender will be more inclined to make the contents of the message vague so it is understood by the receiver but confusing to the interceptor. The sender would also take caution not to reveal any secrets in the message which could benefit the enemy or implicate the sender and allies because the sender is acutely aware of the lack of encryption. However, when a text is encrypted the sender has faith in the security of the encryption and writes messages believing the enemy will not be able to interpret the text. As the in case of Queen Mary’s cipher, she and Anthony Babington did not consider the possibility their cipher could be broken and thus, they communicated their plans of revolt explicitly. Furthermore, weak encryption in particular is dangerous because it can be easily cracked and used by the enemy to deceive the correspondents. This is perfectly illustrated in the case of Queen Mary’s cipher which was broken by Thomas Phelippes and used against Queen Mary and Babington to incriminate Babington’s men.

This implies for those who encrypt secret messages, they should still communicate vaguely, as though their messages are not encrypted and are being inspected by enemy eyes before reaching the receiver. Additionally, correspondents of encrypted messages should be cautious when writing implicating secrets, as Babington was not, resulting in the capture of his men. Babington could have better protected the identities of his men by describing their qualities in his message without revealing their names. When a cipher is used, the strength of its security should be kept in mind, as a weak cipher could become an enemy’s advantage. As the cipher of Mary Queen demonstrates, unsuspecting faith in the security of a cipher can be more dangerous than using no cipher.

I see The Great Cipher is synonymous to the simple monoalphabetic substitution cipher, just on steroids. The concept is the same—one cipher letter or multiple cipher numbers represent a number of plaintext letters. However, what makes the two so different in their difficulty to be cracked lies in the sheer possibility of combinations that could be created from each cipher.

The cipher key was not limited to just one letter replacing another; instead, a few numbers represented syllables. Thus, this opened up a lot more possibilities to stump cryptanalysts.

Before, it was clear in monoalphabetic substitutions that one cipher letter represented one letter of the plaintext. Therefore, we were only faced with a certain amount of different cipher keys to deal with. Even though a completely random monoalphabetic cipher would yield so many possibilities, frequency analysis could easily help decipher it. But now with a cipher with undeterminable characteristics (does “1” represent a letter or does “123” represent one letter? Or a syllable? I’m guessing they did not know how many numbers represented how many letters), patterns that lead to the cracking The Great Cipher become less obvious. There is a multitude of syllables that exist in the French language, making combinations all the greater in amount. This increases the difficulty because although we might see a string of numbers or other patterns, the specific plaintext it refers to—whether it be just one letter or two or three—has much more holes and traps.

In addition, many people might still be familiar with only the mono alphabetic substitution (since cryptology was still developing), so people might have not thought in a “numbers now represents syllables” way just yet. A reason for the people’s unfamiliarity would be that since the Great Cipher was made by two people (the Rossignols) who already knew how to crack extremely hard ciphers, their knowledge of the weakness of strong ciphers bolstered their knowledge to build something knew that didn’t fall into the traps of the simple mono alphabetic substitution cipher. As such, because they thought five steps ahead of everyone else. In addition to their death, the Great Cipher remained unsolved for 200 years because the only people smart enough to crack hard ciphers and used the weakness of those to create a new super hard to crack cipher had died. In short, their knowledge of the Great Cipher died along with them until it was unearthed 200 years later.