Assignment 5: The Enigma Machine

Downloads

Enigma rotors

One of the suggested extensions to the assignment is to implement the wartime Enigma stock of five rotors from which the operator could choose three in any order. The complete set of rotors available for Enigma implemented the following permutations:

  1. "EKMFLGDQVZNTOWYHXUSPAIBRCJ"
  2. "AJDKSIRUXBLHWTMCQGZNPYFVOE"
  3. "BDFHJLCPRTXVZNYEIWGAKMUSQO"
  4. "ESOVPZJAYQUIRHXLNFTGKDCMWB"
  5. "VZBRGITYUPSDNHLXAWMJQOFECK"

Milestone #1

This milestone adds the keys to the Enigma display. Since the keys are not active in this version, they are impossible to see when they are placed correctly because they cover the same image. To be sure that the code is working, this implementation changes the text color of each key to red.

Milestone #2

This milestone extends Milestone #1 by making the keys interactive. Pressing the mouse button on top of a key changes the color of the key text; releasing the button changes it back.

Milestone #3

This milestone extends Milestone #2 by adding the lamps. Since the lamps are not active in this version, the lamps are impossible to see when they are placed correctly because they cover the same image. To be sure that the code is working, this implementation changes the text color of the lamp to red.

Milestone #4

This milestone extends Milestone #3 by having pressing a key light the corresponding lamp.

Milestone #5

This milestone extends Milestone #4 by adding the rotors to the display. To make sure the change is visible, this code changes the text color of the rotor to red.

Milestone #6

This milestone extends Milestone #5 by adding the code necessary to advance a rotor when the user clicks on it.

Milestone #7

This milestone sends the keystroke through the fast rotor only.

Milestone #8

This milestone adds the complete encryption path to Milestone #7.

Milestone #9 (complete program)

This milestone implements the complete graphical simulation of the Enigma machine. The only feature added on top of Milestone #8 is advancing the rotors when a key is pressed.