Who deciphered the Enigma encryption machine? Information security during World War II: hacking Enigma

But the German Navy was the first to use Enigma. It was a 1925 Funkschlüssel C model. In 1934, the Navy adopted a naval modification of the army vehicle (Funkschlüssel M or M3). At that time, the army used only 3 rotors, and in the M3, for greater safety, you could choose 3 rotors out of 5. In 1938, 2 more rotors were added to the kit, in 1939, 1 more, so it became possible to choose 3 out of 8 rotors. And in February 1942, the German submarine fleet was equipped with a 4-rotor M4. Portability was preserved: the reflector and the 4th rotor were thinner than usual. Among the mass-produced Enigmas, the M4 was the most secure. It had a printer (Schreibmax) in the form of a remote panel in the commander's cabin, and the signalman worked with encrypted text, without access to classified data. But there was also special, special equipment. The Abwehr (military intelligence) used a 4-rotor Enigma G. The level of encryption was so high that other German authorities could not read it. For the sake of portability (27x25x16 cm), the Abwehr abandoned the patch panel. As a result, the British managed to hack the machine's security, which greatly complicated the work of German agents in Britain. “Enigma T” (“Tirpitz machine”) was created specifically for communication with its ally Japan. With 8 rotors, reliability was very high, but the machine was hardly used. Based on the M4, they developed the M5 model with a set of 12 rotors (4 working/8 replaceable). And the M10 had a printer for open/closed texts. Both machines had another innovation - a gap-filling rotor, which greatly increased the strength of the encryption. The Army and Air Force encrypted messages in groups of 5 characters, the Navy - in groups of 4 characters. To make it more difficult to decrypt enemy interceptions, the texts contained no more than 250 characters; long ones were broken into parts and encrypted with different keys. To increase security, the text was clogged with “garbage” (“letter salad”). It was planned to rearm all types of troops with M5 and M10 in the summer of 1945, but time ran out.

So, the neighbors were “blind” to Germany’s military preparations. The Germans' radio communication activity increased many times over, and it became impossible to decipher the interceptions. The Poles were the first to be alarmed. While keeping an eye on their dangerous neighbor, in February 1926, they suddenly could not read the encryption of the German Navy, and from July 1928, the encryption of the Reichswehr. It became clear: they switched to machine encryption. In January 29th, Warsaw customs found a “lost” parcel. Berlin's harsh request to return it attracted attention to the box. There was a commercial Enigma. Only after studying it was given to the Germans, but this did not help reveal their tricks, and they already had a reinforced version of the machine. Especially to combat Enigma, Polish military intelligence created the Cipher Bureau of the best mathematicians who spoke fluent German. They were lucky only after 4 years of marking time. Luck came in the form of an officer of the German Ministry of Defense, “bought” in 1931 by the French. Hans-Thilo Schmidt (“Agent Asche”), responsible for the destruction of outdated codes of the then 3-rotor Enigma, sold them to the French. I also got them instructions for it. The bankrupt aristocrat needed money and was offended by his homeland, which did not appreciate his services in the First World War. French and British intelligence showed no interest in this data and handed it over to their Polish allies. In 1932, the talented mathematician Marian Rejewski and his team cracked the miracle machine: “Ashe’s documents became manna from heaven: all the doors instantly opened.” France supplied the Poles with agent information until the war, and they managed to create an Enigma simulator, calling it a “bomb” (a type of ice cream popular in Poland). Its core was 6 Enigmas connected into a network, capable of sorting through all 17,576 positions of the three rotors, i.e., all possible key options, in 2 hours. Her strength was enough to open the keys of the Reichswehr and the Air Force, but she could not split the keys of the Navy. The “bombs” were made by the company AVA Wytwurnia Radiotechniczna (it was the company that reproduced the German “Enigma” in 1933 - 70 pieces!). 37 days before the start of World War II, the Poles passed on their knowledge to the allies, giving them one “bomb” each. The French, crushed by the Wehrmacht, lost their machine, but the British turned theirs into a more advanced cyclometer machine, which became the main instrument of the Ultra program. This counter-Enigma program was Britain's best-kept secret. The messages decrypted here were classified as Ultra, which is higher than Top secret. Bletchley Park: Station X: After the First World War, the British cut their cryptologists. The war with the Nazis began - and all forces had to be urgently mobilized. In August 1939, a group of code-breaking specialists entered the Bletchley Park estate, 50 miles from London, under the guise of a company of hunters. Here, at the decryption center Station X, which was under the personal control of Churchill, all information from radio interception stations in Great Britain and abroad converged. The company "British Tabulating Machines" built here the first decoding machine "Turing bomb" (this was the main British cracker), the core of which was 108 electromagnetic drums. She tried all the options for the cipher key given the known structure of the message being deciphered or part of the plaintext. Each drum, rotating at a speed of 120 revolutions per minute, tested 26 letter options in one full revolution. During operation, the machine (3.0 x2.1 x0.61 m, weight 1 t) ticked like a clockwork, which confirmed its name. For the first time in history, ciphers created en masse by a machine were also solved by the machine.

To work, it was necessary to know the physical principles of the Enigma down to the smallest detail, and the Germans constantly changed it. The British command set the task: to obtain new copies of the machine at all costs. A targeted hunt began. First, they took a Luftwaffe Enigma with a set of keys from a Junkers shot down in Norway. The Wehrmacht, smashing France, advanced so quickly that one signal company overtook its own and was captured. The Enigma collection was replenished by the army. They were dealt with quickly: Wehrmacht and Luftwaffe encryption began to appear on the table of the British headquarters almost simultaneously with the German one. The most complex one was desperately needed - the naval M3. Why? The main front for the British was the sea front. Hitler tried to strangle them with a blockade, cutting off the supply of food, raw materials, fuel, equipment, and ammunition to the island country. Its weapon was the Reich's submarine fleet. The group tactics of the “wolf packs” terrified the Anglo-Saxons, their losses were enormous. They knew about the existence of the M3: 2 rotors were captured on the submarine U-33, and instructions for it on the U-13. During a commando raid on the Lofoten Islands (Norway) on board the German patrol ship "Crab" they captured 2 rotors from the M3 and keys for February, the Germans managed to drown the car. Moreover, it turned out quite by accident that there were German non-military ships sailing in the Atlantic, which had special communications on board. Thus, the Royal Navy destroyer Griffin inspected the allegedly Dutch fishing vessel Polaris off the coast of Norway. The crew, consisting of strong guys, managed to throw two bags overboard, and the British caught one of them. There were documents for the encryption device. In addition, during the war, the international exchange of weather data ceased - and converted “fishermen” went from the Reich to the ocean. On board they had Enigma and settings for every day for 2-3 months, depending on the duration of the voyage. They regularly reported the weather and were easy to find. Special Royal Navy task forces came out to intercept the “meteorologists.” Fast destroyers literally took the enemy to task. By shooting, they tried not to sink the “German”, but to drive his crew into panic and prevent the destruction of special equipment. On May 7, 1941, the trawler Munich was intercepted, but the radio operator managed to throw the Enigma and May keys overboard. But in the captain’s safe they found the keys for June, a short-range communication code book, a coded weather log and a Navy coordinate grid.  The mining helped: the time from intercepting a message to decrypting it was reduced from 11 days to 4 hours! But the keys had expired and new ones were needed. Captain Lempt's mistake Surrender of the German submarine U-110 to the British. May 9, 1941 The main catch was made on May 8, 1941 during the capture of the submarine U-110 of Lieutenant Commander Julius Lemp, which was attacking convoy OV-318. After bombing U-110, the escort vessels forced her to surface. The captain of the destroyer HMS Bulldog went to ram, but, seeing that the Germans were jumping overboard in panic, he turned away in time. Having penetrated the half-submerged boat, the boarding party discovered that the team had not even tried to destroy the secret communications means. At this time, another ship picked up the surviving Germans from the water and locked them in the hold to hide what was happening. This was very important. U-110 took: a working Enigma M3, a set of rotors, keys for April-June, encryption instructions, radiograms, logs (personnel, navigation, signal, radio communications), sea charts, diagrams of minefields in the North Sea and off the coast France, operating instructions for type IXB boats.    d. Sea convoys began to bypass the “wolf packs”: from June to August, the “Doenitz wolves” found only 4% of convoys in the Atlantic, from September to December - 18%. But the Germans, believing that U-110 had taken its secret into the abyss, did not change the communication system. Admiral Doenitz: “Lemp did his duty and died as a hero.” However, after the publication of Roskill’s book “The Secret Capture” in 1959, the hero became, in the eyes of German veterans, a scoundrel who had tarnished his honor: “He did not carry out the order to destroy secret materials! Hundreds of our boats were sunk, thousands of submariners died in vain,” “if he had not died at the hands of the British, we should have shot him.” And in February 1942, the 4-rotor M4 replaced the 3-rotor M3 on boats. Bletchley Park has hit a wall again. All that remained was to hope for the capture of a new vehicle, which happened on October 30, 1942. On this day, Captain-Lieutenant Heidtmann's U-559 northeast of Port Said was heavily damaged by British depth charges. Seeing that the boat was sinking, the crew jumped overboard without destroying the encryption equipment. She was found by sailors from the destroyer Petard. As soon as they handed over the loot to the boarding party that arrived in time, the mangled boat suddenly capsized, and two daredevils (Colin Grazier, Antony Fasson) went with it to a kilometer depth. The spoils were the M4 and the "Brief Call Sign Log"/"Brief Weather Code" brochures, printed with soluble ink on pink blotting paper, which the radio operator was supposed to throw into the water at the first sign of danger. It was with their help that on December 13, 1942, the codes were opened, which immediately gave the headquarters accurate data on the positions of 12 German boats. After a 9-month break (black-out), the reading of ciphergrams began again, which did not stop until the end of the war. From now on, the destruction of the “wolf packs” in the Atlantic was only a matter of time. Immediately after rising from the water, German submariners were completely undressed and all their clothes were taken away in order to search for documents of interest to intelligence (for example, code tables of the Enigma cipher machine). A whole technology for such operations has been developed. Bombs were used to force the boat to the surface and they began shelling with machine guns so that the Germans, remaining on board, would not begin to sink. Meanwhile, a boarding party was approaching her, aiming to look for “something like a typewriter next to the radio station,” “disks with a diameter of 6 inches,” any magazines, books, papers. It was necessary to act quickly, and this was not always possible. Often people died without obtaining anything new. In total, the British captured 170 Enigmas, incl.   parts 3–4 sea M4. This made it possible to speed up the decryption process. When 60 “bombs” were turned on simultaneously (i.e., 60 sets of 108 reels), the search for a solution was reduced from 6 hours to 6 minutes. This already made it possible to quickly respond to uncovered information. At the peak of the war, 211 “bombs” operated around the clock, reading up to 3 thousand German encryption messages daily. They were served in shifts by 1,675 female operators and 265 mechanics. When Station X could no longer cope with the huge flow of radio interceptions, some of the work was moved to the United States. By the spring of 1944, 96 “Turing bombs” were working there, and a whole decryption factory had arisen. In the American model, with its 2000 rpm, the decoding was 15 times faster. Confrontation with the M4 has become a chore. Actually, this was the end of the fight with Enigma.

