{"id":46,"date":"2018-07-21T09:30:23","date_gmt":"2018-07-21T09:30:23","guid":{"rendered":"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=46"},"modified":"2018-12-27T09:54:26","modified_gmt":"2018-12-27T09:54:26","slug":"transposition-cipher-and-cryptanalysis","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/chapter\/transposition-cipher-and-cryptanalysis\/","title":{"rendered":"Transposition Cipher and Cryptanalysis"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/RsOSA8AREpw\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>Learning Objectives<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 To know the substitution cipher in classical cryptography\r\n\r\n\u27a2\u00a0\u00a0 To learn about the mono alphabetic substitution cipher\r\n\r\n\u27a2\u00a0\u00a0 To learn about the poly alphabetic substitution cipher\r\n\r\n\u27a2\u00a0\u00a0 Cryptanalysis of Substitution cipher\r\n\r\n&nbsp;\r\n\r\n<strong>4.1 Introduction<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Cryptanalysis is the study of analyzing <a href=\"https:\/\/en.wikipedia.org\/wiki\/Information_system\">information systems <\/a>in order to study the hidden aspects of the systems. Cryptanalysis is used to breach <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cryptographic\">cryptographic <\/a>security systems and gain access to the contents of encrypted messages, even if the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Key_(cryptography)\">cryptographic key <\/a>is unknown. In addition to mathematical analysis of cryptographic algorithms, cryptanalysis includes the study of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Side-channel_attacks\">side-channel attacks <\/a>that do not target weaknesses in the cryptographic algorithms themselves, but instead exploit weaknesses in their implementation.<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>4.2 Transposition Ciphers<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 In transposition ciphers, we transpose (scramble) the plaintext letters\r\n\r\n&nbsp;\r\n<p style=\"padding-left: 90px;text-align: justify\">Transposition (permutation) means rearranging the order of appearance of the elements of the\u00a0 \u00a0 \u00a0 \u00a0 plaintext. In other words cipher text constitutes permutation\u00a0<span style=\"font-size: 1em;text-align: initial\">of plain text. In general transposition depends on the length of the text and it is aperiodic.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n\u2013\u00a0 The scrambled text is the ciphertext\r\n\r\n\u2013\u00a0 The transposition is the key\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 Corresponds to Shannon\u2019s principle of diffusion( property that spreads statistic properties of text all over the text preventing statistic analysis)<\/p>\r\n&nbsp;\r\n\r\n\u2013\u00a0 This idea is widely used in modern ciphers\r\n\r\n&nbsp;\r\n\r\n<strong>4.3 Scytale<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 One of the oldest cryptography tools was a Spartan scytale , circa 500 BC.\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 Sender and recipient each had a rod of exactly the same radius. The sender wound a narrow ribbon of parchment around his cylinder. Then he\/she wrote on it lengthwise. After the ribbon is unwound, the writing could be read only by a person who had a rod of exactly the same circumference.<\/p>\r\n\u27a2\u00a0\u00a0 It has the advantage of being fast and not prone to mistakes\r\n\r\n\u27a2\u00a0\u00a0 Wind strip of leather around a rod\r\n\r\n\u27a2\u00a0\u00a0 Write message across the rod\r\n\r\n&nbsp;\r\n<p style=\"text-align: left\">T H E T I M E H A<\/p>\r\n<p style=\"text-align: left\">S C O M E T H E W<\/p>\r\n<p style=\"text-align: left\">A L R U S S A I D T<\/p>\r\n<p style=\"text-align: left\">O T A L K O F M A<\/p>\r\n<p style=\"text-align: left\">N Y T H I N G S<\/p>\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 When unwrapped, letters are scrambled\r\n\r\n&nbsp;\r\n\r\nTSATAHCLONEORTYTMUATIESLHMTS\u2026\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Suppose Alice and Bob use Scytale to encrypt a message\r\n\r\n&nbsp;\r\n<p style=\"padding-left: 60px\">\u2013\u00a0 What is the key?<\/p>\r\n<p style=\"padding-left: 60px\">\u00a0 \u00a0 The diameter of the Scytale can be regarded as the key of the cipher.<\/p>\r\n<p style=\"padding-left: 60px\">\u2013\u00a0 How hard is it for Trudy to break without key?<\/p>\r\n<p style=\"padding-left: 60px\">\u00a0 \u00a0 It can be easily <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cryptanalysis\">broken. <\/a>Since the strip of leather around the rod hints strongly to the crackers.<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Suppose many different rod diameters are available to Alice and Bob\u2026\r\n\r\n&nbsp;\r\n<p style=\"padding-left: 60px\">\u2013\u00a0 How hard is it for Trudy to break a message?<\/p>\r\n<p style=\"padding-left: 60px\">To decrypt, Trudy must wrap the leather strip around the rod and read across. The ciphertext is:<\/p>\r\n<p style=\"padding-left: 60px;text-align: justify\">\"\u00a0\u00a0 TSATAHCLONEORTYTMUATIESLHMTS\u2026\" Every ninth letter will appear on the same line.<\/p>\r\n<p style=\"padding-left: 60px\">\u2013 Can Trudy attack messages automatically\u2014without manually examining each putative decrypt?<\/p>\r\n<p style=\"padding-left: 60px;text-align: justify\">Not possible exactly. Putative decrypt over the ciphertext would have to be transferred to something less susceptible which in turn reduces the advantage over it.<\/p>\r\n&nbsp;\r\n\r\n<strong>4.4 Rail Fence Cipher (Zigzag Cipher)<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 A Rail Fence Cipher is a transposition cipher. The letters in the message aren\u2019t changed, but their positions are altered. Unless you know the encryption method, these ciphers are very difficult to crack. To decipher these codes, you need to know the number of rails. Sometimes these ciphers include the spaces between words as blank characters in the cipher.<\/p>\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 write message letters out diagonally over a number of rows\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 then read off cipher row by row Example\r\n\r\n&nbsp;\r\n\r\nplain text : meet me after the toga party\r\n\r\n&nbsp;\r\n\r\nm e m a t r h t g p r y\r\n\r\ne t e f e t e o a a t\r\n\r\n&nbsp;\r\n\r\ngiving ciphertext\r\n\r\n&nbsp;\r\n\r\nMEMATRHTGPRYETEFETEOAAT\r\n\r\n&nbsp;\r\n\r\nThe drawback over here is it has no communication security, and it can be easily broken even by hand.\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\n<strong>4.5 Columnar Transposition<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Put plaintext into rows of matrix then read ciphertext out of columns. The simplest transposition cipher is the columnar transposition. This comes in two forms, the complete columnar transposition and the incomplete columnar. In both of these systems, the plain text is written horizontally in a rectangle that is as wide as the length of the key.<\/p>\r\n&nbsp;\r\n\r\nExample\r\n\r\n&nbsp;\r\n\r\nsuppose matrix is 3 x 4\r\n\r\n&nbsp;\r\n\r\nPlaintext: SEETHELIGHT\r\n\r\n&nbsp;\r\n\r\nCiphertext: SHGEEHELTTIX\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Same effect as Scytale.What is the key? Except the transposition of letters based on 3 x 4 matrix no key is used.<\/p>\r\n&nbsp;\r\n\r\n<strong>4.6 Keyword Columnar Transposition<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In Columnar transposition plain text can be padded based on key either in regular or irregular method. In regular way the plain text has been padded so that it nearly fits the matrix\/rectangle. But in the case of irregular transposition leaves these characters blank, though this makes decryption slightly more difficult. The columns are now reordered such that the letters in the key word are ordered alphabetically.<\/p>\r\n&nbsp;\r\n\r\nExample\r\n\r\n&nbsp;\r\n\r\nPlaintext: CRYPTOISFUN\r\n\r\nMatrix 3 x 4 and keyword MATH\r\n\r\nCiphertext: ROUPSXCTFYIN\r\n\r\n&nbsp;\r\n\r\nHow can Trudy cryptanalyze this cipher?\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Consider the ciphertext\r\n\r\nVOESA IVENE MRTNL EANGE WTNIM HTMLL ADLTR NISHO\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Matrix is n x m for some n and m\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Since 45 letters, n\u00a0 m = 45\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 The ciphertext is<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">VOESA IVENE MRTNL EANGE WTNIM HTMLL ADLTR NISHO DWOEH<\/span>\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 If encryption matrix was 9 x 5, then\u2026<\/span>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong style=\"text-align: initial;font-size: 1em\">4.6.1 Cryptanalysis<\/strong>\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">\u27a2 Exhaustive key search<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">o Always an option for Intruders.<\/span>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">o With the advent of computers and computer cipher systems, cryptanalysts have had to fall back on brute-force guessing to extract the key from a large set of cryptograms.<\/span><\/p>\r\n&nbsp;\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">\u27a2 If keyspace is too large, such an attack will not succeed in a reasonable time<\/span>\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">o Or it will have a low probability of success<\/span>\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">\u27a2 A large keyspace is necessary for security<\/span>\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">\u27a2 But, large keyspace is not sufficient<\/span>\r\n\r\n&nbsp;\r\n\r\n<strong style=\"text-align: initial;font-size: 1em\">4.7 Double Transposition<\/strong>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">One of the most secure hand ciphers used for military field-grade inSecond World War. To perform a Double Columnar Transposition we write out the key as column header. The key is numbered in alphabetical order. If two letters of the key are the same, the first in the key gets the lowest number. <\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Example<\/span><\/p>\r\n<span style=\"text-align: initial;font-size: 1em\">Plain text : THIS IS A SECRET MESSAGE<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">1st Columnar Key: LEONARDO<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">2nd Columnar Key: DAVINCI<\/span>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Note that, in reality, two keywords with a length up to 20 letters each were used to encipher a message.<\/span><\/p>\r\n<span style=\"text-align: initial;font-size: 1em\">The plain text is written out in successive rows beneath the headers:<\/span>\r\n\r\n<\/div>\r\n<span style=\"text-align: initial;font-size: 1em\">\u00a0 \u00a0 L E O N A R D O<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">4 3 6 5 1 8 2 7<\/span>\r\n<div>\r\n\r\n\u00a0 \u00a0---------------\r\n\r\nT H I S I S A S\r\n\r\nE C R E T M E S\r\n\r\nS A G E\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nFirst cipher text: ITAEHCATESSEEIRGSSSM\r\n\r\nNext, we write it down again, in successive rows, and perform the second transposition.\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nD A V I N C I\r\n\r\n3 1 7 4 6 2 5\r\n\r\n-------------\r\n\r\nI T A E H C A\r\n\r\nT E S S E E I\r\n\r\nR G S S S M\r\n\r\n&nbsp;\r\n\r\nAgain, we read off the ciphertext by the column and write down the text in groups of five:\r\n\r\n&nbsp;\r\n\r\nThe final cipher text: TEGCE MITRE SSAIH ESASS\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>4.7.1 Cryptanalysis<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Divide and conquer\r\n<p style=\"padding-left: 60px\">o\u00a0\u00a0\u00a0\u00a0 Trudy attacks part of the keyspace<\/p>\r\n<p style=\"padding-left: 60px\">o\u00a0\u00a0\u00a0\u00a0 A great shortcut attack strategy<\/p>\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Requires careful analysis of algorithm\r\n\r\n\u27a2\u00a0\u00a0 We will see this again and again in the attacks discussed later\r\n\r\n<span style=\"font-size: 1em;text-align: initial\">\u27a2\u00a0\u00a0 Of course, cryptographers try to prevent divide and conquer attacks<\/span>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2\u00a0\u00a0 Its main weakness was that if the attacker intercepts two or more messages of same length using the same key then they could be compared by a tedious process known as \u201cmultiple anagramming\u201d.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>4.8 One-Time Pad(Vernam Cipher\/Perfect Cipher)<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 A provably secure cipher\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 The One Time Pad encryption method is nothing new. In 1882, Frank Miller was the first to describe the One Time Pad system for securing telegraphy. In 1917, Gilbert Vernam invented a cipher solution for a teletype machine. U.S. Army Captain Joseph Mauborgne realized that the character on the key tape could be completely random. Together, they introduced the first One Time Pad encryption system.<\/p>\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 No other cipher we discuss is provably secure\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Why not use one-time pad for everything?\r\n\r\n&nbsp;\r\n<p style=\"padding-left: 60px\">o\u00a0\u00a0\u00a0\u00a0 Impractical for most applications<\/p>\r\n<p style=\"padding-left: 60px\">o\u00a0\u00a0\u00a0\u00a0 But it does have its uses<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>4.8.1 One-Time Pad Encryption<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 The One Time Pad encryption method is a binary additive stream cipher, where a stream of truly random keys is generated and then combined with the plain text for encryption or with the cipher text for decryption by an \u2018exclusive OR\u2019 (XOR) addition. It is possible to prove that a stream cipher encryption scheme is unbreakable if the following preconditions are met<\/p>\r\n&nbsp;\r\n\r\n1.\u00a0\u00a0\u00a0\u00a0\u00a0 The key must be as long as the plain text.\r\n\r\n2.\u00a0\u00a0\u00a0\u00a0\u00a0 The key must be truly random.\r\n\r\n3.\u00a0\u00a0\u00a0\u00a0\u00a0 The key must only be used once\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 One Time Pad keys are used in pairs. The keys are distributed securely prior to encryption. One copy of the key is kept by the sender and one by the recipient.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 Both sender\u2019s and recipient\u2019s keys are automatically destroyed after use, so that erroneous re-application of the same key is impossible<\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\n<img class=\"size-full wp-image-49 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-15.png\" alt=\"\" width=\"500\" height=\"403\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>4.8.2 ONE-TIME PAD DECRYPTION<\/strong>\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-50 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-16.png\" alt=\"\" width=\"524\" height=\"403\" \/>\r\n\r\n&nbsp;\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\n<strong>4.8.3 One-Time Pad Summary<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Provably secure, when used correctly\r\n\r\n&nbsp;\r\n<p style=\"padding-left: 30px\">\u2013\u00a0 Ciphertext provides no info about plaintext<\/p>\r\n<p style=\"padding-left: 30px\">\u2013\u00a0 All plaintexts are equally likely<\/p>\r\n<p style=\"padding-left: 30px\">\u2013\u00a0 Pad must be random, used only once<\/p>\r\n<p style=\"padding-left: 30px\">\u2013\u00a0 Pad is known only by sender and receiver<\/p>\r\n<p style=\"padding-left: 30px\">\u2013\u00a0 Pad is same size as message<\/p>\r\n<p style=\"padding-left: 30px\">\u2013\u00a0 No assurance of message integrity<\/p>\r\n\u27a2\u00a0\u00a0 Why not distribute message the same way as the pad?\r\n\r\n&nbsp;\r\n\r\nBecause the messages are vulnerable to attacks by the intruders.\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Cryptanalysis\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">With One Time Pad encryption, the key used for encoding the message is completely random and is as long as the message itself. That is why the only possible attack to such a cipher is a brute force attack. Brute force attacks use exhaustive trial and error methods in order to find the key that has been used for encrypting the plain text. This means that every possible combination of key bits must be used to decrypt the cipher text. The correct key would be the one that produces a meaningful plain text.<\/p>\r\n&nbsp;\r\n\r\n<strong>4.8.4 Real-World One-Time Pad<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0\u00a0\u00a0\u00a0 Project <a href=\"http:\/\/www.nsa.gov\/venona\/index.cfm\">VENONA<\/a>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;padding-left: 30px\">The Venona project (1943\u201380) was a counter-intelligence program initiated by the U.S. Army\u2019s <a href=\"https:\/\/en.wikipedia.org\/wiki\/Signal_Intelligence_Service\">Signal Intelligence Service <\/a>(later the <a href=\"https:\/\/en.wikipedia.org\/wiki\/National_Security_Agency\">National<\/a> <a href=\"https:\/\/en.wikipedia.org\/wiki\/National_Security_Agency\">Security Agency)<\/a>.The purpose of the Venona project was the decryption of messages transmitted by the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Intelligence_agencies\">intelligence agencies <\/a>of the Soviet Union, e.g. the <a href=\"https:\/\/en.wikipedia.org\/wiki\/NKVD\">NKVD, <\/a>the <a href=\"https:\/\/en.wikipedia.org\/wiki\/KGB\">KGB <\/a>(foreign intelligence) and the <a href=\"https:\/\/en.wikipedia.org\/wiki\/GRU\">GRU <\/a>(military intelligence). During the 37-year duration of the Venona project, the Signal\u00a0<span style=\"font-size: 1em;text-align: initial\">Intelligence Service decrypted and translated approximately 3,000 messages from Russian to EnglishSpy carried one-time pad into U.S.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Spy used pad to encrypt secret messages\r\n\r\n\u27a2\u00a0\u00a0 Repeats within the \u201cone-time\u201d pads made cryptanalysis possible\r\n\r\n&nbsp;\r\n\r\n<strong>4.9 Codebook Cipher<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Literally, a book filled with \u201ccodes\u201d\r\n<p style=\"padding-left: 60px\">\u2013\u00a0 More precisely, 2 codebooks, 1 for encryption and 1 for decryption<\/p>\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Key is the codebook itself\r\n\r\n\u27a2\u00a0\u00a0 Security of cipher requires physical security for codebook\r\n\r\n\u27a2\u00a0\u00a0 Codebooks widely used through WWII\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 In a classic codebook cipher, there are two books, one of which has plaintext words(or phrases) listed in alphabetical order, each of which is adjacent to its corresponding codeword. A particular word or phrase is encrypted by looking it up in the codebook and replacing it with the appropriate codeword. A corresponding codebook indexed by codewords is used to decrypt.<\/p>\r\n\u27a2\u00a0\u00a0\u00a0\u00a0\u00a0 <a href=\"http:\/\/library.thinkquest.org\/28005\/flashed\/timemachine\/courseofhistory\/zimmerman.shtml?tqskip1=1&amp;tqtime=1029\">Zimmerman Telegram <\/a>encrypted via codebook\r\n\r\n&nbsp;\r\n<table class=\"aligncenter\" border=\"1\">\r\n<tbody>\r\n<tr>\r\n<td>February<\/td>\r\n<td>13605<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>fest<\/td>\r\n<td>13732<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>finanzielle<\/td>\r\n<td>13850<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>folgender<\/td>\r\n<td>13918<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Frieden<\/td>\r\n<td>17142<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Friedenschluss<\/td>\r\n<td>17149<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 Modern block ciphers are codebooks!\r\n\r\n&nbsp;\r\n\r\n<strong>4.9.1 Zimmerman Telegram<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 One of most famous codebook ciphers ever\r\n\r\n\u27a2\u00a0\u00a0 Led to US entry in WWI\r\n\r\n\u27a2\u00a0\u00a0 Ciphertext shown here\u2026\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\n<img class=\"size-full wp-image-51 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-17.png\" alt=\"\" width=\"521\" height=\"338\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>4.9.1.1 Zimmerman Telegram Decrypted<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u27a2\u00a0\u00a0 British had recovered partial codebook\r\n\r\n\u27a2\u00a0\u00a0 Able to fill in missing parts\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 The security of a classic codebook cipher depends heavily on the physical security of the book itself. That is, the book must be protected from capture by the enemy.<\/p>\r\n\u27a2\u00a0\u00a0 Codebooks are susceptible to statistical analysis\r\n<p style=\"padding-left: 60px\">1)\u00a0\u00a0\u00a0\u00a0 Like simple substitution cipher, but lots of data required to attack a codebook<\/p>\r\n\u27a2\u00a0\u00a0 Historically, codebooks very popular\r\n\r\n\u27a2\u00a0\u00a0 To extend useful life of a codebook, an additive was usually used\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>4.9.2 Codebook Additive<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 As late as world war II, codebooks were in widespread use. Cryptographers realized that these ciphers were subject to statistical attack, so codebooks were regularly replaced with new codebooks. Since this was an expensive and risky process, it was necessary to extend the life of a codebook as much as possible. To this end, an additive book was generally used.<\/p>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2 Codebook additive is another book filled with \u201crandom\u201d number<\/span><\/p>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2 Sequence of additive numbers added to codeword to yield ciphertext<\/span><\/p>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2 Usually, starting position in additive book selected at random by sende<\/span><\/p>\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2 Starting additive position usually sent \u201cin the clear\u201d with the ciphertext<\/span><\/p>\r\n<p style=\"text-align: justify;padding-left: 30px\"><span style=\"text-align: initial;font-size: 1em\">1) Part of the Message Indicator (MI)<\/span><\/p>\r\n<p style=\"text-align: justify;padding-left: 30px\"><span style=\"text-align: initial;font-size: 1em\">2) Modern term: Initialization Vector (IV)<\/span><\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>Summary<\/strong>\r\n\r\n\u27a2 Outlined the transposition cryptography\r\n\r\n\u27a2 Explained the various types of transposition cryptography\r\n\r\n\u27a2 Introduction to modern cryptography\r\n\r\n\u27a2 Explored the various types cryptanalysis\r\n\r\n1) Exhaustive key search 2) Divide and conquer 3) Statistical analysis 4) Exploit linearity\r\n\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Transposition Cipher and Cryptanalysis<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/RsOSA8AREpw\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<img class=\"size-full wp-image-52 alignleft\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-18.png\" alt=\"\" width=\"646\" height=\"485\" \/>","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/RsOSA8AREpw\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Learning Objectives<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 To know the substitution cipher in classical cryptography<\/p>\n<p>\u27a2\u00a0\u00a0 To learn about the mono alphabetic substitution cipher<\/p>\n<p>\u27a2\u00a0\u00a0 To learn about the poly alphabetic substitution cipher<\/p>\n<p>\u27a2\u00a0\u00a0 Cryptanalysis of Substitution cipher<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.1 Introduction<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Cryptanalysis is the study of analyzing <a href=\"https:\/\/en.wikipedia.org\/wiki\/Information_system\">information systems <\/a>in order to study the hidden aspects of the systems. Cryptanalysis is used to breach <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cryptographic\">cryptographic <\/a>security systems and gain access to the contents of encrypted messages, even if the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Key_(cryptography)\">cryptographic key <\/a>is unknown. In addition to mathematical analysis of cryptographic algorithms, cryptanalysis includes the study of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Side-channel_attacks\">side-channel attacks <\/a>that do not target weaknesses in the cryptographic algorithms themselves, but instead exploit weaknesses in their implementation.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.2 Transposition Ciphers<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 In transposition ciphers, we transpose (scramble) the plaintext letters<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 90px;text-align: justify\">Transposition (permutation) means rearranging the order of appearance of the elements of the\u00a0 \u00a0 \u00a0 \u00a0 plaintext. In other words cipher text constitutes permutation\u00a0<span style=\"font-size: 1em;text-align: initial\">of plain text. In general transposition depends on the length of the text and it is aperiodic.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0 The scrambled text is the ciphertext<\/p>\n<p>\u2013\u00a0 The transposition is the key<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 Corresponds to Shannon\u2019s principle of diffusion( property that spreads statistic properties of text all over the text preventing statistic analysis)<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0 This idea is widely used in modern ciphers<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.3 Scytale<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 One of the oldest cryptography tools was a Spartan scytale , circa 500 BC.<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 Sender and recipient each had a rod of exactly the same radius. The sender wound a narrow ribbon of parchment around his cylinder. Then he\/she wrote on it lengthwise. After the ribbon is unwound, the writing could be read only by a person who had a rod of exactly the same circumference.<\/p>\n<p>\u27a2\u00a0\u00a0 It has the advantage of being fast and not prone to mistakes<\/p>\n<p>\u27a2\u00a0\u00a0 Wind strip of leather around a rod<\/p>\n<p>\u27a2\u00a0\u00a0 Write message across the rod<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: left\">T H E T I M E H A<\/p>\n<p style=\"text-align: left\">S C O M E T H E W<\/p>\n<p style=\"text-align: left\">A L R U S S A I D T<\/p>\n<p style=\"text-align: left\">O T A L K O F M A<\/p>\n<p style=\"text-align: left\">N Y T H I N G S<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 When unwrapped, letters are scrambled<\/p>\n<p>&nbsp;<\/p>\n<p>TSATAHCLONEORTYTMUATIESLHMTS\u2026<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Suppose Alice and Bob use Scytale to encrypt a message<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 60px\">\u2013\u00a0 What is the key?<\/p>\n<p style=\"padding-left: 60px\">\u00a0 \u00a0 The diameter of the Scytale can be regarded as the key of the cipher.<\/p>\n<p style=\"padding-left: 60px\">\u2013\u00a0 How hard is it for Trudy to break without key?<\/p>\n<p style=\"padding-left: 60px\">\u00a0 \u00a0 It can be easily <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cryptanalysis\">broken. <\/a>Since the strip of leather around the rod hints strongly to the crackers.<\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Suppose many different rod diameters are available to Alice and Bob\u2026<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 60px\">\u2013\u00a0 How hard is it for Trudy to break a message?<\/p>\n<p style=\"padding-left: 60px\">To decrypt, Trudy must wrap the leather strip around the rod and read across. The ciphertext is:<\/p>\n<p style=\"padding-left: 60px;text-align: justify\">&#8221;\u00a0\u00a0 TSATAHCLONEORTYTMUATIESLHMTS\u2026&#8221; Every ninth letter will appear on the same line.<\/p>\n<p style=\"padding-left: 60px\">\u2013 Can Trudy attack messages automatically\u2014without manually examining each putative decrypt?<\/p>\n<p style=\"padding-left: 60px;text-align: justify\">Not possible exactly. Putative decrypt over the ciphertext would have to be transferred to something less susceptible which in turn reduces the advantage over it.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.4 Rail Fence Cipher (Zigzag Cipher)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 A Rail Fence Cipher is a transposition cipher. The letters in the message aren\u2019t changed, but their positions are altered. Unless you know the encryption method, these ciphers are very difficult to crack. To decipher these codes, you need to know the number of rails. Sometimes these ciphers include the spaces between words as blank characters in the cipher.<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 write message letters out diagonally over a number of rows<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 then read off cipher row by row Example<\/p>\n<p>&nbsp;<\/p>\n<p>plain text : meet me after the toga party<\/p>\n<p>&nbsp;<\/p>\n<p>m e m a t r h t g p r y<\/p>\n<p>e t e f e t e o a a t<\/p>\n<p>&nbsp;<\/p>\n<p>giving ciphertext<\/p>\n<p>&nbsp;<\/p>\n<p>MEMATRHTGPRYETEFETEOAAT<\/p>\n<p>&nbsp;<\/p>\n<p>The drawback over here is it has no communication security, and it can be easily broken even by hand.<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n<p><strong>4.5 Columnar Transposition<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Put plaintext into rows of matrix then read ciphertext out of columns. The simplest transposition cipher is the columnar transposition. This comes in two forms, the complete columnar transposition and the incomplete columnar. In both of these systems, the plain text is written horizontally in a rectangle that is as wide as the length of the key.<\/p>\n<p>&nbsp;<\/p>\n<p>Example<\/p>\n<p>&nbsp;<\/p>\n<p>suppose matrix is 3 x 4<\/p>\n<p>&nbsp;<\/p>\n<p>Plaintext: SEETHELIGHT<\/p>\n<p>&nbsp;<\/p>\n<p>Ciphertext: SHGEEHELTTIX<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Same effect as Scytale.What is the key? Except the transposition of letters based on 3 x 4 matrix no key is used.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.6 Keyword Columnar Transposition<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In Columnar transposition plain text can be padded based on key either in regular or irregular method. In regular way the plain text has been padded so that it nearly fits the matrix\/rectangle. But in the case of irregular transposition leaves these characters blank, though this makes decryption slightly more difficult. The columns are now reordered such that the letters in the key word are ordered alphabetically.<\/p>\n<p>&nbsp;<\/p>\n<p>Example<\/p>\n<p>&nbsp;<\/p>\n<p>Plaintext: CRYPTOISFUN<\/p>\n<p>Matrix 3 x 4 and keyword MATH<\/p>\n<p>Ciphertext: ROUPSXCTFYIN<\/p>\n<p>&nbsp;<\/p>\n<p>How can Trudy cryptanalyze this cipher?<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Consider the ciphertext<\/p>\n<p>VOESA IVENE MRTNL EANGE WTNIM HTMLL ADLTR NISHO<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Matrix is n x m for some n and m<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 Since 45 letters, n\u00a0 m = 45<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 The ciphertext is<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">VOESA IVENE MRTNL EANGE WTNIM HTMLL ADLTR NISHO DWOEH<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">\u2022\u00a0\u00a0\u00a0\u00a0\u00a0 If encryption matrix was 9 x 5, then\u2026<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"text-align: initial;font-size: 1em\">4.6.1 Cryptanalysis<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">\u27a2 Exhaustive key search<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">o Always an option for Intruders.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">o With the advent of computers and computer cipher systems, cryptanalysts have had to fall back on brute-force guessing to extract the key from a large set of cryptograms.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">\u27a2 If keyspace is too large, such an attack will not succeed in a reasonable time<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">o Or it will have a low probability of success<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">\u27a2 A large keyspace is necessary for security<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">\u27a2 But, large keyspace is not sufficient<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"text-align: initial;font-size: 1em\">4.7 Double Transposition<\/strong><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">One of the most secure hand ciphers used for military field-grade inSecond World War. To perform a Double Columnar Transposition we write out the key as column header. The key is numbered in alphabetical order. If two letters of the key are the same, the first in the key gets the lowest number. <\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Example<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">Plain text : THIS IS A SECRET MESSAGE<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">1st Columnar Key: LEONARDO<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">2nd Columnar Key: DAVINCI<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Note that, in reality, two keywords with a length up to 20 letters each were used to encipher a message.<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">The plain text is written out in successive rows beneath the headers:<\/span><\/p>\n<\/div>\n<p><span style=\"text-align: initial;font-size: 1em\">\u00a0 \u00a0 L E O N A R D O<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">4 3 6 5 1 8 2 7<\/span><\/p>\n<div>\n<p>\u00a0 \u00a0&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>T H I S I S A S<\/p>\n<p>E C R E T M E S<\/p>\n<p>S A G E<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>First cipher text: ITAEHCATESSEEIRGSSSM<\/p>\n<p>Next, we write it down again, in successive rows, and perform the second transposition.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>D A V I N C I<\/p>\n<p>3 1 7 4 6 2 5<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>I T A E H C A<\/p>\n<p>T E S S E E I<\/p>\n<p>R G S S S M<\/p>\n<p>&nbsp;<\/p>\n<p>Again, we read off the ciphertext by the column and write down the text in groups of five:<\/p>\n<p>&nbsp;<\/p>\n<p>The final cipher text: TEGCE MITRE SSAIH ESASS<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.7.1 Cryptanalysis<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Divide and conquer<\/p>\n<p style=\"padding-left: 60px\">o\u00a0\u00a0\u00a0\u00a0 Trudy attacks part of the keyspace<\/p>\n<p style=\"padding-left: 60px\">o\u00a0\u00a0\u00a0\u00a0 A great shortcut attack strategy<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Requires careful analysis of algorithm<\/p>\n<p>\u27a2\u00a0\u00a0 We will see this again and again in the attacks discussed later<\/p>\n<p><span style=\"font-size: 1em;text-align: initial\">\u27a2\u00a0\u00a0 Of course, cryptographers try to prevent divide and conquer attacks<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2\u00a0\u00a0 Its main weakness was that if the attacker intercepts two or more messages of same length using the same key then they could be compared by a tedious process known as \u201cmultiple anagramming\u201d.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.8 One-Time Pad(Vernam Cipher\/Perfect Cipher)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 A provably secure cipher<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 The One Time Pad encryption method is nothing new. In 1882, Frank Miller was the first to describe the One Time Pad system for securing telegraphy. In 1917, Gilbert Vernam invented a cipher solution for a teletype machine. U.S. Army Captain Joseph Mauborgne realized that the character on the key tape could be completely random. Together, they introduced the first One Time Pad encryption system.<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 No other cipher we discuss is provably secure<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Why not use one-time pad for everything?<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 60px\">o\u00a0\u00a0\u00a0\u00a0 Impractical for most applications<\/p>\n<p style=\"padding-left: 60px\">o\u00a0\u00a0\u00a0\u00a0 But it does have its uses<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.8.1 One-Time Pad Encryption<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 The One Time Pad encryption method is a binary additive stream cipher, where a stream of truly random keys is generated and then combined with the plain text for encryption or with the cipher text for decryption by an \u2018exclusive OR\u2019 (XOR) addition. It is possible to prove that a stream cipher encryption scheme is unbreakable if the following preconditions are met<\/p>\n<p>&nbsp;<\/p>\n<p>1.\u00a0\u00a0\u00a0\u00a0\u00a0 The key must be as long as the plain text.<\/p>\n<p>2.\u00a0\u00a0\u00a0\u00a0\u00a0 The key must be truly random.<\/p>\n<p>3.\u00a0\u00a0\u00a0\u00a0\u00a0 The key must only be used once<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 One Time Pad keys are used in pairs. The keys are distributed securely prior to encryption. One copy of the key is kept by the sender and one by the recipient.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 Both sender\u2019s and recipient\u2019s keys are automatically destroyed after use, so that erroneous re-application of the same key is impossible<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-49 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-15.png\" alt=\"\" width=\"500\" height=\"403\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-15.png 500w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-15-300x242.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-15-65x52.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-15-225x181.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-15-350x282.png 350w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.8.2 ONE-TIME PAD DECRYPTION<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-50 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-16.png\" alt=\"\" width=\"524\" height=\"403\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-16.png 524w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-16-300x231.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-16-65x50.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-16-225x173.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-16-350x269.png 350w\" sizes=\"auto, (max-width: 524px) 100vw, 524px\" \/><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n<p><strong>4.8.3 One-Time Pad Summary<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Provably secure, when used correctly<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 30px\">\u2013\u00a0 Ciphertext provides no info about plaintext<\/p>\n<p style=\"padding-left: 30px\">\u2013\u00a0 All plaintexts are equally likely<\/p>\n<p style=\"padding-left: 30px\">\u2013\u00a0 Pad must be random, used only once<\/p>\n<p style=\"padding-left: 30px\">\u2013\u00a0 Pad is known only by sender and receiver<\/p>\n<p style=\"padding-left: 30px\">\u2013\u00a0 Pad is same size as message<\/p>\n<p style=\"padding-left: 30px\">\u2013\u00a0 No assurance of message integrity<\/p>\n<p>\u27a2\u00a0\u00a0 Why not distribute message the same way as the pad?<\/p>\n<p>&nbsp;<\/p>\n<p>Because the messages are vulnerable to attacks by the intruders.<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Cryptanalysis<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">With One Time Pad encryption, the key used for encoding the message is completely random and is as long as the message itself. That is why the only possible attack to such a cipher is a brute force attack. Brute force attacks use exhaustive trial and error methods in order to find the key that has been used for encrypting the plain text. This means that every possible combination of key bits must be used to decrypt the cipher text. The correct key would be the one that produces a meaningful plain text.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.8.4 Real-World One-Time Pad<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0\u00a0\u00a0\u00a0 Project <a href=\"http:\/\/www.nsa.gov\/venona\/index.cfm\">VENONA<\/a><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;padding-left: 30px\">The Venona project (1943\u201380) was a counter-intelligence program initiated by the U.S. Army\u2019s <a href=\"https:\/\/en.wikipedia.org\/wiki\/Signal_Intelligence_Service\">Signal Intelligence Service <\/a>(later the <a href=\"https:\/\/en.wikipedia.org\/wiki\/National_Security_Agency\">National<\/a> <a href=\"https:\/\/en.wikipedia.org\/wiki\/National_Security_Agency\">Security Agency)<\/a>.The purpose of the Venona project was the decryption of messages transmitted by the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Intelligence_agencies\">intelligence agencies <\/a>of the Soviet Union, e.g. the <a href=\"https:\/\/en.wikipedia.org\/wiki\/NKVD\">NKVD, <\/a>the <a href=\"https:\/\/en.wikipedia.org\/wiki\/KGB\">KGB <\/a>(foreign intelligence) and the <a href=\"https:\/\/en.wikipedia.org\/wiki\/GRU\">GRU <\/a>(military intelligence). During the 37-year duration of the Venona project, the Signal\u00a0<span style=\"font-size: 1em;text-align: initial\">Intelligence Service decrypted and translated approximately 3,000 messages from Russian to EnglishSpy carried one-time pad into U.S.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Spy used pad to encrypt secret messages<\/p>\n<p>\u27a2\u00a0\u00a0 Repeats within the \u201cone-time\u201d pads made cryptanalysis possible<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.9 Codebook Cipher<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Literally, a book filled with \u201ccodes\u201d<\/p>\n<p style=\"padding-left: 60px\">\u2013\u00a0 More precisely, 2 codebooks, 1 for encryption and 1 for decryption<\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Key is the codebook itself<\/p>\n<p>\u27a2\u00a0\u00a0 Security of cipher requires physical security for codebook<\/p>\n<p>\u27a2\u00a0\u00a0 Codebooks widely used through WWII<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 In a classic codebook cipher, there are two books, one of which has plaintext words(or phrases) listed in alphabetical order, each of which is adjacent to its corresponding codeword. A particular word or phrase is encrypted by looking it up in the codebook and replacing it with the appropriate codeword. A corresponding codebook indexed by codewords is used to decrypt.<\/p>\n<p>\u27a2\u00a0\u00a0\u00a0\u00a0\u00a0 <a href=\"http:\/\/library.thinkquest.org\/28005\/flashed\/timemachine\/courseofhistory\/zimmerman.shtml?tqskip1=1&amp;tqtime=1029\">Zimmerman Telegram <\/a>encrypted via codebook<\/p>\n<p>&nbsp;<\/p>\n<table class=\"aligncenter\">\n<tbody>\n<tr>\n<td>February<\/td>\n<td>13605<\/td>\n<\/tr>\n<tr>\n<td>fest<\/td>\n<td>13732<\/td>\n<\/tr>\n<tr>\n<td>finanzielle<\/td>\n<td>13850<\/td>\n<\/tr>\n<tr>\n<td>folgender<\/td>\n<td>13918<\/td>\n<\/tr>\n<tr>\n<td>Frieden<\/td>\n<td>17142<\/td>\n<\/tr>\n<tr>\n<td>Friedenschluss<\/td>\n<td>17149<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 Modern block ciphers are codebooks!<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.9.1 Zimmerman Telegram<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 One of most famous codebook ciphers ever<\/p>\n<p>\u27a2\u00a0\u00a0 Led to US entry in WWI<\/p>\n<p>\u27a2\u00a0\u00a0 Ciphertext shown here\u2026<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-51 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-17.png\" alt=\"\" width=\"521\" height=\"338\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-17.png 521w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-17-300x195.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-17-65x42.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-17-225x146.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-17-350x227.png 350w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.9.1.1 Zimmerman Telegram Decrypted<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u27a2\u00a0\u00a0 British had recovered partial codebook<\/p>\n<p>\u27a2\u00a0\u00a0 Able to fill in missing parts<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 The security of a classic codebook cipher depends heavily on the physical security of the book itself. That is, the book must be protected from capture by the enemy.<\/p>\n<p>\u27a2\u00a0\u00a0 Codebooks are susceptible to statistical analysis<\/p>\n<p style=\"padding-left: 60px\">1)\u00a0\u00a0\u00a0\u00a0 Like simple substitution cipher, but lots of data required to attack a codebook<\/p>\n<p>\u27a2\u00a0\u00a0 Historically, codebooks very popular<\/p>\n<p>\u27a2\u00a0\u00a0 To extend useful life of a codebook, an additive was usually used<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4.9.2 Codebook Additive<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u27a2\u00a0\u00a0 As late as world war II, codebooks were in widespread use. Cryptographers realized that these ciphers were subject to statistical attack, so codebooks were regularly replaced with new codebooks. Since this was an expensive and risky process, it was necessary to extend the life of a codebook as much as possible. To this end, an additive book was generally used.<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2 Codebook additive is another book filled with \u201crandom\u201d number<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2 Sequence of additive numbers added to codeword to yield ciphertext<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2 Usually, starting position in additive book selected at random by sende<\/span><\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">\u27a2 Starting additive position usually sent \u201cin the clear\u201d with the ciphertext<\/span><\/p>\n<p style=\"text-align: justify;padding-left: 30px\"><span style=\"text-align: initial;font-size: 1em\">1) Part of the Message Indicator (MI)<\/span><\/p>\n<p style=\"text-align: justify;padding-left: 30px\"><span style=\"text-align: initial;font-size: 1em\">2) Modern term: Initialization Vector (IV)<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Summary<\/strong><\/p>\n<p>\u27a2 Outlined the transposition cryptography<\/p>\n<p>\u27a2 Explained the various types of transposition cryptography<\/p>\n<p>\u27a2 Introduction to modern cryptography<\/p>\n<p>\u27a2 Explored the various types cryptanalysis<\/p>\n<p>1) Exhaustive key search 2) Divide and conquer 3) Statistical analysis 4) Exploit linearity<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Transposition Cipher and Cryptanalysis<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/RsOSA8AREpw\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-52 alignleft\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-18.png\" alt=\"\" width=\"646\" height=\"485\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-18.png 646w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-18-300x225.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-18-65x49.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-18-225x169.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-18-350x263.png 350w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/p>\n","protected":false},"author":3,"menu_order":3,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-kulothungan"],"pb_section_license":""},"chapter-type":[],"contributor":[58],"license":[],"class_list":["post-46","chapter","type-chapter","status-publish","hentry","contributor-dr-kulothungan"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":6,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/46\/revisions"}],"predecessor-version":[{"id":525,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/46\/revisions\/525"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/46\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapter-type?post=46"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/contributor?post=46"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/license?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}