The first world war showed the importance of cryptography on the battlefield, and the danger of weak encryption. The second world war became a defining moment in the history of cryptography and placed it squarely at the center of military and political strategy from that time to the present day.
The Enigma machine was developed by a German Arthur Scherbius in 1918 and was patented in 1919. It was marketed with portability and confidentiality as it sales features, but it had a lack of commercial success. When Germany discovered that they had lost WW I as a result of their cipher having been cracked by the British, despite the high cost, the machine was adopted by the German Navy in 1926, the Army in 1928 and the Air Force in 1935; also it was introduced into service with other sections of the German government.
The Enigma was an Off Line cipher system which was designed to provide high-grade cipher-text from the input of plaintext and the reverse.
The ciphering method used by Enigma is known as a polyalphabetic substitution cipher, and the “key” consists of a combination of gear wheels (rotors), known as “a scrambler”, on each of which 26 letters of the modern alphabet are inscribed, and a mechanism known as the plug-board for performing single character substitutions.
Enigma is used by first setting the scrambler and then typing the plain (unencrypted) text on the keyboard, the ciphered letters, encrypted by the scrambler, are displayed on a lamp board and this letter was transcribed on a message pad. A single scale is rotated by the scrambler each time a character is typed, which means that a different key is used to cipher every single character, the procedure repeated until the message was complete and the cypher-text message was then transmitted by radio using Morse code
Enigma decodes encrypted messages when the same key that was used to prepare the ciphered message is used to decrypt it, and following the same procedure the cipher-text is typed letter by letter and the plaintext equivalent is displayed on the lamp board.
The Enigma was, in terms of its internal architecture, a swapping machine and, as such, two machines with equal configuration would give the same result; for example, “X” to get “C” or “C” to get “X”. This meant that once the “configuration” or “key” was found, all messages using that could be decrypted. There was no internal dynamic update of the key based on the message traffic or any other variable. In addition, keying X would never give X and this latter weakness was used to great effect when applied to known text that provide clues to breaking a cipher-text containing for example expressions such as “Dear Sir”, or “Heil Hitler!”
Japanese Naval Code JN-25 was a secret-key substitution cipher where the cipher-text words appears as a number.
The cipher-text is generated by two other code groups, the first one assigned to the word a constant hard mapping of a unique 5 decimal digit numbers. For example.
Code group |
Word |
41712 |
Like |
64479 |
You |
72084 |
I |
80514 |
Eat |
95280 |
bananas |
39318 |
apples |
The Second code group for a word consist of an “additive book” of code groups, determined by an “indicator” in the cipher-text, and added to the word’s own code group by no-carry addition.
For example, the additive group can be.
1 |
2 |
3 |
4 |
5 |
6 |
7 |
49356 |
70122 |
84213 |
69006 |
22242 |
92355 |
06150 |
To encode the message “I eat apples” and choose the indicator 4 is transformed in follow operation
Message as code groups |
72084 |
80514 |
39318 |
Additive groups, from 4 |
69006 |
22242 |
92355 |
No-carry sums; ciphertext |
31080 |
02756 |
21663 |
Then the transmitted cipher-message is 4 31080 02756 21663
In order to recover the message only is necessary to calculate the subtraction between the ciphertext and the corresponding additive group.
During World War II, the US Navy developed a cipher machine, the Electronic Code Machine (ECM) Mark II, also known as SIGABA.
The ECM Mark II, had its roots in the “M-134”, a cipher machine designed by William Friedman before the war, and in fact the SIGABA was also known as the “M-134C”.
The original M-134 was conceptually similar to the Enigma in that it used a rotor system to scramble letters, but it differed in that it had five rotors, not three, and in that the rotors advanced in a seemingly random fashion, not in a nice neat progression with each character entered.
The movement of the rotors was controlled by a “paper tape”, which was a long strip of paper with holes punched across its width. In this case, the paper tape would accommodate five holes across its width, with a hole punched mean that the corresponding rotor must to advance, if no hole was punched, the rotor would not advance. Which hole controlled which rotor was determined by a plugboard with five plugs.
Given a long and properly devised paper tape, the sequence of rotor movements could be difficult to reverse-engineer. However, the paper tape produced operational issues, and Frank Rowlett used a separate set of rotors to generate the unpredictable sequence of rotor movements.
Friedman and Rowlett implemented this idea with a device called the M-229, which was connected to the M-134 in place of the paper-tape system.
The M-229 had three rotors of its own and a switch to vary its operation, and its output controlled the movement of the five rotors of the M-134.
Finally, the ECM Mark II used all these improvements and included a total of fifteen rotors. Five of these rotors were normal cipher rotors with 26 connections, and they stepped in an irregular fashion. Five of the rotors were known as “control rotors”, and had 26 contacts like the cipher rotors, while the remaining five rotors, the “index rotors”, had 10 contacts each. These two sets of rotors controlled the stepping sequence of the cipher rotors.
The Soviet archives relating to signals intelligence are closed and information on cryptography is hard to find and verify, both during the Tsarist era and in the Soviet period.
Anatoly Klepov, a professional in the field of communications security has published “Encryptors and Radio Intelligence. Shield and Sword of Information World”, although the book was written for a Russian audience the author has published an interesting summary in English at aklepov.com ; and based on it we know “before the war in 1941 top secret information was encrypted with paper encryption documents” and “What was the way the USSR produced encryption keys before 1941?, They used special devices to generate keys to encryption equipment and one-time pads. The devices resembled modern Bingo game machine. The machine featured two units running punch tape. Balls randomly touched the punch tapes generating balanced gamma – random number sequence that was used to generate encryption key. The strength of such encryption keys was miserable.”
Julian Bolivar-Galeno is an Information and Communications Technologies (ICT) Architect whose expertise is in telecommunications, security and embedded systems. He works in BolivarTech focused on decision making, leadership, management and execution of projects oriented to develop strong security algorithms, Artificial Intelligence (AI) research and its applicability to smart solutions at mobile and embedded technologies, always producing resilient and innovative applications.