Enigma/Sending and Receiving Messages
Using an Enigma machine to encrypt a message lets you send it to a recipient who would can decrypt it, while an enemy intercepting the message can't decrypt it. To successfully decrypt the message, the recipient must use a compatible model of Enigma machine, with the same machine settings, with the same message key.
The method of communicating the settings and message key is called the indicator procedure and the Germans used several different methods before and during World War II. Security weaknesses in these indicator procedures were one of the main ways in which the Polish and British codebreakers were able to decrypt intercepted messages.
Machine Settings
Tables of machine settings for each day of a month were created and physically distributed in printed form. Different tables were used for different "networks", representing different branches of the armed forces.
Dirk Rijmenants has created a free Windows PC tool for generating tables of random machine settings.
A wireless station could have been part of more than one network, so the first part of the message (along with the date) would typically include a code (the discriminant) indicating which network, and hence which machine settings, it was intended for.
Message Key
The simplest thing to do would be to transmit the message key (the letters showing in the rotor windows) in plain text at the start of each message. Such a plain text transmission would be called an initialisation vector in modern encryption algorithms and is accepted security practice. In the case of the Enigma, however, the message key was regarded as part of the secret shared between sender and receiver, therefore it was encrypted before sending.
Encrypting the message key doesn't add a lot of security (mathematically it contributes less than 10 bits to the effective key length) and, given the security problems flawed indicator procedures caused in practice, the Germans may have been better off not doing it!
Up to 1938, the German army procedure was to set a fixed starting position for the rotors (part of the day's settings) and to use that to encrypt the message key twice (to detect keying or transmission errors) at the start of the message. This had two security problems that were subsequently corrected: from September 1938 they switched to the operator choosing a different starting position for each message (in effect, an initialisation vector) and transmitting it before the encrypted message key; from May 1940 the operator encrypted the message key once only.
After encrypting the message key, the operator turned the rotors to show the letters of the message key before encrypting the message body.
Sending and Receiving with the Simulator
To send and receive encrypted messages with the simulator, you need to do essentially the same things the real Enigma operators did. First agree which machine model and settings you are going to use; the simplest option would be to use the settings from one of the save files pre-installed in the simulator, but sender and receiver can make up their own settings together and each save them on their own device.
To send an actual message, follow these steps:
- Load the file with your agreed settings into the simulator.
- Open the messaging app that you will send your message with (e.g. email or SMS) and create a new message. Choose 3 (or 4 depending on how many rotors your machine model has) letters as your random start position and type them in as the start of your message.
- Switch back to the simulator (the home button is useful for this), turn the rotors to the letters you chose, then type 3 (or 4 as appropriate) new letters for the message key (remember what you typed!)
- Note what letters are printed, switch to the messaging app and type them in.
- Switch to the simulator, click the tape and Clear it, turn the rotors to the message key you chose in step 3, and then type your message.
- When you have completed the message, click the tape and Copy the printed text.
- Switch to the messaging app and paste the encrypted message (long press on the input box).
- Send the message!
The recipient then follows these steps:
- Load the file with your agreed settings into the simulator.
- Turn the rotors to the first 3 (or 4) letters of the message.
- Type the next 3 (or 4) letters from the message to get the message key.
- Turn the rotors to the message key.
- Copy the rest of the message text from your messaging app.
(You may need to copy the full message, paste it in to a new message so you can edit it, delete the first part that you don't want and then copy it again.) - Switch back to the simulator, click the tape and Paste.
- Read the message!