0
$\begingroup$

For a project, I am writing Enigma and Bombe simulators in Python. I have coded up both and so far so good. My Enigma simulator gives the same results as the online simulator here: https://people.physik.hu-berlin.de/~palloks/js/enigma/enigma-u_v20_en.html

But now I am using my Bombe simulator to find key settings with an assumed ring setting of AAA (1, 1, 1). When the Bombe stops I have a key setting and ring setting which gives a relative offset. For example a message encoded with key = FHY (6, 8, 25) and ring settings JQC (10, 17, 3) gives key/ring offsets of 4, 9, 4. For this same message my Bombe stops at key = WRW (23, 18, 23) and ring = AAA (1, 1, 1). This combination also gives key/ring offsets of 4, 9, 4. This is as I would expect, so far so good.

But... With a 20 character message encoded at key = AKW (1, 11, 23), rings = ZAB (26, 1, 2) the key/ring offsets are 25, 16, 5. However, my Bombe stops at key = BJW (2, 20, 22), rings = AAA (1, 1, 1) giving key/ring offsets as 25, 17, 5. My first thought is, of course, that my Bombe code was incorrect, but if I use the online simulator I get the same encyphered output for either of those settings. So my Bombe stop is correct. What is going on? Why are these settings cryptographically equivalent yet the offsets are not?

AKW (1, 11, 23), rings = ZAB (26, 1, 2) => offset = 25, 16, 5

BJW (2, 20, 22), rings = AAA (1, 1, 1) => offset = 25, 17, 5

I am using rotors I, II, III from left to right (with reflector B and six stecker pairs) if that has any bearing.

Any help is appreciated. Thanks!

$\endgroup$
2

0

Your Answer

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

Browse other questions tagged or ask your own question.