Fishy Codes - Bletchley's Other Secret - Computerphile

The Enigma Cipher and German Tunny Traffic

The story begins with the concept of the Enigma cipher machine, which was used by the Germans to send encrypted messages during World War II. The machine had multiple layers of encryption, including a series of rotors that scrambled the letters before they were transmitted. To make it more user-friendly, the Germans also developed a way to transmit encrypted messages over telegraph lines, where two encrypted messages would be sent back-to-back across the line.

The idea behind this system was that each message would be encoded with its own unique key, making it impossible for anyone to decipher without knowing the specific settings used. However, as one Enigma operator noted, "12 of them didn't make sense", and indeed, the Germans later abandoned this approach in favor of using a single layer of encryption. Despite this, the system was still complex enough that operators needed extensive training to use it effectively.

The German High Command's use of the Enigma machine for sensitive communications only added to its mystique as a secure means of communication. The messages transmitted between headquarters and high-ranking officials were encrypted with Enigma settings, which made them virtually unbreakable. However, this secrecy also meant that there was no way to verify the authenticity of these messages without proper authorization.

The discovery of the Enigma machine's weaknesses, however, came about not through deciphering the messages themselves but by analyzing the traffic patterns used for transmission. The British cryptanalysts at Bletchley Park noticed a peculiar pattern in the messages transmitted using the German Tunny (also known as the "German Enigma") cipher system. This system was similar to the Enigma machine, but it was easier to use and allowed for longer messages.

The development of a new y station to handle this tunny traffic was necessary because the existing systems were becoming overwhelmed with encrypted messages. The machine that eventually they built at Bletchley Park to decipher these messages was called British Tunny. It was an attempt to replicate the German Enigma system, but it also came with its own set of challenges.

The process of decoding tunny traffic involved working with a huge list of norts, all in a row, which could be easily compressed using Huffman encoding. Most volunteers had been building the circuits for this at home on kitchen tables or in garden sheds, indicating the dedication and enthusiasm with which they were working to crack the German Enigma code.

The key to deciphering these messages lay not only in understanding the mechanics of the Enigma machine but also in recognizing patterns and anomalies in the traffic. The fact that Hitler's favorite cipher machine was being used by the German High Command made it all the more urgent for the British cryptanalysts to crack the code, as it held crucial information about the war effort.

One of the most significant challenges in deciphering these messages was that they were often sent without proper verification or authentication. For instance, a transmission might contain a clear message that would later be revealed to be part of a longer encrypted message. This lack of oversight made it easier for the British cryptanalysts to work with the messages, but also introduced an element of uncertainty and risk.

As the story goes, one Enigma operator mentioned how they had seen this phenomenon firsthand, where operators would send messages without double-checking if the recipient was supposed to receive them. The lack of oversight meant that even experienced operators might use the same settings twice or make mistakes in transmission. This realization came as a great temptation for the operators, but it also made their job all the more challenging.

The discovery of a message with the same indicator used by German High Command officials marked an important turning point in deciphering the tunny traffic. It demonstrated that someone had indeed sent messages with the same settings twice, which made it clear that the Germans' secrecy was not foolproof. The cryptanalysts at Bletchley Park finally had concrete evidence that they could work with to crack the German Enigma code.

In August 1941, a message was received that contained the same indicator used in previous transmissions. This marked a significant breakthrough for the British cryptanalysts and demonstrated their ability to work with the tunny traffic. The fact that the Germans knew this too meant that they had eventually cracked the secret of using the same settings twice, which was a great temptation for the operators.

The realization that some messages were intended for public consumption only added another layer of complexity to deciphering the German Enigma code. Messages sent between weather stations or Luftwaffe units might be clear and unencrypted, but those meant for the high-ups at headquarters were encrypted with the most sensitive settings. Deciphering these messages required a deep understanding not just of the mechanics of the Enigma machine but also of the nuances of German military communication.

The story goes that one Enigma operator had noticed during training exercises how the Germans would sometimes use clear messages, such as "m is Michael G is great", to test the authenticity of their equipment. These kinds of messages were often sent with caution and made it easier for the operators to recognize the differences between public broadcasts and sensitive communications.

