Biographies Characteristics Analysis

German Enigma. How did the Enigma machine work?

Based on the materials of the dissertation "Ciphering machines and devices for decryption during the Second World War", defended at the University of Chemnitz (Germany) in 2004.

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

And no wonder: 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 exceptionally 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 of the omissions of the first half of the war and were able to make optimal use of their resources in the second half of the war. According to Anglo-American historians, if it were not for the breaking of German encryption codes, the war would have lasted two years longer, additional victims would have been required, 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, how and why it was possible to develop machine methods of “hacking” and successfully use them.
Breaking the Enigma codes and the codes of other cipher 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 messages 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.

Thousands of Secret Service teams worked on deciphering the codes in England alone. 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 to decipher all intercepted enemy telegrams. He also ordered the previously intercepted telegrams to be deciphered in order to understand the mindset of the German command. This is a testament to his foresight. The most famous result of this activity of his is forcing the entry of the United States into the First World War.
Equally far-sighted was the creation of English listening stations - then it was a completely new idea - especially listening to the radio traffic of enemy ships.

Even then and 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 their 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 were aware of 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 disclosing enemy radio messages", and it was 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 evaluated not by cryptologists (in terms of encryption quality and hacking capabilities), but by technical specialists.

The Allies followed the gradual improvement of German encryption technology and also improved the methods of breaking encryption codes. The facts that testified to the awareness of the allies, the Germans attributed 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 armed forces not only did not interact with each other, but also hid their skills from cryptographers of other branches of the military, since “competition” was in the order of things. The Germans did not try to unravel the encryption codes of the allies, since they had few cryptologists for this, and those that were, worked in isolation from each other. The experience of British cryptologists showed that the joint work of a large team of cryptologists made it possible to solve almost all the tasks. Towards the end of the war, a gradual transition began in the field of encryption from machine-based work to computer-based work.

Cipher machines in military affairs were first used in Germany in 1926. This prompted potential adversaries of Germany to join in the development of their own methods of encryption and decryption. For example, Poland took up this issue, and at first she 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 daily. It was Polish specialists who in 1930 were the first to start work on machine cryptological analysis. After the outbreak of war and the occupation of Poland and France, these works were continued by British specialists. The theoretical work of the mathematician A. Turing was especially important here. Beginning in 1942, the disclosure of encryption codes became extremely important, as the German command increasingly used radio communications to transmit their orders. It was necessary to develop completely new ways of cryptological analysis for decryption machines.

History reference.
Julius Caesar was the first to use text encryption. In the 9th century, the Arab scholar Al-Kindi first considered the problem of deciphering a text. The works of Italian mathematicians of the 15th-16th centuries were devoted to the development of encryption methods. The first mechanical device was invented in 1786 by a Swedish diplomat, and such a device was at the disposal of the American President Jefferson in 1795. It was only in 1922 that this device was improved by the US Army cryptologist Mowborn. It was used to encrypt tactical messages until the outbreak of World War II. Patents to improve usability (but not encryption security) have been issued by the US Patent Office since 1915. All this was supposed to be used to encrypt business correspondence. Despite numerous improvements in devices, it was clear that only short texts were encrypted.

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

Since 1919 German designers also begin to patent their developments, one of the first was the future inventor of Enigma Arthur Scherbius (1878 - 1929). Four variants of similarly designed 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 Foreign Ministry accepted the proposals of the inventor, so he tried to offer his encryption machine to the civilian sectors of the economy. The army and the Foreign Ministry continued to use book encryption.

Arthur Scherbius went to work for a firm that bought his patent for a cipher machine. This firm 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 had an encryption device in the form of 4 interchangeable rotors. The firm advertised the machine widely and advertised it as unbreakable. The officers of the Reichswehr became interested in her. The fact is that in 1923 Churchill's memoirs were published, in which he spoke about his cryptological successes. This caused shock among the leadership of the German army. German officers found out 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 the amateurish encryption invented by amateur cryptographers, since military German cryptology simply did not exist. Naturally, they began to look for reliable ways to encrypt military messages. Therefore, they developed an interest in Enigma.

Enigma had several modifications: A, B, C, etc. Modification C could perform both encryption and decryption of messages; she 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 of Enigma D was also a commercial success. Subsequently, since 1940, it was used in railway transport in the occupied regions of Eastern Europe.
In 1934 in the German navy began to use the next modification of the Enigma I.

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

Gradually, by July 1944, control over the encryption business was transferred from the hands of the Wehrmacht to the roof of the SS, the main role here was played by the 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 are saturated with encryption machines. In Germany, machine designs are constantly being improved. The main difficulty in this was caused by the inability to find out whether the enemy is able to decipher the texts encrypted by this 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 background.
The advent of electric current caused the rapid development of telegraphy, which, not by chance, took place 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. In 1836, the Steinhel device appeared, and in 1840 it was developed by Samuel Morse (Samuel MORSE). Further improvements came down to the Siemens and Halske printing telegraph (Siemens & Halske, 1850), which converted received electrical impulses into readable type. And invented in 1855. Hughes, the printing wheel, after a series of improvements, served well into the 20th century.

