The Engima Cipher

1,438 views
1,374 views

Published on

Presentation at University of West Florida's "lunch 'n learn" series, 8 September 2008

Published in: Education, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,438
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
68
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

The Engima Cipher

  1. 1. The Engima Cipher Dr. Vicki Schell Pensacola Junior College [email_address] 9 September 2008
  2. 2. <ul><li>Qm gajkd bck afevbhkj, axvi afevbhd hqvv pbok gajkd. </li></ul><ul><li>If codes are outlawed, only outlaws will have codes. </li></ul>
  3. 3. Taxonomy of Cryptology
  4. 4. ACTIVITY #1: How many possible keys are there when you swap each letter of the alphabet with another letter? 26*25*24*23*22*21*20*19*18*17*16*15*14*13812*11*10*9*8*7*6*5*4*3*2*1 =26! = 400 000 000 000 000 000 000 000 000
  5. 5. 400 septillion keys 6.5 billion people in the world 31 million seconds in a year If everyone in the world checked one key per second, it would still take 2 billion years to check them all!
  6. 6. Code Breaking Tips <ul><li>Common letters </li></ul><ul><li>One letter words </li></ul><ul><li>Common words </li></ul><ul><li>Double letters </li></ul><ul><li>Clues </li></ul>
  7. 7. The Enigma Machine <ul><li>An Enigma cipher machine consisted of five variable components: </li></ul><ul><li>a plugboard which could contain from 0 to 13 dual-wired cables </li></ul><ul><li>3 ordered rotors which wired 26 input contact points to twenty-six output contact points positioned on alternate faces of a disc </li></ul><ul><li>26 serrations around the periphery of the rotors, which allowed the operator to specify an initial rotational position for the rotors </li></ul><ul><li>a moveable ring on each of the rotors, which controlled the rotational behavior of the rotor immediately to the left by means of a notch </li></ul><ul><li>a reflector half-rotor (which did not in fact rotate) to fold inputs and outputs back onto the same face of contact points </li></ul>
  8. 8. The Plugboard <ul><li>On the front of the machine was a section called the &quot;plugboard&quot;. </li></ul><ul><li>The Enigma machine had several cables with a plug at each end that could be used to plug pairs of letters together. </li></ul><ul><li>If A were plugged to B then, on typing the letter A, the electric current would follow the path that was normally associated with the letter B, and vice versa. </li></ul><ul><li>Enigma machines had 10 cables with which to link up pairs of letters. </li></ul>
  9. 9. <ul><li>Activity : How many ways are there to link up pairs of letters on this simplified plugboard? </li></ul><ul><li>5*3*1= 15 ways </li></ul>Simplified Plugboard
  10. 10. The Plugboard <ul><li>Activity : How many ways are there to link up pairs of letters on the Enigma machine? [10 cables] </li></ul><ul><li> 26*24*22*20*18*16*14*12*10*8 </li></ul><ul><li> 1 000 000 000 000 </li></ul>
  11. 11. Rotor Cipher Machines <ul><li>First rotor machine built in 1915 by two Dutch naval officers, van Hengel and Spengler </li></ul><ul><li>Number of inventors independently developed similar rotor machines </li></ul><ul><li>Most of the rotor machines used a typewriter-like keyboard for input and lighted letters for the output. Some of the later devices used punch card and paper tape for input and/or output </li></ul>
  12. 12. The Rotors <ul><li>First rotor rotates each time a character is input. </li></ul><ul><li>The second rotor rotates once each time the first rotor makes one full turn. </li></ul><ul><li>The third rotor rotates once each time the second rotor has rotated completely. </li></ul>
  13. 13. The Rotors <ul><li>Setup: </li></ul><ul><li>Select left/center/right rotors </li></ul><ul><li>Position initial wheel positions by sliding the indicated window letter up to the first row. </li></ul>
  14. 14. The Rotors <ul><li>Operation: </li></ul><ul><li>If the  notch appears in the window row, shift that rotor and the rotor to the left up one row [the Right Rotor is always shifted up one row before each letter is encoded/decoded] </li></ul>
  15. 15. The Rotors: Operations <ul><li>Select letter to encode/decode in the Input column. </li></ul><ul><li>Read adjacent letter, X, in the right hand column of the Right Rotor; select the letter X in the left hand column of the Rotor. </li></ul>
  16. 16. The Rotors: Operations <ul><li>Repeat for Center Rotor. </li></ul><ul><li>Repeat for Left Rotor. </li></ul><ul><li>Read the adjacent letter, R, in the Reflector; select the other letter R in the Reflector. </li></ul>
  17. 17. The Rotors: Operations <ul><li>Read adjacent letter, Y, in the left hand column of the Left Rotor; select the letter Y in the right hand column of the Rotor. </li></ul><ul><li>Repeat for Center Rotor. </li></ul><ul><li>Repeat for Right Rotor. </li></ul>
  18. 18. The Rotors: Operations <ul><li>Write down the adjacent letter, Z, in the output column. </li></ul><ul><li>Repeat for each letter of the message!!!! </li></ul>
  19. 19. The Rotors: Example <ul><li>Initial setting: </li></ul><ul><ul><li>I-II-III: MCK </li></ul></ul><ul><ul><li>Letter E encodes to Q </li></ul></ul><ul><li>Sample Message: </li></ul><ul><li>QMJIDO MZWZJFJR </li></ul>
  20. 20. Settings of the Daily Keys <ul><li>Order of the 3 rotors inside the machine </li></ul><ul><ul><li>6 combinations </li></ul></ul><ul><li>Plugboard connections </li></ul><ul><ul><li>1 x 10 12 combinations </li></ul></ul><ul><li>Initial positions of the rotors </li></ul><ul><ul><li>26 3 = 17,576 combinations </li></ul></ul><ul><li>Positions of rings that determined reflecting postions of 2 rotors </li></ul><ul><ul><li>26 2 = 676 combinations </li></ul></ul><ul><ul><li>= 6 x [1 x 10 12 ] x 26 3 x 26 2  7 x 10 20 combinations </li></ul></ul><ul><ul><li>= 70,000,000,000,000,000,000 </li></ul></ul>
  21. 21. Bletchley House During World War II, codebreakers at Bletchley Park solved messages from a large number of Axis code and cipher systems, including the German Enigma machine. For this purpose, the Bletchley Park mansion was soon joined by a host of other buildings. The mansion's facade is an idiosyncratic mix of architectural styles.
  22. 22. Bletchley House <ul><li>*Hut 1 — the first hut, built in 1939 </li></ul><ul><li>Hut 3 — intelligence: translation & analysis of Army & Air Force Enigma decrypts </li></ul><ul><li>*Hut 4 — Naval intelligence: analysis of Naval Enigma decrypts </li></ul><ul><li>Hut 6 — Cryptanalysis of Army & Air Force Enigma </li></ul><ul><li>Hut 8 — Cryptanalysis Naval Enigma </li></ul><ul><li>Hut 10 — Meteorological section </li></ul><ul><li>Hut 11 — The first Bombe building      </li></ul><ul><li>Hut 14 — main teleprinter building </li></ul>
  23. 23. The Weaknesses of the German Enigma <ul><li>If used properly it was unbreakable BUT the Germans made mistakes: I. Procedural errors </li></ul><ul><li>Forgot to change key settings </li></ul><ul><li>Sent the same message twice </li></ul><ul><li>Used non random message keys like AAA or ASD </li></ul><ul><li>On key sheets put the same wheel in the same position two days running </li></ul><ul><li>II. Key security Sent out sets of key sheets for many months ahead into vulnerable positions like weather ships. </li></ul><ul><li>III. Cribs Used standard message formats too often thus allowing parts of messages to be guessed. ie Cribs to be found. </li></ul>
  24. 24. The Decryption Process at Bletchley Park <ul><li>The German signal officer transmits a Enigma-encrypted message using Morse signals. </li></ul><ul><li>A couple of German soldiers on the battlefield is receive the message and decrypt it by typing in the message on an Enigma machine. </li></ul><ul><li>The German radio signals are intercepted at secret Interceptstations ( Y-stations ) and send by motorbike courier (or later by teleprinter) to Bletchley Park ( Station X ). </li></ul>
  25. 25. The Decryption Process at Bletchley Park <ul><li>Since it is an Army message, the message is delivered to Hut 6, where the hard decryption work is being performed. Cribs are being looked for (Cryptanalysis). </li></ul><ul><li>Cribs are being tested on the bombs in Hut 11 and results are returned to Hut 6. </li></ul><ul><li>The raw decrypts are passed on to Hut 3, where the Intelligence people are translating it and evaluating it, and bringing it into a form suitable for the authorities. </li></ul>
  26. 26. Rodding & Cribs <ul><li>Suppose that we have the crib: </li></ul><ul><li>WETTERVORHERSAGEBISKAYA </li></ul><ul><li>and the following piece of text encrypted: </li></ul><ul><li>QFZWRWIVTYRESXBFOGKUHQBAISEZ </li></ul>
  27. 27. Rodding & Cribs <ul><li>Set of 26 rods, made up of individual rows of a rod-square table </li></ul><ul><li>3 sets needed, one for each of the 3 rotors; color coded </li></ul><ul><li>The importance of Rodding was that, providing a Crib could be found for an intercepted Enigma cipher text, the right hand wheel could be determined and its start position found. Once that was done the middle and left hand wheels were relatively easily found. </li></ul>
  28. 28. Rodding & Cribs <ul><li>begin the search superimposing the two fragments of text and checking all pairs of letters formed: </li></ul><ul><li>WETTERVORHER S AGEBISKAYA </li></ul><ul><li>QFZWRWIVTYRE S XBFOGKUHQBAISEZ </li></ul><ul><li>This configuration is not correct because the S is encrypted with itself, moving the proceeds of a crib position </li></ul>
  29. 29. Rodding & Cribs <ul><li>QFZWRWI V TYR E SXBFOGKUHQB A ISEZ </li></ul><ul><li>WETTER V ORH E RSAGEBISKAY A </li></ul><ul><li>  </li></ul><ul><li>So we slide the crib along the ciphertext by one character and again check the correspondences. </li></ul><ul><li>We again see that the crib is still in the wrong position because a V and E appear in both the crib and the ciphertext in the same position. </li></ul>
  30. 30. Rodding & Cribs <ul><li>QFZWRWI V TYR E SXBFOGKUHQB A ISEZ </li></ul><ul><li>WETTER V ORH E RSAGEBISKAY A </li></ul><ul><li>Here we at last see how the crib can be matched to a sequence of cipher text, so there is the possibility that </li></ul><ul><li>RWIVTYRESXBFOGKUHQBAISE </li></ul><ul><li>is the encryption of </li></ul><ul><li>WETTERVORHERSAGEBISKAYA </li></ul>
  31. 31. <ul><li>QFZWRWI V TYR E SXBFOGKUHQB A ISEZ </li></ul><ul><li>WETTER V ORH E RSAGEBISKAY A </li></ul><ul><li> 12345 6 … </li></ul><ul><li>If the crib is correctly matched with the ciphertext, we know that </li></ul><ul><ul><li>some setting of the Enigma will encode R as W and W as R in a particular position which we will call position 1 </li></ul></ul><ul><ul><li>the Enigma rotor(s) step and then in the next position, which we call position 2, it will encode W as E and E as W, </li></ul></ul><ul><ul><li>then the rotor(s) step and then in the next position which we call position 3, it will encode I as T and T as I, </li></ul></ul><ul><ul><li>and so on. </li></ul></ul>
  32. 32. The Bombe <ul><li>The bomb was a machine capable to seek the proper combination of rotors between all possible combinations. </li></ul><ul><li>It weighed a ton , divided into three batteries, each containing twelve columns of three drums each. </li></ul><ul><li>Each drum represented a rotor, and then every three a whole machine enigma. </li></ul><ul><li>The top row of drums each battery revolved at a speed of 120 rpm </li></ul><ul><li>The Sound of the Turing Bombe </li></ul>
  33. 33. The Bombe <ul><li>Sometimes messages began with the same words, such as a weather report. This gave clues (called a CRIB) about how the rest of the message had been encoded. </li></ul><ul><li>When the code-breakers eventually worked out what the CRIB letters might be, they tested them on the machine </li></ul><ul><li>Bombes were huge, noisy electro-mechanical machines which could check through combinations of letters far quicker than a human being could. </li></ul><ul><li>When the Bombe stopped, this meant that the code-breakers' guesses were right. </li></ul>
  34. 34. How to Speak Crypto <ul><li>A cipher or cryptosystem is used to encrypt the plaintext </li></ul><ul><li>The result of encryption is cipher text </li></ul><ul><li>We decrypt cipher text to recover plaintext </li></ul><ul><li>A key is used to configure a cryptosystem </li></ul>
  35. 35. How to Speak Crypto Code : whole words or phrases replaced by a letter or number Cipher : Individual letters are replaced with other letters or symbols Plaintext : normal English Ciphertext : coded English Cryptology : the art and science of making and breaking “secret codes” Crytography : making “secret codes” Cryptanalysis : breaking ‘secret codes”
  36. 36. http://www.bletchleypark.org/ Thanks to Mike Koss for permission to use his paper Engima machine Simon Singh.  The Code Book - The Science of Secrecy from Ancient Egypt to Quantum Cryptography . ENGIMA Director: Michael Apted. Actors: Dougray Scott, Kate Winslet, Saffron Borrows, Jeremy Northam, Nikolaj Coster-Waldau.  

×