The history of the Enigma electric rotary cipher machine begins in 1917 with a patent received by the Dutchman Hugo Koch. The following year, the patent was purchased by Arthur Scherbius, who began commercial activities by selling copies of the machine to both private individuals and the German army and navy. Sales were poor until the mid-1920s, due in part to the high price.

In June 1924, the British cryptographic service (Room 40) became interested in the machine's design. For this purpose, a batch of machines was purchased from the German company Chiffrier-maschinen AG, which produced Enigma. One of the conditions of the deal was the registration of a patent with the British Patent Office, which gave the cryptographic service access to a description of the cryptographic scheme.

Polish stage

The first interceptions of messages encrypted using Enigma date back to 1926. However, they could not read them for a long time. In January 1929, a box containing a commercial version of Enigma accidentally ended up at Warsaw customs. Germany asked to return the box, after which the Poles became interested in its contents. On behalf of the Polish Cipher Bureau, the machine was examined by specialists from the AVA company, including its head, cryptanalyst Anthony Palth, after which the box was sent to the German embassy. Studying the machine did not allow deciphering the messages; moreover, the German military used its own, enhanced version of Enigma.

In 1928-29, the first mathematical courses in cryptography were organized in Poland. The listeners were two dozen mathematics students with knowledge of German. Three of the students - Marian Rejewski, Henryk Zygalski and Jerzy Rozycki - entered the service of the Cipher Bureau. Subsequently, it is they who will receive the first results in breaking the Enigma code.

In 1931, an employee of the code bureau of the German Ministry of Defense, Hans-Thilo Schmidt, who had already become an Ashe agent, began to transfer obsolete codes to French intelligence, which, according to his official duties, he needed to destroy, and also handed over instructions for using the military version of Enigma. . Among the reasons that prompted Hans-Thilo to do this were material reward, resentment towards his native country, which did not appreciate his successes during the First World War, and envy of the army career of his brother Rudolf Schmidt. The first two documents were "Gebrauchsanweisung für die Chiffriermaschine Enigma" and "Schlüsselanleitung für die Chiffriermaschine Enigma". French and British intelligence, however, showed no interest in the data received - perhaps it was believed that it was impossible to break the Enigma code. French intelligence Colonel Gustave Bertrand passed on the materials to the Polish "Cipher Bureau" and continued to pass on further information from the agent to them until the fall of 1939.

  1. patch panel settings; (German: Steckerverbindungen)
  2. rotor installation procedure; (German: Walzenlage)
  3. ring positions; (German: Ringstellung)
  4. initial rotor settings. (German: Kenngruppen)

However, the operator should not have used day key to encrypt messages. Instead, the operator came up with a new three-letter key (German: Spruchschlüssel) and twice encrypted it using the day key. After that, the settings of the rotors were changed in accordance with the invented key and the message was encrypted.

Marian's efforts focused on analyzing the vulnerability of the messaging protocol, namely message key replay. The first six letters were selected from daily messages and a correspondence table was compiled on their basis (examples taken from Singh's book):

Message 1 L O K R G M
Message 2 M V T X Z E
Message 3 J K T M P E
Message 4 D V Y P Z X
1st letter A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
4th letter P M R X

If there were enough messages, the table was filled completely.

1st letter A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
4th letter F Q H P L W O G B M V R X U Y C Z I T N J E A S D K

The peculiarity of the full version of the table was that while the day key remains unchanged, the contents of the table also do not change. And, with a high degree of probability, vice versa. It would be possible to create a catalog of tables... however, there are 26 of them!, which makes this work impossible in the foreseeable time. Rejewski began to try to identify some patterns from the tables or find some structural patterns. And he succeeded. He began to consider chains of letters of the following form:

1st letter A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
A → F → W → A
4th letter F Q H P L W O G B M V R X U Y C Z I T N J E A S D K

In the example of the full table above there were 4 such chains:

  1. A → F → W → A
  2. B → Q → Z → K → V → E → L → R → I → B
  3. C → H → G → O → Y → D → P → C
  4. J → M → X → S → T → N → U → J

Marian's next discovery was that although the specific letters depended entirely on the daily setting of the Enigma, the number of chains and letters in them was determined only by the settings of the rotors. Since the number of rotors was 3 (but they could be in any order), and the initial setting consisted of three letters of the Latin alphabet, the number of options was equal to 3!∗ 26 3 = 105456 (\displaystyle 3!*26^(3)=105456)

. This was significantly less than 26!, which made it possible, using built (or stolen) Enigma machines, to compile a catalog containing all possible chains. This work took almost a year, but the result was the ability to read German correspondence.

As Singh notes, it was the ability to divide the problem into two components (rotor settings and patch panel settings) that allowed Rejewski to cope with this task, as well as the help of both the Cypher Bureau mathematicians and Schmidt:

Once the rotor settings for the daytime message were restored, all that remained was to figure out the patch panel settings. From a cryptographic point of view, it was a simple monoalphabetic cipher, further limited to only 6 pairs of letter substitutions. The text often did not even need to be subjected to frequency cryptanalysis, but just to take a closer look at lines like “alliveinbelrin” (English arrive in Berlin with the replacement R ↔ L) and others, which were easy to recover “by eye.”

In 1934, Germany began changing the rotor position every month instead of every quarter. In response to this, Marian Rejewski designed a device called a "cyclometer" to quickly recreate a catalog of cycles.

On December 15, 1938, Germany added the 4th and 5th rotors, and on January 1, 1939, increased the number of patch panel connections from 6 to 10. All this made Enigma cryptanalysis significantly more difficult.

PC Bruno

British stage

Further work on breaking Enigma took place at the secret British intelligence center Station X, later known as Bletchley Park.

Military intelligence veteran Alistair Denniston was appointed project manager. The decryption work was led by Denniston's colleague in room No. 40, the famous linguist and cryptanalyst Alfred Knox ("Dilly" Knox). Mathematics professor Gordon Welchman was responsible for the overall organization of the work. Denniston began recruiting a staff of cryptanalysts based on mental ability: linguists, mathematicians, chess players, champion crossword puzzle solvers, Egyptologists, and even paleontologists. In particular, the famous chess master Stuart Milner-Barry was one of the first to be accepted. Among the mathematicians was a young professor of logic from Cambridge - Alan Turing.

Method

Interception of enemy radio messages was carried out by dozens of receiving stations codenamed “Y-station”. Thousands of such messages arrived at Bletchley Park every day. Bletchley Park had at its disposal an exact copy of Enigma, so decoding messages was reduced to selecting the installation of disks and, for later models, a plug switch. The difficulty of the task was compounded by the fact that the rotor settings changed daily, so the decryption services worked around the clock in three shifts.

The Enigma design, when used correctly, ensured almost complete secrecy. In practice, however, German Enigma users often made careless actions that gave hints to British analysts (such hints in the slang of English students were called cribs). It was on the use and systematization of such errors that the decryption method was based.

