Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Breaking The Enigma → php[tek]

Breaking The Enigma → php[tek]

Many years ago, the world was at war. The very best minds were focussed on out-smarting the "other side", all without the aid of our modern computational tools.

The key was in communication, and the Nazis had devised a simple and effective way to relay orders to the battlefront. They were using one of the most famous forms of electronic encryption: the Enigma.

Breaking this Enigma was a victory built on the tireless work of many people, not least of all the persecuted and brilliant Alan Turing.

In this talk we will learn how the enigma worked, and how it was broken. All in live code!

Christopher Pitt

May 27, 2016
Tweet

More Decks by Christopher Pitt

Other Decks in Technology

Transcript

  1. View Slide

  2. BREAKING the ENIGMA

    View Slide

  3. Thanks to PHP[TEK]

    View Slide

  4. Thanks to SILVERSTRIPE

    View Slide

  5. HUMBLE beginnings

    View Slide

  6. BUTTERFLY effect

    View Slide

  7. meeting CHRISTOPHER

    View Slide

  8. CHOICE and DETERMINISM

    View Slide

  9. THINKING machines

    View Slide

  10. SUM of all parts

    View Slide

  11. SUM of all parts
    ▸ cpu

    View Slide

  12. SUM of all parts
    ▸ cpu
    ▸ ram

    View Slide

  13. SUM of all parts
    ▸ cpu
    ▸ ram
    ▸ hard drive

    View Slide

  14. SUM of all parts
    ▸ cpu
    ▸ ram
    ▸ hard drive
    ▸ keyboard, mouse, network

    View Slide

  15. SUM of all parts
    ▸ cpu
    ▸ ram
    ▸ hard drive
    ▸ keyboard, mouse, network
    ▸ display, speakers, network

    View Slide

  16. SUM of all parts
    ▸ cpu hard-coded rules
    ▸ ram
    ▸ hard drive
    ▸ keyboard, mouse, network
    ▸ display, speakers, network

    View Slide

  17. SUM of all parts
    ▸ cpu hard-coded rules
    ▸ ram 1 variable
    ▸ hard drive
    ▸ keyboard, mouse, network
    ▸ display, speakers, network

    View Slide

  18. SUM of all parts
    ▸ cpu hard-coded rules
    ▸ ram 1 variable
    ▸ hard drive
    ▸ keyboard, mouse, network
    ▸ display, speakers, network

    View Slide

  19. SUM of all parts
    ▸ cpu hard-coded rules
    ▸ ram 1 variable
    ▸ hard drive
    ▸ keyboard, mouse, network stream of symbols
    ▸ display, speakers, network

    View Slide

  20. SUM of all parts
    ▸ cpu hard-coded rules
    ▸ ram 1 variable
    ▸ hard drive
    ▸ keyboard, mouse, network stream of symbols
    ▸ display, speakers, network successful completion

    View Slide

  21. time for some code

    View Slide

  22. FAMINE, SWORD and FIRE

    View Slide

  23. View Slide

  24. $rotor1 = new Rotor(
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "EKMFLGDQVZNTOWYHXUSPAIBRCJ",
    1
    );
    $rotor2 = new Rotor(
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "AJDKSIRUXBLHWTMCQGZNPYFVOE",
    2
    );
    $rotor3 = new Rotor(
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "BDFHJLCPRTXVZNYEIWGAKMUSQO",
    3
    );

    View Slide

  25. $reflector = new Reflector(
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "FVPJIAOYEDRZXWGCTKUQSBNMHL"
    );

    View Slide

  26. $machine = new Machine(
    $rotor1, $rotor2, $rotor3, $reflector
    );

    View Slide

  27. A → K → L → V → B → A → A → T

    View Slide

  28. A → K → L → V → B → A → A → T
    T → A → A → B → V → L → K → A

    View Slide

  29. STARTING configurations
    ▸ 3 rotors from a set of 5

    View Slide

  30. STARTING configurations
    ▸ 3 rotors from a set of 5
    ▸ 26 positions per rotor

    View Slide

  31. STARTING configurations
    ▸ 3 rotors from a set of 5
    ▸ 26 positions per rotor
    ▸ plugboard with 10 connected pairs

    View Slide

  32. STARTING configurations
    ▸ 3 rotors from a set of 5
    ▸ 26 positions per rotor
    ▸ plugboard with 10 connected pairs
    ▸ 158,962,555,217,826,360,000

    View Slide

  33. the BOMBE

    View Slide

  34. View Slide

  35. cipher text ! J Y P D O M Q N J C O S G A W H L E I H Y S O
    position 1 ! K E I N E B E S O N D E R E N E R E I G N I S
    cipher text ! J Y P D O M Q N J C O S G A W H L E I H Y S O
    position 2 ! K E I N E B E S O N D E R E N E R E I G N I
    cipher text ! J Y P D O M Q N J C O S G A W H L E I H Y S O
    position 3 ! K E I N E B E S O N D E R E N E R E I G N

    View Slide

  36. View Slide

  37. View Slide

  38. thank you
    HTTPS://JOIND.IN/17071
    HTTPS://TWITTER.COM/ASSERTCHRIS

    View Slide