I found this explanation of Enigma rotor movement on this website, but can't quite understand the methodology: Enigma rotation example
- A ⤑ B → D ⤑ C (rotor III in position B)
- C ⤑ C → D ⤑ D (rotor II in position A)
- D ⤑ D → F ⤑ F (rotor I in position A)
- F ↔ S (reflector B)
- S ⤑ S → S ⤑ S (rotor I in position A, reverse)
- S ⤑ S → E ⤑ E (rotor II in position A, reverse)
- E ⤑ F → C ⤑ B (rotor III in position B, reverse)
I follow steps 2 to 6 inclusive OK, but unsure about steps 1 & 7: I understand that the rotor moves before encryption, so I get the A>B>D, but why the final D>C? and similarly the end of step 7. I can't understand where that final step comes from. I guess there is a similar bit of complexity when the the rotors cause the next one to step ahead when the notches engage?
I'm only doing this for interest, as I used to use AES a lot in my job (now retired), encrypting electronic messages, so thought I'd get my head round Enigma to keep the brain ticking over.
Think I understand now (correct me if I'm wrong)!: Because the rotor has advanced, pressing A goes into rotor III at letter B, which encodes to D, but "comes out" in "position" C because the rotor has advanced.