Download presentation
1
The Mathematics Behind
The Enigma Machine The Mathematics Behind
2
My project.. My EPQ project is based around the enigma machine from world war two. Not only did I look into the maths behind the machine but also: it’s detailed history Use during and after the war the mechanics of the machine itself how the code of the machine was finally broken in the 1940s From looking at the applications of Tommy Flowers’ work on decoding the machine, I also discussed the mathematics of computers that we use today, as his machine (Colossus) is described as the world’s first digital, programmable and electronic computer.
3
The enigma machine is an electro-mechanical rotor cipher machine which was used for the encryption of secret messages. It was originally invented by German inventor Arthur Scherbius near the end of world war one. Over the course of the next few decades, the machine was adopted by the military and governments of several countries, the most well known being that of the Nazi's during world war two. After world war two, Winston Churchill told king George VI that “it was thanks to Ultra that we won the war”. He also called the codebreakers “the geese that laid the golden eggs and never cackled”. Allied commander general Dwight d. Eisenhower wrote to the head of mi6, passing on his “heartfelt admiration and sincere thanks for the magnificent services” which “saved thousands of British and American lives” The work at Bletchley park on decoding the wartime messages was so secret that there was a lifetime ban on members disclosing information on their work. The enigma machine..
4
A brief timeline.. the earliest commercial models appeared in the 1920s. The first branch of the military to adopt the use of the machine was the German navy in using 29 letters: A-Z, Ä, Ö and Ü. The decoding of the machines began in when German Hans Thilo Schmidt turned to a life of espionage with the French. Marian Rejewski was the first person to break Enigma in 1932, aged just 27. It took 8 years after this time for the first wartime enigma encoded message to be deciphered (by British mathematician Peter Twinn) in January 1940. By April 1940, encoded messages were being deciphered and read within 24 hours of interception thanks to the work of Alan Turing. By 1945, nearly all German Enigma messages were being read but the German military still believed that the system was secure.
5
The enigma machine has a standard mechanical layout which – over the duration of World War Two – was altered in order for messages to become harder to decode. When the letter on the keyboard was pressed, an electric current passed through the machine through a series of scrambling elements: a plugboard three wheel rotors a reflector end disc Once the current had passed through the machine, a corresponding light bulb lit up on the light board. The mechanics.. Reflector Rotors Entry disc lightboard keyboard plugboard
6
The mechanics.. In this diagram’s example, “w” is pressed on the machine’s keyboard. But – according to the plugboard – socket “w” is plugged to socket “x” so current flows up to the entry disc (E) at point X. The current then passes through the internal wiring in the rotors.. ..To the reflector. At the reflector, the current is turned round and flows back through the rotors (but in a different order).. ..now emerging at entry disc terminal “h”. This “h” terminal is connected to socket “h” on the plugboard but according to the plugboard this socket is connected to socket “I”. Finally, the current flows from socket “I” to lamp “I” which lights up. So, in this example, when the letter “W” is pressed, it is enciphered to “I”. Reflector Rotors Entry Disc Keyboard Plugboard Lightboard
7
On the right side of every wheel were 26 pins – current entry points - and each left side with corresponding 26 contact plates – current exit points. Adjacent pins & plates on neighbouring wheels touched, allowing the current to flow through (from both right to left and left to right). Within every wheel were 26 wires which connected the 26 entry points with the 26 exit points; however, each pin was connected to a differing plate, i.e. The “a” pin was connected to the “I” plate. At the reflector wheel (the umkehrwalze), The current was ‘bounced back’ then re- passing through the wheels in reverse order. The mechanics.. entry points wires exit Wheel #1 an example of internal wirings within wheel #1 Connections between adjacent wheels an example of internal wirings within wheel #2 (each wiring is different to the first wheel’s) entry points wires exit Wheel #2
8
The mathematics.. All three wheel rotors were chosen from a range of three, the maximum possible ways of positioning all 3 rotors in the 3 slots available is 6: 3 x 2 x 1 = 6 There was a choice of 26 positions from which each wheel could start from so the total number of possible ways of setting the starting position of each rotor is: 26 x 26 x 26 = 17,576 Each time a letter on the keyboard was pressed the first rotor turned by one place and once it had done a full turn of 26 turns, the rotor to it’s left would turn one place (this then also happened for the third rotor also). the point from which the first rotor would turn the second rotor could be changed, as could the position from which the middle rotor would turn the last. 26 x 26 = 676
9
The plugboard's job was to connect a letter that was pressed on the keyboard to another letter value from which the internal current would flow from and with 26 letters to connect there is a maximum connection number of: 26! = 26 x 25 x 24 x...x 2 x 1 = 403,291,461,126,605,635,584,000,000 403 septillion However, this system leads to a “redundancy”, i.e.: (AB, CD) = (CD, AB) (AC, BD) = (BD, AC) (AD, BC) = (BC, AD) So, by dividing the entire equation used for calculating the total number of connections achievable by two , you allow for this redundancy, meaning that the equation becomes (for a generalised formula where there are k wires between 26 letters is: The mathematics..
10
The mathematics.. Where the k values between 1 and 13 are: 1 pair 325
2 pairs 44,850 3 pairs 3,453,450 4 pairs 164,038,875 5 pairs 5,019,589,575 6 pairs 100,391,791,500 7 pairs 1,305,093,289,500 8 pairs 10,767,019,638,375 9 pairs 58,835,098,191,875 10 pairs 150,738,274,937,250 11 pairs 205,552,193,096,250 12 pairs 102,776,096,548,125 13 pairs 7,905,853,580,625 So, for the enigma machine which only pairs 20 letters (leaving the remaining 6 unpaired) into 10 pairs, there is a k value of: 150,738,274,937, trillion A vast drop from the initial value of: 403 septillion 26!
11
The mathematics.. So, The number of permutations for the enigma machine in total is: 6 x 17,576 = 105,456 105,456 x 150,738,274,937,250 = 15,896,255,521,782,636,000 = 15 quintillion = 1.5 x 1018 However, in 1938, an additional two wheel options were introduced, increasing the total value from 6 to 60: 5 x 4 x 3 = 60 This continues to increase the overall number of combinations to 158 trillion as: 60 x 17,576 = 1,054,560 ∴ 1,054,560 x 150,738,274,937,250 = 158,962,555,217,826,360,000 So the new total (updated) value for the machine is 158 quintillion (or 1.58 x 1018)
12
Later, When the German Navy added 6th, 7th and 8th wheels to the available options and made an enigma machine which used four rotors, the new overall value became: (8 x 7 x 6 x 5) x 264 x 263 x 150,738,274,937,250 = x 1027 2 octillion. In 1933, the enigma II was being used, an eight-rotor model, with the overall number of permutations for this machine being: 8! X 268 x 267 x 150,738,274,937,250 = x 1040 10 Duodecillion However, this machine was soon withdrawn because it was unreliable and tended to jam frequently. The mathematics..
13
In order for the deciphering of the machines to occur, some settings needed to be known about the enigma machine being used on any one day, including: The choice of rotors being used and their positions within the machine Rotor starting positions The message key Plugboard wirings The bombe machine (invented in 1939 by Alan Turing) could calculate all of these daily settings. Manual methods were then used to try and complete the entire decryption process the purpose of the bombe machine was to simply reduce the assumptions of wheel orders and scrambling positions to manageable numbers (i.e. from trillions to hundreds). The main reasons as to why enigma was broken are due to operator mistakes, captured information & hardware as well as flaws in procedures; not the machine itself, which is why the bombe could work so well. The code breaking..
14
Thank you for listening
– any questions? The end..
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.