Ciphers-art - 1/23/09 "Ciphers: Enciphering and Deciphering period ciphers" by Seigneur Lucien de La Rochelle. NOTE: See also the files: cryptography-msg, p-espionage-msg, poisons-art, poisons-msg, punishments-msg, Art-of-Arith-art, Med-Math-Sci-bib, alphabets-msg, scrpt-develop-art, Paleo-Scribes-art. ************************************************************************ NOTICE - This article was submitted to me by the author for inclusion in this set of files, called Stefan's Florilegium. These files are available on the Internet at: http://www.florilegium.org Copyright to the contents of this file remains with the author or translator. While the author will likely give permission for this work to be reprinted in SCA type publications, please check with the author first or check for any permissions granted at the end of this file. Thank you, Mark S. Harris...AKA:..Stefan li Rous stefan at florilegium.org ************************************************************************ NOTE: Other articles by this author and more information about the history of ciphers and cryptology may be found on his website at: http://www.freewebs.com/crypticallymedieval/ Ciphers: Enciphering and Deciphering period ciphers by Seigneur Lucien de La Rochelle Methods we will be covering: Ø Atbash: Hebrew cipher Ø Skytale (or scytale): transposition Ø Caesar cipher: monoalphabetic Ø Dark ages cipher: as found in the archives of Venice Ø Homophonic: multiple representations of some letters Ø Nomenclator: ciphers and codes together Ø Polyalphabetic: multiple representations of all letters Ø Cipher disk: modern version of Leon Battista Alberti's Ø Breaking a monoalphabetic cipher ATBASH: Reversing an alphabet end to end: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Z Y X W V U T S R Q P O N M L K J I H G F E D C B A SKYTALE (or SCYTALE): Ribbon, parchment, or leather wrapped around a rod or wand. Message is written along the length. When un-wound, message is transposed (jumbled). Carried to recipient, who has an identical diameter rod. Material wrapped back around rod of matching size to decipher. Scytale created by Lucien de La Rochelle. This one is in the form of a belt. CAESAR CIPHER: Rotational cipher, in which alphabet is "shifted" up or down a number of spaces. A Caesar cipher shift of three would be: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z D E F G H I J K L M N O P Q R S T U V W X Y Z A B C DARK AGE CIPHERS: Ciphers in which only vowels were enciphered with symbols. H+r+ +s +n +x+mpl+ HOMOPHONIC: In which multiple representations of most commonly used letters exist. Multiple representation cipher of Simeone de Crema circa 1401. Reproduction by Lucien de La Rochelle NOMENCLATOR: A method in which a combination of code words and ciphers are used together. A B C D E F G H I J K L M N O P Q R S T U V W X Y Z P O W U Y T I E Z Q L K J H G F D S A M N B V C X R King of Atlantia = Alpha Queen of Atlantia = Beta King of Caid = Omega Queen of Caid = Theta POLYALPHABETIC: In which each letter has multiple cipher representations ABCDEFGHIJKLMNOPQRSTUVWXYZ BCDEFGHIJKLMNOPQRSTUVWXYZA CDEFGHIJKLMNOPQRSTUVWXYZAB DEFGHIJKLMNOPQRSTUVWXYZABC EFGHIJKLMNOPQRSTUVWXYZABCD FGHI.... CIPHER DISK: Created by Leon Battista Alberti as a quick and easy method of polyalphabetic substitution. BREAKING MONOALPHABETIC CIPHERS: Be it a matter of international importance, or perhaps just being nosy, man has been driven to learn the secrets of others. In the 9th century, there came about a break through in decryption methods. Inspired by the research into the Qu'ran, scholars noticed certain letters appeared more frequently than others. Also, they noticed that certain words and spelling variations came and went as time passed. Some scholars took this frequency analysis and applied to messages that had been enciphered and found that it worked. They also found that different types of correspondence had differing types of arraignments (a merchant's letter to a debtor was much less formal than his letter to a sultan). In modern English, the 12 most frequently used letters are: E T A O I N S H R D L U If these twelve letters are deciphered out of a monoalphabetic cipher, the locations and identities of the remaining letters should be broken with ease. Using frequency analysis, let's decipher the following period text in modern English: Wr eh, ru qrw wr eh: wkdw lv wkh txhvwlrq: Zkhwkhu 'wlv qreohu lq wkh plqg wr vxiihu Wkh volqjv dqg duurzv ri rxwudjhrxv iruwxqh, Ru wr wdnh dupv djdlqvw d vhd ri wurxeohv, Dqg eb rssrvlqj hqg wkhp? Wr glh: wr vohhs; Qr pruh; dqg eb d vohhs wr vdb zh hqg Wkh khduw-dfkh dqg wkh wkrxvdqg qdwxudo vkrfnv Wkdw iohvk lv khlu wr, 'wlv d frqvxppdwlrq Ghyrxwob wr eh zlvk'g. Wr glh, wr vohhs; Wr vohhs: shufkdqfh wr guhdp: db, wkhuh'v wkh uxe; Iru lq wkdw vohhs ri ghdwk zkdw guhdpv pdb frph Zkhq zh kdyh vkxiiohg rii wklv pruwdo frlo, In the manner of frequency analysis how would we go about this? First by counting up all of the letters and putting them in order from most to least occurrence: Letter Count h 53 w 46 r 40 d 33 v 31 k 27 q 23 u 22 l 18 g 16 o 14 i 12 x 12 p 11 e 8 s 8 z 7 f 7 b 6 j 4 n 2 y 2 t 1 So, using this method, we find that our six most used letters are: H W R D V K Okay, as a lark, let's take the most used letter and replace it with the most common English (also called "brute force" analysis). Wr ee, ru qrw wr ee: wkdw lv wke txevwlrq: Zkewkeu 'wlv qreoeu lq wke plqg wr vxiieu Wke volqjv dqg duurzv ri rxwudjerxv iruwxqe, Ru wr wdne dupv djdlqvw d ved ri wurxeoev, Dqg eb rssrvlqj eqg wkep? Wr gle: wr voees; Qr prue; dqg eb d voees wr vdb zh eqg Wke keduw-dfke dqg wke wkrxvdqg qdwxudo vkrfnv Wkdw ioevk lv kelu wr, 'wlv d frqvxppdwlrq Geyrxwob wr ee zlvk'g. Wr gle, wr voees; Wr voees: seufkdqfe wr guedp: db, wkeue'v wke uxe; Iru lq wkdw voees ri gedwk zkdw guedpv pdb frpe Zkeq ze kdye vkxiioeg rii wklv pruwdo frlo, It appears that we got lucky this time, as we are starting to see some interesting patterns. The letter pattern "wkh" seems to be repeated quite a bit. Since we know that the most common three letter words ending in "e" are the and she, let us try some more substitutions. Starting with "the" if it seems to work, we will continue changing with the "t" and "h". Tr ee, ru qrt tr ee: thdt lv the txevtlrq: Zhetheu 'tlv qreoeu lq the plqg tr vxiieu The volqjv dqg duurzv ri rxtudjerxv irutxqe, Ru tr tdne dupv djdlqvt d ved ri turxeoev, Dqg eb rssrvlqj eqg thep? Tr gle: tr voees; Qr prue; dqg eb d voees tr vdb zh eqg The hedut-dfhe dqg the thrxvdqg qdtxudo vhrfnv Thdt ioevk lv helu tr, 'tlv d frqvxppdtlrq Geyrxtob tr ee zlvh'g. Tr gle, tr voees; Tr voees: seufhdqfe tr guedp: db, theue'v the uxe; Iru lq thdt voees ri gedth zkdt guedpv pdb frpe Zkeq ze hdye vhxiioeg rii thlv prutdo frlo, These letters seem to be working. Do you see more patterns starting to form? There is a "thdt". Since we have already inserted the "t" and "h", we could assume that "d" = "a" and see where that leads us. Also, we will take further guesses as we add the letter "a" into the mix. We can already begin guessing at other letters as well. Take, for instance, the combination current combination "tr". Since "t" is a plaintext that we have more-or-less proven, we can try the letter "o" in the place of "r" because it is the only one that makes sense. To ee, ou qot to ee: that lv the txevtloq: Zhetheu 'tlv qreoeu lq the plqg tr vxiieu The volqjv aqg auuozv oi oxtuajeoxv ioutxqe, Ou to take aupv ajalqvt a vea oi tuoxeoev, Aqg eb ossovlqj eqg thep? To gle: to voees; Qr poue; aqg eb a voees to vab zh eqg The heart-ache aqg the thoxvaqg qatxuao vhocnv That ioevk lv helu to, 'tlv a coqvxppatloq Geyoxtob to ee zlvh'g. To gle, to voees; To voees: seuchdqce to gueap: ab, theue'v the uxe; Iou lq that voees oi geath zkat gueapv pab cope Zkeq ze haye vhxiioeg oii thlv poutao colo, Now we have come quite a ways, but we are not there yet. At the beginning of the cipher-text, we have the letter combination "ee" and at the end we have "ze". Since there are only a few two-letter combinations ending in the letter "e" (we, he, be me) let's try to figure out which one they are. "e = w" Well, we run into an issue, as later in the text is the letter combination "eb". Inserting "w" for "e" results in "wb". Since we have already established that h = e, there is no other two-letter combination beginning with "w". The same holds true for e = h and e = m (There are modern words: ma, ha, but we have already solved for "a") This leaves e = b. Try it and see what happens To be, ou qot to be: that lv the txevtloq: Zhetheu 'tlv qrboeu lq the plqg tr vxiieu The volqjv aqg auuozv oi oxtuajeoxv ioutxqe, Ou to take aupv ajalqvt a vea oi tuoxboev, Aqg by ossovlqj eqg thep? To gle: to voees; Qr poue; aqg by a voees to vay zh eqg The heart-ache aqg the thoxvaqg qatxuao vhocnv That ioevk lv helu to, 'tlv a coqvxppatloq Geyoxtob to be zlvh'g. To gle, to voees; To voees: seuchdqce to gueap: ay, theue'v the uxb; Iou lq that voees oi geath zkat gueapv pab cope Zkeq ze haye vhxiioeg oii thlv poutao colo, Wow, the first line kind of jumps out at you, doesn't it? It is more than likely safe enough to assume that this is part of the famous speech given in Hamlet (3,1). So when deciphered, we get: To be, or not to be: that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep; To sleep: perchance to dream: ay, there's the rub; For in that sleep of death what dreams may come When we have shuffled off this mortal coil…, Sources: Kahn, David: The Codebreakers, Machmillan, 1968 (THE source for most cryptological research.) Singh, Simon: The Code Book (The Science of Secrecy From Ancient Egypt to Quantum Cryptography), Anchor Books, 1999 (Great for the spying and cryptography side of the Babbington Plot; concerning Mary, Queen of Scots) Wrixon, Fred B.: Codes, Ciphers, Secrets and Cryptic Communication (Making and Breaking Secret Messages From Hieroglyphs to the Internet), Black Dog and Leventhal Paperbacks, 2005. (Incredible source for the actual use and breaking of ciphers and codes.) NSA Kids Home: http://www.nsa.gov/kids/home.cfm Fun site for kids, even for adults. Wikipedia.org: General cryptography information and links to websites. ------ Copyright 2006 by Jim Looper. . Permission is granted for republication in SCA-related publications, provided the author is credited. Addresses change, but a reasonable attempt should be made to ensure that the author is notified of the publication and if possible receives a copy. If this article is reprinted in a publication, I would appreciate a notice in the publication that you found this article in the Florilegium. I would also appreciate an email to myself, so that I can track which articles are being reprinted. Thanks. -Stefan. Edited by Mark S. Harris Ciphers-art Page 9 of 9