General > General Technical Chat
How long would it take an average computer to figure out the WWII Enigma machine
jmelson:
--- Quote from: Beamin on January 01, 2021, 10:19:35 pm ---Say we recreated the "bomb" (I think it was called the bomb;
--- End quote ---
that's the "bombe", name apprently from the Poles who first started working on cracking Enigma.
--- Quote ---
the thing in blechly park with all the tubes in it that they would feed intercepted codes)
--- End quote ---
That was Colossus,m and was used to crack the Lorenz SZ42, the first serious cypher machines. Cracking that made the Enigma look like a
ceral box decoder ring toy.
--- Quote --- in software and fed it some 3 or 4 rotor and plug board enigma codes how hard would it be to figure out the message? Using the same cryptography the British used no special modern day NSA code cracking.
Could you do it on an arduino? Would it take minutes, seconds, milliseconds? How many lines of code would it take in C or python?
--- End quote ---
A PDP-8 from the 1960's could crack Enigma codes in minutes. Actually, there were two Enigmas, the army Enigma ha 3 rotors, the navy version had 4. The US built several hundred bombes for the cracking effort. Every day at midnight, the Germans changed the order and selection of rotors, and then they were not changed for the rest of the day. The NCR-built bombes were set up with all possible rotor combinations (that took something like 26 machines) and would try to crack the correct rotor combination. That took several MINUTES on an all electromechanical bombe (for army Enigma) and about 20 minutes for navy. Once they knew the rotor combination to use, all machines were set up with those rotors and they ran all the machines in parallel to crack all the messages. This was done in a huge barn-like building in downtown Washington, DC.
As for the SZ42, code-named "tunny" by the British, they had several electromechanical machines before building Colossus, which was part electromechanical with a lot of electronics. It read the SZ42 cyphertext from punched paper tape at several thousand characters per second, allowing the character stream to slip one character per full pass against the crib tape. Maintaining the alignment of the two tapes was a problem, so they eventually stores the crib electronically, so there was only one tape to deal with. (The "crib" is snippets of expected cleartext such as "heil Hitler" or
"commander" etc.)
There is a LOT of info on these systems available online, for your reading pleasure. There are sample Enigma cyphertexts and decoding programs for one to try out.
Jon
Beamin:
--- Quote from: CJay on January 02, 2021, 05:16:21 pm ---
--- Quote from: Beamin on January 02, 2021, 04:15:47 pm ---
--- Quote from: ledtester on January 02, 2021, 12:20:38 am ---This talk is excellent presentation on how to use modern cryptoanalysis techniques on Enigma. Includes a live demo of cracking a message.
https://youtu.be/gNXzMDulp7M
Unfortunately their site enigmacrack.com and source code don't seem to online anymore.
--- End quote ---
So how do they know they are actually breaking the code? Does the computer/gpu try a combination see what comes out, then does a second step where it checks if the text is jibberish?
Not sure how they did it but I would do a hybrid brute force like this:
1. Start with a combination rotor setting 1,2,3: Code word: QWER ASDF
2. Get a result: ZXCV BNMK
3. Take that result compare to an english dictionary and see if ZXCV is a real word. IF NOT then go back to 1 but with rotor setting 1.2.4
4. Get Result BLUE DOGS
5. Compare to dictionary: Yes those are real words stop program, or if more jibberish goto 1,2,5 try again.
I dont see how they were error checking, and 20 min on a 2012 GPU would take an arduino a VERY long time, correct me if im wrong.
As an aside: How can a GPU take 18 in the video but a tube based navy bomb take 20 min according to the posters in this thread? Thats like the DSKY running an iphone app. :scared:
--- End quote ---
And you'd fail mightily with that sort of brute force attack, it could take an incredibly long time.
The Bombe didn't decrypt messages, it determined rotor settings AFAIR, it also relied on 'preprocessing' based on a *lot* of knowledge of how Enigma worked and how it was used plus the rigid message format used for things like weather reports, general messages ending with Heil Hitler etc.
All those factors combined to greatly reduce the work the Bombes had to do.
I suggest watching one of the demos on youtube (if you choose the right/wrong one you might even catch a glimpse of me)
--- End quote ---
Do you have a link to the video you are in?
floobydust:
https://www.youtube.com/watch?v=ZY1Y5xyKcBw&feature=youtu.be
How Enigma's key compares to a serial-killers, I'm not sure.
The recent cracking of the Zodiac Killer messages, long considered a Holy Grail in cryptography for decades, is an excellent lesson and the last two videos 4, 5 are great.
https://www.eevblog.com/forum/security/nerds-solve-50-years-old-zodiac-killers-cipher/
It shows he made PC software Cipher Explorer that takes the ciphertext and applies multiple key patterns. But you must have a human to interpret the results, not sure how automated it could be unless you know words in the plain text.
jmelson:
--- Quote from: floobydust on January 02, 2021, 08:43:28 pm --- But you must have a human to interpret the results, not sure how automated it could be unless you know words in the plain text.
--- End quote ---
Yes, the Germans made the Enigma cracking easy, every message signed off with "heil Hitler". All you needed was to run the last ten characters of ciphertext against all steps of the decode permutation rotors, and it would give you the ending position of the rotors. The Bletchley Park crew had tables so you could back up the rotors by the length of the message and then decode the full text. Since there were seven rotors and you could pick any 3 (army) or 4 (navy) that added some more permutations that you needed to run.
Jon
Cyberdragon:
--- Quote from: CJay on January 02, 2021, 09:35:23 am ---
--- Quote from: themadhippy on January 02, 2021, 01:40:22 am ---cyberchef seems to get the job done rather quickly,description of how to use it and links to examples https://github.com/gchq/CyberChef/wiki/Enigma,-the-Bombe,-and-Typex
--- End quote ---
It does,*much* faster than the original Bombe simulator I saw, would be interesting to see if it could be implemented on something embedded.
--- End quote ---
Would that have been this one?
https://www.101computing.net/turing-welchman-bombe-simulator/
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version