Rotor Machine - Mechanization

Mechanization

It is relatively straightforward to create a machine for performing simple substitution. We can consider an electrical system with 26 switches attached to 26 light bulbs; when you turn on any one of the switches, one of the light bulbs is illuminated. If each switch is operated by a key on a typewriter, and the bulbs are labelled with letters, then such a system can be used for encryption by choosing the wiring between the keys and the bulb: for example, typing the letter A would make the bulb labelled Q light up. However, the wiring is fixed, providing little security.

Rotor machines build on this idea by, in effect, changing the wiring with each key stroke. The wiring is placed inside a rotor, and then rotated with a gear every time a letter was pressed. So while pressing A the first time might generate a Q, the next time it might generate a J. Every letter pressed on the keyboard would spin the rotor and get a new substitution, implementing a polyalphabetic substitution cipher.

Depending on the size of the rotor, this may or may not be more secure than hand ciphers. If the rotor has only 26 positions on it, one for each letter, then all messages will have a (repeating) key 26 letters long. Although the key itself (mostly hidden in the wiring of the rotor) might not be known, the methods for attacking these types of ciphers don't need that information. So while such a single rotor machine is certainly easy to use, it's no more secure than any other partial polyalphabetic cipher system.

But this is easy to correct. Simply stack more rotors next to each other, and gear them together. After the first rotor spins "all the way", make the rotor beside it spin one position. Now you would have to type 26 × 26 = 676 letters (for the Latin alphabet) before the key repeats, and yet it still only requires you to communicate a key of two letters/numbers to set things up. If a key of 676 length is not long enough, another rotor can be added, resulting in a period 17,576 letters long.

In order to be as easy to decipher as encipher, some rotor machines, most notably the Enigma machine, were designed to be symmetrical, i.e., encrypting twice with the same settings recovers the original message (see involution).

Read more about this topic:  Rotor Machine