I’m investigating when intercepted Enigma indicators and rotor-setting constraints can pin down the exact rotor wirings, including their rotational offsets.
Evidence
In simulation, I reproduced Rejewski's fast-rotor reconstruction up to twist. With the right and middle wirings known up to twist, intersecting candidate sets from qualifying triplets isolated the right rotor's exact twist in the cases I tested.
Inside the Enigma
Its rotors connect 26 letter contacts through scrambled wiring. Can intercepted messages reveal those hidden connections?
Recovering the left rotor
In this example, the right rotor is known exactly. The middle rotor’s wiring is known only up to a shift. I’m trying to reconstruct the left rotor, but that remaining uncertainty matters.
The question
Marian Rejewski’s work showed that intercepted indicators could reveal the internal structure of the Wehrmacht Enigma through permutation theory. But recovering a rotor wiring from the available equations does not always determine its absolute physical orientation.
How the investigation began: SRIP
I began this work in my first year during IIT Gandhinagar’s Summer Research Internship Program. I was learning permutation group theory as I modelled the Enigma and reconstructed Rejewski’s algebraic indicator attack.
Building the simulation made the distinction concrete. The classical method reconstructed some rotor wirings only up to twist.
SRIP work trail
- Read Rejewski’s account alongside introductory group theory.
- Formalized the permutation model and worked with co-intern Arjun Maneesh Agarwal on a proof of Rejewski’s pairing theorem.
- Built a notebook that reproduced fast-rotor recovery from simulated messages.
- Tested right-twist recovery using independent triplets whose -settings form arithmetic progressions, intersecting their admissible twist sets to determine the rightmost rotor’s exact twist.
- Derived the dual-triplet equations and explored middle-rotor turnovers as a source of additional constraints.
Minimum mathematical background
The alphabet can be treated as a set of 26 elements, and each rotor wiring is a permutation of that set. Let denote the one-step Caesar shift. The rotor, reflector, plugboard, and changing rotor positions can then be composed into a single permutation describing the effect of the machine on a letter.
The important ambiguity appears in a conjugacy relation such as
where is an unknown rotor wiring and is a known shift. When , the only permutations commuting with are the powers of . If is one solution, then all solutions have the form
The value is the rotor’s twist. Thus, a method that recovers the set of possible values has recovered the wiring only up to twist. An additional constraint is needed to identify the absolute wiring.
For the reconstruction procedures, choose one representative from each known candidate set and write
Here , , and are representatives of the candidate sets, while , , and are their corresponding twists.
The machine as permutations
The notation used in the report represents the plugboard by , the right, middle, and left rotors by , , and , and the reflector by . The Caesar shifts , , and encode the current absolute rotor settings. Rotor stepping changes these settings between key presses, including middle-rotor turnover and double stepping.
For a day , let denote the involution produced by the -th letter of that day’s six-letter indicator, where . For a selected day , the absolute settings after the first key press are written as , corresponding to the left, middle, and right rotors. When only the first-letter involution from the selected day is needed, define the shorthand .
The recovery problem
For a fixed day , Rejewski’s indicator method gives six known involutions . After shifting known terms, consecutive products of the corresponding transformed permutations can produce a relation of the form
Identifying the conjugating permutation leaves 26 possible wirings for the rightmost rotor. The remaining problem is to recover the third rotor, determine the twists, recover the reflector, and account for turnover constraints.
What the SRIP work established
- The Enigma can be represented as a composition of permutations whose form changes with the rotor settings.
- Rejewski’s reconstruction recovers the rotor occupying the rightmost position up to twist.
- Two months with different rotor orders provide additional constraints for reconstructing the remaining rotor and reflector.
- The report treats three cases of rotor-order changes: no rotor fixed, the middle rotor fixed, or the left rotor fixed.
A representative example: and
The general difficulty becomes concrete in one pair of rotor orders. Take the September order to be and the October order to be . The two months place and in the rightmost position at different times, so Rejewski’s method gives candidate sets for both of them up to twist:
With and known up to twist, each qualifying triplet gives an admissible set of values for . In the simulations for this setup, intersecting those sets isolated the correct value and fixed exactly.
The next step is to recover using the dual-triplet approach. In the derivation presented in the SRIP report, the twist of the relevant known rotor was treated as fixed, so the equations were expected to return 26 candidates for . Later simulations showed that recovering only absolutely is not enough: if remains known only up to twist, the dual-triplet equations contain an additional unknown factor involving the twist of .
We refer to this extra unknown contribution as the spin. Each of the 26 possible values of can produce a different set of 26 candidates for , giving
joint configurations of the middle twist and the left wiring. Fixing ‘s twist in this example fixes the spin factor and leaves 26 candidates for .
Methods and current limits
Dual-triplet recovery
The dual-triplet method is intended to recover the third rotor wiring up to twist, provided that the equations have enough absolute twist information as input. In the representative setup, this means that after the rightmost rotor has been made exact, the twist of one further relevant rotor must also be determined. Choose two triplets of days such that the leftmost rotor settings in each triplet form an arithmetic progression with the same common difference , where and .
Each triplet gives a conjugacy relation. Taken together, the two relations form a system of simultaneous conjugacy equations. An unresolved twist on another rotor can introduce spin into the conjugating permutation, as in the worked example. Fixing that twist lets the equations recover the remaining rotor up to its usual 26-fold twist in the tested setup.
Right-twist recovery
The right-twist method is a multi-triplet procedure for recovering the rightmost rotor’s twist. Consider a month with rotor order and choose several independent triplets . For each triplet, the leftmost settings must form the required arithmetic progression:
It applies when the rightmost and middle rotor wirings are each known up to twist, so that and . For each triplet, writing for the first-letter involution from the selected day, the report shifts the known terms and denotes the resulting expressions by .
Each triplet produces an admissible set of rightmost-twist values. The right-twist estimate is obtained by intersecting the independent results:
The cycle structures of the resulting permutation products can vary with the trial rightmost twist. Comparing them requires no knowledge of the middle twist because conjugation preserves cycle structure. In the simulated cases, the intersection isolated the correct rightmost twist. In the worked example, this is the step that fixes exactly.
Procedures still treated as provisional
The report also contains exploratory procedures for other rotor-order configurations that still need to be tested in the relevant cases.
The 26 → 676 spin correction
After the SRIP report, Jonah Weinbaum pointed out that the middle rotor’s unknown twist contributes an extra factor to the dual-triplet equations. I worked through the algebra independently and confirmed that my original count had fixed that twist without determining it. The right-twist intersection still worked in the simulations. The correction changed what the dual-triplet step needed as input and left open how to obtain that extra twist from the available observations.
What remains open
- Can an additional absolute rotor twist be recovered from the indicators or turnover constraints?
- Across rotor orders, when does fixing one more relevant twist remove spin and leave 26 candidates?
- What further constraint would select the remaining rotor's exact wiring from those 26 candidates?

