Historical Ciphers Part 2

Total Page:16

File Type:pdf, Size:1020Kb

Historical Ciphers Part 2 ECE 646 - Lecture 7 Required Reading • W. Stallings, Cryptography and Network Security, Historical Ciphers Chapter 3, Classical Encryption Techniques Part 2 • A. Menezes et al., Handbook of Applied Cryptography, Chapter 7.3 Classical ciphers and historical development 1 2 Substitution Ciphers (2) 14 12 Character frequency 2. Polyalphabetic substitution cipher 10 in a long English 8 plaintext M = m1 m2 … md 6 md+1 md+2 … m2d 4 m2d+1 m2d+2 … m3d 2 ….. 0 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 C = f1(m1) f2(m2) … fd(md) Character frequency 14 in the corresponding f1(md+1) f2(md+2) … fd(m2d ) 12 f (m ) f ( m ) … f (m ) ciphertext 1 2d+1 2 2d+2 d 3d 10 for a polyalphabetic ….. 8 substitution cipher d is a period of the cipher 6 1 × 100% » 3.8 % 4 26 Key = d, f1, f2, …, fd 2 d 26 d Number of keys for a given period d = (26!) » (4 × 10 ) 0 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 3 4 Polyalphabetic substitution ciphers Vigenère Cipher - Example Simplifications (1) Plaintext: TO BE OR NOT TO BE A. Vigenère cipher: polyalphabetic shift cipher Key: NSA Invented in 1568 Encryption: T O B E O R ci = fi mod d(mi) = mi + ki mod d mod 26 N O T T O B -1 mi = f i mod d(ci) = ci - ki mod d mod 26 E Key = k0, k1, … , kd-1 Number of keys for a given period d = (26)d 5 6 1 Vigenère Square Vigenère Square plaintext: 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 plaintext: 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 3 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 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 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 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 a N S A c 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 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 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 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 T O B 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 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 d f g h i j k l m n o p q r s t u v w x y z 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 a b c d e E O R g h i j k l m n o p q r s t u v w x y z 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 a b c d e f h i j k l m n o p q r s t u v w x y z 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 a b c d e f g N O T i j k l m n o p q r s t u v w x y z 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 a b c d e f g h T O B j k l m n o p q r s t u v w x y z 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 a b c d e f g h i k l m n o p q r s t u v w x y z 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 a b c d e f g h i j E l m n o p q r s t u v w x y z 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 a b c d e f g h i j k m n o p q r s t u v w x y z 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 a b c d e f g h i j k l 1 G G B n o p q r s t u v w x y z 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 a b c d e f g h i j k l m o p q r s t u v w x y z 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 a b c d e f g h i j k l m n R G R p q r s t u v w x y z 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 a b c d e f g h i j k l m n o q r s t u v w x y z 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 a b c d e f g h i j k l m n o p A G T r s t u v w x y z 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 a b c d e f g h i j k l m n o p q 2 G G B s t u v w x y z 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 a b c d e f g h i j k l m n o p q r t u v w x y z 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 a b c d e f g h i j k l m n o p q r s R u v w x y z 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 a b c d e f g h i j k l m n o p q r s t v w x y z 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 a b c d e f g h i j k l m n o p q r s t u w x y z 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 a b c d e f g h i j k l m n o p q r s t u v x y z 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 a b c d e f g h i j k l m n o p q r s t u v w y z 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 a b c d e f g h i j k l m n o p q r s t u v w x z 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 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 7 8 Vigenère Cipher - Example Determining the period of the polyalphabetic cipher Plaintext: TO BE OR NOT TO BE Kasiski’s method Key: NSA N S A Ciphertext: G G B R G R A G T G G B R Encryption: T O B E O R N O T Distance = 9 T O B E Period d is a divisor of the distance between G G B identical blocks of the ciphertext R G R A G T G G B In our example: d = 3 or 9 R Ciphertext: GGBRGRAGTGGBR 9 10 Index of coincidence method (1) Index of coincidence method (2) ni - number of occurances of the letter i in the ciphertext Measure of roughness: i = a .
Recommended publications
  • To What Extent Did British Advancements in Cryptanalysis During World War II Influence the Development of Computer Technology?
    Portland State University PDXScholar Young Historians Conference Young Historians Conference 2016 Apr 28th, 9:00 AM - 10:15 AM To What Extent Did British Advancements in Cryptanalysis During World War II Influence the Development of Computer Technology? Hayley A. LeBlanc Sunset High School Follow this and additional works at: https://pdxscholar.library.pdx.edu/younghistorians Part of the European History Commons, and the History of Science, Technology, and Medicine Commons Let us know how access to this document benefits ou.y LeBlanc, Hayley A., "To What Extent Did British Advancements in Cryptanalysis During World War II Influence the Development of Computer Technology?" (2016). Young Historians Conference. 1. https://pdxscholar.library.pdx.edu/younghistorians/2016/oralpres/1 This Event is brought to you for free and open access. It has been accepted for inclusion in Young Historians Conference by an authorized administrator of PDXScholar. Please contact us if we can make this document more accessible: [email protected]. To what extent did British advancements in cryptanalysis during World War 2 influence the development of computer technology? Hayley LeBlanc 1936 words 1 Table of Contents Section A: Plan of Investigation…………………………………………………………………..3 Section B: Summary of Evidence………………………………………………………………....4 Section C: Evaluation of Sources…………………………………………………………………6 Section D: Analysis………………………………………………………………………………..7 Section E: Conclusion……………………………………………………………………………10 Section F: List of Sources………………………………………………………………………..11 Appendix A: Explanation of the Enigma Machine……………………………………….……...13 Appendix B: Glossary of Cryptology Terms.…………………………………………………....16 2 Section A: Plan of Investigation This investigation will focus on the advancements made in the field of computing by British codebreakers working on German ciphers during World War 2 (1939­1945).
    [Show full text]
  • Breaking the Enigma Cipher
    Marian Rejewski An Application of the Theory of Permutations in Breaking the Enigma Cipher Applicaciones Mathematicae. 16, No. 4, Warsaw 1980. Received on 13.5.1977 Introduction. Cryptology, i.e., the science on ciphers, has applied since the very beginning some mathematical methods, mainly the elements of probability theory and statistics. Mechanical and electromechanical ciphering devices, introduced to practice in the twenties of our century, broadened considerably the field of applications of mathematics in cryptology. This is particularly true for the theory of permutations, known since over a hundred years(1), called formerly the theory of substitutions. Its application by Polish cryptologists enabled, in turn of years 1932–33, to break the German Enigma cipher, which subsequently exerted a considerable influence on the course of the 1939–1945 war operation upon the European and African as well as the Far East war theatres (see [1]–[4]). The present paper is intended to show, necessarily in great brevity and simplification, some aspects of the Enigma cipher breaking, those in particular which used the theory of permutations. This paper, being not a systematic outline of the process of breaking the Enigma cipher, presents however its important part. It should be mentioned that the present paper is the first publication on the mathematical background of the Enigma cipher breaking. There exist, however, several reports related to this topic by the same author: one – written in 1942 – can be found in the General Wladyslaw Sikorski Historical Institute in London, and the other – written in 1967 – is deposited in the Military Historical Institute in Warsaw.
    [Show full text]
  • Historical Ciphers • A
    ECE 646 - Lecture 6 Required Reading • W. Stallings, Cryptography and Network Security, Chapter 2, Classical Encryption Techniques Historical Ciphers • A. Menezes et al., Handbook of Applied Cryptography, Chapter 7.3 Classical ciphers and historical development Why (not) to study historical ciphers? Secret Writing AGAINST FOR Steganography Cryptography (hidden messages) (encrypted messages) Not similar to Basic components became modern ciphers a part of modern ciphers Under special circumstances modern ciphers can be Substitution Transposition Long abandoned Ciphers reduced to historical ciphers Transformations (change the order Influence on world events of letters) Codes Substitution The only ciphers you Ciphers can break! (replace words) (replace letters) Selected world events affected by cryptology Mary, Queen of Scots 1586 - trial of Mary Queen of Scots - substitution cipher • Scottish Queen, a cousin of Elisabeth I of England • Forced to flee Scotland by uprising against 1917 - Zimmermann telegram, America enters World War I her and her husband • Treated as a candidate to the throne of England by many British Catholics unhappy about 1939-1945 Battle of England, Battle of Atlantic, D-day - a reign of Elisabeth I, a Protestant ENIGMA machine cipher • Imprisoned by Elisabeth for 19 years • Involved in several plots to assassinate Elisabeth 1944 – world’s first computer, Colossus - • Put on trial for treason by a court of about German Lorenz machine cipher 40 noblemen, including Catholics, after being implicated in the Babington Plot by her own 1950s – operation Venona – breaking ciphers of soviet spies letters sent from prison to her co-conspirators stealing secrets of the U.S. atomic bomb in the encrypted form – one-time pad 1 Mary, Queen of Scots – cont.
    [Show full text]
  • Polish Mathematicians Finding Patterns in Enigma Messages
    Fall 2006 Chris Christensen MAT/CSC 483 Machine Ciphers Polyalphabetic ciphers are good ways to destroy the usefulness of frequency analysis. Implementation can be a problem, however. The key to a polyalphabetic cipher specifies the order of the ciphers that will be used during encryption. Ideally there would be as many ciphers as there are letters in the plaintext message and the ordering of the ciphers would be random – an one-time pad. More commonly, some rotation among a small number of ciphers is prescribed. But, rotating among a small number of ciphers leads to a period, which a cryptanalyst can exploit. Rotating among a “large” number of ciphers might work, but that is hard to do by hand – there is a high probability of encryption errors. Maybe, a machine. During World War II, all the Allied and Axis countries used machine ciphers. The United States had SIGABA, Britain had TypeX, Japan had “Purple,” and Germany (and Italy) had Enigma. SIGABA http://en.wikipedia.org/wiki/SIGABA 1 A TypeX machine at Bletchley Park. 2 From the 1920s until the 1970s, cryptology was dominated by machine ciphers. What the machine ciphers typically did was provide a mechanical way to rotate among a large number of ciphers. The rotation was not random, but the large number of ciphers that were available could prevent depth from occurring within messages and (if the machines were used properly) among messages. We will examine Enigma, which was broken by Polish mathematicians in the 1930s and by the British during World War II. The Japanese Purple machine, which was used to transmit diplomatic messages, was broken by William Friedman’s cryptanalysts.
    [Show full text]
  • The Enigma History and Mathematics
    The Enigma History and Mathematics by Stephanie Faint A thesis presented to the University of Waterloo in fulfilment of the thesis requirement for the degree of Master of Mathematics m Pure Mathematics Waterloo, Ontario, Canada, 1999 @Stephanie Faint 1999 I hereby declare that I am the sole author of this thesis. I authorize the University of Waterloo to lend this thesis to other institutions or individuals for the purpose of scholarly research. I further authorize the University of Waterloo to reproduce this thesis by pho­ tocopying or by other means, in total or in part, at the request of other institutions or individuals for the purpose of scholarly research. 11 The University of Waterloo requires the signatures of all persons using or pho­ tocopying this thesis. Please sign below, and give address and date. ill Abstract In this thesis we look at 'the solution to the German code machine, the Enigma machine. This solution was originally found by Polish cryptologists. We look at the solution from a historical perspective, but most importantly, from a mathematical point of view. Although there are no complete records of the Polish solution, we try to reconstruct what was done, sometimes filling in blanks, and sometimes finding a more mathematical way than was originally found. We also look at whether the solution would have been possible without the help of information obtained from a German spy. IV Acknowledgements I would like to thank all of the people who helped me write this thesis, and who encouraged me to keep going with it. In particular, I would like to thank my friends and fellow grad students for their support, especially Nico Spronk and Philippe Larocque for their help with latex.
    [Show full text]
  • History Today 12 June 2018: Back to Basics
    Back to Basics June 12 The CCH has seen a few instances recently where published histories on the outside that deal with World War II cryptology have used WW II cryptologic terminology incorrectly or made other erroneous statements about the wartime effort. We decided it would be a good idea to lay out some terminology and basic facts for reference. If all this sounds like a primer, well, yes, it is. But we hope it is also an interesting primer. Both the United States and Great Britain had intensive cryptanalytic efforts before World War II, and both enjoyed a measure of success. Although both countries worked a variety of targets, the British concentrated on German cryptosystems, and the U.S. on Japanese systems. Each gave a covername to the systems they sought to solve, and, when successful against an adversary’s system, they applied a different covername to the results of the cryptanalysis. The Americans and British began cautious sharing in early 1941 of what the British called Signals Intelligence (SIGINT) and U.S. officials called Communications Intelligence (COMINT). Over the course of the war, just as the two nations grew closer in military operations, their cryptologic organizations greatly increased cooperation. Both countries had a covername that was applied to the information derived from exploiting a foreign cryptosystem. This had a double purpose; it would help keep the intelligence information within carefully controlled distribution system, and it would alert the reader to the fact that the intelligence had been obtained through an extremely fragile process and could only be discussed with others who held the proper clearances for that kind of intelligence.
    [Show full text]
  • Needles and Haystacks: the Search for Ultra in the 1930'S
    Calhoun: The NPS Institutional Archive Theses and Dissertations Thesis Collection 1983-03 Needles and haystacks: the search for Ultra in the 1930's Gouaze, Linda Yolande Monterey, California. Naval Postgraduate School http://hdl.handle.net/10945/19918 DUDLEY KNOX NAV i 9 NAVAL POSTGRADUATE SCHOOL Monterey, California THESIS NEEDLS AND HAYSTACKS: THE SEARCH FOR ULTRA IN THE 1 930 * s by Linda Yolande Gouaze' March 1983 Thesis Advisor: S . J u r i k a Approved for public release; distribution unlimited Ui^ft UNCLASSIFIED SECURITY CLASSIFICATION OF THIS PACE (When Dmlm Znlored) READ INSTRUCTIONS REPORT DOCUMENTATION PAGE BEFORE COMPLETING FORM 1. REPORT NUMBER 2. GOVT ACCESSION NO. 3. RECIPIENT'S CATALOG NUMBER 4. TITLE (mnd Subtitle) 5. TYPE OF REPORT & PERIOD COVERED Master's Thesis; Needles and Haystacks: The Search March 1983 1930' for Ultra in the s 6. PERFORMING ORG. REPORT NUMBER 7. AUTHORS 8. CONTRACT OR GRANT NUMBERf*) Linda Yolande Gouaze 1. RERFORMINO ORGANIZATION NAME AND AOORESS 10. PROGRAM ELEMENT. PROJECT, TASK AREA & WORK UNIT NUMBERS Naval Postgraduate School Monterey, California 93943 II. CONTROLLING OFFICE NAME AND AOORESS 12. REPORT DATE March 1983 Naval Postgraduate School Monterey, California 93943 O. NUMBER OF PAGES 84 14. MONITORING AGENCY NAME * AOORESSf" dllterent /ram Controlling Olllce) 15. SECURITY CLASS, (ol thle report) UNCLASSIFIED IS*. DECLASSIFICATION/ DOWNGRADING SCHEDULE IS. DISTRIBUTION STATEMENT (ol thle Report) Approved for public release; distribution unlimited 17. DISTRIBUTION STATEMENT (ol In* ebetrmct entered In Block 20, It different from Report) It. SURRLEMENTARY NOTES Enigma British Intelligence code-breaking World War II Polish Intelligence intelligence French Intelligence cryptology 20.
    [Show full text]
  • The Patron of NCSC
    The patron of NCSC According to the Decision of the Minister of National Defense of February 4, 2020, the National Cyber Security Centre was given a name after Jerzy Witold Różycki. The above decision was based on a prevalent belief that Jerzy Różycki took a prominent place in the tradition of Poland through his special contribution to the area of cryptology. That puts him among the greatest world cryptologists of the 20th century. Różycki was one of three most pivotal scientists who broke the German Enigma-machine ciphers. Side by side, Marian Rejewski and Henryk Zygalski also worked with him in the lineup. From 1932, these scientists were employees of the Polish . After the outbreak of World War II, Polish cryptologists sustained their work in France and Great Britain. Jerzy Różycki perished in the Mediterranean Sea in 1942 during his trip from Algiers to France. Jerzy Witold Różycki was born on July 24, 1909 in Olszana. In 1926 he passed his matriculation exam at Secondary School in Wyszków. Later on, he became a student of the Faculty of Mathematics and Natural Sciences of Poznań University. As a student, he demonstrated unique logical and linguistic skills, especially in German language. Zdzisław Krygowski (his promoter) was one of those those who perceived that. In 1929, the Institute of Mathematics of the University of Poznań was involved in the enterprise of the Cipher Bureau of the 2nd Division of the General Staff of the Polish Army. This initiative was aimed at searching for mathematically-skilled people with a special predisposition to do cryptological work.
    [Show full text]
  • LACIDA, Named After Its Creators Langer, Ciężki, and Danilewicz
    Introduction. This article is about a WW II-era Polish Cryptomachine called LACIDA, named after its creators LAnger, CIężki, and DAnilewicz. Not much is known about this machine, but what is known is quite interesting. It is similar to Enigma, but it has six rotors, three of which turn during the encryption process, and three of which are fixed, and these rotors are of three different sizes. Unlike Enigma, there is no reflector or plugboard. There being no reflector, there is an explicit encryption mode and an explicit decryption mode - which is being used is selected by a switch. According to Wikipedia, Marian Rejewski held that this device was not very effective, and might have been easily broken [1]. A closer look. Figure 1: A picture of LACIDA (from [2]). Napęd wskaźnika. Display driver (to show "SZYFR"/"DESZFYR"). Przełącnik szyfr-deszyfr. Cipher/Decipher switch. Połączenie wieloprzewodowe kasety szyfrującej z maszyną Multi-wire connection between the encryption system box and elektryczną do pisania. the electric typewriter. Naciąg sprężyny napędu wirników szyfrujących. Tension spring adjustment for the encryption rotor drive. Zamki pokrywy górnej (dostęp do centrali wtyczkowej). Top cover locks (access to the encryption system). Pokrętta wirników szyfrujących. Encryption rotors exposed for setting. Kaseta szyfrująca. Box containing the encryption system. Okienka literowe. Windows through which the turnable rotors can be seen. This author felt that it might be interesting to produce a simulator to replicate the behaviour of this machine; as this author's hardware design and construction skills are somewhat limited, this simulator would be entirely software- based, and its overall design would be determined by [3].
    [Show full text]
  • The History of Cracking the ENIGMA Machine
    From Poznań to Bletchley Park : the history of cracking the ENIGMA machine: Marie-José Durand-Richard1 Philippe Guillot2 INTRODUCTION During World War II, the Allies could read many of the German ciphered messages they intercepted in plain text almost immediately, providing them with an advantage that had a significant impact on the course of the conflict. Movies such as Enigma (1999) and The Imitation Game (2015), highlight the success of the work of the British at Bletchley Park, and particularly the work of the mathematician Alan Madison Turing (1912-1954). But Turing did not work alone on breaking the Enigma code at Bletchley Park, and it is much less well-known that during the 1930s, the Poles had already accomplished the feat of making transparent the enciphered communications between the German army and its General Staff. So, the history of breaking the Enigma code is rather more complicated than is shown in such hagiographic movies. In this perspective, this paper focuses on the various skills at work in cracking the Enigma machine. In the period from 1932 to 1942, both the French and the British considered military intelligence would be more essential than mathematical cryptanalysis in overcoming the problem. However, their political and geographical situation stimulated the Poles to coordinate their technical, mathematical and political capabilities. Cyclometers, Bombas and perforated sheets were produced to help them overcome complications gradually introduced by the German armies in their Enigma ciphering methods. As early as 1936, the British codebreaker A. Dillwyn (Dilly) Knox (1884-1943) started a manual cryptanalysis of the commercial Enigma code at the Government Code and Cipher School (GC&CS) and succeeded in breaking the code of its Spanish and Italian versions in 1937.
    [Show full text]
  • Facts and Myths of Enigma: Breaking Stereotypes
    Facts and Myths of Enigma: Breaking Stereotypes Kris Gaj1 and Arkadiusz Oráowski2 1 George Mason University, Electrical and Computer Engineering 4400 University Drive, Fairfax, VA 22030, U.S.A. [email protected] 2 Institute of Physics, Polish Academy of Sciences Aleja Lotników 32/46, 02-668 Warszawa, Poland [email protected] Abstract. In spite of a relatively large number of publications about breaking Enigma by the Allies before and during the World War II, this subject remains relatively unknown not only to the general public, but also to people professionally involved in cryptological research. For example, the story of Enigma is rarely a part of a modern textbook on cryptology or a modern course on cryptography and network security. There exist multiple reasons for this situation. First, there are still a few unresolved issues, resulting from conflicting reports, the lack of reliable sources, and a long period required for declassifying documents related to any cryptological activity during the World War II. Secondly, the issue is highly political, and there is little consensus in weighing the contribution of all involved countries. Thirdly, many contemporary cryptologists honestly believe that there is little to learn from the analysis of old cryptosystems, because of the tremendous progress in theory and practice of cryptography and a little similarity between old and modern ciphers. In this paper we confront these opinions by presenting a look at the current state of knowledge about cryptological methods and devices used to break Enigma. We introduce all major players involved in these activities, and we make an effort to weigh their original contributions.
    [Show full text]
  • Forgotten Heroes of the Enigma Story
    BOOKS & ARTS COMMENT manipulating a force pervading in every- day matter, who ally to mount an insur- rection against the established order and Forgotten heroes of help destroy a giant, partially built beam machine,” writes Martin. The trajectory of US solid-state physics, he notes, “fol- the Enigma story lowed much the same plot”. Although he concedes that the SSC was more drasti- Joanne Baker enjoys a tale of the Polish cryptographers cally affected by the end of the cold war than by intradisciplinary critique, there is who paved the way for Alan Turing’s wartime feats. no doubt where Martin’s sympathies lie. He devotes most of his book to a detailed reconstruction of the intense lan Turing’s crucial unscrambling the mathematicians’ struggle, half a century earlier, for rec- of German messages in the Second families have shared ognition by solid-state physicists against World War was a tour de force of personal letters. the leadership of the APS, which was Acodebreaking. From 1940 onwards, Turing Turing unearths a itself frustrated and challenged by the and his team engineered hundreds of elec- remarkable tale of rapid growth in their ranks during the tronic machines, dubbed bombes, which intellect, bravery and 1940s. Physicists who worked on metals, decrypted the thousands of missives sent by camaraderie that ceramics and other domains straddling enemy commanders each day to guide their reads like a nail-biting fundamental and applied physics wanted soldiers. This deluge of knowledge short- spy novel. representation at APS meetings, leading ened the war. Bletchley Park, UK — the Polish skills in X, Y & Z: The to the creation of the Division of Solid secret centre where it all happened — rightly Real Story of cryptography and State Physics in 1947.
    [Show full text]