The next important invention to speed up 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 the insufficient use of the bandwidth of the wires. The first attempt was made by Meyer (B.Meyer) in 1871, but it failed because it was prevented by different length and number of impulses in Morse letters. But in 1874, the French engineer Emile Baudot managed to solve this problem. This solution became the standard for the next 100 years. The Bodo method had two important features. First, it became 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 with the help of postmen. A different organizational system was required, which would include: a device in each house, servicing it by special personnel, receiving telegrams without the help of personnel, constant inclusion in the line, issuing texts page by page. Such a device would only have prospects of success in the United States. In Europe, until 1929, the postal monopoly prevented the appearance of any private device for transmitting messages, they had to be only at the post office.

The first step in this direction was taken in 1901 by the Australian Donald Murray. He, in particular, modified the Baudot 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 United States. Two American inventors competed in the US: Howard Krum and E.E. Kleinschmidt. Subsequently, they merged into one firm in Chicago, which began to produce equipment in 1024, which enjoyed commercial success. Several of their machines were imported by the German firm Lorenz, installed in post offices and obtained a license to produce them in Germany. Since 1929, the postal monopoly in Germany has been abolished, and private individuals have access to telegraph channels. The introduction in 1931 of international standards for telegraph channels made it possible to organize telegraph communications with the whole world. The same devices began to be produced since 1927 by Siemens and Halske.

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

When Siemens and Halske telegraph machines appeared in Germany, the German navy became interested in them. But his leadership was still under the impression that the British during the First World War had cracked the German codes and read their messages. Therefore, they demanded that the telegraph apparatus be connected to the cipher machine. This was then a completely new idea, because encryption in Germany was done manually and only then the ciphertexts were transmitted.

In the USA, this requirement was met by Vernam devices. In Germany, this work was undertaken by Siemens and Halske. They filed their first open patent on this topic in July 1930. By 1932 a workable apparatus 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 began machine encryption of radio messages.

The Germans continued to improve various models of encryption machines, but in the first place they put the improvement of the mechanical part, referring to cryptology in an amateurish way, manufacturing firms did not involve professional cryptologists for consultations. Of great importance for all these problems were the works of the American mathematician Claude Shannon, who has been well-read since 1942. worked at Bell Labs 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 that, 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 ciphertexts by information-theoretical methods. The fundamental question of his theory is: "How much information does the encrypted text contain compared to the clear text?" In 1949, he published The Theory of Communications of Secret Systems, in which he answered this question. The analysis carried out there was the first and only one to quantify the reliability of the encryption method. Analysis after the war showed that neither German nor Japanese cipher machines were unbreakable. In addition, there are other sources of information (for example, intelligence) that greatly simplify the task of deciphering.

The position of England forced her to exchange long ciphertexts with the United States, it was the great length that made their decipherment 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 method of encryption for the Ministry of Foreign Affairs was hacked by German specialists and the corresponding messages were decrypted. Upon learning of this, the United States in 1944. replaced an imperfect system with a more reliable one. Around the same time, the German Wehrmacht, the Navy and the Foreign Ministry also changed the encryption technology to a newly developed one. Soviet encryption methods were also insufficiently reliable, which is why they were hacked by American services and many Soviet intelligence officers who were spying on the American atomic bomb were identified (Operation Venona - breaking).

Breaking.
Now let's talk about HACKING German cipher machines by the British, that is, machine guessing the way texts are encrypted in them. . This work received the English name ULTRA. Non-machine decryption methods were too laborious and unacceptable in war conditions. How were the English deciphering machines arranged, without which the Allies could not have gained an advantage over the German cryptographers? What information and textual material did they need? And was there a mistake by the Germans here, and if so, why did it happen?

First, the scientific and technical foundations.
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 ciphers were widely used by the German Wehrmacht. Such an analysis required not only ciphertexts obtained by eavesdropping, but also plaintexts obtained by 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. With long texts, it became possible to mathematically establish the algorithm even for an unfamiliar cipher machine. Then it was possible 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 data, verify and archive it, and maintain machines. This association was called BP (Bletchley Park - Bletchley Park), it was personally controlled by Churchill. The information obtained turned out to be a powerful weapon in the hands of the allies.

How did the British take possession of the Wehrmacht Enigma? Poland was the first to decipher the 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. In order not to face surprises, the Poles recorded radio messages and deciphered them. They were greatly alarmed by the fact 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 could not decipher messages encrypted by this machine.

Then the BS4 department of the Polish General Staff suggested that the Germans had 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. Poland's military experts failed to decipher the German messages. Even having obtained documents for Enigma through their agents, they could not succeed. They concluded that there was a lack of scientific knowledge. Then they instructed three mathematicians, one of whom studied in Göttingen, to create a system of analysis. All three received additional training at the University of Poznań and were fluent in German. They managed to reproduce the Enigma device and create a copy of it in Warsaw. We note the outstanding achievements in this of one of them, the Polish mathematician M. Reevsky (1905 - 1980). Although the Wehrmacht was constantly improving the encryption of its messages, Polish specialists were able to do so until January 1, 1939. decrypt them. After that, the Poles began to cooperate with the allies, to whom they had not reported anything before. Such cooperation, in view of the obvious military danger, was already expedient. July 25, 1939 they gave the British 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 VR decryption center began to work with it.

