Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please clarify valid settings #5

Open
lordofscripts opened this issue Nov 20, 2023 · 2 comments
Open

Please clarify valid settings #5

lordofscripts opened this issue Nov 20, 2023 · 2 comments

Comments

@lordofscripts
Copy link

We know that in the default CLI app only 3 rotors can be used (I,II,III) but that one can "assemble" one with 5 rotors like the latest Enigma machine.

However, I noticed the following while using it:

  • The reflector can only be B or C, anything else (A,D, etc.) is flagged as invalid
  • There is no explanation about the Window parameter, what it means, what are valid settings, etc.

And what about the Plugboard? in the machine it consisted of key pairs but that doesn't seem to be handled by command-line parameters.

@ibraimgm
Copy link
Owner

This is a rather old toy project, but I will try to answer as best as I can remember.

The reflector can only be B or C, anything else (A,D, etc.) is flagged as invalid
On the M3/M4 enigma, only "B" and "C" reflectors are available, as far as I know. A reflector "A" does indeed exist, and was created for the first enigma, but was discontinued in 1937.

In the source, I also have reflectors B Dünn and B Dünn. As far as I remember, they were "variants" of the B/C reflectors (I think I mad then available on command-line too). You can also implement reflector A easily (the Reflector interface has only 2 simple methods) if you need to.

More info on this: https://people.physik.hu-berlin.de/~palloks/js/enigma/index_en.html#s7

There is no explanation about the Window parameter, what it means, what are valid settings, etc.

This is a tricky one. If I remember right, the window position refers to where the "notch" of the rotor ring is located, and this is needed to know "when" to step the "next" rotor. I don't remember the details, but it was quite tricky to understand. This link may help, but it is not an easy ride: https://www.cryptomuseum.com/crypto/enigma/working.htm

And what about the Plugboard? in the machine it consisted of key pairs but that doesn't seem to be handled by command-line parameters.

You got it right, it is just a "dumb" translation of letter pairs. And yes, I did not add it to the command line just because it was to wordy to add (you would have to input the whole alphabet) and I figured out anyone would hardly ever use that. The exising CreatePlugboard can create a custom plugboard if you need it (or you can implement the interface yourself).

@lordofscripts
Copy link
Author

This is what can be said so far comparing the available Enigma description and matching it to your CLI. I will use the Day 20 settings of the Luchtwaffe coding sheet referred previously:

  • Umkehrwalze is the chosen Reflector (-f or --reflector): B (assumed)
  • Walzenlage is the positioning order of the three Rotors (-r or --rotors) or wheel choice & order: V,II,III
  • Steckerbrett is the Plugboard key-pair translation. Your default app implementation is self-steckered, but I updated the source to let the user apply a plugboard (-p or --plugboard): ZGNWSMVYXTUROCLBAQHF
  • Grundstellung is the starting position of each of the three wheels or rotors (-w or --window): ??? don't see the relation to the code sheet
  • Ringstellung is the adjustable index position (-r or --ring) of each wheel/rotor: 07 (G), 18 (R), 04 (D)

However, while your README explains how to use the program, it does not explain how to make this experiment useful. In other words, we can encrypt using the sample application but there is no explanation HOW the user, can make a round-trip and decrypt the output of your software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants