160 likes | 362 Vues
Fundamentals of Computer Security. The Mechanization of Ciphers: The Enigma. The Enigma Machine Arthur Scherbius, circa 1918. scrambling unit (3 rotors). reflector. entry wheel. lampboard. keyboard. Plugboard or Steckerboard. 3-rotor Enigma with Steckerboard. The Enigma at Work.
E N D
Fundamentals of Computer Security The Mechanization of Ciphers: The Enigma CSCI 379 Fundamentals of Computer Security
The Enigma MachineArthur Scherbius, circa 1918. scrambling unit (3 rotors) reflector entry wheel lampboard keyboard Plugboard or Steckerboard 3-rotor Enigma with Steckerboard CSCI 379 Fundamentals of Computer Security
The Enigma at Work battery Q keyboard E lampboard Reflector: This is a stationary disc in most Enigma models. The Abwehr Enigma had a moving reflector which could be changed (Beta and Gamma rotors). CSCI 379 Fundamentals of Computer Security
Using the Machine • The cipher clerk adjusts the machine with the day’s settings (rotor order, Ringstellung, stecker pairs). • The clerk chooses an arbitrary message key, say PGH. • The clerk picks the indicator setting for the day, say QCD, and sets the rotors to that starting position. Then, s/he types the message key twice: PGHPGH and the machine enciphers this to KIVBJE and sends that away by radio. Then, s/he sets the rotors to PGH and enciphers the message. • The receiver sets his/her machine to the indicator setting for the day and punches in the received text, KIVBJE, which the Enigma deciphers to PGHPGH. Next, the receiver sets the rotors to PGH and starts to punch in the received message ciphertext. CSCI 379 Fundamentals of Computer Security
Anatomy of a Rotor One rotor alone performs a substitution cipher: it maps one input letter to one output letter according to a permutation defined by its wiring. A rotor can take 26 different positions as it rotates. When rotors are put side-by-side, the letter scrambling in series. The rotor rings have turnover notches. When a rotor completes one revolution, its notch forces the rotor to its left to advance one position. A rotor consists of a ring and a core. The ring can be adjusted (rotated) around the core, which actually contains the letter pair wirings. CSCI 379 Fundamentals of Computer Security
Rotor Contacts CSCI 379 Fundamentals of Computer Security
Rotor Choices Each scrambling rotor was assigned a “type”. From the set of available types, a subset was chosen to be installed at the machine at any given time. Assume that there were 5 rotor types and that 3 were chosen to be used together. This means there are 10 different ways to choose 3 rotors. With this many rotors, there are 3! possible ways to arrange them in sequence. In total, there are 60 different ways to select and install these rotors. As many as eight types of rotors were constructed plus two different kinds of reflectors. CSCI 379 Fundamentals of Computer Security
The Scrambling Unit In a machine with 3 rotors, the number of possible rotor configurations (relative positions) is: For the sake of discussion, assume that all rotors turnover points are the letter A. Assume that before a message is sent, the rotors are set to some starting position, say AZB (the little windows on top of the rotors will show these three letters). As each letter of the message is pressed, the window will show AZC,AZD,AZE,…, AAA,…,BAA,… and after 17,576 keystrokes, the machine cycles back to the starting position AZC. CSCI 379 Fundamentals of Computer Security
The Steckerboard The number of ways to select 2n letters from 26 is: A B C D E F G H I J K L M N O P Q R Once 2n letters are picked, the number of possible letter pairs one can form with this set is: S T U V W X Y Z AK, which are connected by a cable, are said to be cross-steckered. Letters not paired with any others are said to be self-steckered. For n cables, the total number of possible stecker pairs is: CSCI 379 Fundamentals of Computer Security
The Steckerboard Number of stecker pairs used by the Germans. Optimal number of stecker pairs. CSCI 379 Fundamentals of Computer Security
Enigma Keys (Daily Settings) day of the month keys scrambling unit ring settings steckerboard CSCI 379 Fundamentals of Computer Security
Key Space CSCI 379 Fundamentals of Computer Security
Cracking Messages If you find the machine settings for the day, you can read ALL the messages sent on that day. Wait… how to you get the settings for a day? Random guessing won’t work because the key space is humungous. This is like looking for a needle in a haystack. Ok, what kind of search strategy works best for finding a needle in a haystack? CSCI 379 Fundamentals of Computer Security
The Turing/Welchman Bombe A Bombe menu. Fake Bombe used in the movie Enigma. CSCI 379 Fundamentals of Computer Security
The Turing/Welchman Bombe Say you collect many enciphered messages in one day and that you can be pretty sure that you know where certain words will appear in that ciphertext (“cribs”). From these messages you can construct the Bombe menu. W E Hmmm: w -> E, e -> T, t -> W T CSCI 379 Fundamentals of Computer Security
The Turing/Welchman Bombe CSCI 379 Fundamentals of Computer Security