British cryptologists after the First World War were reduced, they remained only under the roof of the Foreign Office. During the war in Spain, the Germans used Enigma D, and the English cryptologists who remained in the service, under the guidance of the eminent 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. Alan Turing, a mathematician from Cambridge, was among the attendees of the English courses for the training of cryptographers. 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 the decryption algorithm necessarily exists, it only remained to open it!

Turing was included in the BP as a conscript. By May 1, 1940. he made serious progress: 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 "weather" (Wetter), and that the strict rules of German grammar predetermined its exact position in the sentence. This allowed him to eventually come to a solution to the problem of breaking the Enigma, and he created an electromechanical device for this. The idea came to him at the beginning of 1940, and in May of the same year, with the help of a group of engineers, such a device was created. The task of deciphering was facilitated 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 insignificant.

The British military, and especially Churchill personally, demanded constant attention to the decoding of messages. Since the summer of 1940 the British deciphered all messages encrypted with Enigma. Nevertheless, British specialists were constantly improving the deciphering technique. By the end of the war, British decoders had 211 deciphering devices operating around the clock. They were served by 265 mechanics, and 1675 women were involved in the 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 continued for several years and remained unfinished!

The instruction for the creation of decrypting devices, created then by Dühring, was 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 that a message from the German services would follow about this with a set known to the British in advance words! In addition, the German services transmitted this message many times, each time encoding it in different ciphers, 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 English fleet was able to remove such a machine from a German submarine they had captured. On February 1, 1942, the German Navy switched to using the M4 model. But some German messages, encrypted in the old way, erroneously contained information about the design features of this new machine. This greatly facilitated the task of Turing's team. Already in December 1942. Enigma M4 was hacked. December 13, 1942 the British Admiralty received accurate data on the location of 12 German submarines in the Atlantic ...

According to Turing, in order 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 the Enigma M4 was broken completely and provided the British and Americans with comprehensive intelligence information until the end of the war. 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 Soviet intelligence officer Kim Philby was at the head of the British counterintelligence, all the information was immediately sent to the USSR! Some of this information was transmitted to the Soviet Union both officially through the British Bureau in Moscow and semi-officially through Alexander Rado, the Soviet resident in Switzerland.)

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 academischen 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

The Enigma is a rotary cipher machine used by Nazi Germany during World War II. Thanks to the impact it had on the course of the war, the Enigma hack was arguably the highlight of the centuries-long history of cryptanalysis. In this topic, I would like to talk about the hacking method used in Bletchley Park, as well as describe the device of the machine itself.

rotary machines

For the first time encryption rotary machines began to be used at the beginning of the 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 after 26 steps.
To increase the sequence period, several rotors connected in series can be used. When one of the disks makes a complete revolution, the next disk moves one position. This increases the sequence length to 26n, 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 encryption of 4 characters: A, B, C, D. In the initial position, the first disk implements substitution: A-C; B-A; C-B; D-D. The permutations of the second and third discs are A-B; B-C; C-A; D-D and A-A; B-C; C-B; D-D respectively.
When the letter B is pressed on the keyboard, an electrical circuit is closed, depending on the current position of the rotors, and a light on the indicator lights up. In the example above, the letter B will be encrypted in C. After that, 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 cipher rotary machines. It was used by the German troops during World War II and was considered virtually unbreakable.
The Enigma encryption procedure is implemented as in the above example, except for some additional touches.
Firstly, the number of rotors in different versions of Enigma could be different. The most common was the three-rotor Enigma, but a four-disk variant was also used.
Secondly, the decryption process of the demonstration rotary machine described above is different from the encryption process. Each time, for decoding, you will have to change the left and right rotor in places, which may not be very convenient. To solve this problem, another disk was added to Enigma, which was called the reflector. In the reflector, all contacts were connected in pairs, thus realizing the repeated passage of the signal through the rotors, but along a different route. Unlike the other rotors, the reflector was always in a fixed position and did not rotate.

Let's add a reflector that implements the substitution (A-B; C-D) to our demo cipher machine. When you press the B key, the signal passes through the rotors and enters the reflector through contact C. Here the signal is "reflected" and returned back, passing through the rotors in reverse order and along a different path. As a result, the letter B at the output is converted to D.
Note that if you press the D key, the signal will follow the same circuit, converting D to 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 stability of such a machine rests on the secrecy of the internal switching of the rotors. If the device of the rotors is revealed, then hacking is reduced to the selection of 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 provide a high level of security. Therefore, Enigma was equipped with another additional tool: patch panel. By connecting letters in pairs on the patch panel, one could add another additional step to encryption.


For example, let's say that on the patch panel, the letter B is connected to the letter A. Now when you press A, the A-B substitution occurs first, and the letter B is fed into the input of the first rotor.
The message is decrypted in the same way. When you press the D key, the rotors and reflector perform a D-D-D-D-C-B-A-B conversion. The plugboard then converts B to A.

