Wednesday, October 22, 2014

Using the Arduino Enigma Simulator

This guide shows how to operate the Arduino Enigma Simulator and encrypt your first message.

 The about screen is shown upon the first 3 times power is applied.

This screen clarifies that this device is for educational, historical and entertainment purposes. The encryption principle implemented has been broken many times in the past.

A list of online resources that provided information used to build this implementation are listed.

 Touch OK to continue to the main screen.
This is the home screen, the Enigma machine is ready to encode messages with the settings in effect at the moment. If this is the first time the machine is powered up, the default settings are loaded, otherwise the last settings used are kept.

To start encoding a message, press and hold the keys at the bottom of the screen, the wheels will move, a lamp in the middle section will illuminate for as long as the key is pressed and the corresponding character will also be printed in the tape running above the lamp field. Once the key is no longer pressed, the lamp will turn off.

The default setting of AAAA can be changed by dragging the rings to the right of the corresponding letter up or down.

By default, the machine is configured with the B thin reflector, Beta greek wheel (additional wheel), Wheels 1,2,3. All wheel settings to A, No plugs.

Encoding a message with the default settings is no fun, so let's touch the Enigma logo to open the machine and be able to change the rotors.

The machine is now open, notice that the bulbs in the lamp field are exposed, the rotors are shown, the printer, texture, serial port functions can be changed and a box of spare rotors is shown at the bottom of the screen.

To start changing the rotors, the ones installed must first be removed, to do so, touch the letters in the rotors to be removed.
Rotor I has been brought down to the middle area and placed flat on its side. Here the inner setting can be changed or it can be placed in the spare rotor box by touching the area inside the spare rotor box.
The rotor has been placed in the spare rotor box, continue removing the other three rotors by touching them and touching the box below.

Once a rotor is in the intermediate position above the lamp field it can be placed in the machine if there is an open space or back in the spare box.

This can be used to change the position of a rotor without putting it back in the box. For example to move Rotor III from the rightmost position to the second position, touch the rotor and then touch the empty space in the rotor mechanism.
All the rotors have been removed from the machine, now we will install different ones. Start by touching the letters of rotor VII on the spare rotor box.
Rotor VII is now flat on its side and the inner setting can be changed.

The next step will shown how to set the machine to use reflector C, greek rotor Beta, and rotors VII, VIII, VI. Inner rotor setting will be set to PLUS, outer settings to BIKE.

To change the inner setting, touch the contacts of the rotor and while pressing down, slide around the wheel until the desired letter is shown. Sliding in a clockwise direction increments the setting. Doing so in a counter-clockwise direction decrements the setting

Changing the inner setting changes the letter substitutions performed with the same visible letters on the wheels. The turnover point for the rotor, the letter at which the rotor to the left is advanced is not affected by the inner setting.

The inner setting has been changed to L, now its time to install the rotor in the machine. To do so, press the location where the second rotor would be installed, The leftmost location in a four wheel machine can only be filled with a greek rotor, Beta or Gamma.
Next, Rotor VIII is selected, rotated to U and installed in the third position.
Rotor VI is selected, rotated to S and installed in the fourth position.
Lastly, a greek rotor must be selected, rotors I thru VIII cannot be installed in this position. The greek rotors cannot be installed in the middle positions either. To close the machine, all rotors must be present. The machine will not let you install a non-greek rotor in the left position, or a greek rotor in the next 3 positions.
Greek rotor Beta is selected, rotated to P and installed in the leftmost position.

The rotor selection and placement can be done in any order, not necessarily the same order shown here.
Now, touch the reflector and it will change from B thin to C thin. Touching it again will change it to A for an Enigma I machine, then B, and C for an M3 Enigma. The model and creation year of the selected enigma machine will be shown in the front panel view when the machine is closed. This helps distinguish the specific model when a three rotor machine is used

After the reflector is changed, we can either close the machine or install some plugs in the plugboard. To do so, touch the plug area below the spare rotor box.
The plugboard is now shown. The machine keys are shown at the top of the screen. To return to the previous screen, touch the keys at the top. To install some plugs, touch the area below the letters.

Start installing a plug from J to U by touching below the J.
To install the other side of the plug, touch the area below the U.
The area below the J will now show that is connected to U, The area below U will show that is connected to J,

A strip of paper will be shown below the plugboard showing the order in which the plugs were installed. When an Uhr unit is not used, JU is the same as UJ.

When using the Uhr, the order of the plugs does matter. That is why they are shown below the plugboard.

