Enigma Simulation - Rotor List Index Advance Algorithm

Introduction

Hardware rotors are represented in the simulation using python lists. When the physical rotor is advanced one position the python list must be modified (advanced one position). It requires two steps.

  1. move the list entries up one

    This rotates the rotor one position. This changes the "IN" points in the list.

    For example:
    (list indexes) 0 -> 26, 1 -> 0, 2 -> 1, 3 -> 2, ...
    (characters)   A -> Z,  B -> A, C -> B, D -> C, ...

  2. reduce the list values by one

    Because the rotor is made of physical wires they don't change lengths. The rotor list "IN and "OUT" points must remain a fixed distance apart. If you move the "IN" point, you must move the "OUT" point.

    This changes the "OUT" points in the list.

Advance Rotor

image missing