TL;DW: With some clever tricks, and the advantage of hindsight, it can be done reasonably quickly on a modern computer.
It's still extremely cool, don't get me wrong, but I don't think it's really what OPs asking. Given what's mentioned in the video (~12:50) and what some other commenters have mentioned I get the impression an actual brute-force is not really practical.
Give or take a few centuries, it's very far from the age of the universe.
It's text. It's not something formatted.
If I encrypted a JSON string, gave it to you, you can brute-force all day trying to parse the output as a JSON string. If it works, you probably have it right.
But here? Because of how the Engima machine works you still get an output. And since we don't need to decode this output (like JSON to an actual JavaScript Object) we don't have that many ways of validating the output.
It's German from 1945. Abbreviations, different (older) spelling, spelling mistakes, ... all make it really hard to distinguish real output from incorrect output.
For English, about 13% of letters are "e", so if the frequency is too far off that it is probably not the right key; likewise, if 13% of the letters are "z" it is also not likely to be the right key. By applying frequency checks to the most and least common letters it should be a fairly strong filter for plausible keys.
UUUVIRSIBENNULEINSYNACHRXUUUSTUETZPUNKTLUEBECKVVVCHEFVIERXUUUFLOTTXXMITUUUVIERSIBENNULZWOUNDUUUVIERSIBENNULDREIZURFLENDERWERFTLUEBECKGEHENXFONDORTFOLGTWEITERESX
There's enough code language being used in these messages that frequency analysis is not going to a major help (especially since it doesn't work well on very short texts anyways).
From what I can gather this says something like:
To U4701 Sync message, Lubeck base, From commander 4th U-boat fleet, go with U4702 U4703 to Flender Shipyard Lubeck, more to follow
It's less gibberish than it looks like at first. They really shot themselves in the foot by not having numbers on the enigma system, this would have really made messages much shorter because they had to write them all out.
There's so much specific jargon in there that would make it really easy to detect a correct message IMO. Just make a simple list of very common words and tally up.
Indeed frequency analysis wouldn't work though but it's still pretty possible IMO.
The machine works a bit weirdly, in that as you find some correct settings, your results converge towards the legible result. You can get 95% of the settings correct, and produce quite legible results, at which point you stop solving. So the correct result there might actually be any other three char combo like "ABC" or "UAK", but the analyst stopped investigating, because the rest of the message was reasonably legible.
vier -> vir
sieben -> siben
nul -> null
---
Given that the message is decrypted from German, it seems to be a mix of letters and numbers that are likely military terms, geographical locations, and orders. Here's the translated meaning:
"Vier fünf null eins Y nach R. Stützpunkt Lübeck. Chef Vier. Flotte Mit Vier fünf null zwei und Vier fünf null drei zur Flender Werft Lübeck gehen. Dort folgt Weiteres."
In English, this roughly translates to:
"Four five zero one Y to R. Base Lübeck. Chief Four. Fleet with Four five zero two and Four five zero three go to Flender shipyard Lübeck. More to follow there."
This appears to be a set of instructions for a fleet of ships, possibly submarines (given the context of WWII and German naval operations), directing them to a particular location (the Flender shipyard in Lübeck) and notifying that further instructions will be provided upon arrival. "Four five zero one", "Four five zero two", and "Four five zero three" are likely codes for specific ships or units in the fleet. "Y nach R" could be coordinates or specific route instructions.
https://enigma.hoerenberg.com/index.php?cat=The%20U534%20mes...
> Interpretation (preliminary):
> [An] U-4701, nachrichtlich [an] U-Stützpunkt Lübeck von Chef 4. U-Flottille: Mit U-4702 und U-4703 zur Flender Werft Lübeck gehen. Von dort folgt Weiteres.
> Translation (preliminary):
> [To] U-4701, for information [to] Submarine Base Lübeck from Chief of 4th Submarine Flotilla: With U-4702 and U-4703 go to Flender Dockyard at Lübeck. From there more follows.
I find it interesting that it pulled some kind of interpretation from the string. Far more than I would have. I asked it to translate the English data back into a similarly plaintext string and then asked a second instance to decode it and it came back with a similar, slightly distorted response.
The point is more to say that a language model is exactly the sort of thing that would be used to determine whether a given potentially decoded plaintext string is actually decoded, and given various anachronisms and shorthands our personal language models may not be adequate.
But a giant one that's been fed all sorts of data including examples of text of similar usage sounds actually like it might be exactly the tool for this problem.
With a modern block cipher, a partial key doesn't help. If you have 120 bits of a 128 bit AES key or whatever, decrypting the cipher text with your partial key will give pure noise. Even if you flip just one random bit in the key, the decrypt will be indistinguishable from complete randomness. Not so with Enigma; if you have parts of the key correct, parts of the rotor settings correct, parts of the wheel selection correct, patterns in the plaintext will show up as patterns in the ciphertext. The more of the key you have, the more those patterns will show up when you run the decryption routine against the ciphertext.
Natural language has a quirk where letters are more likely to be repeated. If you calculate the percentage of letters that are repeated, this gives you the incidence of coincidence. Incidence of coincidence is preserved by a partial Enigma key. So in that particular plaintext, all those repeated UUUs, those repeated NN, those XX and TT, those will light up like quasars.
Incidence of coincidence analysis should just tell you outright what all of the rotor settings are. From then you'll need someone familiar with German and the code language to be able to figure out the plugboard settings, but that's not as difficult as you might think.
Also going for longer cribs such as NUL, EINS, ZWEI, DREI etc proves generally fruitful. There is also a story about the crib HEILHITLER toward the end of a message being particularly useful for code breakers but I don't know if that is genuine or contemporary disinformation to cover true code breaking capabilities, akin to the story of carrots being good for darksight[1] as cover for improved radar capability.
[1] https://www.smithsonianmag.com/arts-culture/a-wwii-propagand...
This gives you some crude form of error checking.
The rest of it as you mentioned makes it difficult to determine, data mining the possible results for common abbreviations from other plaintext could narrow.It down.
Sure, you could argue that it’s not quite as unambiguous as JSON but, in the realm of all possible plaintext, I’d say JSON and 1945 German aren’t too far apart in terms of likelihood of getting a false positive on a string of non-trivial size.
If you want a bit more certainty you could just try it on another string (which is the next step in the process either way), and then another. At least to me the constraints of “German and a char doesn’t map to itself” seem like pretty limiting factors here.
Also, I agree it doesn’t reduce the search space but I think the post I was replying to was talking more about difficulty of verifying the correctness of a decrypt that reducing the search space. That was definitely my point ant least. Either way, as you say, this definitely doesn’t reduce the search space.
I'd make a fast approx check for some of these properties that can run during brute force, then feed anything that passes that check to a better check, then finally to a human (maybe nowadays put an LLM before the human stage).
There's a chance to miss the translation if it doesn't match other messages but this seems like a decent approach.
Edit: Though it might have been that purely electronic cryptographic machines were just cheaper and stronger by that point.
I found this:
https://crypto.stackexchange.com/questions/33628/how-many-po...
which says the key space is something like 10^20 or 10^23.
A modern supercomputer does something like 10^18 FLOPS. I assume that an enigma decryption is considerably more than a single floating point operation, but presumably just a few orders of magnitude.
So... if I'm reading that right, we're talking about months, perhaps?