6 ms·
Engima Breaker in Rust
- torginus 3y agoIn Rust!
- ajsnigrutin 3y agohttps://news.ycombinator.com/item?id=8830044 https://news.ycombinator.com/item?id=8830044 In ruby!
- ajsnigrutin 3y agoIn Go! https://news.ycombinator.com/item?id=15838329 https://news.ycombinator.com/item?id=15838329
- ajsnigrutin 3y agoIn python! https://news.ycombinator.com/item?id=13879751 https://news.ycombinator.com/item?id=13879751
- ajsnigrutin 3y agoIn flash! https://news.ycombinator.com/item?id=416161 https://news.ycombinator.com/item?id=416161
- ajsnigrutin 3y agoIn excel! https://news.ycombinator.com/item?id=3755656 https://news.ycombinator.com/item?id=3755656
- kylepaps 3y agoExcellent stuff
- karaokeyoga 3y agoEngima → Enigma
- kookamamie 3y agoThe title itself was ciphertext.
- anilakar 3y agoBut not an Enigma ciphertext, as it cannot map back to the same letter.
- actionfromafar 3y agoActually, Enigma is larger.
- 65a 3y agoCWOWD CZKZO DLUML TPRHR KXFHH MHIUS TMXON CHQXQ DFMBI APKZV DRFIU SEFLV ZSSPK ESGNE BNRQA QBVHH YMAZ just to not be cruel, it's an m3 without UKW-D, 3 rotors and a plugboard :) EDIT: I think I answered my question looking at the code. There are a lot more rotors known (see cryptomuseum). Some things I found while writing an enigma: many online enigmas have some bugs with double stepping the wheel on a single press, which the machine did not do. The Humboldt University Berlin's online enigma is correct. There is also a very similar machine used by the Soviets until the 1980s that you can probably represent with the same datastructures called Fialka: https://en.wikipedia.org/wiki/Fialka https://en.wikipedia.org/wiki/Fialka. My test case that returns different results on different emulators is: M3, rotors III, II, I, no ring setting, UKW-B, starting position AEQ. The string ABCDEFGHIJ produces OMUQBCLPVR in minarke.c and produces LUINDKMWNH in the University Humboldt Berlin enigma. I believe the latter is correct.
- Pewqazz 3y agoHey, I'm the original author of the repo -- I noticed a bunch of stars coming in and figured it was coming from Hacker News, heh. I should probably go and make it clearer in the README, but you're right, by no means is it a full Enigma implementation. It mostly started as a translation of code described in [this post](http://practicalcryptography.com/ciphers/mechanical-era/enigma/ http://practicalcryptography.com/ciphers/mechanical-era/enig...) from C to Rust (since I was a naïve undergrad interested in Rust). At some point it would be cool to add the full Enigma functionality. Do you have any guidance for test cases and/or reference implementations?
- willvarfar 3y agomy own machine with rotors and some proper test vectors https://gist.github.com/williame/94beef4b9afea659864950c29d402b90 https://gist.github.com/williame/94beef4b9afea659864950c29d4... I also had a fast version in c++ that could trivially brute force messages with an index of coincidence kind of attack, but can't find that code after a quick search of github :(
- 65a 3y agoI used many of these as test cases: http://wiki.franklinheath.co.uk/index.php/Enigma/Sample_Messages http://wiki.franklinheath.co.uk/index.php/Enigma/Sample_Mess...
- willvarfar 3y agoAh everyone should make a raytracer and an enigma cracker :) My own exploration https://williame.github.io/post/145830743193.html https://williame.github.io/post/145830743193.html