Enigma Persistence Analysis

The real Enigma differed from the one described by the demonstration machine in only one way. Namely, in the device of the rotors. In our example, the rotor changes its position only when the previous disk completes a complete revolution. In real Enigma, each disk had a special notch that, at a certain position, picked up the next rotor and shifted it one position.
The location of the notch for each of the rotors could be adjusted using special outer rings. The initial position of the rings did not affect the switching of the rotors and the result of encryption of 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
In encryption, the rotors could be arranged in any sequence, 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 the patch panel is calculated by 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 is 150738274937250=2 47 different combinations.
Thus, the basic version of Enigma with three rotors had a solid keyspace 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

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

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

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 enigma in 14th, 15th and 20th positions. 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, thus looping the chain A-G-K-A. Such looped chains are called cycles. The presence of cycles allows us to divide the task of breaking Enigma into two simple components: 1) finding the starting position of the rotors and 2) finding the connections of the plugboard with known rotor settings.

We know that Enigma encryption goes through several transformations. First, the signal passes through the patch panel. The result of the conversion on the patch panel enters the rotors. After that, the signal hits the reflector and returns through the rotors to the patch panel, where the last 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 plugboard, we express the internal transformation of Enigma in terms of P i:
P i \u003d R -1 TR
Now encryption can be written as:
E i \u003d S -1 P i S

Using the formula, we will rewrite the substitutions from the example in 14, 15 and 20 positions.
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 is reduced 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 holds for the letter S, this means that the correct configuration of the rotors has been found and that the letter A is connected to the letter S on the patch panel. The search for the remaining pairs comes down to deciphering the cryptotext by letter and comparing the result with the known plaintext.
It should be noted that with a probability of 1/26, the equality can be fulfilled even if the rotors are incorrectly installed, therefore, to increase the reliability of the algorithm, it is desirable to use several “cycles”.
Another important point is related to the fact that an attacker may know only a 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 received cryptogram. Knowing the fact that Enigma never encrypts a letter into itself helps a lot in solving this problem. Those. to find the correct offset, you need to find such a position in the cryptotext at which none of the letters of the private text is duplicated by the letter of the open message.

P.S.

A very slow, but quite working implementation of the attack on Python can be viewed at

At almost any time of the year, the English countryside looks the same: green meadows, cows, medieval-looking houses and a wide sky - sometimes gray, sometimes dazzling blue. It was just transitioning from Mode 1 to the rarer Mode 2 as the commuter train sped me to Bletchley Station. It is hard to imagine that the foundations of computer science and cryptography were laid in the midst of these picturesque hills. However, the upcoming walk through the most interesting museum dispelled all possible doubts.

Such a picturesque place, of course, was not chosen by the British by chance: an inconspicuous barracks with green roofs, located in a remote village, is just what was needed to hide a top-secret military facility, where they were constantly working on breaking the ciphers of the Axis countries. Bletchley Park may not be impressive from the outside, but the work that was done here helped turn the tide of the war.

Cryptohuts

In wartime, Bletchley Park was entered through the main gate, presenting a pass to the guards, and now they buy a ticket at the entrance. I lingered there a little longer to look at the adjoining gift shop and temporary exhibition dedicated to World War I intelligence technologies (which is also a very interesting topic, by the way). But the main thing lay ahead.

Actually, Bletchley Park is about twenty long one-story buildings, which are called hut in English, and are usually translated into Russian as “house”. I called them “huts” to myself, combining one with the other. In addition to them, there is a mansion (aka Mansion), where the command worked and distinguished guests were received, as well as several auxiliary buildings: former stables, a garage, residential buildings for staff.

Those same houses
Homestead in all its glory
Inside the estate looks richer than the huts

Each house has its own number, and these numbers are of historical importance, you will definitely meet them in any story about Bletchley Park. In the sixth, for example, intercepted messages were received, in the eighth they were engaged in cryptanalysis (Alan Turing worked there), in the eleventh there were computers - “bombs”. The fourth house was later allocated for work on the Enigma version, which was used in the navy, the seventh - for the Japanese variation on the Enigma theme and other ciphers, in the fifth, transmissions intercepted in Italy, Spain and Portugal were analyzed, as well as German police encryption. Well, and so on.

You can visit the houses in any order. The decor in most of them is very similar: old furniture, old things, tattered notebooks, posters and maps from the Second World War. All this, of course, did not lie here for eighty years: the houses first passed from one state organization to another, then they were abandoned, and only in 2014 the restorers meticulously restored them, saving them from demolition and turning them into a museum.

This, as is customary in England, was approached not only carefully, but also with fiction: in many rooms, voices of actors and sounds are heard from hidden speakers that give the impression that work is in full swing around. You walk in and hear the sound of a typewriter, someone's footsteps and a radio in the distance, and then you "eavesdrop" on someone's lively conversation about a recently intercepted cipher.

But the real curiosity is projections. For example, this man, who, as it were, is sitting at the table, greeted me and briefly spoke about the local order.


