Secrets, Lies, & Spies: A History of Ciphers
ETHCC 3 · March 2020 · 25:20
Daniela Osorio surveys the history of ciphers through the framing of secrets, lies and spies.
Speakers
Topics
From ETHCC 3, hosted by Ethereum France.
Transcript
yeah you
I do okay hello everyone thank you for joining us and welcome to history of ciphers during these three days at FCC you're going to see over a hundred technical talks and workshops so rather than talk to you about the latest and greatest blockchain dev tools I wanted to do something a little bit later and perhaps a bit more esoteric and talk to you today about some really really old encryption tools so I hope to be able to take you back in time to the origins of the technology that served as the foundation in
catalyst for the current blockchain industry so that being said when you talk to protocol researchers about crypto they don't usually think of this as a reference to cryptocurrency but rather as a reference to cryptography so in the grand scheme of things modern cryptography hasn't really been around for that long and there was an essay published in 1945 by Claude Shannon of Bell Labs called a mathematical theory of cryptography and this is widely considered to be the starting point for modern cryptography so what happened before then from the beginning of recorded history codes and ciphers have been used to carry secret
messages so today we'll explore some of the most significant early encryption methods such as the Caesar shift cipher sky tail tree Matthias is tableau and the Visionaire cipher so as you can imagine the race to create even more complex code and this parallel race to break them continues today as computers strive to create unbreakable codes that you know are encryptions of sensitive data but actually before there were computers involved it was actually people who were trying to find novel ways of encrypting information manually so let's go back to the beginning codes and ciphers and in the modern world we
are constantly surrounded by different forms of encryptions in our daily lives so any time that we make a phone call send an email get money from an ATM buy something online we're really relying on invisible sophisticated computer encryption to protect our data and keep it private however the desire for secrecy and privacy is nothing new so for more than two thousand years ciphers and codes have played vital roles and politics the theater of war the fight against crime the search for freedom in all of its forms and many many love affairs so in fact worth have been won and lost Empire as a built or destroyed and individual lives have been transformed
by messages passing through in secret so with with so much at stake it comes as no surprise that there's a never-ending battle between cryptographers and code breakers nothing captivates the human mind quite like secrets and for some code breakers the challenge to unravel them is often motivation enough but there can be many other motivators such as idealism patriotism revenge money or a desire for greater knowledge so we can start with a quick definite some few definitions about the differences between codes and ciphers this is a bit of an oversimplification but essentially ciphers or systems for concealing the meaning of messages by replacing them
with other symbols so you replace an A with a letter D be made with a letter X and you go on and you create an a message that is in ciphered on the other hand codes place more emphasis on meanings rather than characters so they tend to replace whole words or phrases and typically they refer to a pre-established codebook so it makes it a little bit more challenging because you need to have that reference in order to be able to refer to the code and understand what those symbols translate into so in practice many cipher systems are actually hybrids of both cypher and
codes and that's sort of what adds layers of complexity to the to the inside frame and an encryption another difference between the codes inside first relates to their level of inherent flexibility so um codes are static because you have a codebook and you have a certain I don't know you've seen this in the movies on television there's always some reference a little black book or you know a New York tourism book that people refer to and now that's how they translate the messages but even if there's multiple potential meanings for a word it really comes down to a limitation in the number of variables that a code can have whereas a cipher has inherently more flexibility because it's able to transpose and add layers of complexity
into how how it creates that in cipher meant so one of the main ways in which crypt analysts break codes is actually by identifying repetition and patterns I'm gonna show that to you a little bit later but ciphers then add a lot of extra layers in order to try and counter that so at the end of the day there's a lot of different ways in which you can alter the algorithm in order to add complexity to the cipher back to the origins the history of secret right in and hidden messages stretches back to some of the world's most ancient civilizations the roots of cryptography can actually be traced back to ancient Egypt where scribes carving stories onto the rocks became to alter the heroglyph fix that they were carving so even
though this was not necessarily done to conceal a meaning it did serve to foreshadow the cryptography that was going to be developed later on and one of the earliest techniques of concealing information was actually discovered in Mesopotamia on a really really small tablet on the banks of the Tigris River and it dates back to 1500 BC and it had an encrypted formula for making pottery glazes so it was it was written in an unusual groups constant of vowels using something known as cuneiform science and it was simply done as a way for whoever had that to guard his you know what he considered to be a valuable trade secret and the Babylonians the Assyrians the
Greeks they all developed their own ways of hiding the meaning of their messages so the Greeks were pretty adept at hiding it under the wax of wax tablets inside of items doing them on people who were then the messengers and perhaps as far back as the 17th century the Spartans were well known for using a device known as a sky tail to carry secret messages using a rudimentary kind of transportations a transposition cipher so according to Greek historian Plutarch the way that it worked was as follows so whenever they would send out an admiral or a commander they would make two round pieces of wood exactly like one like the other in terms of their dimensions in terms of length
and general thickness and they keep one and they give the other one to the Envoy so whenever they want to start to send an important message they would take a long long piece of parchment paper wrap it around this piece of wood and then start to write normally and you get something along the lines of that where the parchment itself doesn't actually enable you to read the message unless you know what to wrap it around and then in the time of the Romans came the first major historical figure to be associated with a cryptographic method which was Julius Caesar so so Caesar is remembered as one of the most famous rulers of ancient Rome and he was born in about hundred before Christ in his military
memoir Gallic Wars he described how he obscured the meaning of vital wartime messages in case they were ever intercepted however his predilection for secret writing was not so secret so a Greek historian tranquillus recounted how if Caesar ever wanted to send anything confidential he wrote it in a cipher so the Caesar shift is actually a simple substitution cipher it gets the name from the way that the cipher alphabet is formed it's a monoalphabetic substitution cipher since each letter is replaced by one by only one letter and the same one each time appears in the encrypted message so that is to say if you if you look at tranquilizes explanation of this of the Caesar cipher
it really says must substitute the fourth letter of the alphabet namely D for a and so with the others if you were writing a like a quick script to create an automatic decoder for the Caesar shift all I would say shift and plus three and that would automatically Ducote anything and going back to substitution ciphers the same principle applies for any variation of them as long as you shift the letters further into the alphabet going from 1 up to 25 spots and the alphabet wraps around it so that was the very very first substitution cipher the next evolution of ciphers turned into cipher
disks so this new form of cipher can actually be traced back to the papal Court and was created by a Renaissance man known as Leon Battista Alberti so when the Vatican reached out to him and explained that they had a need to send encrypted messages he agreed to help and he wrote an essay back then which is their version of a white paper he wrote an essay in 1467 where he laid out the foundation for a completely new way of writing in cipher so he described a system of encryption using two concentric metal disks whose circumferences were divided into 24 equal parts the segments of the outer disk contained the letter of the alphabet and numbers 1 2 4 he left out three letters and there
was a couple of them that were not in the latin alphabet and then the cells of the inner circle contained the 24 letters of the Latin alphabet in a random order and so in order to send an encrypted message the letters or numbers in a plaintext message were read on the outer place and then they were replaced with letters that were found in the inner plate so both the sender and the receiver needed to have identical disks in order to be able to encipher and then decipher the message and they needed to also agree on the initial position for the two desks the two disks to be relative to each other so so far this is still just a monoalphabetic substitution but then Alberti took this sort of ingenious step forward where he decided
that after three or four words he would actually change the position of the index by turning the circle turning the dial and so and then he would also add he would substitute certain phrases with numbers from a codebook that he had and he merged it all together and that's how you have this encryption and so the reason that this that cipher disks came about was because the original forms of ciphers were a little too easy to crack because you could look at frequency of letters appearing in messages and figure out what the formula was because there's a pretty predictable way to the pattern in which letters appear in languages so the cipher disk then was trying to add
added variables of randomness and variability in order to further protect the messages from there we move on to trim a thesis tableau and he was a german-born Abid who wrote the world's first book on cryptography in 1518 it was a series of six books on codes and ciphers and he titled it poly graffia so through his work he set out what has now become the standard method for writing polyalphabetic cipher systems which is known as the tableau and if you look at it here the tableau is actually the all the letters of the alphabet written across so it's 26 columns across and 26
rows down and each row contains the alphabet in standard order but every time it shifts over one place similar to like this similar to the Caesar shift and so in order to write an encrypted message the sender would use the first row to encrypt the first letter the second row to encrypt the next one so if you see here in this version of like all as well even though there's two L's next to each other they're actually different letters because of how it goes down and so this makes it a lot harder to to break the code simply by looking at it and saying oh that must be the same letter over the next few decades of this of the 16th century this went through a
lot more of iterations but someone who really stands out in connection to the tableau cipher was a French man called Blaise D Visionnaire so the Visionnaire cipher or the chiefly Visionnaire is a development in polyalphabetic ciphers he was a French diplomat who published a really important book in 1586 called tractor shifflett which loosely translates into process ciphers his book took another step forward in the development of polyalphabetic ciphers by suggesting a series of keys that could be used to decide which rows the tableau to use one in ciphering messages so instead of cycling through the standard alphabet
the person sending the message would use them in a specific order in sequence which would follow the key so if you start to see his methodology it starts to resemble a little bit of what we do today and if you if you think about how he added an extra key what he meant was this version over here this is what's known is essentially like a public key for you know in ciphering and deciphering because the intended recipient would know that you just simply work your way down through the alphabet whereas in this version the the key meant for example let's it the key could be cypher right and so you would
start with looking at the first row the fall under C in order to encrypt the message and then you'd move your way through in order to overlay the key on top of the actual encryption so all right so following that you have the the black chambers so the Visionaire cipher is significantly harder to crack than the monel abetik cipher however polyalphabetic ciphers were slow to use and prone to inaccuracies even though they were highly secure so but because of that Naumann cleaners really kept their place as the method of choice for hundreds of years and people kept using the simpler versions of ciphers
and one of the most skilled cryptographers in history actually built his career around being able to construct really tricky nominators another frenchman his name was Anton Racine yell and born in 1699 and he actually became France very first full-time cryptologist and was a central figure in the courts of King Louie the 13th in King Louie the 14th so along with a son who was also cryptographer they invented something known as the great cipher and this was an enhanced monophyletic cipher that was particularly resistant to cracking so the cipher performed substitutions and syllables rather than individual works and used a series of hacks including having a code group that meant ignore
the previous code group this great cipher was used to encode the king's secrets but after both of those cryptographers died the details of that system were lost and it was such a great ciphering method that no one could break it for centuries and so several centuries later in 1890 a French crypto analyst spent three years of his life working on cracking the code and being able to finally recover the content of that correspondence for the Royal archives and that experience made it clear to the rulers of France that the interception of enciphered messages from rivals had a lot of value and they created something called the Kevin Anwar or the black chamber which was a team of French code breakers that was routinely
intercepting and reading the dispatches of foreign diplomats from the 1700s onwards so this institutionalized script analysis became common practice across Europe in the 18th century and the most famous was really known was operating in Vienna and was known as the geheime mckibben it can fly which translates into the secret legal office and this Vienna's Black Chamber was founded during the role of Empress Maria Theresa and was renowned for its efficiency Vienna was one of Europe's commercial and diplomatic crossroads during the 1700s and the passing of mail through the city and post offices were everyday and there was large amounts of it coming
through so the black chamber really made use of this activity and every bag of mail that was scheduled to go into each one of the local embassies was first brought into a secret room in the black chamber at about 7:00 in the morning and then the staff essentially opened all the diplomatic letters copied the important pieces reseal the letters and sent them on to their you know Morton morning delivery britain had its own form of institutionalized script analysis it was named the deciphering branch and they were essentially sent intercepted letters by the secret office in the private office which were the two aspyn's visions of the British post office the routine letter opening started as a thing for diplomats then it
moved into something they did for foreign content and then it eventually wasn't limited to messages from abroad politicians were soon finding out that their own correspondence locally was being monitored so as early as 1735 members of parliament started complaining that their letters had clear evidence of having been open to the post office and enough tampering so overall the skilled work of the black chambers increase the pressure and crypto and cryptographers to use more complex ciphers soon the pressure would be magnified with the donning of the area of electrical communication which started within ciphered Morse code over Telegraph and eventually led to the development of modern cryptography so that's it and I'm gonna finish finish by
reminding you all that we have an NCC after-party on Thursday that's it thank you anybody's got any questions by chance I couldn't ask it in French when when the guy finally broke so so I mean what he found a lot of respect from the local cryptographic community he didn't find great treasure the King wasn't writing about where he you know
hid his gold but but yeah I mean I think code breakers is an entirely different subset of people who dive into this just for the predominantly for the thrill of solving these puzzles yeah but thank you very much