The deciphering of German Enigma messages was a complex task that required patience, skill, and attention to detail. However, as one Enigma operator noted, "12 of them didn't make sense", and eventually, they discovered the key to cracking the code. The story of the British cryptanalysts at Bletchley Park is a testament to their dedication and perseverance in the face of adversity.

The discovery of the German Tunny traffic was another significant breakthrough for the British cryptanalysts. It showed that even seemingly innocuous messages could hold crucial information about the war effort. Deciphering these messages required a deep understanding of the mechanics of the Enigma machine but also an eye for patterns and anomalies in the traffic.

The ultimate goal of deciphering German Enigma messages was to gain insight into the strategic decisions made by the German High Command during World War II. This information could be used to inform Allied military strategy, potentially giving them a crucial edge on the battlefield. The British cryptanalysts at Bletchley Park had finally cracked the code and were now able to read these encrypted messages with ease.

The discovery of the Enigma machine's weaknesses came about not through deciphering the messages themselves but by analyzing the traffic patterns used for transmission. This allowed the British cryptanalysts to work with concrete evidence rather than speculation, making it easier to crack the German Enigma code.

In conclusion, the story of the German Tunny traffic is one of intrigue and complexity. The development of this system was a testament to the ingenuity of the Germans but also presented significant challenges for the British cryptanalysts at Bletchley Park. Deciphering these messages required patience, skill, and attention to detail, as well as an understanding of the nuances of German military communication.

Ultimately, the discovery of the tunny traffic marked a major breakthrough in deciphering German Enigma messages. The story of how the British cryptanalysts at Bletchley Park finally cracked the code is one of determination and perseverance in the face of adversity.

