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

Bug in Enigma M4 #108

Closed
stinovlas opened this issue Jan 10, 2021 · 3 comments
Closed

Bug in Enigma M4 #108

stinovlas opened this issue Jan 10, 2021 · 3 comments
Labels

Comments

@stinovlas
Copy link

Steps to reproduce the bug

  1. Navigate to cryptii.com/pipes/enigma-machine.
  2. Set mode to DECODE
  3. Enter following settings:
    • Model = Enigma M4 "Shark"
    • Ciphertext = JSMC IYFI
    • Reflector = UKW C thin
    • Rotor 1 = Gamma (Position 10, Ring 10)
    • Rotor 2 = V (Position 15, Ring 15)
    • Rotor 3 = VIII (Position 8, Ring 8)
    • Rotor 4 = VII (Position 1, Ring 1)
    • empty the Plugboard setting

After that, I see incorrect plaintext wvim dcpv

Describe what you expected to happen
I expect to see correct plaintext test test

Version, environment and state

{"version":"4.0.8+master.b029d8c","env":{"name":"firefox","version":"82.0.0","os":"Linux","type":"browser"},"pipe":{"id":1634492782,"url":"https://cryptii.com/pipes/enigma-machine","title":"The Enigma machine: Encrypt and decrypt online","description":"The Enigma cipher machine is well known for the vital role it played during WWII. Alan Turing and his attempts to crack the Enigma machine code changed history. Nevertheless, many messages could not be decrypted until today.","items":[{"name":"text","title":"Ciphertext"},{"name":"enigma","settings":{"model":"M4","reflector":"UKW-C-thin","rotor1":"gamma","position1":10,"ring1":10,"rotor2":"V","position2":15,"ring2":15,"rotor3":"VIII","position3":8,"ring3":8,"rotor4":"VII","position4":1,"ring4":1,"plugboard":"","includeForeignChars":false},"reverse":true},{"name":"text","title":"Plaintext"}],"content":{"data":"JSMC IYFI"}}}

My thoughts
I assume this is a bug in cryptii, because the output of cryptii diverges from several other implementations I tried, including the one on http://users.telenet.be/d.rijmenants/en/enigmasim.htm which claims that their simulator is exact replica of real Enigma machine (including M4).

I checked the wiring of UKW-C-thin reflector and rotors Gamma, V, VIII and VII and they seem to be in order. I also didn't observe this bug with Enigma M3 which I used multiple times with no problems.

@stinovlas stinovlas added the bug label Jan 10, 2021
@ffraenz
Copy link
Member

ffraenz commented Jan 10, 2021

Thank you for reporting this issue! I'm always learning something new about the Enigma machine when issues arrive.

I've created a page for the test case:
https://cryptii.com/pipes/P2CeCw

An important reference simulation I often compare my implementations to is giving the same result as Cryptii:
http://people.physik.hu-berlin.de/~palloks/js/enigma/enigma-u_v25_en.html

Now the real challenge lies in finding out what makes this test case special and who's interpretation is right.

@stinovlas
Copy link
Author

Now the real challenge lies in finding out what makes this test case special and who's interpretation is right.

Definitely! Thank you for your quick response. I'd like to contribute and I'll try to look into it when I find some spare time =o).

@ffraenz
Copy link
Member

ffraenz commented Nov 16, 2022

I'm closing this issue due to inactivity. However, bugs in the Enigma implementation are very important to me, so please reopen this issue or create a new one, if necessary.

@ffraenz ffraenz closed this as completed Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants