Enigma Simulation - Operation Notes

Introduction

This document is sort-of an operation manual for the Enigma simulation. It is not much, but here it is.

To use the Enigma machine simulation to communicate requires a shared rotor, reflector, plugboard configuration.

It is always a good idea to read the code files for more information. The structure of the code and the comments in the code are another form of documentation.

Enigma Machine Simulation Configuration

The Enigma machine simulation configuration is in a file. It contains rotor, reflector, and plugboard "wiring" and is created by a user. To communicate, the configuration (file) must be shared and used by others.

Which rotors to use and their order (left,middle,right), and the rotor's initial (starting) position must be communicates another way. It could be communicated verbally or written down.

Creating Configuration Files

The program create_emigma_config_file.py is available and is used to create configuration files. The file is a simple comma separated value (csv) file. The file format can be understood by reading the file.

The program allows the user to select one of several alphabets and also set plugboard pairs as part of the enigma simulation configuration. It creates the file enigma_config.csv.

Multiple Configuration Files

When communicating with a large number of people you may need separate configuration files for different groups. The enigma machine simulation programs has a build in default configuration file name (enigma_config.csv). If you do not want to use the default, you may include a different configuration file as the first parameter on the command line.

To create separate configuration files:
  1. Create a config file using create_enigma_config_file.py. This will create a config file having new "wiring" for rotors, and reflector. (Perhaps a new plugboard setup if you enter different character pairs.)
  2. Rename the new config file (enigma_config.py).
  3. Include the renamed config file on the command line.

Send and Receiving Messages

These steps are from: The Enigma Enigma: How The Enigma Machine Worked

The sender and receiver must use the same configuration of the enigma machine in order to communicate. They must know

These were published and changed regularly (hourly? daily?). The sender and receiver looked up this information and configure their enigma machines accordingly.

To set the rotor starting positions, the person doing the encrypting selects random rotor positions and includes them at the start of a message.

  1. Make up an initial start position. For example ABC, and a message key, DEF.
  2. Set the rotors to ABC and type in DEF. Let’s say that encrypts to GHI.
  3. Next set the rotors to the message key, DEF, and start typing the plaintext message.
  4. Record the output, which is the ciphertext.
  5. Transmit the initial start position ABC, the encrypted message key GHI, and then the ciphertext.

The person decrypting the message would

  1. Set the rotors to the first three letters received, ABC.
  2. type in the next three letters, GHI. DEF is output.
  3. sets the rotors to DEF.
  4. Start typing the ciphertext message. The output is the plaintext message.