In many rooms, twilight reigns - so that projections can be better seen

The most interesting thing, of course, was to look at the desktop of Alan Turing. His office is located in the eighth house and looks very modest.


This is what Alan Turing's desk looked like

Well, you can look at Turing's creation itself - the Enigma decryption machine - in house number 11 - in the same place where the very first model of the "bomb" was assembled at one time.

Cryptological bomb

This may be news to you, but Alan Turing was not the first to decipher Enigma by brute force. His work is preceded by research by the Polish cryptographer Marian Rejewski. By the way, it was he who called the decryption machine a “bomb”.

The Polish "bomb" was much simpler. Pay attention to the rotors on top

Why "bomb"? There are several different versions. For example, according to one, the sort of ice cream beloved by Reevsky and colleagues was allegedly called that, which was sold in a cafe not far from the encryption bureau of the Polish General Staff, and they borrowed this name. A much simpler explanation is that in Polish the word "bomb" can be used for an exclamation like "eureka!". Well, a very simple option: the car was ticking like a bomb.

Shortly before the capture of Poland by Germany, Polish engineers handed over to the British all the developments related to the decoding of German ciphers, including the drawings of the "bomb", as well as a working copy of the "Enigma" - not a German, but a Polish clone, which they managed to develop before the invasion. The rest of the Poles' developments were destroyed so that Hitler's intelligence did not suspect anything.

The problem was that the Polish version of the "bomb" was designed only for the Enigma I machine with three fixed rotors. Even before the start of the war, the Germans commissioned improved versions of the Enigma, where the rotors were replaced every day. This made the Polish version completely unusable.

If you've watched The Imitation Game, you're already pretty familiar with Bletchley Park. However, the director could not resist and made several digressions from real historical events. In particular, Turing did not create a prototype of the "bomb" with his own hand and never called her "Christopher".


Popular English actor Cryptocode Podbirac as Alan Turing

Based on the Polish machine and the theoretical work of Alan Turing, the engineers of the British Tabulating Machine Company created the "bombs" that were supplied to Bletchley Park and other secret facilities. By the end of the war, there were already 210 cars, but with the end of hostilities, all the "bombs" were destroyed on the orders of Winston Churchill.

Why did the British authorities need to destroy such a beautiful data center? The fact is that the “bomb” is not a universal computer - it is designed exclusively for decoding messages encrypted by Enigma. Once this was no longer needed, the machines also became unnecessary, and their components could be sold.

Another reason may have been a premonition that the Soviet Union would not be Britain's best friend in the future. What if the USSR (or anywhere else) started using technology similar to Enigma? Then it is better not to demonstrate to anyone the ability to open its ciphers quickly and automatically.

Only two "bombs" have survived from wartime - they were transferred to GCHQ, the UK Government Communications Center (consider the modern analogue of Bletchley Park). They say they were dismantled in the sixties. But GCHQ graciously agreed to provide the museum in Bletchley with old drawings of the "bombs" - alas, not in the best condition and not entirely. Nevertheless, enthusiasts managed to restore them, and then create several reconstructions. They are now in the museum.

Interestingly, during the war, the production of the first "bomb" took about twelve months, but the reenactors from the BCS Computer Conservation Society, starting in 1994, worked for about twelve years. Which, of course, is not surprising, given that they had no resources at their disposal other than their savings and garages.

How did Enigma work?

So, "bombs" were used to decrypt the messages that were obtained at the output after Enigma encryption. But how exactly does she do it? Of course, we will not analyze its electromechanical circuit in detail, but it is interesting to learn the general principle of operation. At least it was interesting for me to listen and write down this story from the words of a museum worker.

The design of the "bomb" is largely due to the design of the "Enigma" itself. Actually, we can assume that the "bomb" is a few dozen "Enigmas" put together in such a way as to sort through the possible settings of the encryption machine.

The simplest "Enigma" is three-rotor. It was widely used in the Wehrmacht, and its design suggested that it could be used by an ordinary soldier, and not by a mathematician or engineer. It works very simply: if the operator presses, say, P, a light will light up under one of the letters on the panel, for example, under the letter Q. It remains only to convert to Morse code and transmit.

An important point: if you press P again, there is very little chance of getting Q again. Because every time you press the button, the rotor moves one position and changes the configuration of the electrical circuit. Such a cipher is called polyalphabetic.


Look at the three rotors at the top. If you, for example, enter Q on the keyboard, then Q will first be replaced by Y, then by S, by N, then reflected (it will turn out K), changed again three times and the output will be U. Thus, Q will be encoded as U. But what if you type U? Get Q! So the cipher is symmetrical. This was very convenient for military applications: if two places had Enigmas with the same settings, messages could be freely transferred between them.

This scheme, however, has a big drawback: when entering the letter Q, due to the reflection at the end, under no circumstances could one get Q. German engineers knew about this feature, but did not attach much importance to it, but the British found an opportunity to exploit it . How did the British know about the insides of the Enigma? The fact is that it was based on a completely non-secret development. The first patent for it was filed in 1919 and described a machine for banks and financial institutions that allowed the exchange of encrypted messages. It was sold on the open market, and British intelligence managed to acquire several copies. By their own example, by the way, the British Typex cipher machine was also made, in which the above-described flaw was corrected.


