Let's honour great Polish mathematicians (Jerzy Różycki, Henryk Zygalski, Marian Rajewski) who broke the first Enigma giving Turning the basis, so they are not erased from history
No joke. I’m a computer science student. After watching “the imitation game” I searched up “how does Enigma work” and I thought “ah it must be so easy to understand and decode now!”. Nope.
It's an achievement of many people, including Marian Rejewski, who broke the simpler version of Enigma in 1930. His work was then used by Turing & Park as a foundation for newer Enigma in 1941.
Not to mention, Mike could code this up on his laptop, pre-built and bought at a store, in a high-level coding language. Turning *built* his computer. Imagine not simply having to write the code, but having to also physically construct a machine solely to run it. No using pre-built chips, no machine code, no assembly code, no standardization, no reference for building such a machine or any help from other learned people, as at the time, no such machine had ever really been built and there were no people who knew how to build it. He was a once in a generation genius.
Haha, I did the same, and it was fun indeed. But I wasn't able the write code to crack Enigma yet. As mentioned in the video, a brute force attack will take too long, even with modern computers.
@@alainbesseleer6516 An average laptop has like what, 4-6 cores? Try this with a basic workstation that has something like 64 cores slugging through the computations at 4ghz. Just based on the amount of alu available and their sheer size given nowadays they can operate with 64 bit values, you can do quite a bit more than you'd assume and it's relatively affordable (for cracking the enigma at least... forget anything short of a chunk from the national budget to crack a decent modern encryption).
@@Hr1s7i Even better use compute shaders and a stack of GPU's and you will be looking at thousands of cores to do the work of decryption. Also don't use a sequential brute force.
@@gezzuzzful Well, that's not what he said. Of course knowing how enigma works (i.e. stealing an enigma machine) is the fundament to break the code. The point here is, how do you know if the encrypted message is actually an enigma cypher? Imagine I give you some encrypted message right now. How do you know if this was encrypted with enigma or maybe RSA or AES. Maybe just a simple Caesar cipher or a simple pre-shared-key xor cypher. All your attempts to crack it as if its an enigma cypher would not really help you.
Also how difficult to decipher it would be if you didn't know what language was encrypted. If you decide Swahili or Martian successfully, it's still useless to you if you can't recognise it.
@@Bunny99s It would be abundantly clear that it wasn't a Caeser-shift cypher, if it's a known English (or American) message which fails the ETOAN frequency test. After that, I suspect that it would be a bit of a guessing-game as to what encryption system was used and I doubt that the 5-letter cluster WW2 vintage formatting would be used, as it would most likely be sent as a solid block of characters instead. A modern, digital spin on Enigma could use different sized "virtual rotors" and rather than merely 26 positions (just the English letters in one case), could have upper-case, lower-case, numbers 0-9, space and all the commonly used punctuation marks, making rotors with about 70 positions each. Then there's the possibility of eliminating the "tell" of no symbol being encyphered as itself, but whether that's considered to matter when there's now about 24million possible rotor setting combinations from one arrangement of just 4 rotors, compared to the original 4-rotor Naval Enigma with about 0.5million possible rotor setting combination from one arrangement of 26-position rotors. This is also ignoring the "reflector", which doubles the exponent (70^8 or 26^8 instead of "merely" 70^4 or 26^4) by running the circuit back through the rotors. I would also hazard a cautious guess that some loon could even construct a physical version of a 70-position rotor machine, just for the heck of it.
Dr. Mike Pound is definitely my favorite speaker on the Computerphile. His ability to explain complex problems in a very easy to get way is outstanding.
Pound's strategy of repeating "if you get one of them correct, it'll be slightly better." over and over might work for you, but the high energy of Professor Moriarty makes for a more engaging Computerphile for me.
We cracked enigma a few years ago in our class with our teacher and it was so much fun. He really tried to explain everything and we actually understood it. It was such a great feeling to see this video and remember everything I learned
at my school we had a sort of computer club wher we could play call of duty (the original back IN 04, 05) to gain entry you had to get a password that was encrypted with an enigma machine. the clue was HELP (this was the start postion leters of the wheels) and the plug board was pre defined was kinda fun trying to figure it out
"well, the weakness of Enigma is that if we get some of these things right, even if the others are wrong, we get a little bit closer to the answer, usually."
He addresses that at 20:30, mentioning how with a 128-bit or 256-bit encryption, even if you get the first bit correct you'll still have random noise. The fact that Enigma *did* show marked improvement with correctly guessed settings meant that it was inherently insecure to a degree.
Not so obvious if you connect 10 stecker plugs, the IOC will hardly change if you guess 1 plug correctly. Without any stecker plugs connected you can crack 100 character text in a few minutes on a laptop.
Also because having to reliably type and transcribe for transmission a several hundred character message was a serious chore. There were rules about not re-sending the same message, due to errors, however because on occasion this was not adhered to the security was compromised. The smarts of all the people working on decrypting these messages was staggering.
Yep, it also resembles evolution: a big change by itself it's really unlikely, but small accumulative changes make you progress little by little in the right direction
A great deal of the solution is also from laziness on the part of the germans. Instead of using new codes, they used variations of the same codes. Once the english knew this, they could play with variations and find the key fairly easily.
I think the Kriegsmarine did change the codes once and it took the Allies months to decipher again (or was it adding another rotor). Though they never really change the codes afterwards. One of the flaws with the German's was they believed the Allies could not decipher enigma. If they believed the Allies could, the Germans would most likely have changed the codes (assuming they could to begin with). Instead, Germany focused too much on just espionage.
@@matthewmayton1845 The Enigma codes were changed every day at midnight. The Germans also had a way to do it every hour, but they rarely did that. What you're referring to was when the Navy added a 4th rotor, but by then the codebreaking was so advanced it didn't add much of a problem.
At the end, but not always. Official orders from Berlin, but not common communication between lower instances. First 8 letters served as header that had to be decrypted first, because there was who sent message and who should be receiving it(what branch, what sector).
I worked with something similar in the Army as a Radio Teletype operator. It was called a KW-7. You were handed a slip of paper and on it was pairs of numbers I believe it was 1 to 32. In the KW-7 there was something called the "Block". The block had 32 wires which you would arrange into sockets on the block according to that slip of paper. Once you set these wires in the block, you put the block into the main crypto body, close and lock the lid, then run a system check. In order for it work properly, you would key up the radio, and hold a button for 15 seconds to sync with other receiving stations. At the time, the machine was classified as Confidential, once keyed it was classified as secret. Unfortunately the system was compromised by the Walker Spy Ring. Not only did this group sell the key lists for almost 20 years. But gave them the design specifications. The crypto essentially was rendered ineffective. I was basically out of a job and was reduced in my speciatly as a single channel radio operator. If this interests you. Look up the AN/GRC-142, AN-GRC-122, AN/VSC-2, and the AN/VSC3. Very cool stuff in its time. All museum pieces now. The KW-7 is no longer classified.
@@iHack-ms5nr I loved that movie so much. Granted, there was a lot of movie dramatization and some factual liberties taken, but it's a terrific film that does a great job of piquing viewers' interest about cryptography and WWII.
Enigma is talked about so much because its breaking was so importance in the war. There were other, better machines, such as the American SIGABA or the British TYPEX, that are not talked about, because they don't have such a compelling story, and because their details are still secret (or they were the last time I checked).
The Enigma was simple enough to (almost) explain and the breaking of it was declassified a long time ago. The Tunny break was only declassified recently (and it was much more complicated). There was no public information until recently about the British codes (and how easily most of them were broken by the Germans). And the Enigma has Turing, of course.
Programmers have a different definition for "laziness": expend 8 hours automating a solution to a job that would take 1 hour to do by hand, just in case you have to do it again in the future. The reasoning: I am lazy... 🤷♂️
@@costa_marco And that's why programmers are so much more efficient than most others when it comes to doing stuff on computers. Your regular guy would manually update a spreadsheet by printing out a list of things that needs to be updated on a piece of paper, tediously going over every entry. A programmer would spend 2 hours making an interpreter of the other document to automate that process. Instant 20,000% efficiency for the foreseeable future. And you'd be amazed at how many there are out there sitting at computer keyboards day in and day out doing it manually.
The laziness he's referring to is not the time spent programming the decoder, but the time he'd have to spend waiting for it to produce a response. 3 rotors takes a few seconds. 5 rotors would take hours or days.
I am glad your code implements the double stepping correctly. As you say implementing Enigma in code is really just array manipulation. I've done a few versions including one in 80s home computer BASIC! The algorithm for Enigma is really quite simple. The Turing/Welchman Bombe, the machine they actually used in WW2 to crack Enigma, is much more complicated. Reverse engineering that, really understanding how it works then making my own was one of my most satisfying projects. Welchman's contribution of the diagonal board to Turing's original design was brilliant. And Welchman was also responsible for coming up with the idea of traffic analysis. I always feel a bit sad that Turing's name is always mentioned but Welchman is nearly unheard of. And yes, as others have rightly pointed out all that work was made possible but the work of the three Polish mathematicians and the Frenchman Bertrand who somehow managed to co-ordinate things between the English, French and Poles. One other difficulty is real Enigma messages were not just plain text. They contained a lot of military jargon and acronyms. Very cool video and well explained, thank you!
The local library had a book about ciphers in the 1970s. Enigma machines and their post-war sale was also discussed. At the back he had written a message which had been through a virtual Enigma machine. He told the readers how to write the program which would decrypt it.
The other thing you can reasonably assume; which a modern computer can take advantage of; is that the message will be in German (both in it’s vocabulary and grammar)...
another thing used was plaintext attacking a very famous line at the bottom of most messages, which i wont put here because i dont want youtube flagging this comment
@@tonytungsten4278 he wasn't treated any beter than anyother homosexual male of the time. the dude was chemically castrated and arrested. eventually (potentially) killing himself via cyanide poisoning.
there was a project on the BOiNC platform trying to crack Enigma messages using brute force decryption, the messages had been intercepted during the war but never decoded. They did manage to crack a few but it took an awful lot of computer power to do so.
@@codegeek98 The project (enigma@home) managed to decrypt 4 messages using brute force decryption method. it took over 360,000 years of compute power (based on an AMD Athlon Xp 3500+ single thread processor) to decrypt all 4 message.
@@tomstech4390 Just beware the power bill. I used to run Seti@Home, then Boinc aggressively in my business. It was fun. Then I came to appreciate the effect on the power bill.
@@tomstech4390 afaik enigma@home is still running? Even if not there are many math projects on the BOINC network - or other stuff. Like nedicine research. You can even get paid in cryptocoins if you use Gridcoin (for most of those projects).
A particular collection of jumpers in the front of the machine would result in a characteristic collection of letter-rings: A->W->Z, B->X->Y->E->R, etc. This was one of the contributions of the Poles, they delivered this strategy to the Brits right before Poland was invaded. You could analyze a new day's message like this and hack the jumper settings. This then allowed Turing and team to just focus on the rotor combinations and using the German crib WETTER ("weather") which would appear in the first message of the day at a particular offset.
Worth noting that they could start guessing about rotors and all because before the war Polish secret service got a hold of one of the first versions of Enigma, then Polish mathematicians (Marian Rajewski) cracked it without computers and shared the machine and algorithms with British secret service. This facilitated immensely breaking subsequent Enigma versions.
I would say was crucial as they provided decrypting algorithm. What Turing did (and it was amazing by itself) was building and electromechanical automaton, which was able to crack codes quick enough to use intercepted intelligence. The third or fourth iteration of enigma's encrypting algorithm become too hard to crack manually. In fact some of the first messages cracked by Poles directly predicted war and even Marshall Piłsudski tried to convince Charles de Gaulle to perform attack on Germany, before it will be too late. That may be one of the reasons, why this truth is not spoken widely.
Face the truth, Jerzy Rozycki, Henryk Zygalski and Marian Rejewski broke the code, wrote algorithms, then tried to come up with some engineering tools to speed braking code up. All having no knowledge about secret military cutting edge technology at that time, called computers. All what Turing made was to build a machine where the numerical methods and algorithms invented by Poles could be efficiently executed. That how the Allies won the war, then as a "thank you" they sold us out to Stalin. Humiliated Poles not inviting us to the victory parade!!! We like the Chinese do not forget this
@@telawiw329 moron. Turing is the father of modern computer science. He's far beyond just an engineer who built a machine. That was Tommy Flowers. Turing didn't use the Polish algorithms.
@@merrymonarch Before the introduction of the plug board, there were only 1,054,560 combinations on the original machines. Hardly colossal. It was the addition of the plug board on the military machines that ran it up to 1.5*10^14 combinations.
@@stargazer7644 fair point. Collosal is subjective. You're right about the plug board too. I think I read somewhere that if they'd added an extra rota it would have been too much for the computers they had at Bletchley
That is the total number of combinations, yes - but we can "break" one wheel at a time, so we don't need to try all of the combinations. The number of tests required is just 26 per wheel, so 23×3, not 23^3.
@@gayMath Twitter and FB should be banned for their evil censorship. Or seized and turned into a utility. Did you not know about Twitter censoring truth-tellers, President Trump, and tampering with elections? Twitter has already been banned in a few countries due to that.
I'd love to do the same for the Lorentz cypher. I really want to know more about that, no one talks about it nearly to the same degree as enigma but it was the real challenge that they needed a proper computer to crack.
Came here to say that! After reading extensively about Lorenz, the process of cracking it and the people involved, I - and excuse me - shat myself upon realization of how incredibly brilliant Bill Tutte (and a lot of others) was.
If you think about the fact that they made these things ~80 years ago, purely mechanical, carry-able and operateable by an average person, it's kinda incredible. Not just that, but there are also 3 things which REALLY helped them to crack it and it was still hard: - they sold a (dumbed down) version before the war commercially - they needed to captured one - after they added more wheels (at some point they kinda noticed and it basically broke the decryption for some time) they needed to capture one again
That's another thing that's better about modern ciphers. They're still hard to crack even if the enemy has full knowledge of the algorithm. The only thing that needs to be kept secret is the key.
Well, not quite. Commercial version was simplified, had less rotors and few minor differences. Enigma was cracked in 1933 by Polish mathematicians (French declared it impossible to break, British gave up independent work on breaking encryption and relayed on work of Polish Cipher Bearau). It wasn't decoded in real time, but with few hours/days delay - using Zygalski sheets, by hand. When Germany added more rotors, there was a case, when they sent by regular post device to embassy in Warsaw. Thanks to postal service workers (who delayed delivery from Friday to Monday), Poles got like 24h to study new design. What is worth mentioning: knowledge how Enigma is operating is not much of a help to break encryption. The most critical part to break encryption was set of rotors, ring settings. Without those it is far more difficult to predict result of encryption.
@@kuhluhOG I apologize for my reaction, but I hear far too many times that Turing or US Marines were cause Enigma was broken at all (yeah, too many talks with egocentric Americans T_T )... and that is not true. In his genius, Alan Turing automated and improved process of decryption of Enigma - which is a great achievement itself. Breaking Enigma predates work done by Turing almost for a decade. Aaaaand ofc, US did almost nothing besides using decrypted messages :D
Follow up video in 10 years: "Cracking Enigma in 30 milliseconds using brute force on a Quantum Computer" Edit: turns out I was probably too conservative, not 30 sec but just a fraction of a second.
@@DesertCookie hopefully 🤗 I'd already be impressed with solving 150,000,000,000,000 combinations in 30 sec, which means 5 trillion combinations per sec... but maybe a 3000 qubits trapped ion quantum computer with no errors could do much better 🤷🏻♂️ tbh I have no idea.
@@draygoes actually very low error rates are already achieved in some Trapped ion QCs with up to 32 fully connected qubits... and we're only in 2021! Imagine what will be achieved in 10-20 years, not to mention further down the line... Think about all the things that people in the 1950's would have deemed impossible, which are now possible or even plain boring for us. I'm sure they'll figure it out ;)
@@DesertCookie actually after looking up the processing power of current state-of-the-art supercomputer, and given the nature of quantum computers, I agree with you that it should be much faster than 30 sec... potentially even a millisecond. Crazy
This reminds me of the movie trope where some malicious program is trying to crack an encryption key and it gets 1 character of the key at a time to progressively find the whole key. I remember this at the end of "War Games" but I think I've seen it many times where "hackers" are trying to infiltrate a system.
That actually didn't happen in War Games. It wasn't cracking one key, it was finding ten different keys, one at a time. It didn't really explain how it was doing that, if I remember correctly.
@@kentix417worryingly the nuclear codes at one point actually was "0000 0000" (because they wanted it to be memorable in an emergency 😂) so the computer would have probably got it on its first try...
I had a minor heart attack when he said "it took a bit of effort to come up with the code". I've been trying for 2 hrs to finish a substitution cipher and was nowhere near close lmao. There's levels to this and it is humbling to know.
Yeah, a couple of years ago I created a small program in C++ that was based on the 'logic' behind Enigma. It took me about a couple of weeks to get it working as intended. In my code, in essence, a string variable would be run through a series of functions (the digital equivalent to the Rotors) that used integers to increment/decrement each character in the string (using the integer as a shift) before passing the variable to the next function, which would repeat the process with a different 'shift', for however many times the user would want to encrypt the string, so that - ultimately - the encrypted text that was put out would be protected by the fact that, A: you could have as many 'Rotors' as required, thereby increasing the number of potential true characters that each letter could decrypt to, and B: were you to successfully decrypt the text once or twice, it would only therefore decrypt to the previously encrypted version of the string and not the true, original plaintext. Back then, I created a Decryptor that was configured as a mirror opposite to the Encryptor, with the assumption being that you could only decrypt the text correctly if you had the Decryptor. I didn't know nearly as much as I do nowadays about coding and cryptography (and I STILL wouldn't trust my skills in that department, I'm still barely an amateur). However, knowing more about Hacking nowadays, I realise that all you would need to do in order to crack the above-mentioned encryption method would be to analyse the code of the Encryptor and simply create an altered version of it in order to decrypt the text. It's a fun thing to try with coding though and I'd highly recommend it to anyone for purely educational purposes in order to practise playing around with integers and variables. Definitely leave hardcore Cryptography to the guys and gals who know their stuff in this field, it's so dangerous if you don't know what you're doing with it.
The Polish then the British mathematicians that cracked Enigma are some of the most amazing thinkers of our time. I got lost during this video, but I understood enough to be very impressed. This is the best example of "standing on the shoulders of giants". Awesome all around.
I know that the polish cracked the code, but i don't know more about it, but while the british mathematicians around Mr. Turing were impressive, they still had the advantage of captured enigmas and captured documents of which rotors to use when. (Not at the start, but it helped them immensely) Still i think it was impressive that while here in the video he knew how an enigma machine works and could use his own language, it still took longer than i expected. Now imagine, not knowing how it works (the rotors and plugs and the turning) as well as having to decipher a foreign language. (And then using the Navy version with 6 rotors)
I had actually implemented the Enigma as well as the Turing Welchman Bombe 2 years ago for a cryptography project in college. Java based. It was fun and frustrating. But I've forgotten mostly how the bombe worked...
My understanding is that it was an electro-mechanical dedicated computer which tried to "brute force" the encryption key by looking for a recognised sequence of characters in its output. It was made out of dozens of chained telephone-exchange style "uniselectors" which each had 26 positions.
I'm just wondering. Can you brute-force all combinations fast enough in parallel using a GPU? Cause you're basically doing the same program (decrypting using a random setting, then calculating the output's "quality") millions of times. So an Nvidia 3090 has 10496CUDA-cores and can boost up to 1.7GHz. Lets assume you can do a bruteforce attempt per 4 clock-cycles per-cuda-core. then you're already guessing 4,460,800,000,000 guesses each second. I think you could easily try every combination in under a day...
He's said in other videos that they do indeed use high end graphics cards for this, in fact they have tons of them all working at the same time, together, in a big server. Dunno how you do that, get graphics cards to link with each other like that. But yeah he's said that's what they do, at that university. And so different classes and groups and academics have to book a time slot when they can use the dozens of graphics cards in parallel to brute force something or to use a more sophisticated method to crack a code or to model a complex system like the weather, or anything like that that academics do. The physicists use them a lot too, to model systems like perhaps individual atoms and things like that. Which makes a lot of sense, considering they computer science was originally a branch of physics, and remained there way for decades until the 70s and 80s where computer science began being seen as a separate subject altogether. But yeah, it's still linked heavily with physics.
@@duffman18 "Dunno how you do that, get graphics cards to link with each other like that. " They not have to be linked if brute force is used. Each graphic card can work on a distinct subrange of the possible settings without the need to communicate with other graphic cards
I now have a slightly better understanding of exactly what Colossus was doing - statistical analysis of cracked code in order to better guess the settings. My admiration of those mathematicians, engineers, linguists and logicians only ever grows.
@@paulwomack5866 where Tunny = the intercepted code from a Lorentz cipher machine. Highly recommend anyone go to the Bletchley museum of they are in the area. Sadly I went when the computing museum was closed, but the working Colossus machine was whirring about. Superbly knowledgeable your guides, but now I see some of the attacks that can be used, the actual working their behind it makes so much sense.
If I remember right what Bombe was doing was plaintext decryption rather than statistical. "Okay, we have a large number of possible combinations, but which ones can deliver the plaintext we think it starts with and not throw any errors down the line?" Then that much smaller subset of combinations would be tested with other analysis and against other messages (remember that they wouldn't change the code for each message so if you cracked one you cracked them all until the code cycled). I don't know if they used the computer for that or went back to doing it by hand once they had a workable subset.
@@MrGoatflakes The Polish invented the bomba, the device used at Blethchley was a more advanced development by Turing and Welch, using the bomba as a basis
I haven't finished watching the video yet but around 11:20 you're referring to "26 x 3" multiple times -- surely though this should be "26 ^ 3", in other words, if there are 26 valid configurations of a rotor, and three rotors to configure, the total number of configurations is 26 x 26 x 26? The video is awesome just wanted to point that out (or maybe I'm missing something).
"this isn't something one does by hand right, not quickly" I'll give you one name: Arne Beurling. On his own, without any computation assist, without access to any hardware ( unlike Bletchley park, which had a copy of the early Enigma that was brought out from Poland ), he cracked the Geheimschreiber, which was roughly the Enigma for teleprinters, in 2 weeks.
We always hear about how brilliant Turing and his team were because they were able to crack the code. I'd love to see something about the dude that invented it. Must of been just as clever to come up with the machine.
@@vksasdgaming9472 I don't know too much about this. But I assume that you could just take the basic idea and make it arbitrarily more complicated by adding more rotors, plugs etc. that it easily could have been made unsolvable.
@@kreiseltower New plugs and rotors were method to make encryption more complex. In practice fact that military communications follows protocol made it easier. If every message begins with or includes known expression it is easier to break. Informally worded messages might have been unsolvable as there simply was no way to guess what there was being said.
You just explained how to crack the enigma code, in under 20 minutes, to me, who failed GCSE maths, and I understood all of it. That is more impressive than cracking the code. Bravo.
The plug board is static, as in it doesn't change from one character to the next. The result is that the plug board applies a simple substitution to the input and the output of the rotors. Which means that they have no effect on the IoC.
Yes, it's just obfuscation and therefor not secure, even though 13! gives approx. 6 billion plugboard combinations. That sounds a lot and probably provides a false sense of security to the occasional user. I am pretty sure, however, that the designers were aware of the flaw.
It'd be great to do a follow up talking about how to correct things. If you know "JBROPOSE" should be "IPROPOSE", can you feed that back through the system to correct the solution more? I'm wondering about how that error propagates to later strings, where the true words aren't as obvious.
He mentioned that, knowing the plain text, he can put it in and it "pretty much breaks through it right away". Now what he doesn't specify is if the entire plain text needs to be known or if pieces are enough, but I suspect pieces would be enough already. Knowing more and more actually present letters of the message improves the accuracy of the statistical methods.
@@thecakeredux knowing pieces of the plaintext is enough because the entire encryption rule applies both to that segment of plaintext as well as the rest of it. Knowing the plaintext does break Enigma, and how you come to know that plaintext (be it espionage or random struck of luck) is irrelevant.
i suspsect leaving the computer to it these days if the code is all there having a human going in and checking it and saying no that must be that might be slower but maybe at that first point a human or an ai might do a better job of guessing the correct text than running the scrip to find the actual correct words.
As an example of Enigma being difficult to break if the message is no longer than 50-60 characters there are still U-Boat messages that have never been broken. A short message along with the Kreigsmarine Enigma machines that added an additional rotor are very difficult to decipher.
There was nothing preventing them from manually scrambling their messages on top of the Enigma encoding. All it would take is a manual alphabet switching system that changes based on the number of messages that have been sent. Turing could never have accounted for it.
Part of the problem with U-boat Enigma messages is that they weren't merely enciphered, they were also encoded. That is, the original message won't necessarily contain _any_ plaintext, so there's no way to know when you've deciphered it.
I think there are still a few Enigma messages left undecrypted out there. This approach may be used, with plugboard implemented, to crack those and give a more complete image of WW2.
I wrote my undergraduate dissertation on ciphertext only cryptanalysis of the enigma machine. Wrote a tool in Java to perform it too. Was a really fun project, such interesting history - helped living in Bletchley too!
Is the formula for the number of Start and Ring possibilities at 11:29 correct? I'd think it should be 26^3, as in... It's defined by 3 numbers from 1-26.
That would be the case if you needed to solve for the entire set at once, but because you can get incremental improvements breaking one wheel at a time, it really _is_ 26×3. You only need to find a slight improvement in the statistical output on one wheel, trying all 26 settings there, then you can move on to the next.
@@stanrogers5613 except he's only giving a formula for the number of possible states of the machine where i linked. Of course algorithms to crack the enigma aren't going through each one.
I wrote enigma in C++ as a capstone project, then decided to go with writing a network manager. Got a 104 on the project, and after the presentation I showed my enigma code to the professor, and he told me he would have loved to see that instead of the network manager for the capstone. I learned a lesson in the perception of value that day.
When I was Signals Corps back in the dim dark days we used OTLP's then encrypted that for transmission don't think all the computers in the world will help break that.
He doesn‘t go into details such as how to calculate the IoC, the number of possibilities etc., and how he came to know of the rotor properties (which input generates which output letter) and the notches. Statistical language analysis seems to be the key to solve crypto.
Sounds like Enigma decryption is the kind of thing where an evolutionary/genetic algorithm would work _really_ well. I wonder if anyone had tried that yet - it has to be an interesting experiment!
@@gschadalavada8980 Usually you start with a bunch of algorithms which are just guessing. However, some will guess better than others. Keep the better ones, mutate their guesses (automatically) a little and repeat, until you have one you're happy with. Just youtube them, there's lots of really cool videos on them :)
In effect, he is doing precisely that by hand. Notice that he mentioned fitness functions specifically. Whereas the GA would be evaluating the entire solution space starting from a random draw and fiddling with the details, the presenter has chosen to stage the work such that he can evaluate one entire domain comprehensively before moving on to the next one. You could do that with a GA as well, and in my experience, it would converge to the proper solution faster than if you did the whole solution in one pass.
9:55 - How? How exactly does getting one wheel right, or one plug-board wire right, lead to an improvement in this metric? It's still a completely different substitution cipher on every character.
As I can understand it - without knowing atleast some of correct settings, or some part of the plain text, Enigma is practically unbreakable for short texts even for today's normal computer. Could it be broken by a brute force attack, assuming that you have a super computer at your disposal ? As far as I know, during ww2 Enigma wasn't broken until allies got a hand on working Enigma machine plus actual code books plus some of the messages encrypted, so I would say, that for that standards it was impossible to crack Enigma, unless Germans made a mistake (which they did :)
the mistake was that letter cant become itself during enryption thats how the britains could build a machine wich could crack the code every day in like 20minutes
@@thelastengineer8633 No, that was only a small flaw of the enigma which reduced the possible letters from 26 to 25. It's still something to work with but not decisive for the cracking. The biggest mistake of the Germans was to use similar messages each time and not to change their codebooks from time to time.
assuming you have a super computer you can probably decrypt the message with all possible settings and apply the metrics to determine accuracy to the decrypted text. That would still be alot of effort even for a supercomputer, but possible
@@GrandTheftChris I think the machine not encrypting a letter as itself was a bit more important than that. You are right that at helicopter level, as a matter of the zillions of possiible settings, reducing the possible letters from 26 to 25 wouldn't reduce the zillions by that much. But that would only make it of little relevance if you were doing a brute force attack. But in practice it made a huge difference, precisely because the main attack was using cribs as you describe - ie a guess at a chunk of plain text based on the content of previous messages. But if your crib was say "WEATHERREPORT" you couldn't guarantee that that was what the first 13 letters of ciphertext meant. The message might begin with a dozen junk letters, or it might begin with MORNINGHANSHERES THEWEATHERREPORT. So the codebreakers had to try their guessed plain text against the encrypted text successively in different positions - eg against encrypted text letters 1 to 13, 2 to 14, 3 to 15, 4 to 16 etc. The "can't encrypt as the same letter" feature allowed them rapidly to reject impossible matches. eg if they were trying WEATHERREPORT against letters 1-13 of the encrypted text and that was : BDARFGHIJTBEM they would know immediately that letters 1-13 couldn't be it, because A appears in position 3 in both ciphertext and guessed plain text.
@@leemoore5212 That's true. :) Still, add a 4th rotor, add some plugs on the plugboard and distribute a new codebook every month. It would have been unbreakable during ww2.
I might be missing something. If the rotors move, what’s stopping someone from just spamming every letter until it loops again. Then wouldn’t you be able to know “oh, if there is a D in the 4th letter, when you press A 4 times it becomes a D, so that must be an a”
1. How would you know that when you press A four times you get a D ? Until you've cracked the key for the day, all you know is that there's a D. You don't know it came from an A. 2. If you're saying you can work through the whole cycle of rotations, sure you can. All three rotors move, so the compete cycle is 26x26x26 = 17,576. So after 17,576 key presses the machine returns to the start position. But any message you're trying to read will never be 17,576 letters long. The Germans imposed a maximum 250 letters on any message before you had to reset with a new start position. Note that there are also 17,576 different start positions. Assuming the Germans had sent messages that were 100,000 letters long, you could say that mystery letter 1 produced a D on the first press and mystery letter 2 produced a V on the 17,577th press. If by chance the 35.153rd press produced a D, you could say that the first letter of the plain text was the same as the 35,153rd letter. Do you feel like you're a whole lot further forward ?
Was the line starting with "ZUSE" (~5:53 onwards) a subtle nod to Konrad or pure coincidence? I wish people would remember that the CODE is "Ultra" and the MACHINE is "Enigma".
New drinking game - every time he mentions the fact that getting it slightly right yields somewhat comprehensible results instead of random nonsense, you drink
I used to visit an elderly chap who worked for BTM in Letchworth right at the start of WWII as a design engineer (possibly not the correct job description), he knew 'Doc' Keen and Edward Travis for sure. He lived here all his life, went on to be a senior manager for ICL. All we have left of 1/1 is in the name of two of the residential streets on the old site where the Bombes were made, that being Pascal Way and Tabbs Close. He was still very guarded about his work there right up to his death only a few years ago at the age of 98, absolte gent he was and played down his efforts.
At 9:52 when you said getting one of plug board setting correct will make the results better than if none were you talking about other statistical results? Because you'd only explained index of coincidence and I don't see how IOC could improved by changing plugboard settings. The plugboard causes every instance of one letter to swap to a specific different letter -- and that would have no impact on the probability that two letters picked at random in the output will be the same. (if the 2nd and 7th letter of the output are the same they'd match no matter what the plugboard setting was; it might cause them to be 'Z's instead of 'D's but they'd still match each other; and still wouldn't match anything additional)
By the way. Will it be possible to crack the Enigma settings if it was used not for encrypting an text in any human language, but rather for encrypting a binary data saved in something 'Base64 like'. I think that this might be way, way, way harder if the input set wouldn't have any strict structure or anything to use for analysis like that presented in the video.
Yes indeed. If the plaintext still looks random then this kind of approach fails. For this reason PGP starts the encoding process by compressing the message (using PKZIP) because that makes the 'plaintext' passed to the crypto engine already much closer to being random, and therefore more resistant to this kind of attack
Hi Computerphile, my university (University of Portsmouth) is currently under attack from some hackers who have encrypted all their files! Could you make a video about it? cheers
I'm definitely going to start using the phrase, "How English is this?" when correcting grammar. I love the concept of how close is something to a language and just referring to it as "How language is this?". This was a great video. Very informative.
I’ve actually used an enigma machine, not a kit, a real one!! The NSA brought one to a cyber camp I did when I was a teenager!! It was actually really cool!! Cheers!!
Great video! When you explained your algorithm, I was wondering how you can avoid that you run into a local maximum. But apperently it happens. Any suggestions how to improve it besides starting again with a different seed and see if you end up with a better fitness?
Focusing onto the basic IOC text recognition. It appears that sending the message through backwards, sdrawkcab, may be a simple method to defy common machine text recognition methods.
Let's honour great Polish mathematicians (Jerzy Różycki, Henryk Zygalski, Marian Rajewski) who broke the first Enigma giving Turning the basis, so they are not erased from history
exactly, this is so overlooked
If you go to Bletchley Park, you'll see their contribution is well-recognized. Gays FTW!
The 2 Zlote coin has an enigma wheel on one face
@@DunderKlomp I've been at Bletchley Park Computing Museum 3 years ago and found ZERO (literally) mention about any Polish contribution.
* Turing
What I take from this video is that, if you get one of them correct, it'll be slightly better.
How many times has he said that throughout the video? I thought I was going crazy.
Hmm, I think he should have made that more clear honestly, kinda vague.
@@pies765 Basically he said that if you get one of them correctly, the IoC will tend to get slightly better
@@AlePazzaglia WHAT?
Well, yes. That is the most important vulnerability of the Enigma scheme, and the biggest difference to modern schemes.
What a testament to Turing's brilliance: it's not even trivial 80 years later.
Indeed. But also to Arthur Scherbius, the inventor of the enigma machine itself: it’s not even trivial 80 years later.
No joke. I’m a computer science student. After watching “the imitation game” I searched up “how does Enigma work” and I thought “ah it must be so easy to understand and decode now!”. Nope.
It's an achievement of many people, including Marian Rejewski, who broke the simpler version of Enigma in 1930. His work was then used by Turing & Park as a foundation for newer Enigma in 1941.
Not to mention, Mike could code this up on his laptop, pre-built and bought at a store, in a high-level coding language.
Turning *built* his computer.
Imagine not simply having to write the code, but having to also physically construct a machine solely to run it.
No using pre-built chips, no machine code, no assembly code, no standardization, no reference for building such a machine or any help from other learned people, as at the time, no such machine had ever really been built and there were no people who knew how to build it.
He was a once in a generation genius.
@@projecttitanomega The "bomb" computers were a Polish design, not something Turing came up with.
" I implemted an enigma machine because it was fun."
This is the mark of a true programmer.
I mean this is why I'm watching this whole video and am not even slightly bored.
Haha, I did the same, and it was fun indeed. But I wasn't able the write code to crack Enigma yet. As mentioned in the video, a brute force attack will take too long, even with modern computers.
@@alainbesseleer6516 An average laptop has like what, 4-6 cores? Try this with a basic workstation that has something like 64 cores slugging through the computations at 4ghz. Just based on the amount of alu available and their sheer size given nowadays they can operate with 64 bit values, you can do quite a bit more than you'd assume and it's relatively affordable (for cracking the enigma at least... forget anything short of a chunk from the national budget to crack a decent modern encryption).
@@Hr1s7i Even better use compute shaders and a stack of GPU's and you will be looking at thousands of cores to do the work of decryption. Also don't use a sequential brute force.
implemented*
One thing that wasn't mentioned was how difficult it would be to decipher if you didn't start out already knowing that it was an enigma cypher.
you just to steal the machine
@@gezzuzzful Well, that's not what he said. Of course knowing how enigma works (i.e. stealing an enigma machine) is the fundament to break the code. The point here is, how do you know if the encrypted message is actually an enigma cypher? Imagine I give you some encrypted message right now. How do you know if this was encrypted with enigma or maybe RSA or AES. Maybe just a simple Caesar cipher or a simple pre-shared-key xor cypher. All your attempts to crack it as if its an enigma cypher would not really help you.
Also how difficult to decipher it would be if you didn't know what language was encrypted. If you decide Swahili or Martian successfully, it's still useless to you if you can't recognise it.
@@Bunny99s It would be abundantly clear that it wasn't a Caeser-shift cypher, if it's a known English (or American) message which fails the ETOAN frequency test.
After that, I suspect that it would be a bit of a guessing-game as to what encryption system was used and I doubt that the 5-letter cluster WW2 vintage formatting would be used, as it would most likely be sent as a solid block of characters instead.
A modern, digital spin on Enigma could use different sized "virtual rotors" and rather than merely 26 positions (just the English letters in one case), could have upper-case, lower-case, numbers 0-9, space and all the commonly used punctuation marks, making rotors with about 70 positions each. Then there's the possibility of eliminating the "tell" of no symbol being encyphered as itself, but whether that's considered to matter when there's now about 24million possible rotor setting combinations from one arrangement of just 4 rotors, compared to the original 4-rotor Naval Enigma with about 0.5million possible rotor setting combination from one arrangement of 26-position rotors. This is also ignoring the "reflector", which doubles the exponent (70^8 or 26^8 instead of "merely" 70^4 or 26^4) by running the circuit back through the rotors.
I would also hazard a cautious guess that some loon could even construct a physical version of a 70-position rotor machine, just for the heck of it.
Lol!
Someone has to finish Code Bullet's projects...
Lol
I was about to say!
Now I finally know
Lol
Haha yess!
Dr. Mike Pound is definitely my favorite speaker on the Computerphile. His ability to explain complex problems in a very easy to get way is outstanding.
Pound's strategy of repeating "if you get one of them correct, it'll be slightly better." over and over might work for you, but the high energy of Professor Moriarty makes for a more engaging Computerphile for me.
Agreed, it also helps that he talks about more interesting topics imo
And he saved middle earth!
Which one is Professor Moriarty? I'm a big fan of Mike and Dave-but I think they are all great
most suspicious too
We cracked enigma a few years ago in our class with our teacher and it was so much fun. He really tried to explain everything and we actually understood it. It was such a great feeling to see this video and remember everything I learned
at my school we had a sort of computer club wher we could play call of duty (the original back IN 04, 05) to gain entry you had to get a password that was encrypted with an enigma machine. the clue was HELP (this was the start postion leters of the wheels) and the plug board was pre defined was kinda fun trying to figure it out
Your class was cool.
Someone finally says "class, teacher", else everyone in internet is like: I wish this was taught in school
"well, the weakness of Enigma is that if we get some of these things right, even if the others are wrong, we get a little bit closer to the answer, usually."
He addresses that at 20:30, mentioning how with a 128-bit or 256-bit encryption, even if you get the first bit correct you'll still have random noise. The fact that Enigma *did* show marked improvement with correctly guessed settings meant that it was inherently insecure to a degree.
Not so obvious if you connect 10 stecker plugs, the IOC will hardly change if you guess 1 plug correctly.
Without any stecker plugs connected you can crack 100 character text in a few minutes on a laptop.
@@martinwragg8246 fyi Stecker means plug.
@@Execuor thanks, I did know, just what I call them. 😉
Is there a cryptographic term for this property?
18:30 "In the war the limited messages to something like 200 characters"
Oh great it's Twitter all over again.
I 2 try to decipher Twitter messages with enigma for the real message
Also because having to reliably type and transcribe for transmission a several hundred character message was a serious chore. There were rules about not re-sending the same message, due to errors, however because on occasion this was not adhered to the security was compromised. The smarts of all the people working on decrypting these messages was staggering.
@DeHerg *14:31
The fact or property that getting some settings right improves the metrics means that your approach resembles single-pin picking of a lock.
Yep, it also resembles evolution: a big change by itself it's really unlikely, but small accumulative changes make you progress little by little in the right direction
@@alpardal Lies! Miles don't exist! Everything is inches!
This is the Lockpicking Lawyer and what I have for you today is this Enigma...
@barutaji two is binding...
@@alpardal also hence 'fitness function'
Mike Pound? Enigma machine? Now this video is lit!
I like your pfp
Pound is the best speaker on this channel, pound for pound, no contest. Insta watch.
He is great! One of my favourites is the one where he cracks passwords. Super interesting!
I second that. There are some really good speakers here, but he just combines incredible energy, understanding, humour. Love his videos.
Rob Miles tho
d
Lol, pound for pound
The known plaintext at the beginning was the salute that referenced their leader. His ego ultimately led to enigma being cracked during the war.
A great deal of the solution is also from laziness on the part of the germans. Instead of using new codes, they used variations of the same codes. Once the english knew this, they could play with variations and find the key fairly easily.
I think the Kriegsmarine did change the codes once and it took the Allies months to decipher again (or was it adding another rotor). Though they never really change the codes afterwards. One of the flaws with the German's was they believed the Allies could not decipher enigma. If they believed the Allies could, the Germans would most likely have changed the codes (assuming they could to begin with). Instead, Germany focused too much on just espionage.
@@matthewmayton1845 The Enigma codes were changed every day at midnight. The Germans also had a way to do it every hour, but they rarely did that. What you're referring to was when the Navy added a 4th rotor, but by then the codebreaking was so advanced it didn't add much of a problem.
At the end, but not always. Official orders from Berlin, but not common communication between lower instances.
First 8 letters served as header that had to be decrypted first, because there was who sent message and who should be receiving it(what branch, what sector).
I worked with something similar in the Army as a Radio Teletype operator. It was called a KW-7. You were handed a slip of paper and on it was pairs of numbers I believe it was 1 to 32. In the KW-7 there was something called the "Block". The block had 32 wires which you would arrange into sockets on the block according to that slip of paper. Once you set these wires in the block, you put the block into the main crypto body, close and lock the lid, then run a system check. In order for it work properly, you would key up the radio, and hold a button for 15 seconds to sync with other receiving stations. At the time, the machine was classified as Confidential, once keyed it was classified as secret. Unfortunately the system was compromised by the Walker Spy Ring. Not only did this group sell the key lists for almost 20 years. But gave them the design specifications. The crypto essentially was rendered ineffective. I was basically out of a job and was reduced in my speciatly as a single channel radio operator. If this interests you. Look up the AN/GRC-142, AN-GRC-122, AN/VSC-2, and the AN/VSC3. Very cool stuff in its time. All museum pieces now. The KW-7 is no longer classified.
Enigma machine: "zmnag ttygt lmrus cd!"
Alan Turing: "fkxs."
Is that possible to decrypte or not?
You know that the Enigma Machine was great when it is being talked about even today
Yes! I'm taking second year ICT, and we were just watching The Imititation Game today (A movie about Turing breaking the Enigma cipher)
@@iHack-ms5nr I loved that movie so much. Granted, there was a lot of movie dramatization and some factual liberties taken, but it's a terrific film that does a great job of piquing viewers' interest about cryptography and WWII.
actually, there were much better rotary machines, but nobody talks about them, because they are just not as famous as Enigma.
Enigma is talked about so much because its breaking was so importance in the war. There were other, better machines, such as the American SIGABA or the British TYPEX, that are not talked about, because they don't have such a compelling story, and because their details are still secret (or they were the last time I checked).
The Enigma was simple enough to (almost) explain and the breaking of it was declassified a long time ago. The Tunny break was only declassified recently (and it was much more complicated). There was no public information until recently about the British codes (and how easily most of them were broken by the Germans).
And the Enigma has Turing, of course.
14:36 “I’m lazy”
- programmes enigma machine decoder in spare time 😂
Programmers have a different definition for "laziness": expend 8 hours automating a solution to a job that would take 1 hour to do by hand, just in case you have to do it again in the future. The reasoning: I am lazy... 🤷♂️
@@costa_marco And that's why programmers are so much more efficient than most others when it comes to doing stuff on computers.
Your regular guy would manually update a spreadsheet by printing out a list of things that needs to be updated on a piece of paper, tediously going over every entry.
A programmer would spend 2 hours making an interpreter of the other document to automate that process.
Instant 20,000% efficiency for the foreseeable future.
And you'd be amazed at how many there are out there sitting at computer keyboards day in and day out doing it manually.
@@RealCadde Except xkcd 1319 ;)
Yeah pretty much the first question any programmer asks "Can I get some machine to do this process for me?"
The laziness he's referring to is not the time spent programming the decoder, but the time he'd have to spend waiting for it to produce a response. 3 rotors takes a few seconds. 5 rotors would take hours or days.
I am glad your code implements the double stepping correctly. As you say implementing Enigma in code is really just array manipulation. I've done a few versions including one in 80s home computer BASIC! The algorithm for Enigma is really quite simple. The Turing/Welchman Bombe, the machine they actually used in WW2 to crack Enigma, is much more complicated. Reverse engineering that, really understanding how it works then making my own was one of my most satisfying projects. Welchman's contribution of the diagonal board to Turing's original design was brilliant. And Welchman was also responsible for coming up with the idea of traffic analysis. I always feel a bit sad that Turing's name is always mentioned but Welchman is nearly unheard of. And yes, as others have rightly pointed out all that work was made possible but the work of the three Polish mathematicians and the Frenchman Bertrand who somehow managed to co-ordinate things between the English, French and Poles. One other difficulty is real Enigma messages were not just plain text. They contained a lot of military jargon and acronyms. Very cool video and well explained, thank you!
The local library had a book about ciphers in the 1970s. Enigma machines and their post-war sale was also discussed.
At the back he had written a message which had been through a virtual Enigma machine. He told the readers how to write the program which would decrypt it.
What I love about Professor Pound is that not only is he hilarious - he is also a humble genius
Visiting Bletchley park is such a splendid experience
The other thing you can reasonably assume; which a modern computer can take advantage of; is that the message will be in German (both in it’s vocabulary and grammar)...
One challenge is that a lot of the messages from ww2 had loads of abbreviations and shorthand, so that'd serve to make it more difficult
@@thatcherfreeman To an extent; yes; however much of that can be figured out and added to the dictionary.... for example, dropping vowels.
another thing used was plaintext attacking a very famous line at the bottom of most messages, which i wont put here because i dont want youtube flagging this comment
@@sircalvin Yeah... something about hailing the guy in charge... 😉
Many of the american encrypts were translated into Navajo and Lacota beforehand. The Axis never cracked those messages.
Anytime I hear about Turing, it always makes me sad to think how he was treated after all his accomplishments.
Do people without any accomplishments deserve to be treated worse?
@@tonytungsten4278 than people with accomplishments? yes, otherwise we'd give everyone a nobel prize
@@tonytungsten4278 he wasn't treated any beter than anyother homosexual male of the time. the dude was chemically castrated and arrested. eventually (potentially) killing himself via cyanide poisoning.
@@tonytungsten4278Are you a fan of participation trophies?
there was a project on the BOiNC platform trying to crack Enigma messages using brute force decryption, the messages had been intercepted during the war but never decoded. They did manage to crack a few but it took an awful lot of computer power to do so.
I'm sure "an awful lot" back then could be completed in a few days on a single thread of JS running on a semi-smart-phone's toy web browser
@@codegeek98 The project (enigma@home) managed to decrypt 4 messages using brute force decryption method. it took over 360,000 years of compute power (based on an AMD Athlon Xp 3500+ single thread processor) to decrypt all 4 message.
@@ragnarsdad6065 were they all done? Os it still going? Have many 6, 8, 16 core cpus spare atm.
@@tomstech4390 Just beware the power bill. I used to run Seti@Home, then Boinc aggressively in my business. It was fun. Then I came to appreciate the effect on the power bill.
@@tomstech4390 afaik enigma@home is still running? Even if not there are many math projects on the BOINC network - or other stuff. Like nedicine research.
You can even get paid in cryptocoins if you use Gridcoin (for most of those projects).
A particular collection of jumpers in the front of the machine would result in a characteristic collection of letter-rings: A->W->Z, B->X->Y->E->R, etc. This was one of the contributions of the Poles, they delivered this strategy to the Brits right before Poland was invaded. You could analyze a new day's message like this and hack the jumper settings. This then allowed Turing and team to just focus on the rotor combinations and using the German crib WETTER ("weather") which would appear in the first message of the day at a particular offset.
I love how at 6:50 the transition and lighting makes it look like a whole day has passed while MP has been churning out ciphertext lol
Worth noting that they could start guessing about rotors and all because before the war Polish secret service got a hold of one of the first versions of Enigma, then Polish mathematicians (Marian Rajewski) cracked it without computers and shared the machine and algorithms with British secret service. This facilitated immensely breaking subsequent Enigma versions.
Very true. The Polish contribution was important. Rajewski and his colleagues did some great work.
I would say was crucial as they provided decrypting algorithm. What Turing did (and it was amazing by itself) was building and electromechanical automaton, which was able to crack codes quick enough to use intercepted intelligence. The third or fourth iteration of enigma's encrypting algorithm become too hard to crack manually.
In fact some of the first messages cracked by Poles directly predicted war and even Marshall Piłsudski tried to convince Charles de Gaulle to perform attack on Germany, before it will be too late. That may be one of the reasons, why this truth is not spoken widely.
Face the truth, Jerzy Rozycki, Henryk Zygalski and Marian Rejewski broke the code, wrote algorithms, then tried to come up with some engineering tools to speed braking code up. All having no knowledge about secret military cutting edge technology at that time, called computers. All what Turing made was to build a machine where the numerical methods and algorithms invented by Poles could be efficiently executed. That how the Allies won the war, then as a "thank you" they sold us out to Stalin. Humiliated Poles not inviting us to the victory parade!!! We like the Chinese do not forget this
They also made the first bombe
@@telawiw329 moron. Turing is the father of modern computer science. He's far beyond just an engineer who built a machine. That was Tommy Flowers. Turing didn't use the Polish algorithms.
Video’s about mike programming for fun are always gold
After having worked later generation machines (KL-7) in the seventies as a navy
radio-operator I marvel at the simplicity of this explanation. Thanks.
I have no idea how I didn't know this channel existed even though I've been subscribes to numberphile for 3+ years
Every video with Dr Mike Pound is absolute bliss. Thanks mate.
At 10:47, when you say 26×3, surely you mean 26^3, since each rotor can individually be in one of 26 positions?
The number was a colossal, so yes
@@merrymonarch Before the introduction of the plug board, there were only 1,054,560 combinations on the original machines. Hardly colossal. It was the addition of the plug board on the military machines that ran it up to 1.5*10^14 combinations.
@@stargazer7644 fair point. Collosal is subjective. You're right about the plug board too. I think I read somewhere that if they'd added an extra rota it would have been too much for the computers they had at Bletchley
That is the total number of combinations, yes - but we can "break" one wheel at a time, so we don't need to try all of the combinations. The number of tests required is just 26 per wheel, so 23×3, not 23^3.
Moral of the story: Use enigma only if you want to encrypt your tweets.
And only really tweets before the character count was doubled
Twitter is pretty much pointless now without President Trump's tweets.
@@yosefmacgruber1920 ???
@@gayMath
Twitter and FB should be banned for their evil censorship. Or seized and turned into a utility. Did you not know about Twitter censoring truth-tellers, President Trump, and tampering with elections? Twitter has already been banned in a few countries due to that.
@@yosefmacgruber1920 wtf are you smoking i want some
The history of codebreakers, and the skill. It’s amazing. Love the video
"Now some people say that there's no way of doing integer factorisation in polynomial time .. but actually ...
I've implemented that as well"
Hahaha :) Yeah, halfway through all his implementations I started to wonder where he got all the time and motivation.
I'd love to do the same for the Lorentz cypher. I really want to know more about that, no one talks about it nearly to the same degree as enigma but it was the real challenge that they needed a proper computer to crack.
Came here to say that! After reading extensively about Lorenz, the process of cracking it and the people involved, I - and excuse me - shat myself upon realization of how incredibly brilliant Bill Tutte (and a lot of others) was.
I'd listen to Mike Pound talk about anything CS related. But Mike talking about Enigma: Instant click!
If you think about the fact that they made these things ~80 years ago, purely mechanical, carry-able and operateable by an average person, it's kinda incredible.
Not just that, but there are also 3 things which REALLY helped them to crack it and it was still hard:
- they sold a (dumbed down) version before the war commercially
- they needed to captured one
- after they added more wheels (at some point they kinda noticed and it basically broke the decryption for some time) they needed to capture one again
That's another thing that's better about modern ciphers. They're still hard to crack even if the enemy has full knowledge of the algorithm. The only thing that needs to be kept secret is the key.
Well, not quite. Commercial version was simplified, had less rotors and few minor differences.
Enigma was cracked in 1933 by Polish mathematicians (French declared it impossible to break, British gave up independent work on breaking encryption and relayed on work of Polish Cipher Bearau). It wasn't decoded in real time, but with few hours/days delay - using Zygalski sheets, by hand.
When Germany added more rotors, there was a case, when they sent by regular post device to embassy in Warsaw. Thanks to postal service workers (who delayed delivery from Friday to Monday), Poles got like 24h to study new design.
What is worth mentioning: knowledge how Enigma is operating is not much of a help to break encryption. The most critical part to break encryption was set of rotors, ring settings. Without those it is far more difficult to predict result of encryption.
@@kilijanek that's why I said "dumbed down" version
@@kuhluhOG I apologize for my reaction, but I hear far too many times that Turing or US Marines were cause Enigma was broken at all (yeah, too many talks with egocentric Americans T_T )... and that is not true.
In his genius, Alan Turing automated and improved process of decryption of Enigma - which is a great achievement itself.
Breaking Enigma predates work done by Turing almost for a decade. Aaaaand ofc, US did almost nothing besides using decrypted messages :D
@@kilijanek well, the US also built more of the decryption machines, but yeah, the US didn't do anything more
Everyone be really nice to this guy cause he would make a great supervillain.
Dfn
Why?
@@AceDeclan Because he seem to be nice and smart so you wouldn't know he is villain until end of movie.
@@crusaderanimation6967 because he has a snake pet and the only people who has snake pet are animal lovers or serial killer
Follow up video in 10 years: "Cracking Enigma in 30 milliseconds using brute force on a Quantum Computer"
Edit: turns out I was probably too conservative, not 30 sec but just a fraction of a second.
More like one millisecond.
@@DesertCookie hopefully 🤗 I'd already be impressed with solving 150,000,000,000,000 combinations in 30 sec, which means 5 trillion combinations per sec... but maybe a 3000 qubits trapped ion quantum computer with no errors could do much better 🤷🏻♂️ tbh I have no idea.
@@YAZlakhdar How weird is it that "with no errors" was the first part of that sentence that didn't register as somehow possible one day?
@@draygoes actually very low error rates are already achieved in some Trapped ion QCs with up to 32 fully connected qubits... and we're only in 2021! Imagine what will be achieved in 10-20 years, not to mention further down the line... Think about all the things that people in the 1950's would have deemed impossible, which are now possible or even plain boring for us. I'm sure they'll figure it out ;)
@@DesertCookie actually after looking up the processing power of current state-of-the-art supercomputer, and given the nature of quantum computers, I agree with you that it should be much faster than 30 sec... potentially even a millisecond. Crazy
I was just about to sit down and eat lunch and look what I find in my subscription box... another trip to pound town!
Awesome video! Love getting that kind of accessible explanation :D ... Also, tiny PSA: „Zuse“ is pronounced „tsoo-suh“, not „Zeus“ ;)
This reminds me of the movie trope where some malicious program is trying to crack an encryption key and it gets 1 character of the key at a time to progressively find the whole key. I remember this at the end of "War Games" but I think I've seen it many times where "hackers" are trying to infiltrate a system.
And some actor has to shout out, "It has 3 symbols.", "It has 4 symbols. Two more and we're doomed!", etc. with ever greater urgency
That actually didn't happen in War Games. It wasn't cracking one key, it was finding ten different keys, one at a time. It didn't really explain how it was doing that, if I remember correctly.
Ikr? I’m always like… That’s not how encryption works!
But apparently it did a long time ago 😅
@@kentix417worryingly the nuclear codes at one point actually was "0000 0000" (because they wanted it to be memorable in an emergency 😂)
so the computer would have probably got it on its first try...
I had a minor heart attack when he said "it took a bit of effort to come up with the code". I've been trying for 2 hrs to finish a substitution cipher and was nowhere near close lmao. There's levels to this and it is humbling to know.
Yeah, a couple of years ago I created a small program in C++ that was based on the 'logic' behind Enigma. It took me about a couple of weeks to get it working as intended. In my code, in essence, a string variable would be run through a series of functions (the digital equivalent to the Rotors) that used integers to increment/decrement each character in the string (using the integer as a shift) before passing the variable to the next function, which would repeat the process with a different 'shift', for however many times the user would want to encrypt the string, so that - ultimately - the encrypted text that was put out would be protected by the fact that, A: you could have as many 'Rotors' as required, thereby increasing the number of potential true characters that each letter could decrypt to, and B: were you to successfully decrypt the text once or twice, it would only therefore decrypt to the previously encrypted version of the string and not the true, original plaintext.
Back then, I created a Decryptor that was configured as a mirror opposite to the Encryptor, with the assumption being that you could only decrypt the text correctly if you had the Decryptor. I didn't know nearly as much as I do nowadays about coding and cryptography (and I STILL wouldn't trust my skills in that department, I'm still barely an amateur).
However, knowing more about Hacking nowadays, I realise that all you would need to do in order to crack the above-mentioned encryption method would be to analyse the code of the Encryptor and simply create an altered version of it in order to decrypt the text.
It's a fun thing to try with coding though and I'd highly recommend it to anyone for purely educational purposes in order to practise playing around with integers and variables. Definitely leave hardcore Cryptography to the guys and gals who know their stuff in this field, it's so dangerous if you don't know what you're doing with it.
The Polish then the British mathematicians that cracked Enigma are some of the most amazing thinkers of our time.
I got lost during this video, but I understood enough to be very impressed. This is the best example of "standing on the shoulders of giants". Awesome all around.
I know that the polish cracked the code, but i don't know more about it, but while the british mathematicians around Mr. Turing were impressive, they still had the advantage of captured enigmas and captured documents of which rotors to use when. (Not at the start, but it helped them immensely)
Still i think it was impressive that while here in the video he knew how an enigma machine works and could use his own language, it still took longer than i expected. Now imagine, not knowing how it works (the rotors and plugs and the turning) as well as having to decipher a foreign language. (And then using the Navy version with 6 rotors)
I had actually implemented the Enigma as well as the Turing Welchman Bombe 2 years ago for a cryptography project in college. Java based. It was fun and frustrating. But I've forgotten mostly how the bombe worked...
My understanding is that it was an electro-mechanical dedicated computer which tried to "brute force" the encryption key by looking for a recognised sequence of characters in its output. It was made out of dozens of chained telephone-exchange style "uniselectors" which each had 26 positions.
I'm just wondering.
Can you brute-force all combinations fast enough in parallel using a GPU? Cause you're basically doing the same program (decrypting using a random setting, then calculating the output's "quality") millions of times.
So an Nvidia 3090 has 10496CUDA-cores and can boost up to 1.7GHz. Lets assume you can do a bruteforce attempt per 4 clock-cycles per-cuda-core. then you're already guessing 4,460,800,000,000 guesses each second.
I think you could easily try every combination in under a day...
He's said in other videos that they do indeed use high end graphics cards for this, in fact they have tons of them all working at the same time, together, in a big server. Dunno how you do that, get graphics cards to link with each other like that. But yeah he's said that's what they do, at that university. And so different classes and groups and academics have to book a time slot when they can use the dozens of graphics cards in parallel to brute force something or to use a more sophisticated method to crack a code or to model a complex system like the weather, or anything like that that academics do. The physicists use them a lot too, to model systems like perhaps individual atoms and things like that. Which makes a lot of sense, considering they computer science was originally a branch of physics, and remained there way for decades until the 70s and 80s where computer science began being seen as a separate subject altogether. But yeah, it's still linked heavily with physics.
@@duffman18 "Dunno how you do that, get graphics cards to link with each other like that. "
They not have to be linked if brute force is used. Each graphic card can work on a distinct subrange of the possible settings without the need to communicate with other graphic cards
I now have a slightly better understanding of exactly what Colossus was doing - statistical analysis of cracked code in order to better guess the settings. My admiration of those mathematicians, engineers, linguists and logicians only ever grows.
Colussus was used against Tunny, not Enigma. Enigma cracking was implemented by Turing's Bombe.
@@paulwomack5866 where Tunny = the intercepted code from a Lorentz cipher machine. Highly recommend anyone go to the Bletchley museum of they are in the area. Sadly I went when the computing museum was closed, but the working Colossus machine was whirring about. Superbly knowledgeable your guides, but now I see some of the attacks that can be used, the actual working their behind it makes so much sense.
If I remember right what Bombe was doing was plaintext decryption rather than statistical. "Okay, we have a large number of possible combinations, but which ones can deliver the plaintext we think it starts with and not throw any errors down the line?" Then that much smaller subset of combinations would be tested with other analysis and against other messages (remember that they wouldn't change the code for each message so if you cracked one you cracked them all until the code cycled). I don't know if they used the computer for that or went back to doing it by hand once they had a workable subset.
@@paulwomack5866 as much as I admire Turing, he did not invent the bombe, the Polish did.
@@MrGoatflakes The Polish invented the bomba, the device used at Blethchley was a more advanced development by Turing and Welch, using the bomba as a basis
1:05
Speaker: "Enigma machine"
Subtitles: "Knitting machine"
Damn, why are we trying to crack a knitting machine?
Fun fact, stitch patterns in sewing machines used punch card programming before computers existed
@@Nekuzir Damn, I didn't know that, thanks for the fact!
Gram gram been spending too much time making sweaters
I haven't finished watching the video yet but around 11:20 you're referring to "26 x 3" multiple times -- surely though this should be "26 ^ 3", in other words, if there are 26 valid configurations of a rotor, and three rotors to configure, the total number of configurations is 26 x 26 x 26?
The video is awesome just wanted to point that out (or maybe I'm missing something).
how ironic they sent Alan to prison and now he's on a bank note
I wonder which ones of our moral panics will seem unjust to viewers 70 years hence.
@@Snagabott - Factory farming
@@Snagabott Assange case
Too many to name...
@@Snagabott Social justice, probably
"Let's look very briefly at what a knitting machine is" - thanks subtitles.
"this isn't something one does by hand right, not quickly"
I'll give you one name: Arne Beurling. On his own, without any computation assist, without access to any hardware ( unlike Bletchley park, which had a copy of the early Enigma that was brought out from Poland ), he cracked the Geheimschreiber, which was roughly the Enigma for teleprinters, in 2 weeks.
This is true, but to be fair the identicle feat was later replicated by Bill Tutte at Bletchley Park with the Lorenz teleprinter device
We always hear about how brilliant Turing and his team were because they were able to crack the code.
I'd love to see something about the dude that invented it.
Must of been just as clever to come up with the machine.
Arthur Scherbius was his name. Machine was patented 1928 and was commercial system. Of course that was its first version.
@@vksasdgaming9472 I don't know too much about this. But I assume that you could just take the basic idea and make it arbitrarily more complicated by adding more rotors, plugs etc. that it easily could have been made unsolvable.
@@kreiseltower New plugs and rotors were method to make encryption more complex. In practice fact that military communications follows protocol made it easier. If every message begins with or includes known expression it is easier to break. Informally worded messages might have been unsolvable as there simply was no way to guess what there was being said.
The way Alan was treated at the time was absolutely disgusting, especially after what he had done.
Britains most shameful hour for sure.
@@jag1963 i don't know owning slaves and the genocide of the indigenous peoples of the Americas is pretty up there
@@evilcanuck Those things were done by people who live in the Americas, not Britain.
@@tomx641 who came from Britain
@@evilcanuck Are you self-hating, or do you come from people without sin?
wasn't the 3-rotor enigma cracked by the Polish?
Yes, in 1932. But a change the Germans made in 1938 rendered their procedure ineffective.
Look up Marian Rejewski
You just explained how to crack the enigma code, in under 20 minutes, to me, who failed GCSE maths, and I understood all of it. That is more impressive than cracking the code. Bravo.
The automatically generated subtitles are killing me 😂 "churning bombs" and "knitting machines" 🙈
Videos like this are why I love the computerphile channel!
The plug board is static, as in it doesn't change from one character to the next. The result is that the plug board applies a simple substitution to the input and the output of the rotors. Which means that they have no effect on the IoC.
Yes, it's just obfuscation and therefor not secure, even though 13! gives approx. 6 billion plugboard combinations. That sounds a lot and probably provides a false sense of security to the occasional user. I am pretty sure, however, that the designers were aware of the flaw.
It'd be great to do a follow up talking about how to correct things. If you know "JBROPOSE" should be "IPROPOSE", can you feed that back through the system to correct the solution more? I'm wondering about how that error propagates to later strings, where the true words aren't as obvious.
I could be wrong, but just swapping the plugboard configuration might help. So in your example just connect I to J and B to P
He mentioned that, knowing the plain text, he can put it in and it "pretty much breaks through it right away". Now what he doesn't specify is if the entire plain text needs to be known or if pieces are enough, but I suspect pieces would be enough already. Knowing more and more actually present letters of the message improves the accuracy of the statistical methods.
@@thecakeredux knowing pieces of the plaintext is enough because the entire encryption rule applies both to that segment of plaintext as well as the rest of it. Knowing the plaintext does break Enigma, and how you come to know that plaintext (be it espionage or random struck of luck) is irrelevant.
You just need to go through the rotor settings again with the correct plugboard.
i suspsect leaving the computer to it these days if the code is all there having a human going in and checking it and saying no that must be that might be slower but maybe at that first point a human or an ai might do a better job of guessing the correct text than running the scrip to find the actual correct words.
As an example of Enigma being difficult to break if the message is no longer than 50-60 characters there are still U-Boat messages that have never been broken. A short message along with the Kreigsmarine Enigma machines that added an additional rotor are very difficult to decipher.
There was nothing preventing them from manually scrambling their messages on top of the Enigma encoding. All it would take is a manual alphabet switching system that changes based on the number of messages that have been sent.
Turing could never have accounted for it.
Part of the problem with U-boat Enigma messages is that they weren't merely enciphered, they were also encoded. That is, the original message won't necessarily contain _any_ plaintext, so there's no way to know when you've deciphered it.
I think there are still a few Enigma messages left undecrypted out there. This approach may be used, with plugboard implemented, to crack those and give a more complete image of WW2.
If you find any give 'em to me xD I built my own version of this, might be fun :)
All of the undecrypted Enigma messages have been decoded.
Mike is the reason I subscribed to Computerphile. Love the way of his explanation
This has to be the best explanation of the Enigma machine I have seen so far. Well done fella.
I wrote my undergraduate dissertation on ciphertext only cryptanalysis of the enigma machine. Wrote a tool in Java to perform it too. Was a really fun project, such interesting history - helped living in Bletchley too!
Is the formula for the number of Start and Ring possibilities at 11:29 correct? I'd think it should be 26^3, as in... It's defined by 3 numbers from 1-26.
That would be the case if you needed to solve for the entire set at once, but because you can get incremental improvements breaking one wheel at a time, it really _is_ 26×3. You only need to find a slight improvement in the statistical output on one wheel, trying all 26 settings there, then you can move on to the next.
@@stanrogers5613 except he's only giving a formula for the number of possible states of the machine where i linked. Of course algorithms to crack the enigma aren't going through each one.
Thank you, I’ve been waiting for someone to make a video about doing this in modern times, with better computing. Literally perfect!
I wrote enigma in C++ as a capstone project, then decided to go with writing a network manager. Got a 104 on the project, and after the presentation I showed my enigma code to the professor, and he told me he would have loved to see that instead of the network manager for the capstone. I learned a lesson in the perception of value that day.
When I was Signals Corps back in the dim dark days we used OTLP's then encrypted that for transmission don't think all the computers in the world will help break that.
You didn't participate in enigma@home? The distributed computing project to crack the last 3 undecrypted enigma messages?
It's finished now though.
I still feel just as dumb after watching this as I did before hand, however it was very interesting.
He doesn‘t go into details such as how to calculate the IoC, the number of possibilities etc., and how he came to know of the rotor properties (which input generates which output letter) and the notches. Statistical language analysis seems to be the key to solve crypto.
Sounds like Enigma decryption is the kind of thing where an evolutionary/genetic algorithm would work _really_ well. I wonder if anyone had tried that yet - it has to be an interesting experiment!
Hi I’m curious, what are those algorithms you’ve mentioned?
@@gschadalavada8980 Usually you start with a bunch of algorithms which are just guessing. However, some will guess better than others. Keep the better ones, mutate their guesses (automatically) a little and repeat, until you have one you're happy with. Just youtube them, there's lots of really cool videos on them :)
In effect, he is doing precisely that by hand. Notice that he mentioned fitness functions specifically. Whereas the GA would be evaluating the entire solution space starting from a random draw and fiddling with the details, the presenter has chosen to stage the work such that he can evaluate one entire domain comprehensively before moving on to the next one. You could do that with a GA as well, and in my experience, it would converge to the proper solution faster than if you did the whole solution in one pass.
For the number of rotor setting combinations at 10:45 shouldn't that be 26^3 instead of 26x3?
yeah it bothers me as well
9:55 - How? How exactly does getting one wheel right, or one plug-board wire right, lead to an improvement in this metric? It's still a completely different substitution cipher on every character.
Great explanation of the process involved. Shows how hard it was back in the day.
Indeed, and it was all done with mechanical wheels, yet it was and still is pretty effective if done properly.
As I can understand it - without knowing atleast some of correct settings, or some part of the plain text, Enigma is practically unbreakable for short texts even for today's normal computer. Could it be broken by a brute force attack, assuming that you have a super computer at your disposal ?
As far as I know, during ww2 Enigma wasn't broken until allies got a hand on working Enigma machine plus actual code books plus some of the messages encrypted, so I would say, that for that standards it was impossible to crack Enigma, unless Germans made a mistake (which they did :)
the mistake was that letter cant become itself during enryption thats how the britains could build a machine wich could crack the code every day in like 20minutes
@@thelastengineer8633 No, that was only a small flaw of the enigma which reduced the possible letters from 26 to 25. It's still something to work with but not decisive for the cracking. The biggest mistake of the Germans was to use similar messages each time and not to change their codebooks from time to time.
assuming you have a super computer you can probably decrypt the message with all possible settings and apply the metrics to determine accuracy to the decrypted text. That would still be alot of effort even for a supercomputer, but possible
@@GrandTheftChris I think the machine not encrypting a letter as itself was a bit more important than that. You are right that at helicopter level, as a matter of the zillions of possiible settings, reducing the possible letters from 26 to 25 wouldn't reduce the zillions by that much. But that would only make it of little relevance if you were doing a brute force attack.
But in practice it made a huge difference, precisely because the main attack was using cribs as you describe - ie a guess at a chunk of plain text based on the content of previous messages.
But if your crib was say "WEATHERREPORT" you couldn't guarantee that that was what the first 13 letters of ciphertext meant. The message might begin with a dozen junk letters, or it might begin with MORNINGHANSHERES THEWEATHERREPORT. So the codebreakers had to try their guessed plain text against the encrypted text successively in different positions - eg against encrypted text letters 1 to 13, 2 to 14, 3 to 15, 4 to 16 etc. The "can't encrypt as the same letter" feature allowed them rapidly to reject impossible matches. eg if they were trying WEATHERREPORT against letters 1-13 of the encrypted text and that was : BDARFGHIJTBEM they would know immediately that letters 1-13 couldn't be it, because A appears in position 3 in both ciphertext and guessed plain text.
@@leemoore5212 That's true. :) Still, add a 4th rotor, add some plugs on the plugboard and distribute a new codebook every month. It would have been unbreakable during ww2.
Everyone always forgets Marian rejewski who cracked the enigma BEFORE ALLEN TURING
I might be missing something. If the rotors move, what’s stopping someone from just spamming every letter until it loops again. Then wouldn’t you be able to know “oh, if there is a D in the 4th letter, when you press A 4 times it becomes a D, so that must be an a”
1. How would you know that when you press A four times you get a D ? Until you've cracked the key for the day, all you know is that there's a D. You don't know it came from an A.
2. If you're saying you can work through the whole cycle of rotations, sure you can.
All three rotors move, so the compete cycle is 26x26x26 = 17,576. So after 17,576 key presses the machine returns to the start position. But any message you're trying to read will never be 17,576 letters long. The Germans imposed a maximum 250 letters on any message before you had to reset with a new start position. Note that there are also 17,576 different start positions.
Assuming the Germans had sent messages that were 100,000 letters long, you could say that mystery letter 1 produced a D on the first press and mystery letter 2 produced a V on the 17,577th press. If by chance the 35.153rd press produced a D, you could say that the first letter of the plain text was the same as the 35,153rd letter. Do you feel like you're a whole lot further forward ?
Was the line starting with "ZUSE" (~5:53 onwards) a subtle nod to Konrad or pure coincidence?
I wish people would remember that the CODE is "Ultra" and the MACHINE is "Enigma".
New drinking game - every time he mentions the fact that getting it slightly right yields somewhat comprehensible results instead of random nonsense, you drink
I treid tooo listn bt gott ddrnk...
@@guyh3403 Looks like you've almost got your rotor/plugboard settings right. Keep going.
You did learn that bit though didn't you. XD
I used to visit an elderly chap who worked for BTM in Letchworth right at the start of WWII as a design engineer (possibly not the correct job description), he knew 'Doc' Keen and Edward Travis for sure.
He lived here all his life, went on to be a senior manager for ICL.
All we have left of 1/1 is in the name of two of the residential streets on the old site where the Bombes were made, that being Pascal Way and Tabbs Close.
He was still very guarded about his work there right up to his death only a few years ago at the age of 98, absolte gent he was and played down his efforts.
Every time he finishes a sentence he adjusts his right shoulder. I can't stop watching that.
haha, it's his energy, he can't wait to stop talking and start writing / coding.
@10:45 you said that there are 26 * 3 different starting positions. It should have been 26 ^ 3 instead.
At 9:52 when you said getting one of plug board setting correct will make the results better than if none were you talking about other statistical results? Because you'd only explained index of coincidence and I don't see how IOC could improved by changing plugboard settings.
The plugboard causes every instance of one letter to swap to a specific different letter -- and that would have no impact on the probability that two letters picked at random in the output will be the same. (if the 2nd and 7th letter of the output are the same they'd match no matter what the plugboard setting was; it might cause them to be 'Z's instead of 'D's but they'd still match each other; and still wouldn't match anything additional)
By the way. Will it be possible to crack the Enigma settings if it was used not for encrypting an text in any human language, but rather for encrypting a binary data saved in something 'Base64 like'. I think that this might be way, way, way harder if the input set wouldn't have any strict structure or anything to use for analysis like that presented in the video.
Yes indeed. If the plaintext still looks random then this kind of approach fails.
For this reason PGP starts the encoding process by compressing the message (using PKZIP) because that makes the 'plaintext' passed to the crypto engine already much closer to being random, and therefore more resistant to this kind of attack
Great video. Would love a tutorial to recreate the Enigma Machine in code.
Code Bullet started one but never finished it.
Hi Computerphile, my university (University of Portsmouth) is currently under attack from some hackers who have encrypted all their files! Could you make a video about it? cheers
I appreciate how the subtitles declared it a knitting machine.
Why nobody is honouring scientists who made Enigma. What a brilliance it was.
mans just explained the weakness of enigma 180 times before getting to the point.
If you find this interesting, give “The Code Book” by Simon Singh a read.
I'm definitely going to start using the phrase, "How English is this?" when correcting grammar. I love the concept of how close is something to a language and just referring to it as "How language is this?". This was a great video. Very informative.
This has nothing to do with grammar. The Index of coincidence is obviously all about how the words are written, i.e. the syntax.
The initial settings give a factor $26^3$ not $26\times 3$ (other instances occur too).
Sad mistake for a Doctor.
Sounds like a overly complicated Occams Razor method for the process of elimination. (Keep firing, and you’ll eventually hit the bullseye)
I’ve actually used an enigma machine, not a kit, a real one!! The NSA brought one to a cyber camp I did when I was a teenager!! It was actually really cool!! Cheers!!
They have one on display that you can type on in the National Cryptologic Museum outside DC.
@@michaelsommers2356 yeah, they had a pretty cool one 🙂🙂
Much as I love computers and cryptography, I feel quite strongly that the NSA should be kept away from children.
Great video! When you explained your algorithm, I was wondering how you can avoid that you run into a local maximum. But apperently it happens. Any suggestions how to improve it besides starting again with a different seed and see if you end up with a better fitness?
You usually don’t have to throw out all your settings.
This guy looks like he's sitting on a chair made entirely of fire ants.
Can't unsee now
This guy knows what he’s talking about and he is really enthusiastic to tell everyone. Amazing lectures, learned so much of his video’s!
Focusing onto the basic IOC text recognition. It appears that sending the message through backwards, sdrawkcab, may be a simple method to defy common machine text recognition methods.
Hi, which program do you use for animations, they look great on every video? :-)