-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Lorenz SZ40/42 cipher attachment operation #528
Conversation
Hi @VirtualColossus, thank you very much for this contribution! I've played around on your Virtual Colossus and Lorenz a number of times so it's very gratifying to see it entering the CyberChef ecosystem. We had intended on implementing Lorenz and Colossus at some point in the future when we got the chance, but you've saved us a lot of time! Before I merge this PR, we'll have a good rummage through and think about the best way to package it. I think we'll split this and the other related operations (Enigma, Typex, Bombe, Multi-Bombe) out into their own module as they are starting to get reasonably large. I guess a suitable name for this module might be "Bletchley". It would also be worth expanding a little on the description you've provided. I'd like to change the infoUrl to the Wikipedia article on Lorenz so that it fits out convention and user expectations a little better, however I'm not at all against including a link to virtualcolossus.co.uk in the description body. |
Hi @n1474335, my pleasure, maybe I'll start having a think about how to achieve a Colossus sometime. I've updated the description and link as requested. If you think it needs more detail - maybe I can suggest a larger addition to your wiki pages as you have with Bombe, Enigma & Types with a few examples and walkthrough. I think a "Bletchley Park" module would be a great idea. |
Sorry it's taken so long to look at this, but I would like to get this merged and I've had a look at it now. I think the user interface and so forth are great. I'd like to see the A walkthrough as per the Enigma/Bombe/Typex page would be nice if you could - there's quite a lot of options, and while I think the way they've been implemented is sensible, it's a little intimidating just because configuring a real Lorenz is so complicated! |
Great! I'll see what I can do. It's been a while now since I checked out code last but will find time to catch up when I can .. dread to think what the UI and run() function for a Colossus operation will look like! |
Following changes have been made: Let me know if any further changes required. Query: Can I add section 'learn more' linking to my website & TNMOC or would you prefer to stick with just links to Wikipedia? |
The walkthrough could use a couple more links to recipes as you work through it, but other than that I like it. Happy with your code changes - good to see the unit tests catching some bugs! I'll leave @n1474335 to answer the links query. Nice work, and thanks very much! |
@VirtualColossus Thanks very much for your work on this, it's looking really good. RE links: I'm keen for the I'm happy for you to link to TMNOC and your website in the wiki article (as we have linked to a number of places in the article on Enigma, the Bombe and Typex). I'm also happy in this particular case for you to link to your website in the operation description, however this does not set a precedent for future operations. We're making an exception in this case due to the context and utility of the site, providing a unique way to test the algorithm. |
Thanks. |
Thanks very much once again, this is a really great addition. I've put the wiki article here and added a link to it in the operation description. |
Yes, thanks again from me too. Let us know when you figure out how to do Colossus! :-) |
No problem - I enjoyed working out how to do this within your platform (very nice work by the way). Colossus could be tricky, but tell you what, I'll swap you a Colossus operation for the recorded sound from your real TypeX you have (I'd love real sounds of it running and typing for my TypeX simulation I'm currently working on!) ;) |
You know, in exchange for a Colossus operation, we might just be able to sort something out. I've spoken to our History department and they think this could be possible some time in the new year (they're a little busy at the moment what with all our centenary stuff and the Science Museum exhibition). What exactly would you like recorded? |
I like your use of the We should be able to record those things for you. We'll hopefully get it done by the end of Feb, barring anything major coming up. Nice touch with the CyberChef rotor settings! It looks really good. |
@VirtualColossus I'm pleased to say we have completed the TypeX recording. We also decided to record Enigma while we were at it, so you've got both. I have emailed the files through to you. I hope you find them useful! |
@n1474335 I have the recordings - they are fantastic, just what I was after plus a few other bonus items I wasn't expecting. A little audio, especially from the actual machine itself, makes an incredible difference to how my simulations work and mean people get much more of a feel for how it would have been to use one of these rare machines themselves. Thank you SO much, already working on putting these into the simulation. Thanks for the extra Christmas present - I really appreciate your efforts, a big pat on the back for all your team for doing this. |
In case you're interested in checking out the results of the Typex audio recording you kindly organised, my simulation is now live on https://typex.virtualcolossus.co.uk |
This is an operation which emulates the Lorenz SZ40/42 cipher attachment, models available include the SZ40, SZ42a and SZ42b with the option for the Klartextfunktion (plaintext limitation).
Three example wheel lug patterns are included (KH, ZMUG & BREAM) which are from the settings within Tony Sale's original Virtual Colossus code which was written to help work out the mechanics of the Colossus Rebuild at TNMOC (http://www.tnmoc.org/). A custom pattern mode also allows setting of any pattern of lugs on each of the twelve wheels.
Wheel starts can be set for each of the twelve rotors plus there is an option to set whether this operation is receiving or sending. Normally on the real Lorenz, the cipher text itself is never seen by the operators at each end of the link so an option was required to know if it is enciphering from plain text or deciphering from ITA2 code.
This emulation has been tested against a number of examples with start positions which were originally in Tony Sale's Virtual Colossus. This is as close as I can get to confirming that the operation is enciphering/deciphering correctly as I don't believe a working Lorenz SZ42 is
currently available! This operation is also fully compatible and tested against my web emulator, Virtual Lorenz (https://lorenz.virtualcolossus.co.uk). Virtual Lorenz has been used to encipher a new message which has then been run on the Colossus Rebuild at TNMOC and confirmed to be accurate.
Examples with recipe
kh - example.txt
zmug - example.txt