The very first Typex model. As many as five rotors!

The standard Enigma had three rotors, but you could choose from five options in total and install each of them in any slot. This is exactly what is reflected in the second column - the numbers of the rotors in the order in which they are supposed to be put in the car. Thus, already at this stage, it was possible to get sixty options for settings. Next to each rotor is a ring with the letters of the alphabet (in some versions of the machine - the corresponding numbers). The settings for these rings are in the third column. The widest column is already an invention of German cryptographers, which was not in the original Enigma. Here are the settings that are set using the plug-in panel by pairing the letters. This confuses the whole scheme and turns it into a difficult puzzle. If you look at the bottom line of our table (the first day of the month), then the settings will be as follows: rotors III, I and IV are placed in the machine from left to right, the rings next to them are set at 18, 24 and 15, and then the letters N are connected on the panel with plugs and P, J and V and so on. When all these factors are taken into account, there are about 107,458,687,327,300,000,000,000 possible combinations - more than seconds have passed since the Big Bang. It is not surprising that the Germans considered this car extremely reliable.

There were many variants of the Enigma, in particular, a version with four rotors was used on submarines.

Enigma hack

Breaking the cipher, as usual, allowed the unreliability of people, their mistakes and predictability.

The Enigma manual says to choose three of the five rotors. Each of the three horizontal sections of the "bomb" can test one possible position, that is, one machine can run three out of sixty possible combinations at a time. To check everything, you need either twenty "bombs" or twenty consecutive checks.

However, the Germans made a pleasant surprise to the English cryptographers. They introduced a rule that the same position of the rotors should not be repeated within a month, and also for two days in a row. It sounds like it was supposed to increase reliability, but in reality it had the opposite effect. It turned out that by the end of the month, the number of combinations that needed to be checked was significantly reduced.

The second thing that helped with the decryption was traffic analysis. The British listened to and recorded the encrypted messages of Hitler's army from the very beginning of the war. There was no talk of decoding then, but sometimes the very fact of communication is important, plus such characteristics as the frequency at which the message was transmitted, its length, time of day, and so on. Also, using triangulation, it was possible to determine where the message was sent from.

A good example is the transmissions that came from the North Sea every day from the same locations, at the same time, on the same frequency. What could it be? It turned out that these were meteorological ships, which daily glorified weather data. What words can be contained in such a transmission? Of course, "weather forecast"! Such guesses pave the way for a method that today we call a plaintext attack, and in those days they called "clues" (cribs).

Since we know that "Enigma" never produces the same letters as the original message, we need to match the "hint" successively with each substring of the same length and see if there are any matches. If not, then it is a candidate string. For example, if we check the clue "weather in the Bay of Biscay" (Wettervorhersage Biskaya), then we first write it out against the encrypted string.

Q F Z W R W I V T Y R E * S* X B F O G K U H Q B A I S E Z

W E T T E R V O R H E R * S* A G E B I S K A Y A

We see that the letter S is encrypted into itself. This means that the hint needs to be shifted by one character and checked again. In this case, several letters will match at once - move more. Matches R. Move twice more until we hit a potentially valid substring.

If we were dealing with a substitution cipher, then this could be the end of it. But since this is a polyalphabetic cipher, we need the settings and initial positions of the Enigma rotors. It was them who were picked up with the help of "bombs". To do this, a pair of letters must first be numbered.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

R W I V T Y R E S X B F O G K U H Q B A I S E

W E T T E R V O R H E R S A G E B I S K A Y A

And then, based on this table, draw up the so-called "menu" - a diagram that shows which letter of the original message (that is, "hints") into which letter is supposedly encrypted and in what position. According to this scheme, the “bomb” is configured.


Each of the reels can take one of 26 positions - one for each letter of the alphabet being sifted through. Behind each of the drums there are 26 contacts, which are connected with thick cables in such a way that the machine searches for the plug-in panel settings that give successive matches of the letters of the encrypted string with the hint.

Since the structure of the "bomb" does not take into account the switching device inside the "Enigma", it gives out several options in the course of work, which the operator must check. Some of them will not work simply because in Enigma only one plug can be connected to one socket. If the settings are not suitable, the operator starts the machine again to get the next option. In about fifteen minutes, the "bomb" will go through all the options for the selected position of the reels. If it is guessed correctly, then it remains to select the settings of the rings - already without automation (we will not dive into details). Then, on English Typex machines modified for compatibility with Enigma, the encryptions were translated into clear text.

Thus, operating with a whole fleet of "bombs", the British, by the end of the war, received actual settings every day before breakfast. In total, the Germans had about fifty channels, many of which broadcast much more interesting things than the weather forecast.

Allowed to touch