To remove a plug, touch either end. At this point to remove this plug, touch either the area below the J or below the U.
After the plugs for JU, continue installing the plugs:
Lastly, install the plugs for VW
When exactly ten pairs of plugs are installed, the Uhr unit is shown. By default it is set to 00, which disables the Uhr scrambling function and instead functions like normal jumpers between the letters selected.

An Enigma machine shipped with 10 jumpers, If more or less are used, the Uhr unit will not be shown.

To set the Uhr, press anywhere in the outer circle and while pressing, slide along the outer line in a clockwise or counter-clockwise direction until the desired Uhr setting from 00-39 is showing.

The Uhr unit was wired in such a way that when in the 00 position, is behaved like a set of plugs, A was exchanged B and viceversa, The next three settings would disrupt the symmetry of the plugs, A would be connected to K, but K would connect to Y. Settings that were multiple of 4 (4,8,12...) would regain reciprocity, however the letters swapped would be different of the plugged pairs, A and J would be swapped.

Once the desired Uhr number has been selected, the plugboard will substitute the jumped letters in a different order to the one shown in the paper.

The actual plugboard substitution can be seen if the arduino is connected to a computer, the serial function of the Arduino Enigma Simulator is set to V (verbose), and a monitor program is opened with 9600, 8, N, 1

To return to the previous screen, touch the enigma keys at the top.
We have been returned to the open machine view. The top view of the installed rotors is shown. a gap is shown below the number 5 and the number 8, corresponding to the M and P plug which did not receive plugs. Notice the screw head on the plug.

We can now change the default starting position of the machine shown upon power up by touching and dragging the rings to the right of the rotor letters.

The machine options shown to the right of the rotor mechanism can also be set.

Touching the printer text changes from No, to 0,4,5,6. No printer is shown when in NO, if 0 is shown, the characters are not grouped, otherwise they are shown in groups of 4, 5, or 6 characters.

Touching the texture text changes from No, to 1, 2. No texture is shown in the main screen when in NO, a fine texture is shown in 1, a coarse texture when in 2.

Touching the serial text changes from No, to V, to C. Nothing is shown thru the serial port when in NO. The V option (verbose) shows the wheel types and substitutions performed, the characters swapped by the plugboard/Uhr combination and the internal path the letters follow.

The C option for the serial port allows operating the coding function of the Enigma machine through the serial port. The machine has to be closed (Enigma logo showing). The operator sitting at a computer can change the wheels by sending a ! and then the wheels. For example, to set the machine to BIKE, send !BIKE, to set an M3 machine to CAB, send !CAB. Extra characters after the wheels are coded with the settings in effect at the moment. To set the wheel types, internal positions, plugs and Uhr, physical access to the Enigma screen is needed.

Touching the close text checks if all the wheels are installed and closes the machine.

The i to the right of the word Close shows the about screen.

Set the wheels to BIKE by dragging the rings until the desired letter is in the center of the screen.

Once the machine is fuly set up, close it by touching the handle on the top left corner, just above the reflector or touching the word Close.

The settings will be saved to non-volatile memory and retained when the power is off. To clear the last used settings, select different wheels.
The machine is now closed and ready to operate. The starting position of the wheels is shown and can also be changed by dragging the rings to the rights of the wheels.

If power is removed at this point, when powered up again, these settings will be reloaded, if this is not desirable, open the machine again by touching the enigma logo and change the wheels. Also, touch the plugs and scramble or remove them altogether.

To start encoding text, press the keys at the bottom of the screen, the wheels will turn, then a lamp in the middle representing the encoded character will illuminate, the same character will be simultaneously printed if the printer is enabled,
The word TEST was encoded to PAXM.

You can use Daniel Palloks Universal Enigma to verify the encoding

Universal Enigma

M4 "Shark" U-Boats

Wheels: C.Beta VII-VIII-VI (B,I,K,E) / Rings: 16 12 21 19 / Plugged: JU LY NE XT QR BA DF OS KI VW /Uhr=17

To clear the printer tape, cut it by touching it on the right most part.
We can change the Uhr setting and encode another text. To do so, touch the plugs below the keys.
Rotate the Uhr to position 29 and then click the keys above the plugs to return to the front panel view.
The word TEST was encoded with the same starting position BIKE, but the Uhr setting was different, instead of PAXM, the Uhr has now changed the cryptotext to PVLM

You are now ready to change the settings and operate the Arduino Enigma Simulator

No comments:

Post a Comment