Hints were any frequently repeated texts, such as greetings, numbers (coded by pronunciation: “one”, “two”, etc.). All clues were entered into a card index (Index) along with the context: the radio operator’s handwriting, the place and time of transmission, etc.

In the absence of the required number of clues, especially on the eve of major operations, special measures were taken to obtain them. This technique was code-named “gardening” (English: gardening). For example, before the departure of the next polar convoy, demonstrative mining of a certain area of ​​the sea was carried out. If the enemy reported the results of mine clearance indicating previously known coordinates, this gave the desired clue.

Turing

One of the main theorists at Bletchley Park was Alan Turing. After studying the Polish materials, Turing came to the conclusion that using the previous approach with a complete search of messages would no longer work. Firstly, this would require the creation of more than 30 Polish-type machines, which was many times the annual budget of Station X, and secondly, it could be expected that Germany could correct the design flaw on which the Polish method was based. Therefore, he developed his own method based on enumerating sequences of characters in the source text.

Soon the Germans added a switching device to the Enigma design, thereby significantly expanding the number of code options. The problem that arose for the British was solved by Gordon Welchman, proposing the design of a “diagonal board”. As a result of this work, a cryptanalytic machine was built in August 1940 Bombe. Over time, more than 200 machines were installed at Bletchley Park, which made it possible to increase the decryption rate to two to three thousand messages per day.

Although the Bombe underwent some changes in detail, its overall appearance remained the same: a cabinet weighing about a ton, a front panel two by three meters and 36 groups of rotors on it, three in each. Using the machine required special skills, and was highly dependent on the qualifications of the operating personnel - volunteer girls from the Women’s Royal Naval Service (English). Subsequently, when some of the work was transferred to the USA, some of the employees were sent along with the technology.

"Live" information

From time to time, Germany made design changes to the machine or strengthened the cryptographic protection in some way. In such cases, cryptanalysts from Bletchley Park were powerless, and for further work it was urgently necessary to find a description of the changes or at least new copies of instructions and Enigma machines.

Secrecy

“This is my pockmarked hen that lays golden eggs but never clucks.”

Winston Churchill on Bletchley Park

The British government did everything possible to hide successes in deciphering German codes from both the enemy and the leadership of the USSR. To this end, all actions based on data from the Ultra program had to be accompanied by cover operations masking the true source of information. Thus, to transmit Ultra information to the USSR, the Swiss organization Lucy was used, which, according to legend, had a source at the top of the German leadership. The information received from Lucy was transmitted to the USSR by the resident of Soviet intelligence in Switzerland Sandor Rado.

To camouflage the Ultra, fictitious reconnaissance flights, radio games, etc. were used.

The existence of the Ultra program was known to a strictly limited circle of people, the number of which was about ten people. The necessary information was transmitted to its destination by a network of intelligence units assigned to the headquarters of the army and navy commanders. The source of the information was not disclosed, which sometimes led to the British command underestimating Ultra’s completely reliable information and causing major losses (See The sinking of the aircraft carrier Glories).

USSR

Among the information received by Great Britain was information about preparations for an invasion of the USSR. Despite the risk of revealing the source, the information was transferred to the Soviet government. However, Stalin did not believe in the possibility of an attack.

Outcome assessments

Some authors point out that from a modern point of view, the Enigma cipher was not very reliable. However, at one time its absolute reliability did not raise any doubts among German experts: until the very end of the war, the German command looked for the reasons for leaks of secret information anywhere, but not in the disclosure of Enigma. That is why the success of British codebreakers became a particularly valuable contribution to the victory over Nazism.

After the war

see also