In the Bletchley Park Museum, you can not only look around, but also touch the decoding with your own hands. Including - with the help of touchscreen tables. Each of them gives his task. In this, for example, it is proposed to combine the sheets of Banbury (Banburismus). This is an early method of deciphering the Enigma, which was used before the creation of the "bombs". Alas, it was impossible to decipher something in this way during the day, and at midnight all the successes turned into a pumpkin due to another change in settings.

Fake "data center" in Hut 11

What is in house number 11, where there used to be a "server room", if all the "bombs" were destroyed in the last century? To be honest, I still hoped in the depths of my soul to come here and find everything in the same form as it once was. Alas, no, but the hall is still not empty.

Here are such iron structures with plywood sheets. Some show life-size photographs of the "bombs", others show quotes from the stories of those who worked here. They were mostly women, including from the WAF - the women's service of the RAF. The quote in the picture tells us that switching loops and looking after the "bombs" was not an easy task at all, but exhausting daily work. By the way, another series of projections is hidden between the dummies. The girl tells her friend that she had no idea where she would serve, and is completely amazed by what is happening in Bletchley. Well, I was also amazed by the unusual exhibit!

I spent a total of five hours at Bletchley Park. This was barely enough to take a good look at the central part and catch a glimpse of everything else. It was so interesting that I did not even notice how time passed until my legs began to ache and ask to go back - if not to the hotel, then at least to the train.

And besides the houses, dimly lit offices, restored "bombs" and long stands with accompanying texts, there was something to see. I already mentioned about the hall dedicated to espionage during the First World War, there was also a hall about the decryption of Lorenz and the creation of the Colossus computer. By the way, in the museum I also found the Colossus itself, or rather the part that the reenactors managed to build.

The most hardy already outside the territory of Bletchley Park is waiting for a small museum of computer history, where you can get acquainted with how computing technology developed after Turing. I also looked there, but I already walked at a fast pace. I have already seen enough of BBC Micro and Spectrum in other places - you can do it, for example, at the Chaos Constructions festival in St. Petersburg. But you won’t find a live “bomb” anywhere.

