fixed enigma machine, should have working cli operation. switched characters to being 0 index to fix the issue with the mod.
also planned out the graphical layout and started rendering the keyboard.
Log in to leave a comment
added reverse rotor functionality, this is getting trippy. the reverse enciphering is definitely broken since it may output a negative number if the wheel rotates too much but I’ll just have to fix that later. for the most part, or rather, for at least a couple inputs (I’ve only tested a couple) it seems to be working correctly
Log in to leave a comment
separated modular functions into individual files and switched to the three rotors of Enigma I. now utilising an initialiser function to install all three rotors, allowing for changes in the ordering.
one key concept that took some time to understand is that the wiring of each rotor was exclusively within itself. That means, when a rotor rotates, functionally, the input is shifted by one, the mappings themselves never change, as is often easy to visualise. the implication this returns when simulating a compartmentalised process is that both inputs and outputs have to be shifted in accordance with rotation. a rotor shifted one place takes the input ‘A’ into the ‘B’ wiring, and the ‘B’ connection is what is activated on the other side of the rotor. Significantly, if ‘B’ corresponds to a ‘D’, then the next rotor does NOT receive an input of ‘D’, but rather an input of ‘C’, since the first rotor has been shifted by one position.
Log in to leave a comment
implemented a single rotor to test out the system. uses the 1924 commercial enigma cipher from https://en.wikipedia.org/wiki/Enigma_rotor_details
Log in to leave a comment