Saturday, November 1, 2014

Some test cases for the Double Stepping Anomaly

The Enigma machines that used levers to move the rotors have an interesting behavior called Double Stepping. For the following discussion, the three wheel enigma models are analyzed. The four wheel enigma model behaves in a similar manner except that the leftmost rotor is stationary, it does not get moved by the rotor to its right.

http://www.cryptomuseum.com/crypto/enigma/working.htm

Rotors I through V have a single position at which the rotor to the left is advanced.  Rotors VI,VII and VIII have two advancing positions. When the Z or the M is displayed, the next key-press will advance the rotor to the left. When the middle rotor is at the Z or M position, the next keypress will move the middle rotor and the leftmost rotor, regardless of the position of the rightmost rotor. You can see this behavior in the BZB CAC CAD sequence.

Before I understood this, I had a faulty double stepping logic. The sequences below helped me test that. The ones starting with * only advance the middle rotor once.

The sequences below can be started at any point and are not affected by what happened before, only by what is displayed now. If one sets rotors 6,7,8 to MMN, the next key press will turn them to NNO.

Rotors 1,2,3

ADU ADV AEW BFX

Rotors 6,7,8

ZYY ZYZ ZZA AAB
MLL MLM MMN NNO

ZZY AAZ ABA ABB
MML NNM NON NOO

* ZZZ AAA AAB
* MMM NNN NNO

YYY YYZ YZA ZAB
LLL LLM LMN MNO

YZY ZAZ ZBA
LML MNM MON

* YZZ ZAA ZAB
* LMM MNN MNO

AZY BAZ BBA BBB
NML ONM OON OOO

ZZX AAY AAZ ABA
MMK NNL NNM NON

AYZ AZA BAB
NLM NMN ONO

No comments:

Post a Comment