|
Post by yo9gjx on Mar 24, 2017 19:04:56 GMT
|
|
|
Post by Arduino Enigma on Mar 25, 2017 3:52:06 GMT
Interesting post. The Enigma G uses a gear stepping mechanism, but multiple notches in the wheels make it step frequently. I have been researching the Enigma Z trying to find the settings for one published example, but not getting 100% matches. Been thinking there is something wrong with the stepping, but have been unable to put a finger on what...
One model uses lever stepping, another uses gears, was assuming the geared stepping was in numerical order 9998 -> 9999 -> 0000, but now realize that the geared stepping supports more than one turnover notch.
|
|
|
Post by mauser on May 7, 2017 5:26:25 GMT
|
|
|
Post by Arduino Enigma on May 10, 2017 0:07:28 GMT
mauser: Nice feat, adding a new machine to your MkIV. Care to post pics of your build / talk about the software mods? What's the difference between the IP models and the normal ones. BTW, TheBletchleyPub has a MkIV IP as well. Recently they have started wrapping in in cling wrap...
|
|
|
Post by mauser on May 11, 2017 1:19:24 GMT
My avatar is my machine at present. I've not bought the wood box yet, so I printed the inner box on my 3D printer in purple PLA plastic for the moment. I'll post snippets of the code in the near future. The sketch approaches the Enigma algorithm differently than either your or lpaseen. I also dramatically reduced code size, increased speed and saved a bunch of workspace on the Arduino by converting as many integer variables to byte. You have a value like a number representing a value on a wheel, why store it as a two byte integer when one byte will do. Anyway, I'll post some code snippets in the next response. I'm also building a theoretical Enigma, based on the M4 and the 'G'. Say four steppable wheels (3 from 8, and 2 thins), and three instead of two fixed reflectors. The weakness in the G design was the 4th wheel WAS the reflector and BP dicovered "lobsters" when all 4 wheels stepped. By fixing the reflector and treating wheel 4 like the other three, you don't get the lobster. The reflector doesn't change so although the scramble from right to left remains the same through 4 wheels, it changes through the reflector and comes back on a different path from left to right.
|
|
|
Post by lpaseen on May 11, 2017 19:16:49 GMT
I did look a little at the mark 4 code but decided to write my own version. I know several things can be improved (so I can add enigma machines like enigma G or UKW-D) and with time I will work it but for the moment that code works and other more pressing things (like doc) is missing so I'm working on that first. One major diff is that Mark 4 uses a arduino mega2560 with 246k program space and 8K ram, I'm using the small arduino nano with 32/2k so space is critical.
|
|
|
Post by mauser on May 11, 2017 21:44:42 GMT
Then I really suggest you convert as many 'int' entries to 'byte' if you haven't already. The Mega in the IP now has almost 5k ram just by making that change. Arduino Enigma can benefit as well as he is using the Uno as I recall with 4K of ram.
|
|
|
Post by lpaseen on May 11, 2017 21:54:40 GMT
Then I really suggest you convert as many 'int' entries to 'byte' if you haven't already. The Mega in the IP now has almost 5k ram just by making that change. Arduino Enigma can benefit as well as he is using the Uno as I recall with 4K of ram. uint8_t is what I mostly use Another thing that really helps is to wrap all text output in F(" ") so, change Serial.println("some text"); to Serial.println(F("some text"));
|
|
|
Post by mauser on May 13, 2017 9:09:26 GMT
Good point, the uint8_t and a byte are basically the same as far as storage, 8 bits is 8 bits. The Mark 4IP doesn't use Serial.print anything. The few lines that are in there are Serial3 and strictly for sending data to the thermal printer so you get your cipher groups printed out. Since that text is not fixed text, the F(" ") macro won't work in any case.
|
|
|
Post by Arduino Enigma on May 17, 2017 16:29:09 GMT
|
|
|
Post by Arduino Enigma on May 17, 2017 17:32:26 GMT
|
|