## Context During WW2, Germay, Japan and Italy were far outnumbered by the Allies. Their only conceivable path to victory was the ability to launch widespread surprise attacks > the goal of encryption technology then was to automate the one-time pad using an encryption machine The german's elctro-mechanical rotor machine was called the Enigma. ## Encryption - Accept an input letter - Apply a random shift - Output the encrypted letter Machine Principle: - Initial State - Accept Input - Operation on Input - Produce Output Operation from initial state to final state is always predictable and repeatable > Goal to produce identical machines that output a scrambled sequence of shifts that were difficult / took a long time to repeat Generate an identical shift sequence - share identical machines - agree on initial position - Key Setting - Align machines to same position, - finally cycle through the identical machines to achieve identical sequence State of art technology of that time --> Rotor Encryption Machine - Mechanical process of an odometer, which takes a long time to repeat its cycle - For 3 rotors: - length of sequence = 26*26*26 = list of shifts 17,576 numbers long - Each rotor position is equal to a location in this sequence Key Space - Collection of all possible Key Settings - Key Setting - Initial Machine state - Key Space increases if no. of ways to arrange the rotors increases When we select a Key Setting, we are selecting a starting point in the Key Space which determines the rest of the sequence. Security of Rotor Machines: - Size of the Key Space - Randomness of the Key Setting #### Breaking the Enigma > It could be set up in 150 million million million ways > Likelihood of guessing the key setting for a given message was as likely as guessing the outcome of 26 dice rolls - Daily Key Settings to Align Machines including the Daily Configuration of rotors - What to use and order? Mistakes: - Procedural Error - Operators had to select a random initial position of a rotor before communication began, but fatigued operators varied this very little. - Destroying the uniform distribution of the initial rotor position. - After repeat observation, the allies could reverse engineer, the rotor wirings completely - Design Error - An input letter would never encrypt to itself - So given an encrypted letter, you can eliminate the possibility that it was the original letter - Cribs - Common words like weather used in messages > The outcome of world war 2 could have been drastically different. > Only if operators rolled a dice to decide their initial rotor positions, the starting point in the sequence could have been uniformly distributed. Preventing the reverse engineering of the rotor wirings > Allow letters to be encrypted to themselves, to avoid the Bombe from taking advantage of cribs. Requiring the allies to check the entire key space > Repetition reduced the key space