Your attention is a review material (let's say, without details) about the principle of operation of the fairly well-known Enigma encryption machine.

Many have heard that in World War II, the German side used a special encryption machine, Enigma, for encryption.
According to sources, this device was a new word in cryptography of that time.

How did she work?

Substitution cipher

To begin with, you should know what a “Replacement Cipher” is. This is the usual replacement of one letter for another. Those. in such a cipher, instead of the letter "A", for example, "T" is used, instead of "B" - "S", etc.

Breaking such a cipher is quite simple. In the presence of a more or less long encrypted message, it is possible to perform a frequency analysis and compare it with the frequency of the use of letters in the language. Those. if there are many letters “T” in the message encrypted with the replacement cipher, then this is a clear sign that some kind of vowel is hidden behind this letter (for example, “A” or “O”, since usually these letters are the most frequent in the language) .

Enigma device

Enigma was like a dynamic Caesar cipher. Those. Initially, a certain initial value was set on the drums (a kind of random seed), which was the key. Further, when typing letters, each letter was encrypted with a Caesar cipher, and then this cipher changed to another.

The change of the cipher was provided with the help of rotors.

The rotors were disks that had 26 contacts on each side, connected inside the rotor in a certain (random) way. It was passing through the rotor that the signal was converted from the letter "A" to the letter "T", etc.

There were several rotors and they turned after typing each character (in the manner of a drum counter).

In addition, there was also a patch panel into which you could insert wires that changed letters in pairs. Those. by inserting the wire with one end into the “A” socket, and with the other end into the “E”, you swapped these letters.

The principle of operation can be understood by looking at the circuit diagram:

The number of rotors varied in different years and for different purposes (for example, Enigmas with a large number of rotors were used in the navy).

To complicate hacking, operators coded frequently used words (names) differently each time. For example, the word "Minensuchboot" could be written as "MINENSUCHBOOT", "MINBOOT", "MMMBOOT" or "MMM354"

Accessories.

As with any popular device, there were a large number of accessories for the Enigma (yes, it started already then). For example, there were auto-printing devices (in the normal version, coding was done by lighting up lights, the values ​​​​of which the operator had to write down).

In addition, there were remote printers (on wires, of course). So that the operator who drives the encrypted message into the machine does not have access to the decrypted one.

The German cipher machine was called the "Riddle" not for a red word. The story of her capture and the decoding of radio interceptions is legendary, and cinematography contributes a lot to this. Myths and truth about the German encoder - in our material.

As is well known, the interception of messages by the adversary can only be countered by their reliable protection or encryption. The history of encryption goes back centuries - one of the most famous ciphers is called the Caesar cipher. Then attempts were made to mechanize the process of encryption and decryption: the Alberti disk, created in the 60s of the 15th century by Leon Battista Alberti, the author of A Treatise on Ciphers, one of the first books on the art of encryption and decryption, has come down to us.

The Enigma machine used by Germany during World War II was not unique. But it differed from similar devices adopted by other countries by its relative simplicity and mass use: it could be used almost everywhere - both in the field and on a submarine. The history of Enigma dates back to 1917 - then the Dutchman Hugo Koch received a patent for it. Her work consisted in replacing some letters with others due to rotating rollers.

We know the history of decoding the Enigma machine mainly from Hollywood blockbusters about submarines. However, these films, according to historians, have little in common with reality.

For example, the 2000 film U-571 tells about the secret mission of American sailors to capture the Enigma cipher machine aboard the German submarine U-571. The action takes place in 1942 in the North Atlantic. Despite the fact that the film is spectacular, the story told in it does not correspond to historical facts at all. The submarine U-571 was indeed in service with Nazi Germany, but was sunk in 1944, and the Americans managed to capture the Enigma machine only at the very end of the war, and this did not play a serious role in the approach of Victory. By the way, at the end of the film, the creators report historically true facts about the capture of the encoder, but they appeared at the insistence of the film's consultant, an Englishman by birth. On the other hand, the director of the film, Jonathan Mostov, stated that his tape "is a work of art."

European films, on the other hand, try to maintain historical accuracy, but there is also a share of fiction in them. Michael Apted's 2001 film Enigma tells the story of Tom Jericho, a mathematician who has to solve the updated code of a German cipher machine in just four days. Of course, in real life, it took much longer to decipher the codes. At first, the cryptological service of Poland was engaged in this. And a group of mathematicians - Marian Rejewski, Heinrich Zygalski and Jerzy Rozicki - studying obsolete German ciphers, found that the so-called daily code, which was changed every day, consisted of plugboard settings, the order of installation of the rotors, the positions of the rings and the initial settings of the rotor . It happened in 1939, even before the capture of Poland by Nazi Germany. Also, the Polish “Cipher Bureau”, created specifically for the “fight” with Enigma, had at its disposal several copies of a working machine, as well as an electromechanical Bomba machine, consisting of six paired German devices, which helped in working with codes. It was she who later became the prototype for the Bombe - the invention of Alan Turing.

The Polish side managed to transfer its developments to the British special services, which organized further work to crack the “mystery”. By the way, for the first time the British became interested in Enigma back in the mid-20s, however, they quickly abandoned the idea of ​​deciphering the code, apparently considering that it was impossible to do so. However, with the outbreak of World War II, the situation changed: largely thanks to the mysterious machine, Germany controlled half of the Atlantic, drowned European convoys with food and ammunition. Under these conditions, Great Britain and other countries of the anti-Hitler coalition definitely needed to penetrate the Enigma riddle.

Sir Alistair Dennison, head of the Public School of Codes and Cyphers, which was located in the huge castle of Bletchley Park 50 miles from London, conceived and carried out a secret operation Ultra, turning to talented graduates of Cambridge and Oxford, among whom was the famous cryptographer and mathematician Alan Turing . Turing's work on cracking the codes of the Enigma typewriter is dedicated to the 2014 film The Imitation Game, released in 2014. Back in 1936, Turing developed an abstract computational "Turing machine", which can be considered a model of a computer - a device capable of solving any problem presented in the form of a program - a sequence of actions. At the school of codes and ciphers, he headed the Hut 8 group responsible for the cryptanalysis of German Navy messages and developed a number of methods for breaking the German cipher. In addition to the Turing group, 12,000 employees worked at Bletchley Park. It was thanks to their hard work that the Enigma codes succumbed to decryption, but it was not possible to break all the ciphers. For example, the Triton cipher worked successfully for about a year, and even when the Bletchley guys cracked it, it did not bring the desired result, since too much time passed from the moment the cipher was intercepted to the information was transmitted to the British sailors.

The thing is that, by order of Winston Churchill, all decryption materials were received only by the heads of intelligence services and Sir Stuart Menzies, who headed MI6. Such precautions were taken to prevent the Germans from guessing about the disclosure of ciphers. At the same time, these measures did not always work, then the Germans changed the Enigma settings, after which the decryption work began anew.

The Imitation Game also touches upon the relationship between British and Soviet cryptographers. Official London was really not sure about the competence of specialists from the Soviet Union, however, on the personal order of Winston Churchill, on July 24, 1941, materials with the Ultra stamp were transferred to Moscow. True, in order to exclude the possibility of disclosing not only the source of information, but also the fact that Moscow would find out about the existence of Bletchley Park, all materials were disguised as undercover data. However, in the USSR they learned about the work on the decryption of Enigma back in 1939, and three years later, the Soviet spy John Cairncross entered the State School of Codes and Ciphers, who regularly sent all the necessary information to Moscow.

Many are wondering why the USSR did not decipher the radio intercepts of the German "Riddle", although the Soviet troops captured two such devices back in 1941, and in the Battle of Stalingrad, Moscow had three more devices at its disposal. According to historians, the lack of modern electronic equipment in the USSR at that time affected.

By the way, a special department of the Cheka, dealing with encryption and decryption, was convened in the USSR on May 5, 1921. On the account of the employees of the department there were not very many, for obvious reasons - the department worked for intelligence and counterintelligence - advertised victories. For example, the disclosure already in the twenties of the diplomatic codes of a number of countries. A cipher was also created - the famous "Russian code", which, as they say, no one managed to decipher.