1
$\begingroup$

I am currently writing a paper in my old age for the fun of it. I feel that the enigma machine had gotten a bad wrap for some of its flaws. I decided to write a machine simulation to see if I can correct some of these flaws. The part of the "not being able to encode a character unto itself" isn't as large a flaw as first presented. In my version, I eliminated that flaw. At least, that is what it looks like.

I set up a test to ensure that it can encode to itself. And still be decrypted properly. I created an input file of fifty "A". Ran the encryption/decryption and, indeed, was able to encode 21 "A"'s to itself out of 50 characters, 42% of the data. Other test with others character types showed about the same results, between 9-21 characters. In an unrelated test, I saw this occur again.

So, the fix I believe was to treat the reflector like a plug board. I just randomly build character pairs for the plugboard. And then, just randomly build an alphabet string ensuring there no dups.

I think, the engineer that built the reflector may have put too much effort ensuring that a single entered from one end, had to exit on the opposite side of the reflector. I was planning on adding more notches to spin the rotors more. I thought that if I could make the last (left) rotor actually change more often, that it would have a better scramble. But, I hadn't coded that far, when I notice that it could encipher to itself.

Does this make sense? Am I off track on this?

Support files:

Input enter image description here

Encrypted enter image description here

Decrypted enter image description here

Device Log

   MSG:  >>> Begin Encrypt <<<

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encrypt()|Line: 88
   MSG: Message Size: 50 MSG: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:-

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:)

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:L

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:'

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:Z

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:I

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:(

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:J

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:N

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:U

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:W

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:8

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:Q

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:8

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:)

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:8

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:-

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:R

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:'

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:6

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:5

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:,

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:2

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:Z

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:K

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:D

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:3

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:'

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:S

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:I

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 169
   MSG: Input char:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encode()|Line: 195
   MSG: Output cipher:A

2023.05.15 19:20:57|INFO|PGM: Device|FNC: Encrypt()|Line: 102
   MSG: Encrypted Size: 50 Cipher: -)L'AZIAAA(AAJNAUWAA8Q8)A8-ARAA'6AAA5,AA2ZKDA3'SIA
$\endgroup$

1 Answer 1

1
$\begingroup$

The issue here is that you have a cryptographic scheme that is easy to implement in software, but not in the electro-mechanical technology of the Enigma machine. Mathematically, the Umkehrwalze pairs letters much like the Steckerbrett, however whereas the Steckerbrett could leave letters unpaired (equivalently pairing a letter with itself), this could not be done with the Umkehrwalze whilst due to the design of the machine.

Electrically at rest, all 26 wires corresponding to the letters of the alphabet were wired to one terminal of the battery. Depressing a key broke the connection of one of the wires and moved it to the other terminal. Current would then flow through this one wire and the wires of the Walzen before coming to the Umkehrwalze and heading back through the rotors on a different path, ending at a different letter which was therefore wired to the other terminal and completed the circuit.

If the Umkehrwalze had attempted to loop back a wire to itself, the current could not flow in both directions. Instead no circuit would be completed, just a wire with potential which could not cause a bulb to light up.

One could ask if the no fixed point property could have been managed in other ways. For example, if we remove the Umkehrwalze and just have exit wires at that point connecting to the other terminal. This would mean that the Enigma permutation only changes at one point per step (rather than twice in the actual design) and this is easier to attack (in fact the original Enigma A and B models did not have an Umkehrwalze). Alternatively, one could ask for more rotors and step more than rotor at each key press. This would add to the user effort and expense of construction. If you've ever pressed an Enigma key, you'll know that you have to transfer considerably more effort than a typewriter and this increases when more rotors turn.

I'd agree that people rather overstate the effect of the no-fixed point feature, but it is not an easy one to correct when one considers the limitations of the machine.

$\endgroup$
5
  • 1
    $\begingroup$ Addition: if we want to solve the no-fixed point issue and keep the feature that each rotor has two opportunities to scramble the in->out transformation without doubling the number of contacts on a rotor, it seems we need to use active circuitry somewhere. That what the Fialka does: it has three transistors in the reflector. $\endgroup$
    – fgrieu
    May 16, 2023 at 7:12
  • 1
    $\begingroup$ @fgrieu Agreed, but that requires 1950s technology. $\endgroup$
    – Daniel S
    May 16, 2023 at 7:35
  • $\begingroup$ @fgrieu That is cool! I didn't know about that, I'll need to look into that. $\endgroup$ May 16, 2023 at 19:56
  • $\begingroup$ @DanielS, So, can I infer that coding the reflector was the solution, going from hardware to software? That would make sense. Thanks! $\endgroup$ May 16, 2023 at 20:17
  • $\begingroup$ I wonder if that would mean, anyone writing a simulation would also be able to encrypt a character to itself? $\endgroup$ May 16, 2023 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.