Notes

  1. There were also mistakes: among those invited to the project was biologist Lieutenant Commander Geoffrey Tandi, a specialist in cryptogamers
  2. Max Newman, Tom Flowers and other specialists came to Bletchley Park later in connection with work on the Tunney cipher.
  3. The Enigma code was used not only by the army, air force and navy, but also by military intelligence (Abwehr), railways and other services. They all used their own rotor setups.
  4. An important design flaw was the inability to encode a letter with the same letter. This feature of Enigma was widely used in deciphering
  5. Turing noticed that the number “one” (German: Eins) occurs in 90% of messages. On this basis, a special decryption method was built - the “eins-algorithm”. Even the greeting was used as crib Heil Hitler and rude curses, which especially amused the numerous female staff of Bletchley Park
  6. The Polish machine was called a “bomb” (Polish: Bomba kryptologiczna - Cryptological bomb). In English bomb - bomb. Its name, according to one version, comes from the name of an ice cream dessert. Bombe glacée(“One theory was that bomba was named after the ice cream, bombe glacee, which was being eaten when the machine was invented.” // Enigma: The Battle for the Code, By Hugh Sebag-Montefiore, 2002, ISBN 978-0 -471-43721-5).
  7. Bombe was manufactured by British Tabulating Machines. (English); The design of the car was made by the company's chief designer, Harold Keene. Harold Keen).
  8. Machines and maintenance personnel were located outside Bletchley Park in the surrounding villages.
  9. The version of the refusal to protect Coventry in order to maintain the secrecy of Ultra is untrue and is based solely on the memories of F.W. Winterbottam, an RAF officer who did not have access to such information. Winterbottam's version has been repeatedly refuted by other memoirists and historians.
  10. The USSR had some information about the Ultra program from its agent at Bletchley Park - John Cairncross, one of the members of the Cambridge Five. The British were unaware of Cairncross's role until 1951.
  11. F. Winterbotham writes that later, for reasons of secrecy, the British did not share information. Thus, according to Winterbotham, the Wehrmacht in the USSR learned about the Kursk operation from other sources. It must be taken into account, however, that Winterbotham’s book was published before the declassification of the British archives on the decipherment of the Lorenz code (1975), and he himself, being an Air Force officer during the war, did not have access to secret information about Enigma. Archival materials clearly indicate the transfer of a detailed plan to Moscow

Based on materials from the dissertation “Encryption machines and decryption devices during the Second World War,” defended at the University of Chemnitz (Germany) in 2004.

Introduction. For the general public, the word “Enigma” (in Greek - a riddle) is synonymous with the concepts of “cipher machine” and “code breaking”, which has been taken care of by films about submarines and similar novels that have little to do with reality. Little is known to the general public about the fact that there were other encryption machines, for which special decryption machines were created to “break”, and about the consequences that this had in the Second World War.

And not surprisingly: there is too little information about this in popular publications. And the information available there is usually either insufficient or unreliable. This is all the more regrettable because the breaking of encryption codes was of extremely important historical significance for the course of the war, since the allies (in the anti-Hitler coalition), thanks to the information obtained in this way, had significant advantages, they were able to compensate for some omissions of the first half of the war and were able to optimally use their resources in the second half of the war. According to Anglo-American historians, if it had not been for the breaking of German encryption codes, the war would have lasted two years longer, additional casualties would have been required, and it is also possible that an atomic bomb would have been dropped on Germany.

But we will not deal with this issue, but will limit ourselves to the scientific, technical and organizational circumstances that contributed to the disclosure of German encryption codes. And what is especially important is how and why it was possible to develop machine methods of “hacking” and use them successfully.
Hacking the Enigma codes and the codes of other encryption machines provided the allies with access not only to military-tactical information, but also to information from the Foreign Ministry, police, SS and railway. This also includes reports from the Axis countries, especially Japanese diplomacy, and the Italian army. The Allies also received information about the internal situation in Germany and its allies.

In England alone, thousands of secret service personnel worked to decipher the codes. This work was personally supervised by the Prime Minister of England Winston Churchill, who knew about the importance of this work from the experience of the First World War, when he was the Secretary of the Navy of the British government. Already in November 1914, he ordered the deciphering of all intercepted enemy telegrams. He also ordered that previously intercepted telegrams be deciphered in order to understand the thinking of the German command. This is evidence of his foresight. The most famous result of this activity was forcing the US entry into the First World War.
Equally far-sighted was the creation of English listening stations - then a completely new idea - especially listening to the radio traffic of enemy ships.

Even then and in the period between the two world wars, Churchill equated such activities with a new type of weapon. Finally, it was clear that it was necessary to classify our own radio communications. And all this had to be kept secret from the enemy. There are great doubts that the leaders of the Third Reich realized all this. In the leadership of the Wehrmacht (OKW) there was a department with a small number of cryptologists and with the task of “developing methods for revealing enemy radio messages,” and we were talking about front-line radio reconnaissance officers, who were charged with providing front-line commanders with tactical information on their sector of the front. In the German army, the encryption machines used were assessed not by cryptologists (in terms of encryption quality and cracking capabilities), but by technical specialists.

The Allies followed the gradual improvement of German encryption technology and also improved methods of breaking encryption codes. The Germans attributed facts indicating the awareness of the Allies to betrayal and espionage. In addition, in the Third Reich there was often no clear subordination, and the encryption services of different branches of the military not only did not interact with each other, but also hid their skills from the cryptographers of other branches of the military, since “competition” was the order of the day. The Germans did not try to unravel the Allied encryption codes, since they had few cryptologists for this, and those that they had worked in isolation from each other. The experience of English cryptologists has shown that the joint work of a large team of cryptologists made it possible to solve almost all the assigned problems. Towards the end of the war, a gradual transition in the field of encryption began from machine-based work to computer-based work.

Encryption machines in military affairs were first used in Germany in 1926. This prompted Germany's potential adversaries to develop their own encryption and decryption methods. For example, Poland took up this issue, and first it had to develop the theoretical foundations of machine cryptology, since “manual” methods were not suitable for this. A future war would require thousands of radio messages to be deciphered every day. It was Polish specialists who were the first to begin work on machine cryptological analysis in 1930. After the outbreak of war and the occupation of Poland and France, this work was continued by English specialists. The theoretical work of the mathematician A. Turing was especially important here. Beginning in 1942, breaking encryption codes became extremely important, as the German command increasingly used radio communications to transmit its orders. It was necessary to develop completely new methods of cryptological analysis for decryption machines.

Historical reference.
Julius Caesar was the first to use text encryption. In the 9th century, the Arab scholar Al-Kindi first considered the problem of text decipherment. The work of Italian mathematicians of the 15th and 16th centuries was devoted to the development of encryption methods. The first mechanical device was invented in 1786 by a Swedish diplomat; such a device was also at the disposal of the American President Jefferson in 1795. Only in 1922 this device was improved by the American army cryptologist Mauborn. It was used to encrypt tactical messages until the outbreak of World War II. Patents for improving usability (but not for encryption security) were issued by the US Patent Office starting in 1915. All this was supposed to be used to encrypt business correspondence. Despite numerous improvements in devices, it was clear that only short text encryption was reliable.

At the end of the First World War and in the first years after it, several inventions appeared, created by amateurs for whom this was a kind of hobby. Let's name two of them: Hebern and Vernam, both Americans, neither of them, most likely, had ever heard of the science of cryptology. The latter of the two even implemented some operations of Boolean logic, which at that time few people knew about except professional mathematicians. Professional cryptologists began further improving these encryption machines, which made it possible to increase their security against hacking.

Since 1919 German designers also began to patent their developments; one of the first was the future inventor of the Enigma, Arthur Scherbius (1878 - 1929). Four variants of similar machines were developed, but there was no commercial interest in them, probably because the machines were expensive and difficult to maintain. Neither the Navy nor the Ministry of Foreign Affairs accepted the inventor's proposals, so he tried to offer his encryption machine to the civilian sectors of the economy. The army and the Foreign Ministry continued to use ledger encryption.

Arthur Scherbius went to work for the company that bought his patent for an encryption machine. This company continued to improve Enigma even after the death of its author. In the second version (Enigma B), the machine was a modified electric typewriter, on one side it was equipped with an encryption device in the form of 4 replaceable rotors. The company widely displayed the machine and advertised it as unhackable. Reichswehr officers became interested in her. The fact is that in 1923, Churchill’s memoirs were published, in which he talked about his cryptological successes. This shocked the leadership of the German army. German officers learned that most of their military and diplomatic communications had been deciphered by British and French experts! And that this success was largely determined by the weakness of amateurish encryption, invented by amateur cryptologists, since German military cryptology simply did not exist. Naturally, they began to look for strong encryption methods for military communications. Therefore, they became interested in Enigma.

Enigma had several modifications: A, B, C, etc. Modification C could perform both encryption and decryption of messages; it did not require complex maintenance. But its products were not yet resistant to hacking, because the creators were not advised by professional cryptologists. It was used by the German Navy from 1926 to 1934. The next modification, Enigma D, was also a commercial success. Subsequently, since 1940, it was used in railway transport in the occupied areas of Eastern Europe.
In 1934 The German navy began to use another modification of Enigma I.

It is curious that Polish cryptologists tried to decrypt German radio messages classified by this machine, and the results of this work somehow became known to German intelligence. At first, the Poles were successful, but the German intelligence “watching” them reported this to their cryptologists, and they changed the codes. When it turned out that Polish cryptologists were unable to crack messages encrypted with Enigma -1, the ground forces, the Wehrmacht, also began to use this machine. After some improvement, it was this encryption machine that became the main one in the Second World War. Since 1942, the German submarine fleet adopted the Enigma-4 modification.

Gradually, by July 1944, control over the encryption business passed from the hands of the Wehrmacht to the roof of the SS, the main role here was played by competition between these branches of the armed forces. From the very first days of WWII, the armies of the USA, Sweden, Finland, Norway, Italy and other countries were saturated with encryption machines. In Germany, machine designs are constantly being improved. The main difficulty in this case was caused by the inability to find out whether the enemy was able to decipher texts encrypted by a given machine. Enigma of various modifications was introduced at levels above the division, it continued to be produced after the war (model “Schlüsselkasten 43”) in Chemnitz: in October 1945. 1,000 pieces were produced in January 1946. - already 10,000 pieces!

Telegraph, historical information.
The advent of electric current caused the rapid development of telegraphy, which, not coincidentally, occurred in the 19th century in parallel with industrialization. The driving force was the railways, which used the telegraph for the needs of railway traffic, for which all kinds of devices such as pointers were developed. Steinhel's device appeared in 1836, and in 1840 it was developed by Samuel MORSE. Further improvements came in the form of the Siemens and Halske printing telegraph (Siemens & Halske, 1850), which converted received electrical impulses into readable type. And invented in 1855. The printing wheel, after a number of improvements, was still used by Hughes in the 20th century.

The next important invention for accelerating the transfer of information was created in 1867 by Wheatstone: punched tape with Morse code, which the device felt mechanically. The further development of telegraphy was hampered by insufficient use of wire capacity. The first attempt was made by B. Meyer in 1871, but it failed because the different lengths and number of pulses in Morse letters prevented it. But in 1874, the French engineer Emile Baudot managed to solve this problem. This solution became the standard for the next 100 years. Baudot's method had two important features. Firstly, it was the first step towards the use of binary calculus. And secondly, it was the first reliable multi-channel data transmission system.

The further development of telegraphy rested on the need to deliver telegrams using postmen. A different organizational system was required, which would include: a device in every house, its maintenance by special personnel, receiving telegrams without the help of staff, constant connection to the line, issuing texts page by page. Such a device would have prospects of success only in the USA. In Europe, until 1929, the postal monopoly prevented the appearance of any private device for transmitting messages; they had to be installed only at the post office.

The first step in this direction was taken in 1901 by the Australian Donald Murray. In particular, he modified Baudot's code. This modification was the standard until 1931. He did not have commercial success, since he did not dare to patent his invention in the USA. In the USA, two American inventors competed with each other: Howard Krum and E.E. Kleinschmidt. Subsequently, they merged into one company in Chicago, which began producing equipment in 1024, which enjoyed commercial success. The German company Lorenz imported several of their machines, installed them in post offices and obtained a license for their production in Germany. Since 1929, the postal monopoly in Germany was abolished, and private individuals gained access to telegraph channels. The introduction of international standards for telegraph channels in 1931 made it possible to organize telegraph communications with the whole world. The same devices began to be produced in 1927 by Siemens and Halske.

The first person to combine a telegraph with an encryption machine was 27-year-old American Gilbert Vernam, an employee of the ATT company. In 1918 he applied for a patent in which he empirically used Boolean algebra (which, by the way, he had no idea about and which was then being studied by several mathematicians around the world).
The American officer William Friedman made a great contribution to cryptology; he made American encryption machines virtually unbreakable.

When telegraph devices from Siemens and Halske appeared in Germany, the German Navy became interested in them. But its leadership was still under the impression that the British had cracked the German codes and read their messages during the First World War. Therefore, they demanded to connect the telegraph apparatus with a encryption machine. This was a completely new idea at the time, because encryption in Germany was done manually and only then were the encrypted texts transmitted.

In the USA, this requirement was met by Vernam devices. In Germany, the company Siemens and Halske took on this work. They filed the first open patent on this topic in July 1930. By 1932 a workable device was created, which at first was freely sold, but since 1934. was classified. Since 1936 These devices began to be used in aviation, and since 1941. - and ground forces. Since 1942 Machine encryption of radio messages began.

The Germans continued to improve various models of encryption machines, but they put the improvement of the mechanical part in the first place, treating cryptology in an amateurish manner; manufacturing companies did not involve professional cryptologists for consultations. Of great importance for all these problems were the works of the American mathematician Claude Shannon, who was well-read since 1942. worked at Bell Laboratories and conducted secret mathematical research there. Even before the war, he was famous for proving the analogy between Boolean algebra and relay connections in telephony. It was he who discovered the “bit” as a unit of information. After the war, in 1948. Shannon wrote his main work, The Mathematical Theory of Communications. After this he became a professor of mathematics at the university.

Shannon was the first to consider the mathematical model of cryptology and developed the analysis of encrypted texts using information theoretical methods. The fundamental question of his theory is: “How much information does ciphertext contain compared to plaintext?” In 1949, he published the work “The Theory of Communications of Secret Systems,” in which he answered this question. The analysis carried out there was the first and only to quantify the strength of an encryption method. Post-war analysis showed that neither German nor Japanese encryption machines were unbreakable. In addition, there are other sources of information (for example, intelligence) that greatly simplify the decryption task.

England's position forced it to exchange long cipher texts with the United States; it was the great length that made deciphering them possible. In a special department of the British secret service M 16, a method was developed that increased the degree of secrecy of the message - ROCKEX. The American encryption method for the Foreign Office was broken by German experts and the corresponding messages were decrypted. Having learned about this, the United States in 1944. replaced an imperfect system with a more reliable one. Around the same time, the German Wehrmacht, Navy and Foreign Ministry also exchanged encryption technology for newly developed ones. Soviet encryption methods were also insufficiently reliable, which is why they were hacked by American services and many Soviet intelligence officers involved in espionage for the American atomic bomb were identified (Operation Venona - breaking).

Breaking into.
Now let's talk about the British HACKING German encryption machines, that is, the machine unraveling of the method of encrypting texts in them. . This work received the English name ULTRA. Non-machine decryption methods were too labor-intensive and unacceptable in war conditions. How were the English deciphering machines constructed, without which the Allies could not have achieved an advantage over the German codebreakers? What information and textual material did they need? And was there a German mistake here, and if so, why did it happen?

First, the scientific and technical basics.
First, preliminary scientific work was carried out, since it was necessary, first of all, to analyze the algorithms cryptologically and mathematically. This was possible because encryption was widely used by the German Wehrmacht. Such analysis required not only ciphertexts obtained through eavesdropping, but also plaintexts obtained through espionage or theft. In addition, different texts were needed, encrypted in the same way. At the same time, a linguistic analysis of the language of the military and diplomats was carried out. Given long texts, it became possible to mathematically establish an algorithm even for an unfamiliar cipher machine. Then they managed to reconstruct the car.

For this work, the British brought together approximately 10,000 people, including mathematicians, engineers, linguists, translators, military experts, and other employees to sort the data, check it, archive it, and maintain the machines. This association was called BP (Bletchley Park) and was under the personal control of Churchill. The information received turned out to be a powerful weapon in the hands of the Allies.

How did the British master the Wehrmacht Enigma? Poland was the first to decipher German codes. After the First World War, it was in constant military danger from both of its neighbors - Germany and the USSR, who dreamed of regaining the lands lost and transferred to Poland. To avoid surprises, the Poles recorded radio messages and deciphered them. They were greatly alarmed that after the introduction in February 1926. in the German Navy Enigma C, as well as after its introduction in the ground forces in July 1928. they were unable to decipher messages encrypted by this machine.

Then the BS4 department of the Polish General Staff assumed that the Germans had acquired machine encryption, especially since the early commercial versions of Enigma were known to them. Polish intelligence confirmed that in the Wehrmacht from June 1, 1930. Enigma 1 is used. Polish military experts were unable to decipher German messages. Even having received Enigma documents through their agents, they could not achieve success. They concluded that there was a lack of scientific knowledge. Then they commissioned three mathematicians, one of whom studied in Göttingen, to create a system of analysis. All three received additional training at the University of Poznan and spoke fluent German. They managed to reproduce the Enigma device and create a copy of it in Warsaw. Let us note the outstanding achievements of one of them, the Polish mathematician M. Rejewski (1905 - 1980). Although the Wehrmacht constantly improved the encryption of its messages, Polish specialists succeeded until January 1, 1939. decipher them. After this, the Poles began to cooperate with the allies, to whom they had not previously communicated anything. Such cooperation was already advisable in view of the obvious military danger. July 25, 1939 they conveyed to the English and French representatives all the information they knew. On August 16 of the same year, the Polish “gift” reached England, and English experts from the newly created BP Decoding Center began working with it.

British cryptologists were reduced after the First World War, remaining only under the roof of the Foreign Office. During the war in Spain, the Germans used Enigma D, and the remaining English cryptologists, under the leadership of the outstanding philologist Alfred Dillwyn (1885-1943), continued to work on deciphering German messages. But purely mathematical methods were not enough. By this time, at the end of 1938. Cambridge mathematician Alan Turing was among the visitors to the English cryptographer training courses. He took part in the attacks on Enigma 1. He created an analysis model known as the “Turing machine”, which made it possible to assert that a decryption algorithm definitely exists, all that remained was to discover it!

Thüring was included in the BP as a person liable for military service. By May 1, 1940 he achieved serious success: he took advantage of the fact that every day at 6 o'clock in the morning the German weather service transmitted an encrypted weather forecast. It is clear that it necessarily contained the word "wetter" (Wetter), and that the strict rules of German grammar determined its exact position in the sentence. This allowed him to ultimately come to a solution to the problem of breaking the Enigma, and he created an electromechanical device for this. The idea came to him in early 1940, and in May of the same year, with the help of a group of engineers, such a device was created. The task of decoding was made easier by the fact that the language of German radio messages was simple, expressions and individual words were often repeated. German officers did not know the basics of cryptology, considering it unimportant.

The British military, and especially Churchill personally, demanded constant attention to deciphering messages. Since the summer of 1940 The British deciphered all messages encrypted using Enigma. Nevertheless, English specialists were constantly improving decryption technology. By the end of the war, British codebreakers had 211 decryption devices working around the clock. They were served by 265 mechanics, and 1,675 women were recruited for duty. The work of the creators of these machines was appreciated many years later, when they tried to recreate one of them: due to the lack of necessary personnel at that time, the work on recreating the famous machine lasted several years and remained unfinished!

The instructions for creating decryption devices created by Dühring at that time were banned until 1996... Among the means of decryption was the method of “forced” information: for example, British planes destroyed the pier in the port of Calle, knowing in advance that the German services would report this with a set of information known in advance to the British words! In addition, German services transmitted this message many times, each time encoding it with different codes, but word for word...

Finally, the most important front for England was the submarine war, where the Germans used a new modification of the Enigma M3. The British fleet was able to remove such a vehicle from a captured German submarine. On February 1, 1942, the German Navy switched to using the M4 model. But some German messages, encrypted in the old way, mistakenly contained information about the design features of this new machine. This made the task much easier for Thuring's team. Already in December 1942. Enigma M4 was cracked. On December 13, 1942, the British Admiralty received precise data on the location of 12 German submarines in the Atlantic...

According to Turing, to speed up decryption it was necessary to switch to the use of electronics, since electromechanical relay devices did not perform this procedure quickly enough. On November 7, 1942, Turing went to the United States, where, together with a team from Bell Laboratories, he created an apparatus for top-secret negotiations between Churchill and Roosevelt. At the same time, under his leadership, American decryption machines were improved, so that Enigma M4 was finally cracked and until the end of the war it provided the British and Americans with comprehensive intelligence information. Only in November 1944 did the German command have doubts about the reliability of their encryption technology, but this did not lead to any measures...

(Translator's note: Since, starting from 1943, the head of British counterintelligence was the Soviet intelligence officer Kim Philby, all information immediately came to the USSR! Some of this information was transmitted to the Soviet Union both officially through the British bureau in Moscow, and also semi-officially through the Soviet resident in Switzerland, Alexander Rado.)

Chiffriermaschinen und Entzifferungsgeräte
im Zweiten Weltkrieg:
Technikgeschichte und informatikhistorische Aspekte
Von der Philosophischen Fakultät der Technischen Universität Chemnitz genehmigte
Dissertation
zur Erlangung des akademischen Grades doctor philosophiae (Dr.phil.)
von Dipl.-Ing.Michael Pröse

Based on materials from the dissertation “Encryption machines and decryption devices during the Second World War,” defended at the University of Chemnitz (Germany) in 2004.

Introduction. For the general public, the word “Enigma” (in Greek - a riddle) is synonymous with the concepts of “cipher machine” and “code breaking”, which has been taken care of by films about submarines and similar novels that have little to do with reality. Little is known to the general public about the fact that there were other encryption machines, for which special decryption machines were created to “break”, and about the consequences that this had in the Second World War.

And not surprisingly: there is too little information about this in popular publications. And the information available there is usually either insufficient or unreliable. This is all the more regrettable because the breaking of encryption codes was of extremely important historical significance for the course of the war, since the allies (in the anti-Hitler coalition), thanks to the information obtained in this way, had significant advantages, they were able to compensate for some omissions of the first half of the war and were able to optimally use their resources in the second half of the war. According to Anglo-American historians, if it had not been for the breaking of German encryption codes, the war would have lasted two years longer, additional casualties would have been required, and it is also possible that an atomic bomb would have been dropped on Germany.

But we will not deal with this issue, but will limit ourselves to the scientific, technical and organizational circumstances that contributed to the disclosure of German encryption codes. And what is especially important is how and why it was possible to develop machine methods of “hacking” and use them successfully.
Hacking the Enigma codes and the codes of other encryption machines provided the allies with access not only to military-tactical information, but also to information from the Foreign Ministry, police, SS and railway. This also includes reports from the Axis countries, especially Japanese diplomacy, and the Italian army. The Allies also received information about the internal situation in Germany and its allies.

In England alone, thousands of secret service personnel worked to decipher the codes. This work was personally supervised by the Prime Minister of England Winston Churchill, who knew about the importance of this work from the experience of the First World War, when he was the Secretary of the Navy of the British government. Already in November 1914, he ordered the deciphering of all intercepted enemy telegrams. He also ordered that previously intercepted telegrams be deciphered in order to understand the thinking of the German command. This is evidence of his foresight. The most famous result of this activity was forcing the US entry into the First World War.
Equally far-sighted was the creation of English listening stations - then a completely new idea - especially listening to the radio traffic of enemy ships.

Even then and in the period between the two world wars, Churchill equated such activities with a new type of weapon. Finally, it was clear that it was necessary to classify our own radio communications. And all this had to be kept secret from the enemy. There are great doubts that the leaders of the Third Reich realized all this. In the leadership of the Wehrmacht (OKW) there was a department with a small number of cryptologists and with the task of “developing methods for revealing enemy radio messages,” and we were talking about front-line radio reconnaissance officers, who were charged with providing front-line commanders with tactical information on their sector of the front. In the German army, the encryption machines used were assessed not by cryptologists (in terms of encryption quality and cracking capabilities), but by technical specialists.

The Allies followed the gradual improvement of German encryption technology and also improved methods of breaking encryption codes. The Germans attributed facts indicating the awareness of the Allies to betrayal and espionage. In addition, in the Third Reich there was often no clear subordination, and the encryption services of different branches of the military not only did not interact with each other, but also hid their skills from the cryptographers of other branches of the military, since “competition” was the order of the day. The Germans did not try to unravel the Allied encryption codes, since they had few cryptologists for this, and those that they had worked in isolation from each other. The experience of English cryptologists has shown that the joint work of a large team of cryptologists made it possible to solve almost all the assigned problems. Towards the end of the war, a gradual transition in the field of encryption began from machine-based work to computer-based work.

Encryption machines in military affairs were first used in Germany in 1926. This prompted Germany's potential adversaries to develop their own encryption and decryption methods. For example, Poland took up this issue, and first it had to develop the theoretical foundations of machine cryptology, since “manual” methods were not suitable for this. A future war would require thousands of radio messages to be deciphered every day. It was Polish specialists who were the first to begin work on machine cryptological analysis in 1930. After the outbreak of war and the occupation of Poland and France, this work was continued by English specialists. The theoretical work of the mathematician A. Turing was especially important here. Beginning in 1942, breaking encryption codes became extremely important, as the German command increasingly used radio communications to transmit its orders. It was necessary to develop completely new methods of cryptological analysis for decryption machines.

Historical reference.
Julius Caesar was the first to use text encryption. In the 9th century, the Arab scholar Al-Kindi first considered the problem of text decipherment. The work of Italian mathematicians of the 15th and 16th centuries was devoted to the development of encryption methods. The first mechanical device was invented in 1786 by a Swedish diplomat; such a device was also at the disposal of the American President Jefferson in 1795. Only in 1922 this device was improved by the American army cryptologist Mauborn. It was used to encrypt tactical messages until the outbreak of World War II. Patents for improving usability (but not for encryption security) were issued by the US Patent Office starting in 1915. All this was supposed to be used to encrypt business correspondence. Despite numerous improvements in devices, it was clear that only short text encryption was reliable.

At the end of the First World War and in the first years after it, several inventions appeared, created by amateurs for whom this was a kind of hobby. Let's name two of them: Hebern and Vernam, both Americans, neither of them, most likely, had ever heard of the science of cryptology. The latter of the two even implemented some operations of Boolean logic, which at that time few people knew about except professional mathematicians. Professional cryptologists began further improving these encryption machines, which made it possible to increase their security against hacking.

Since 1919 German designers also began to patent their developments; one of the first was the future inventor of the Enigma, Arthur Scherbius (1878 - 1929). Four variants of similar machines were developed, but there was no commercial interest in them, probably because the machines were expensive and difficult to maintain. Neither the Navy nor the Ministry of Foreign Affairs accepted the inventor's proposals, so he tried to offer his encryption machine to the civilian sectors of the economy. The army and the Foreign Ministry continued to use ledger encryption.

Arthur Scherbius went to work for the company that bought his patent for an encryption machine. This company continued to improve Enigma even after the death of its author. In the second version (Enigma B), the machine was a modified electric typewriter, on one side it was equipped with an encryption device in the form of 4 replaceable rotors. The company widely displayed the machine and advertised it as unhackable. Reichswehr officers became interested in her. The fact is that in 1923, Churchill’s memoirs were published, in which he talked about his cryptological successes. This shocked the leadership of the German army. German officers learned that most of their military and diplomatic communications had been deciphered by British and French experts! And that this success was largely determined by the weakness of amateurish encryption, invented by amateur cryptologists, since German military cryptology simply did not exist. Naturally, they began to look for strong encryption methods for military communications. Therefore, they became interested in Enigma.

Enigma had several modifications: A, B, C, etc. Modification C could perform both encryption and decryption of messages; it did not require complex maintenance. But its products were not yet resistant to hacking, because the creators were not advised by professional cryptologists. It was used by the German Navy from 1926 to 1934. The next modification, Enigma D, was also a commercial success. Subsequently, since 1940, it was used in railway transport in the occupied areas of Eastern Europe.
In 1934 The German navy began to use another modification of Enigma I.

It is curious that Polish cryptologists tried to decrypt German radio messages classified by this machine, and the results of this work somehow became known to German intelligence. At first, the Poles were successful, but the German intelligence “watching” them reported this to their cryptologists, and they changed the codes. When it turned out that Polish cryptologists were unable to crack messages encrypted with Enigma -1, the ground forces, the Wehrmacht, also began to use this machine. After some improvement, it was this encryption machine that became the main one in the Second World War. Since 1942, the German submarine fleet adopted the Enigma-4 modification.

Gradually, by July 1944, control over the encryption business passed from the hands of the Wehrmacht to the roof of the SS, the main role here was played by competition between these branches of the armed forces. From the very first days of WWII, the armies of the USA, Sweden, Finland, Norway, Italy and other countries were saturated with encryption machines. In Germany, machine designs are constantly being improved. The main difficulty in this case was caused by the inability to find out whether the enemy was able to decipher texts encrypted by a given machine. Enigma of various modifications was introduced at levels above the division, it continued to be produced after the war (model “Schlüsselkasten 43”) in Chemnitz: in October 1945. 1,000 pieces were produced in January 1946. - already 10,000 pieces!

Telegraph, historical information.
The advent of electric current caused the rapid development of telegraphy, which, not coincidentally, occurred in the 19th century in parallel with industrialization. The driving force was the railways, which used the telegraph for the needs of railway traffic, for which all kinds of devices such as pointers were developed. Steinhel's device appeared in 1836, and in 1840 it was developed by Samuel MORSE. Further improvements came in the form of the Siemens and Halske printing telegraph (Siemens & Halske, 1850), which converted received electrical impulses into readable type. And invented in 1855. The printing wheel, after a number of improvements, was still used by Hughes in the 20th century.

The next important invention for accelerating the transfer of information was created in 1867 by Wheatstone: punched tape with Morse code, which the device felt mechanically. The further development of telegraphy was hampered by insufficient use of wire capacity. The first attempt was made by B. Meyer in 1871, but it failed because the different lengths and number of pulses in Morse letters prevented it. But in 1874, the French engineer Emile Baudot managed to solve this problem. This solution became the standard for the next 100 years. Baudot's method had two important features. Firstly, it was the first step towards the use of binary calculus. And secondly, it was the first reliable multi-channel data transmission system.

The further development of telegraphy rested on the need to deliver telegrams using postmen. A different organizational system was required, which would include: a device in every house, its maintenance by special personnel, receiving telegrams without the help of staff, constant connection to the line, issuing texts page by page. Such a device would have prospects of success only in the USA. In Europe, until 1929, the postal monopoly prevented the appearance of any private device for transmitting messages; they had to be installed only at the post office.

The first step in this direction was taken in 1901 by the Australian Donald Murray. In particular, he modified Baudot's code. This modification was the standard until 1931. He did not have commercial success, since he did not dare to patent his invention in the USA. In the USA, two American inventors competed with each other: Howard Krum and E.E. Kleinschmidt. Subsequently, they merged into one company in Chicago, which began producing equipment in 1024, which enjoyed commercial success. The German company Lorenz imported several of their machines, installed them in post offices and obtained a license for their production in Germany. Since 1929, the postal monopoly in Germany was abolished, and private individuals gained access to telegraph channels. The introduction of international standards for telegraph channels in 1931 made it possible to organize telegraph communications with the whole world. The same devices began to be produced in 1927 by Siemens and Halske.

The first person to combine a telegraph with an encryption machine was 27-year-old American Gilbert Vernam, an employee of the ATT company. In 1918 he applied for a patent in which he empirically used Boolean algebra (which, by the way, he had no idea about and which was then being studied by several mathematicians around the world).
The American officer William Friedman made a great contribution to cryptology; he made American encryption machines virtually unbreakable.

When telegraph devices from Siemens and Halske appeared in Germany, the German Navy became interested in them. But its leadership was still under the impression that the British had cracked the German codes and read their messages during the First World War. Therefore, they demanded to connect the telegraph apparatus with a encryption machine. This was a completely new idea at the time, because encryption in Germany was done manually and only then were the encrypted texts transmitted.

In the USA, this requirement was met by Vernam devices. In Germany, the company Siemens and Halske took on this work. They filed the first open patent on this topic in July 1930. By 1932 a workable device was created, which at first was freely sold, but since 1934. was classified. Since 1936 These devices began to be used in aviation, and since 1941. - and ground forces. Since 1942 Machine encryption of radio messages began.

The Germans continued to improve various models of encryption machines, but they put the improvement of the mechanical part in the first place, treating cryptology in an amateurish manner; manufacturing companies did not involve professional cryptologists for consultations. Of great importance for all these problems were the works of the American mathematician Claude Shannon, who was well-read since 1942. worked at Bell Laboratories and conducted secret mathematical research there. Even before the war, he was famous for proving the analogy between Boolean algebra and relay connections in telephony. It was he who discovered the “bit” as a unit of information. After the war, in 1948. Shannon wrote his main work, The Mathematical Theory of Communications. After this he became a professor of mathematics at the university.

Shannon was the first to consider the mathematical model of cryptology and developed the analysis of encrypted texts using information theoretical methods. The fundamental question of his theory is: “How much information does ciphertext contain compared to plaintext?” In 1949, he published the work “The Theory of Communications of Secret Systems,” in which he answered this question. The analysis carried out there was the first and only to quantify the strength of an encryption method. Post-war analysis showed that neither German nor Japanese encryption machines were unbreakable. In addition, there are other sources of information (for example, intelligence) that greatly simplify the decryption task.

England's position forced it to exchange long cipher texts with the United States; it was the great length that made deciphering them possible. In a special department of the British secret service M 16, a method was developed that increased the degree of secrecy of the message - ROCKEX. The American encryption method for the Foreign Office was broken by German experts and the corresponding messages were decrypted. Having learned about this, the United States in 1944. replaced an imperfect system with a more reliable one. Around the same time, the German Wehrmacht, Navy and Foreign Ministry also exchanged encryption technology for newly developed ones. Soviet encryption methods were also insufficiently reliable, which is why they were hacked by American services and many Soviet intelligence officers involved in espionage for the American atomic bomb were identified (Operation Venona - breaking).

Breaking into.
Now let's talk about the British HACKING German encryption machines, that is, the machine unraveling of the method of encrypting texts in them. . This work received the English name ULTRA. Non-machine decryption methods were too labor-intensive and unacceptable in war conditions. How were the English deciphering machines constructed, without which the Allies could not have achieved an advantage over the German codebreakers? What information and textual material did they need? And was there a German mistake here, and if so, why did it happen?

First, the scientific and technical basics.
First, preliminary scientific work was carried out, since it was necessary, first of all, to analyze the algorithms cryptologically and mathematically. This was possible because encryption was widely used by the German Wehrmacht. Such analysis required not only ciphertexts obtained through eavesdropping, but also plaintexts obtained through espionage or theft. In addition, different texts were needed, encrypted in the same way. At the same time, a linguistic analysis of the language of the military and diplomats was carried out. Given long texts, it became possible to mathematically establish an algorithm even for an unfamiliar cipher machine. Then they managed to reconstruct the car.

For this work, the British brought together approximately 10,000 people, including mathematicians, engineers, linguists, translators, military experts, and other employees to sort the data, check it, archive it, and maintain the machines. This association was called BP (Bletchley Park) and was under the personal control of Churchill. The information received turned out to be a powerful weapon in the hands of the Allies.

How did the British master the Wehrmacht Enigma? Poland was the first to decipher German codes. After the First World War, it was in constant military danger from both of its neighbors - Germany and the USSR, who dreamed of regaining the lands lost and transferred to Poland. To avoid surprises, the Poles recorded radio messages and deciphered them. They were greatly alarmed that after the introduction in February 1926. in the German Navy Enigma C, as well as after its introduction in the ground forces in July 1928. they were unable to decipher messages encrypted by this machine.

Then the BS4 department of the Polish General Staff assumed that the Germans had acquired machine encryption, especially since the early commercial versions of Enigma were known to them. Polish intelligence confirmed that in the Wehrmacht from June 1, 1930. Enigma 1 is used. Polish military experts were unable to decipher German messages. Even having received Enigma documents through their agents, they could not achieve success. They concluded that there was a lack of scientific knowledge. Then they commissioned three mathematicians, one of whom studied in Göttingen, to create a system of analysis. All three received additional training at the University of Poznan and spoke fluent German. They managed to reproduce the Enigma device and create a copy of it in Warsaw. Let us note the outstanding achievements of one of them, the Polish mathematician M. Rejewski (1905 - 1980). Although the Wehrmacht constantly improved the encryption of its messages, Polish specialists succeeded until January 1, 1939. decipher them. After this, the Poles began to cooperate with the allies, to whom they had not previously communicated anything. Such cooperation was already advisable in view of the obvious military danger. July 25, 1939 they conveyed to the English and French representatives all the information they knew. On August 16 of the same year, the Polish “gift” reached England, and English experts from the newly created BP Decoding Center began working with it.

British cryptologists were reduced after the First World War, remaining only under the roof of the Foreign Office. During the war in Spain, the Germans used Enigma D, and the remaining English cryptologists, under the leadership of the outstanding philologist Alfred Dillwyn (1885-1943), continued to work on deciphering German messages. But purely mathematical methods were not enough. By this time, at the end of 1938. Cambridge mathematician Alan Turing was among the visitors to the English cryptographer training courses. He took part in the attacks on Enigma 1. He created an analysis model known as the “Turing machine”, which made it possible to assert that a decryption algorithm definitely exists, all that remained was to discover it!

Thüring was included in the BP as a person liable for military service. By May 1, 1940 he achieved serious success: he took advantage of the fact that every day at 6 o'clock in the morning the German weather service transmitted an encrypted weather forecast. It is clear that it necessarily contained the word "wetter" (Wetter), and that the strict rules of German grammar determined its exact position in the sentence. This allowed him to ultimately come to a solution to the problem of breaking the Enigma, and he created an electromechanical device for this. The idea came to him in early 1940, and in May of the same year, with the help of a group of engineers, such a device was created. The task of decoding was made easier by the fact that the language of German radio messages was simple, expressions and individual words were often repeated. German officers did not know the basics of cryptology, considering it unimportant.

The British military, and especially Churchill personally, demanded constant attention to deciphering messages. Since the summer of 1940 The British deciphered all messages encrypted using Enigma. Nevertheless, English specialists were constantly improving decryption technology. By the end of the war, British codebreakers had 211 decryption devices working around the clock. They were served by 265 mechanics, and 1,675 women were recruited for duty. The work of the creators of these machines was appreciated many years later, when they tried to recreate one of them: due to the lack of necessary personnel at that time, the work on recreating the famous machine lasted several years and remained unfinished!

The instructions for creating decryption devices created by Dühring at that time were banned until 1996... Among the means of decryption was the method of “forced” information: for example, British planes destroyed the pier in the port of Calle, knowing in advance that the German services would report this with a set of information known in advance to the British words! In addition, German services transmitted this message many times, each time encoding it with different codes, but word for word...

Finally, the most important front for England was the submarine war, where the Germans used a new modification of the Enigma M3. The British fleet was able to remove such a vehicle from a captured German submarine. On February 1, 1942, the German Navy switched to using the M4 model. But some German messages, encrypted in the old way, mistakenly contained information about the design features of this new machine. This made the task much easier for Thuring's team. Already in December 1942. Enigma M4 was cracked. On December 13, 1942, the British Admiralty received precise data on the location of 12 German submarines in the Atlantic...

According to Turing, to speed up decryption it was necessary to switch to the use of electronics, since electromechanical relay devices did not perform this procedure quickly enough. On November 7, 1942, Turing went to the United States, where, together with a team from Bell Laboratories, he created an apparatus for top-secret negotiations between Churchill and Roosevelt. At the same time, under his leadership, American decryption machines were improved, so that Enigma M4 was finally cracked and until the end of the war it provided the British and Americans with comprehensive intelligence information. Only in November 1944 did the German command have doubts about the reliability of their encryption technology, but this did not lead to any measures...

(Translator's note: Since, starting from 1943, the head of British counterintelligence was the Soviet intelligence officer Kim Philby, all information immediately came to the USSR! Some of this information was transmitted to the Soviet Union both officially through the British bureau in Moscow, and also semi-officially through the Soviet resident in Switzerland, Alexander Rado.)

Chiffriermaschinen und Entzifferungsgeräte
im Zweiten Weltkrieg:
Technikgeschichte und informatikhistorische Aspekte
Von der Philosophischen Fakultät der Technischen Universität Chemnitz genehmigte
Dissertation
zur Erlangung des akademischen Grades doctor philosophiae (Dr.phil.)
von Dipl.-Ing.Michael Pröse

All specialists unanimously agreed that a reading is impossible.
Admiral Kurt Fricke, Chief of Naval War Command

Enigma is a rotary cipher machine used by Nazi Germany during World War II. The impact it had on the course of the war made the breaking of Enigma perhaps the most remarkable moment in the centuries-long history of cryptanalysis. In this topic I would like to talk about the hacking method used at Bletchley Park, as well as describe the structure of the machine itself.

Rotary machines

The first use of rotary cipher machines began in the early 20th century. The main component of such devices is a disk (aka rotor) with 26 electrical contacts on both sides of the disk. Each contact corresponded to a letter of the English alphabet. Connecting the contacts of the left and right sides implemented a simple substitution cipher. As the disk rotated, the contacts shifted, thereby changing the substitution for each letter. One disk provided 26 different substitutions. This means that when encrypting the same character, the resulting sequence begins to repeat itself after 26 steps.
To increase the sequence period, multiple rotors can be used in series. When one of the disks completes a full revolution, the next disk moves one position. This increases the sequence length to 26 n, where n is the number of rotors connected in series.
As an example, consider the following image of a simplified rotary machine:

The given machine consists of a keyboard (for entering a character), three disks, an indicator (for displaying cryptotext) and implements the encryption of 4 characters: A, B, C, D. In the initial position, the first disk implements the substitution: A-C; B-A; C-B; D-D. The substitutions of the second and third disks are A-B; B-C; C-A; D-D and A-A; B-C; C-B; D-D respectively.
When you press the letter B on the keyboard, an electrical circuit is closed, depending on the current position of the rotors, and the light on the indicator lights up. In the example above, the letter B will be encrypted into C. After which the first rotor will move one position and the machine settings will look like this:

Enigma

Enigma is the most popular representative of the world of rotary encryption machines. It was used by German troops during World War II and was considered virtually unhackable.
The Enigma encryption procedure is implemented as in the above example, with the exception of some additional touches.
Firstly, the number of rotors in different versions of Enigma could differ. The most common was the Enigma with three rotors, but a variant with four disks was also used.
Secondly, the decryption process of the demonstration rotor machine described above is different from the encryption process. Each time, to decrypt, you will have to swap the left and right rotors, which may not be entirely convenient. To solve this problem, another disk was added to Enigma, which was called a reflector. In the reflector, all contacts were connected in pairs, thereby re-passing the signal through the rotors, but along a different route. Unlike other rotors, the reflector was always in a fixed position and did not rotate.

Let's add a reflector that implements the replacement (A-B; C-D) to our demo encryption machine. When the B key is pressed, the signal passes through the rotors and enters the reflector through pin C. Here the signal is “reflected” and comes back, passing through the rotors in the opposite order and along a different path. As a result, the letter B at the output is converted to D.
Please note that if you press the D key, the signal will follow the same circuit, converting D into B. Thus, the presence of a reflector made the encryption and decryption processes identical.
Another property of Enigma associated with the reflector is the impossibility of encrypting any letter into itself. This property played a very important role in breaking the Enigma.

The resulting device is already very similar to the real Enigma. With one minor caveat. The durability of such a machine rests on the secrecy of the internal switching of the rotors. If the structure of the rotors is revealed, then hacking is reduced to selecting their initial positions.
Since each rotor can be in one of 26 positions, for three rotors we get 26 3 = 17476 options. At the same time, the rotors themselves can also be arranged in any order, which increases the complexity by 3! once. Those. The key space of such a machine will be 6*17576=105456. This is clearly not enough to ensure a high level of security. Therefore, Enigma was equipped with one more additional tool: patch panel. By connecting letters in pairs on the patch panel, one additional step could be added to the encryption.


For example, suppose that on the patch panel the letter B is connected to the letter A. Now when you click on A, the A-B substitution occurs first, and the letter B is supplied to the input of the first rotor.
The message is decrypted in a similar way. When you press the D key, the rotors and reflector perform a D-D-D-D-C-B-A-B conversion. The patch panel then converts B to A.

Enigma Durability Analysis

The real Enigma differed from the demonstration machine described in only one way. Namely, in the design of the rotors. In our example, the rotor changes its position only when the previous disk completes a full revolution. In the real Enigma, each disk had a special recess, which in a certain position picked up the next rotor and shifted it one position.
The location of the recess for each of the rotors could be adjusted using special outer rings. The initial position of the rings did not affect the commutation of the rotors and the result of encrypting a single letter, so the rings are not taken into account when calculating the Enigma key space.
So, the basic Enigma model had 3 different rotors, numbered with Roman numerals I, II, III and implementing the following substitutions:
Entry = ABCDEFGHIJKLMNOPQRSTUVWXYZ
I = EKMFLGDQVZNTOWYHXUSPAIBRCJ
II = AJDKSIRUXBLHWTMCQGZNPYFVOE
III = BDFHJLCPRTXVZNYEIWGAKMUSQO
When encrypted, the rotors could be placed in any order, which for three rotors gives 6 different combinations.
In addition, each rotor could be installed in one of 26 possible starting positions. Those. the initial position of the rotors has only
6 * 26 3 = 105456 combinations.
The number of all possible connections on a patch panel is calculated using the formula n! /((n-2m)! m! 2 m), where n is the number of letters of the alphabet, m is the number of connected pairs.
For 26 letters of the English alphabet and 10 pairs this amounts to 150738274937250=2 47 different combinations.
Thus, the basic version of the Enigma with three rotors had a significant key space even by modern standards:
150738274937250*105456=15,896,255,521,782,636,000≈2 64 .
Such a huge number of options inspired a deceptive sense of invulnerability.

Enigma cryptanalysis

The large key space provides the Enigma cipher with a fairly serious level of resistance to attacks using a known ciphertext.
A complete search of 2 64 options, even on modern computers, is not an easy task.
However, everything changes if you use a known plaintext attack. For such a case, there is a very ingenious method that allows you to neglect the settings of the switchboard in the process of searching for a key combination, which reduces the Enigma key space to only 105,456 combinations and makes the entire cipher fatally vulnerable.

The method exploits the presence of so-called “cycles” in an open-closed text pair. To explain the concept of a "cycle", consider the following plain message P and its corresponding Enigma-encrypted cryptotext C.

P = WETTERVORHERSAGEBISKAYA
C=RWIVTYRESXBFOGKUHQBAISE
Let's write each character from the pair in the form of a table:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
w e t t e r v o r h e r s a g e b i s k a y a
r w i v t y r e s x b f o g k u h q b a i s e

Pay attention to the substitutions implemented by the enigma in positions 14, 15 and 20. At step 14, the letter A is encrypted into G. The latter, in turn, is encrypted into K at step 15. And then the letter K is encrypted into A at step 20, thereby looping the chain A-G-K-A. Such looped chains are called cycles. The presence of cycles allows us to divide the problem of breaking Enigma into two simple components: 1) searching for the starting position of the rotors and 2) searching for connections of the patch panel with known rotor settings.

We know that Enigma encryption involves several transformations. The signal first passes through the patch panel. The result of the conversion on the patch panel is fed into the rotors. After which the signal enters the reflector and returns through the rotors to the patch panel, where the final substitution is performed. All these operations can be represented by a mathematical formula:
E i = S -1 R -1 TRS, where
S and S -1 , - transformation on the patch panel at the input and output, respectively;
R and R -1 - transformation in the rotors at the input and output;
T - transformation on the reflector.
Omitting the switchboard, we express the internal Enigma transformation in terms of P i:
Pi = R -1 TR
Now encryption can be written as:
E i = S -1 P i S

Using the formula, we will rewrite the substitutions from the example in positions 14, 15 and 20.
S -1 P 14 S(A) = G or what is the same P 14 S(A) = S(G).
P 15 S(G) = S(K)
P 20 S(K) = S(A)
Replacing S(K) in the last expression we get:
P 20 P 15 P 14 S(A) = S(A) (1) where S(A) is the letter connected to A on the patch panel.
Now the attack comes down to a trivial enumeration of all possible rotor settings. For each combination of rotors, it is necessary to check the fulfillment of equality (1). If the equality is true for the letter S, this means that the correct configuration of the rotors has been found and that the letter A is connected on the patch panel with the letter S. The search for the remaining pairs is reduced to the literal decoding of the cryptotext and comparing the result with the known plaintext.
It should be noted that with a probability of 1/26, equality can be true even if the rotors are installed incorrectly, therefore, to increase the reliability of the algorithm, it is advisable to use several “cycles”.
Another important point is that the attacker may only know part of the encrypted message. And in this case, first of all, he will need to find the location of the known text in the resulting cryptogram. In solving this problem, it is very helpful to know the fact that Enigma never encrypts a letter into itself. Those. To find the correct offset, you need to find a position in the cryptotext at which none of the letters of the private text are duplicated by the letter of the open message.

P.S.

A very slow, but quite working implementation of an attack in Python can be found at

Did you like the article? Share with your friends!