{"id":9802,"date":"2015-09-11T09:00:44","date_gmt":"2015-09-11T13:00:44","guid":{"rendered":"https:\/\/www.kaspersky.com\/blog\/?p=9802"},"modified":"2021-09-30T10:46:41","modified_gmt":"2021-09-30T14:46:41","slug":"vigenere-cipher-history","status":"publish","type":"post","link":"https:\/\/www.kaspersky.com\/blog\/vigenere-cipher-history\/9802\/","title":{"rendered":"How a 17th century cipher became the basis of an unbreakable 20th century cipher"},"content":{"rendered":"<p>The majority of ciphers referenced in historical or fiction works belong to the same family of ciphers \u2014 monoalphabetic ciphers. We have already dove into the <a href=\"https:\/\/www.kaspersky.com\/blog\/best-fiction-with-ciphers-explanation\/\" target=\"_blank\" rel=\"noopener nofollow\">main vulnerability of this encryption method<\/a>, which is a probability of cracking the cipher by analyzing the symbol frequency pattern. This is something that was assessed long before any computer ever existed.<\/p>\n<p>One of the most renowned and interesting ciphers designed to eliminate this flaw was the Vigenere cipher. It was attributed to a 17th century French diplomat, yet was actually created by two individuals, independent of each other. Curiously, Blaise Vigenere was not one of them, he just proposed this cipher to Henry III, and the cipher claimed its current name in the 19th century.<\/p>\n<p>The first reference to the cipher can be found in Leon Battista\u2019s book <em>Tractate on Ciphers<\/em>. He is famous for being the first to propose the theory that would later become linear perspective in paintings. The idea behind the cipher was quite simple, but it brought cryptography to a completely new level, marking the dawn of polyalphabetic ciphers.<\/p>\n<blockquote class=\"twitter-pullquote\"><p>#Infosec history: How a 17th century #cipher became the basis of an unbreakable 20th century cipher<\/p><a href=\"https:\/\/twitter.com\/share?url=https%3A%2F%2Fkas.pr%2FRLj4&amp;text=%23Infosec+history%3A+How+a+17th+century+%23cipher+became+the+basis+of+an+unbreakable+20th+century+cipher\" class=\"btn btn-twhite\" data-lang=\"en\" data-count=\"0\" target=\"_blank\" rel=\"noopener nofollow\">Tweet<\/a><\/blockquote>\n<p>In a monoalphabetic cipher, each symbol of the plaintext is substituted by a constant symbol of the cipher text \u2014 it\u2019s like using another alphabet. It does not matter, whether the replacements are random, or based on a certain shift value in the alphabet (like in the <a href=\"https:\/\/en.wikipedia.org\/wiki\/caesar_cipher\" target=\"_blank\" rel=\"noopener nofollow\">Caesar cipher<\/a>), whether they are letters or numbers or any other symbols.<\/p>\n<p>As it was vividly described in Sir Arthur Conan Doyle\u2019s \u201cThe Adventure of the Dancing Men,\u201d the substituting symbols can be even pictograms, but that does not spare the cipher from the common vulnerability: one can make assumptions of the keywords used in the encrypted text, or analyze the frequency of a certain symbols in the message, or take other guesses.<\/p>\n<p>Your humble servant once did \u2014 just for fun \u2014 use this method to decrypt an email, which was delivered in an alternative encoding scheme. And it wasn\u2019t that hard to decode, even without a particular skill or decent computing power.<\/p>\n<p>A polyalphabetic cipher uses a number of different substitute alphabets in cycles. Take the Vigenere\u2019s cipher, and here\u2019s the pattern: we take the Cesar\u2019s cipher as the basis and compile a table that includes all possible shift values:<\/p>\n<p><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/92\/2015\/09\/06024156\/vigenere-cipher-0.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-9809\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/92\/2015\/09\/06024156\/vigenere-cipher-0.png\" alt=\"Infosec history: How a 17 century cipher became the basis of an unbreakable 20 century cipher\" width=\"800\" height=\"800\"><\/a><\/p>\n<p>Thus we have 26 different substitute alphabets and now we need to decide on the principle of substitution. A simple change to the next alphabet for each new letter would be a decent sophistication element, but once we employ the key phrase, the cipher becomes super hard to break.<\/p>\n<p>Since we started with ancient stories, let\u2019s take VINTAGE as our keyword. In order to encipher a phrase like THINK ABOUT, we need to repeat the key phrase until it matches the length of the plaintext:<\/p>\n<p><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/92\/2015\/09\/06024154\/vigenere-cipher-1.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-9810\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/92\/2015\/09\/06024154\/vigenere-cipher-1.png\" alt=\"Infosec history: How a 17 century cipher became the basis of an unbreakable 20 century cipher\" width=\"1120\" height=\"203\"><\/a><\/p>\n<p>Now, for each of the symbols of the source text we employ the substitute, which is located in the row starting with the letter of the keyword and in the column starting by the letter of the plaintext. For instance, the first letter is replaced by the symbol, which is located in the crossing of the T-column and the V-row \u2013 which is \u201cO\u201d.<\/p>\n<p><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/92\/2015\/09\/06024153\/vigenere-cipher-2.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-9811\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/92\/2015\/09\/06024153\/vigenere-cipher-2.png\" alt=\"Infosec history: How a 17 century cipher became the basis of an unbreakable 20 century cipher\" width=\"1116\" height=\"304\"><\/a><\/p>\n<p>The deciphering, then, is the opposite process: we find the rows which correspond to the letters of the keyword, find the cipher letters and then write down the letters which mark the columns, getting the plaintext.<\/p>\n<p>It\u2019s fascinating that the original idea, as designed by Alberti, presupposed a special disk with rotating alphabet rings, and the table, which we described above, was proposed later by another contributor. The disk described in the tractate of 1446 was used, by the Confederates during the Civil War in the US.<\/p>\n<p>In general, the cipher was reputed as quite reliable, was even rendered \u2018unbreakable\u2019 by the mathematician Charles Lutwidge Dodgson (a.k.a. Lewis Carrol) and praised by Scientific American Magazine. Yet, its more famed iteration was introduced later as \u2018The Gronsfeld Cipher.\u2019 The major difference from its foregoer was the limitation of the replacement alphabets to 10 (according to the number of digits) and the fact that the keyword was a number.<\/p>\n<p>What\u2019s interesting is that the Vigenere cipher was susceptible to cryptic analysis, provided certain conditions. By assessing some characteristics, it was possible to define the length of the key, and then, by analyzing rows of letters, enciphered by the same row of the table, one could employ a standard method based on the frequency of certain letters in the language.<\/p>\n<p>The first to perform a successful attack on a modification of the Vigenere cipher back in 1854 was no one other than Charles Babbage, a pioneer of computing, but the analysis was published by another researcher, Friedrich Kasiski nine months later.<\/p>\n<p>Strange as it seems, it helped to fortify the cipher. One of the enhancements was the use of the keyword, which is equal in length to the message itself, thus eliminating a possibility of frequency analysis.<\/p>\n<p>However, this upgrade brought about another vulnerability: the use of sensible text as a key phrase provided a cryptoanalyst with some statistic information about the key, serving another hint on the venture to decipher the text.<\/p>\n<p>But this idea fueled the next improvement \u2013 the use of random sequence of symbols as a keyword.<\/p>\n<p>As a result, this idea was deployed in the concept of <a href=\"https:\/\/en.wikipedia.org\/wiki\/One-time_pad\" target=\"_blank\" rel=\"noopener nofollow\">one-time pads<\/a> (OTP). Such ciphers once became unbreakable and were used in the sphere of civil and military cryptography. But this is a story for another day.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most interesting ciphers designed to eliminate the vulnerability to symbol frequency analysis was the Vigenere cipher. Which later became the basis of unbreakable one-time pads.<\/p>\n","protected":false},"author":40,"featured_media":9808,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5],"tags":[1128,597,261,577,388,1241],"class_list":{"0":"post-9802","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-news","8":"tag-ciphers","9":"tag-cryptography","10":"tag-encryption","11":"tag-history","12":"tag-infosec","13":"tag-vigenere-cipher"},"hreflang":[{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/vigenere-cipher-history\/9802\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/vigenere-cipher-history\/6224\/"},{"hreflang":"es-mx","url":"https:\/\/latam.kaspersky.com\/blog\/vigenere-cipher-history\/6140\/"},{"hreflang":"es","url":"https:\/\/www.kaspersky.es\/blog\/vigenere-cipher-history\/6804\/"},{"hreflang":"it","url":"https:\/\/www.kaspersky.it\/blog\/vigenere-cipher-history\/6625\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/vigenere-cipher-history\/8856\/"},{"hreflang":"pt-br","url":"https:\/\/www.kaspersky.com.br\/blog\/vigenere-cipher-history\/5688\/"},{"hreflang":"ja","url":"https:\/\/blog.kaspersky.co.jp\/vigenere-cipher-history\/8819\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/vigenere-cipher-history\/8856\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/vigenere-cipher-history\/9802\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/vigenere-cipher-history\/9802\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/www.kaspersky.com\/blog\/tag\/ciphers\/","name":"ciphers"},"_links":{"self":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/9802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=9802"}],"version-history":[{"count":3,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/9802\/revisions"}],"predecessor-version":[{"id":42232,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/9802\/revisions\/42232"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/9808"}],"wp:attachment":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=9802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=9802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=9802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}