Enigma Machines and how the internal wiring of their rotors was reverse-engineered is the topic of this note.
I pieced this together from several sources, so it is a little convoluted but it mainly follows chapter 3.8 from the book Abstract Algebra by Lawrence and Zorzitto, albeit in a perhaps simplified, less rigorous way.
Rejewski and his team of code breakers did a lot more than what is described in this note. For example, they designed and prototyped electro-mechanical computers to take over some of the tedious manual labor that was still needed to sift through possible permutations. Later, at Bletchley Park, Alan Turing and his team scaled up those prototypes and made the Bombe.
enigma.pdf