Math Project: Enigma Machine · The Math Behind Enigma…. Rotors: They had to pick 5 rotors from 3...

Post on 28-Dec-2019

7 views 0 download

Transcript of Math Project: Enigma Machine · The Math Behind Enigma…. Rotors: They had to pick 5 rotors from 3...

Math Project: Enigma MachineBy Yaroslav Naftulyev

History

● The Enigma machine is a device which allows to encrypt messages that would be “uncrackable”.

● The machine was created after World War I by Arthur Scherbius and officially distributed to german military in 1923.

● The machine would encrypt valuable information which contained location of military, weather forecast and future attacks.

How it works?In theory, Enigma is a simple circuit.

It contains:

● 3 rotors • A plugboard

● A keyboard • A reflector

● 26 lights •Movable ring

The Math Behind Enigma….

Rotors: They had to pick 5 rotors from 3 and arrange them = 5P3 = 60

Each Rotor has 26 numbers in which it could start = 26^3 =17, 576

Math Behind Enigma….Continued

The plugboard: Each plugboard has 26 letters = 26!

Each plugboard has 10 pairs of letters connected together ( 20 letters means 3 pairs are not connected) 26!/6! (Since 6 letters are not connected.)

Since the pairs can be connected in any order, it doesn't matter, which one you start with(connecting A B(first) or C and D(first). This means that 26!/6!10!

If the letters are connected in a pair, it doesn't matter if they are swapped as A and B, and the pair B and A are considered to be the same. 26!/6!10!2^10

Math Behind Enigma

Rotors: 5P3= 60

Starting Positions: 26^3= 17576

Plugboard: 26!/(6!10!2^10)

Combining that 60 x 26^3 x 26!/(6!10!2^10) =

158,962,555,217,826,360,000 ways to set the enigma machine.

Fun fact: Did you know that the maximum number of permutation occurs when there is actually 11 pairs of cables? But due to an error, german mathematician used only 10!

Each month they would receive a new sheet

The Flaw behind Enigma

J X A T G B G G Y W C R Y B G D T (Enigma code)

W E T T E R B E R I C H T

J X A T G B G G Y W C R Y B G D T

W E T T E R B E R I C H T

J X A T G B G G Y W C R Y B G D T

W E T T E R B E R I C H T (possible answer)

Cracking Enigma...using deduction

J X A T G B G G Y W C R Y B G D T

W E T T E R B E R I C H T

Here we can see that if we pick B it will go through enigma machine to become T.

Conclusion

Since T A is wrong we need to check the connection between t and the other 26 possibilities (it is possible the machine is not connected as well)

If no letter match for that specific setting, you need to change the starting positions of the rotors. Ex: 0 0 0 ---> 0 0 1

The bomb machine was designed to allow to go through all the possibilities in under 20 minutes. Since it registered every rejection, it used the process of elimination.

Sources

https://plus.maths.org/content/exploring-enigma

https://www.youtube.com/watch?v=G2_Q9FoD-oQ

https://www.theguardian.com/technology/2014/nov/14/how-did-enigma-machine-work-imitation-game

https://plus.maths.org/content/exploring-enigma