"WEBVTTKind: captionsLanguage: ensome of you will have seen sha and me going wild around Bletchley Park and we'll deduce from that that we' paid a visit to BP as they call it in the trade it's time now for me to move off from the Enigma story which I've done two or three videos on already and tell a story that in many ways is even more relevant to the start of computer science than even Enigma was we've all heard of Alan touring but I would suspect that fewer of you have heard about Bill Tutt Max Newman Tommy flowers but they're all worthy of hero status because they're all connected with a type of Cipher traffic mysterious type of traffic that came to Bletchley Park's attention and at Bletchley was always called tunny traffic they loved calling mysterious traffic by the name of fish and there was things like sturgeon and Halbert as well as tunny but this one is going to be tunny traffic tunny is the original English word for what we nowadays call Tu it's as simple as that even before the war the Metropolitan Police and the foreign office jointly used to listen to the airwaves to see what was happening you know that shouldn't be happening within the UK Shores anything mysterious now an awful lot of course of what they were listening to was plain straightforward radio broadcast or from the military point of view it will be mors code some of that mors code might well be encrypted Enigma traffic but it was in mors this one was weird it wasn't in mors it sounded almost like a touchone telephone on steroids or something uh it was all over the place and so what they did was they equipped the listening stations that were all over the UK because they all knew that war was almost inevitable they had a whole load of joint listening stations and these listened for enigma traffic they also listened for anything unusual they were called y stations capital Y for reasons I don't understand but there again blle Park was called station X and I don't understand that either so these y stations started saying look there's some weird stuff here would you like to see what it looks like they were able to make a recording of the trace of this as if it was an oscilloscope but actually on a piece of paper if you look here it's like a waveform and that is exactly what it is and they were a ble to record this as a black trace and when you look at it it's like a mixture between a sort of sine wave and a square wave but once they got the experts in looking at this you got to remember tele printers were very common they were used in stock exchanges that were used in telegraphy a lot of traffic went over landline that was actually teleprinter code this was broadcast because presumably the land line was too long between the far end of Greece and Germany let's say so it had to be broadcast and the expert said that's broadcast tele print traffic that is now you know why sha and I have set the scene by doing a video already on five whole paper tape codes tele printer alphabet and even on exclusive all the rule at the police and the foreign offices anything mysterious like this gets sent to gccs and we remember from the previous videos GC and CS govern code and Cipher School initially based in St James's Park in London the great majority of it moved off to Bletchley Park in the late 30s so Blacky Park was accumulating this stuff big debate is this a vernum cipher in the late 1920s an American employee of AT&T had come up with the idea of doing secure enciphered teleprinter transmissions by doing what we would Now call an exclusive or between two five bit patterns yeah great idea because it would disguise the character you wanted to send there's only one problem that if you want to apply that to a whole message how would you arrange to have as it were Cipher key characters randomly chosen to mix in Via exclusive or with your plain text that you wanted to send and to send out the result well what Vernon proposed and to my amazement he patented it and he this is madness this is madness this is secure this they shouldn't be patenting this stuff it gives the game away this is AT&T and we're not at War yet we're not having the competition coming up with this bright idea this has got commercial potential you know as well as military we're going to pent it so vernum pented the idea it would use two five hole tapes and uh what you could do is have this one which is the plain text running alongside this one which has somehow been generated and this is the key this is the thing that's going to be exclusive or character by character with this to give a cipher text the problem is the enormous one these things are driven by sprocket holes you start trying to run two tapes simultaneously through a piece of bespoke electronics which they invented which will do the merging but you must keep them in exact sync you do not want differential stretching between the two things worse still when your supervisor says this thing isn't going fast enough we need more speed and you speed it up you know what happens next the sprocket holes tear and then you've got slippage like you've never dreamed of in your worst nightmares so as a result of all this problem of tape synchronization it never really got to mark it it was quietly abandoned but the idea was good but the people of blessy Park started say is this a verum cipher that we were taught about at training school before we started here at BP but maybe the Germans have been smart enough to say we're not going to use a second tape because you got to it synchronized we will provide the key characters from a machine it'll be like an add-on to the teletype the tele printer you type in your plane text character this thing will invent and it's probably going to have wheels rotor Wheels every good Cipher machine has rotor wheels on it would somehow generate a five bit International teletype letter and then it'll automatically exclusive or it um and then we'll get an output and that'll be our Cipher and the good thing is that it will be a lot less problem to keep the machine in sync with what we're doing when you've only got one tape to worry about so in the end they discovered that that's exactly what was happening looked at more and more of this tonny traffic how on Earth are we ever ever going to get into this stuff at the start of this signal it goes up high but the rule in these intercepted messages that we put out on this piece of Kit called the undulator is that if it's high it's a zero and if it goes low it's a one and the neutral point is somewhere in the middle let's just do a straightforward addition of two five bit codes to see what it would look like the letter a capital A in the international teleprinter code the bordo Murray code is 1 1 0 0 0 and let me remind you one of the approved signals for doing an exclusive or operation is Plus in a circle I'm going to add that on Via exclusive or to the letter X letter X is one 0 1 one one you all know how this works now exclusive or gives a Zer if they're the same and one if they're different look that up in your table what character is that it's the letter V so there we are look the plain text shall we say was a the ciphering character given by the randomizing device was X and this particular character is V what we're going to have to do on this surely is to get enough evidence about that random keystream before we can start working out how the heck it works mathematicians were around and were upon the scene arguably not as many as Bly par really needed in the early days to say look this is an example of what we in the mathematics trade call an additive cyer ciphering system it's doing arithmetic modulo a certain number this as I've said is arithmetic modulo 2 it's binary addition but without the carries and some Wise St said do you know there are weaknesses in all additive ciphers basically at the end of the 19th century a man called kirkoff had published a paper about cryptography via additive ciphers and said the problem with them all is if you accumulate enough captured Cipher text even when you don't know the key but lots of different messages if they're all done with the same key you can eventually accumulate so much that via a clever trick you can work out what the messages are without even knowing the key because it kind of cancels out and oh that could be helpful so all we've got to look out for then is are they using the same key for any of this stuff handy every single one of these Transmissions before it came through on the undulator they all came with an indicator now this really puzzled them at first I copied one down from my reference books those 12 characters would be sent out and then there'd be a pause and then this stuff the undulated traffic would start however there was sufficient of this sent out to train the operators that again the game was given away the Crypt analyst said I wonder if that's in in code or Cipher itself and oh I don't know no but you see could this be like Enigma they sent out blocks of three letters to show the settings the initial settings could it be like that then somebody else would say yeah but there's 12 of them that doesn't make sense 10 would make sense two layers of encipherment one after the other first row of five you know five bits and then push it on again do another one but these could be settings of Cipher wheels just like Enigma but how can we be sure that they AR in a code of their own do they really mean what they say as part of the training scenario obvious for the poor operators trying to work this machine there were some of the Transmissions that said in clear m is Michael G is geart right so by the time you've got o is Otto K is Carl right you can see this is trending yes it's k for call you see the K and you wind the C we around to see k for call and by the fact that they had elaborated in the training all of these as uh boys first names made the listeners sure that these were what they seem so the answer now is very clear we have to sit and wait patiently we have to ask our wise stations to rigorously senders exactly what the indicator was and if we wait long enough somebody will use the same indicator twice absolutely against standing orders but it was known from Enigma this was a great Temptation In the Heat of battle with people shouting at you you use the same settings twice it's all right nobody will be listening oh yes they are this did happen I guess you could say sooner rather than later I think it was August 1941 they finally got a message which had got the same indicator and they knew perfectly well that with that when a lot of hard patient work because there were no computers to help you nevertheless we could probably disentangle this message now another thing these messages seem to be going between headquarters of the German High command these were not between weather stations they were not even between Luft vaffa stations this was serious stuff with this was going from Athens HQ to Berlin HQ shall we say clearly this stuff and there wasn't much of it initially was going to be used by the high-ups the German High command and as we now know it really was Hitler's favorite Cipher machine it's great Advantage unlike Enigma was that it was user friendly you know what Enigma is like you need a person to punch the thing a person to read the lamps a person to send the mors code here you could connect two encrypted type teletypes back to back across a landline or even across the airwaves although that would be a bit dicey to do with interference but you could in principle have your operators never see the cipher text it goes in one end enciphered across deyer out it comes therefore because it's easy to use and user friendly people will send longer messages and that's music to the ears of the cryptanalyst Brigade they love that by this stage the listeners have decided that we need a new y station separately for this tunny traffic remember the traffic was called tunny the machine that was generating it was called German tuny or just tunny the machines that eventually they built at Bletchley Park once they understood how it worked to do the same job of deciphering was called British tunny but it was all tunny you know say so here was this tunny traffic all stacking up all waiting to be decrypted all waiting for two or more to be sent out with the same key nowly technically that's called ad depth getting a dep dep means you've got two or more car messages all with the same key absolutely against standing orders because the German cryptographers had warned the military this one this kind of exor additive Cipher is even more sensitive to deths probably even an enigma with Enigma you only got a short message out anyway because life too short to send much more than about 50 carats this thing in the end they got 4,000 characters worth and then when they said when the chap phoned back to and said sorry uh didn't quite get that could you send it again my first thought was surely the sender guy would have had the sense to make a tape of it and to send it offline in the first place no we hadn't he typed it in by hand without making a copy so when it was sent again you can imagine the sender muttering and cursing he used abbreviations he made it shorter and as we'll see next time that made the deciphering job even easier 0 0 2 1 and so on and the important thing about this is by doing this we're going to get a huge list of norts all in a row and that is very easily compressed by Huffman encoding most of our volunteers have been building the circuits at home on kitchen tables in Garden shedssome of you will have seen sha and me going wild around Bletchley Park and we'll deduce from that that we' paid a visit to BP as they call it in the trade it's time now for me to move off from the Enigma story which I've done two or three videos on already and tell a story that in many ways is even more relevant to the start of computer science than even Enigma was we've all heard of Alan touring but I would suspect that fewer of you have heard about Bill Tutt Max Newman Tommy flowers but they're all worthy of hero status because they're all connected with a type of Cipher traffic mysterious type of traffic that came to Bletchley Park's attention and at Bletchley was always called tunny traffic they loved calling mysterious traffic by the name of fish and there was things like sturgeon and Halbert as well as tunny but this one is going to be tunny traffic tunny is the original English word for what we nowadays call Tu it's as simple as that even before the war the Metropolitan Police and the foreign office jointly used to listen to the airwaves to see what was happening you know that shouldn't be happening within the UK Shores anything mysterious now an awful lot of course of what they were listening to was plain straightforward radio broadcast or from the military point of view it will be mors code some of that mors code might well be encrypted Enigma traffic but it was in mors this one was weird it wasn't in mors it sounded almost like a touchone telephone on steroids or something uh it was all over the place and so what they did was they equipped the listening stations that were all over the UK because they all knew that war was almost inevitable they had a whole load of joint listening stations and these listened for enigma traffic they also listened for anything unusual they were called y stations capital Y for reasons I don't understand but there again blle Park was called station X and I don't understand that either so these y stations started saying look there's some weird stuff here would you like to see what it looks like they were able to make a recording of the trace of this as if it was an oscilloscope but actually on a piece of paper if you look here it's like a waveform and that is exactly what it is and they were a ble to record this as a black trace and when you look at it it's like a mixture between a sort of sine wave and a square wave but once they got the experts in looking at this you got to remember tele printers were very common they were used in stock exchanges that were used in telegraphy a lot of traffic went over landline that was actually teleprinter code this was broadcast because presumably the land line was too long between the far end of Greece and Germany let's say so it had to be broadcast and the expert said that's broadcast tele print traffic that is now you know why sha and I have set the scene by doing a video already on five whole paper tape codes tele printer alphabet and even on exclusive all the rule at the police and the foreign offices anything mysterious like this gets sent to gccs and we remember from the previous videos GC and CS govern code and Cipher School initially based in St James's Park in London the great majority of it moved off to Bletchley Park in the late 30s so Blacky Park was accumulating this stuff big debate is this a vernum cipher in the late 1920s an American employee of AT&T had come up with the idea of doing secure enciphered teleprinter transmissions by doing what we would Now call an exclusive or between two five bit patterns yeah great idea because it would disguise the character you wanted to send there's only one problem that if you want to apply that to a whole message how would you arrange to have as it were Cipher key characters randomly chosen to mix in Via exclusive or with your plain text that you wanted to send and to send out the result well what Vernon proposed and to my amazement he patented it and he this is madness this is madness this is secure this they shouldn't be patenting this stuff it gives the game away this is AT&T and we're not at War yet we're not having the competition coming up with this bright idea this has got commercial potential you know as well as military we're going to pent it so vernum pented the idea it would use two five hole tapes and uh what you could do is have this one which is the plain text running alongside this one which has somehow been generated and this is the key this is the thing that's going to be exclusive or character by character with this to give a cipher text the problem is the enormous one these things are driven by sprocket holes you start trying to run two tapes simultaneously through a piece of bespoke electronics which they invented which will do the merging but you must keep them in exact sync you do not want differential stretching between the two things worse still when your supervisor says this thing isn't going fast enough we need more speed and you speed it up you know what happens next the sprocket holes tear and then you've got slippage like you've never dreamed of in your worst nightmares so as a result of all this problem of tape synchronization it never really got to mark it it was quietly abandoned but the idea was good but the people of blessy Park started say is this a verum cipher that we were taught about at training school before we started here at BP but maybe the Germans have been smart enough to say we're not going to use a second tape because you got to it synchronized we will provide the key characters from a machine it'll be like an add-on to the teletype the tele printer you type in your plane text character this thing will invent and it's probably going to have wheels rotor Wheels every good Cipher machine has rotor wheels on it would somehow generate a five bit International teletype letter and then it'll automatically exclusive or it um and then we'll get an output and that'll be our Cipher and the good thing is that it will be a lot less problem to keep the machine in sync with what we're doing when you've only got one tape to worry about so in the end they discovered that that's exactly what was happening looked at more and more of this tonny traffic how on Earth are we ever ever going to get into this stuff at the start of this signal it goes up high but the rule in these intercepted messages that we put out on this piece of Kit called the undulator is that if it's high it's a zero and if it goes low it's a one and the neutral point is somewhere in the middle let's just do a straightforward addition of two five bit codes to see what it would look like the letter a capital A in the international teleprinter code the bordo Murray code is 1 1 0 0 0 and let me remind you one of the approved signals for doing an exclusive or operation is Plus in a circle I'm going to add that on Via exclusive or to the letter X letter X is one 0 1 one one you all know how this works now exclusive or gives a Zer if they're the same and one if they're different look that up in your table what character is that it's the letter V so there we are look the plain text shall we say was a the ciphering character given by the randomizing device was X and this particular character is V what we're going to have to do on this surely is to get enough evidence about that random keystream before we can start working out how the heck it works mathematicians were around and were upon the scene arguably not as many as Bly par really needed in the early days to say look this is an example of what we in the mathematics trade call an additive cyer ciphering system it's doing arithmetic modulo a certain number this as I've said is arithmetic modulo 2 it's binary addition but without the carries and some Wise St said do you know there are weaknesses in all additive ciphers basically at the end of the 19th century a man called kirkoff had published a paper about cryptography via additive ciphers and said the problem with them all is if you accumulate enough captured Cipher text even when you don't know the key but lots of different messages if they're all done with the same key you can eventually accumulate so much that via a clever trick you can work out what the messages are without even knowing the key because it kind of cancels out and oh that could be helpful so all we've got to look out for then is are they using the same key for any of this stuff handy every single one of these Transmissions before it came through on the undulator they all came with an indicator now this really puzzled them at first I copied one down from my reference books those 12 characters would be sent out and then there'd be a pause and then this stuff the undulated traffic would start however there was sufficient of this sent out to train the operators that again the game was given away the Crypt analyst said I wonder if that's in in code or Cipher itself and oh I don't know no but you see could this be like Enigma they sent out blocks of three letters to show the settings the initial settings could it be like that then somebody else would say yeah but there's 12 of them that doesn't make sense 10 would make sense two layers of encipherment one after the other first row of five you know five bits and then push it on again do another one but these could be settings of Cipher wheels just like Enigma but how can we be sure that they AR in a code of their own do they really mean what they say as part of the training scenario obvious for the poor operators trying to work this machine there were some of the Transmissions that said in clear m is Michael G is geart right so by the time you've got o is Otto K is Carl right you can see this is trending yes it's k for call you see the K and you wind the C we around to see k for call and by the fact that they had elaborated in the training all of these as uh boys first names made the listeners sure that these were what they seem so the answer now is very clear we have to sit and wait patiently we have to ask our wise stations to rigorously senders exactly what the indicator was and if we wait long enough somebody will use the same indicator twice absolutely against standing orders but it was known from Enigma this was a great Temptation In the Heat of battle with people shouting at you you use the same settings twice it's all right nobody will be listening oh yes they are this did happen I guess you could say sooner rather than later I think it was August 1941 they finally got a message which had got the same indicator and they knew perfectly well that with that when a lot of hard patient work because there were no computers to help you nevertheless we could probably disentangle this message now another thing these messages seem to be going between headquarters of the German High command these were not between weather stations they were not even between Luft vaffa stations this was serious stuff with this was going from Athens HQ to Berlin HQ shall we say clearly this stuff and there wasn't much of it initially was going to be used by the high-ups the German High command and as we now know it really was Hitler's favorite Cipher machine it's great Advantage unlike Enigma was that it was user friendly you know what Enigma is like you need a person to punch the thing a person to read the lamps a person to send the mors code here you could connect two encrypted type teletypes back to back across a landline or even across the airwaves although that would be a bit dicey to do with interference but you could in principle have your operators never see the cipher text it goes in one end enciphered across deyer out it comes therefore because it's easy to use and user friendly people will send longer messages and that's music to the ears of the cryptanalyst Brigade they love that by this stage the listeners have decided that we need a new y station separately for this tunny traffic remember the traffic was called tunny the machine that was generating it was called German tuny or just tunny the machines that eventually they built at Bletchley Park once they understood how it worked to do the same job of deciphering was called British tunny but it was all tunny you know say so here was this tunny traffic all stacking up all waiting to be decrypted all waiting for two or more to be sent out with the same key nowly technically that's called ad depth getting a dep dep means you've got two or more car messages all with the same key absolutely against standing orders because the German cryptographers had warned the military this one this kind of exor additive Cipher is even more sensitive to deths probably even an enigma with Enigma you only got a short message out anyway because life too short to send much more than about 50 carats this thing in the end they got 4,000 characters worth and then when they said when the chap phoned back to and said sorry uh didn't quite get that could you send it again my first thought was surely the sender guy would have had the sense to make a tape of it and to send it offline in the first place no we hadn't he typed it in by hand without making a copy so when it was sent again you can imagine the sender muttering and cursing he used abbreviations he made it shorter and as we'll see next time that made the deciphering job even easier 0 0 2 1 and so on and the important thing about this is by doing this we're going to get a huge list of norts all in a row and that is very easily compressed by Huffman encoding most of our volunteers have been building the circuits at home on kitchen tables in Garden sheds\n"