Encyclopedia > Enigma

  Article Content

Enigma

This article relates to the Enigma in cryptography. For the Enigma web browser, see Enigma browser; for the musical work by Elgar see Enigma Variations.

Fig. 1 - The Enigma Machine
The Enigma was an electro-mechanical cypher machine used for both encryption and decryption, widely used in various forms by most German military forces. Ease of use and the supposedly unbreakable cypher were the main reasons for its widespread use. The cypher was in fact broken, and the reading of information in the messages it didn't protect is generally credited with ending World War II at least a year earlier than it would have otherwise.

The British encryption machine, Typex, and several American ones, eg the SIGABA or M-134-C, were similar in principle to Enigma, but far more secure.

Table of contents

History

Enigma was developed by Arthur Scherbius in various versions dating back to 1919. He set up a Berlin company to produce the machine, and the first commercial versions were offered for sale in 1923. Several copies were purchased by the German Navy in 1926, and the device was then picked up by the Army in 1929, and thereafter by practically every German military organization and by most parts of the Nazi hierarchy. In the German Navy, it was called the "M" machine.

Versions of Enigma were used for practically all German (and much other European Axis) radio, and often telegraph, communications throughout the war, even weather reports were encrypted with an Enigma machine. Both the Spanish (during the Civil War) and Italians (during World War II) are said to have used the commercial machine, unchanged, for military communications. This was unwise, for the British (and one presumes, others) had succeeded in breaking the plain commercial version.

Operation

The Enigma machine was electro-mechanical, meaning it used a combination of electrical and mechanical parts. The mechanism consisted primarily of a typewriter-style keyboard, which operated electrical switches as well as a gearing mechanism.

The electrical portion consisted of a battery attached through the keys to lamps. In general terms, when a key was held down on the keyboard, one of the lamps would be lit up by the battery. In the picture to the right you can see the typewriter keys at the front of the machine, and the lights are the small (barely visible) circles "above" the keyboard in the middle of the machine.

The heart of the basic machine was mechanical, consisting of several connected rotors. Enigma rotors consisted of flat disks with 26 contacts on each side, arranged in a circular manner around the outer faces of the disk. Every contact on one side of each disk is wired to a different contact on the other side. For instance, in a particular rotor the 1st contact on one side of the rotor might be wired to the 14th contact on the other side, the 2nd one the first side to the 22nd on the other, and so forth. Each rotor in the set supplied with an Enigma was wired differently than the others, and the German military/party models used different rotor wirings than did the commercial models.

Inside the machine were three slots (n most variants) into which the rotors could be placed. The rotors were "stacked" in the slots in such a way that the contacts on the "output" side of one rotor were in contact with the "input" contacts on the next. The third rotor was connected to a reflector (unique to the Enigma family amonst the various rotor machines designed in the period) which was hard wired to feed outputs of the third rotor back into different contacts of the third rotor, thence back to the first rotor, but by a different route. In the picture you can see the three stacked rotors at the very top of the machine, with teeth protruding from the surface that allows the rotors to be turned by hand.

When a key was pressed on the keyboard, the current from the battery flowing to that letter, say A, would be fed into the A position of the first rotor. There it would travel through the rotor's internal wiring to, say, the J position on the other side. It would then go into the next rotor, perhaps turned such that the first rotor's J was lined up with the second's X. From there it would travel to the other side of the second rotor, and so on. By the time the signal had travelled through the rotors and back, some other letter than A would light in the lamp array – thus substituting one letter for another, the key to all substitution cypher systems.

Because the rotors changed position (rather like an automobile odometer) with every key press, A might be Q this time, but the next A would be something different, perhaps T. After 26 letters were pressed, a cam on the rotor spun the rotor in the next slot. The substitution alphabet thus changed with every plaintext letter.

Better yet, due to the "random" wiring of each rotor, the exact sequence of these substitution alphabets varied depending on the initial position of the rotors, their installed order, and which rotors were installed in the machine. These settings were referred to as the initial settings, and were given out in books once a month (to start with -- they became more frequent as time went on).

The machine was symmetrical in the sense that decypherment[?] works in the same way as encypherment[?]: type in the encyphered text and the sequence of lit lamps will correspond to the plain text. However, this works only if the decyphering machine has the same configuration as had the encrypting machine (rotor sequence, wiring, ring settings, and initial positions); these changed regularly (at first monthly, then weekly, then daily and even more often near the end of the War on some networks) and were specified in key schedules distributed to Enigma users.

Basic Decryption

Ciphers can be attacked in a number of ways, and by the opening of World War I code-breaking departments were good enough that most cyphers could be broken with enough effort. However most of the techniques used relied on gaining access to sufficient quantities of encyphered text, from which patterns might be discerned with much hard work.

In the frequency analysis technique, letters and patterns of letters are counted. Since certain letters appear much more frequently than others in any particular language, this counting can reveal information about likely substitutions in the cipher. Use of the technique typically attempts to find a few key letters and combinations, for instance for English, E S and T, as well as NG, ST and other similar combinations. Once these are found the message is partially decrypted, revealing more information about other likely substitutions.

Simple frequency analysis relies on any one letter always being substituted for another letter in the cypher: if this is not the case the situation is more difficult. For many years, cryptographers attempted to hide the frequencies by using several different substitutions for common letters, but this is unable to fully hide patterns in the substitutions for plaintext letters. Such codes were being widely broken by the 1500s.

One technique to make frequency analysis more difficult is to use a different substitution for every letter, not only the common ones. This would normally be a very time-consuming process that required both parties to exchange their substitution patterns prior to talking. In the 1500s, a new technique became used, now known generally as polyalphabetic ciphers, which provided a simple technique for "creating" a library of substitution patterns. The two parties would exchange a small pattern, referred to as the key, and follow a simple technique that resulted in a different substitution being used for every letter.

It took several hundred years to reliably break these cyphers, and the new techiques relied on statistics (coincidence counting, for example) to discover information about the key used for a message. Basically these techniques look for repeating patterns in the ciphertext, which provide clues about the length of the key. Once this is known the message essentially becomes a series of messages, each as long as the length of the key, to which normal frequency analysis can be applied. Babbage, Kaisiski, and Freidman are among those who did most to develop these techniques.

Cryptographers were instructed to not only use a different substitution for every letter, but also to use a key that is very long, so that both of these techniques will fail. However this is very difficult to arrange; a very long key would take longer to convey to the parties who needed it, and mistakes would be mmore likely. The ultimate cypher of this kind would be one in which such a long key could be generated from a simple pattern, just as the polyalphabetic ciphers generate a number of substitution alphabets given a simple key.

Enigma's use of multiple rotors provided a simple way of transmitting which substitution alphabet to use for any letter. In this respect it was similar to the polyalphabetic cipher. However, unlike the polyalphabetic system, the Enigma had no obvious key length since the rotors generated a new substitution alphabet with each keypress, and the entire sequence of substution alphabets could be changed by spinning one or more rotors before starting a new encryption. In the most simple sense, Enigma had a library of 26 x 26 x 26 = 17576 alphabets for any given combination and ordering of rotors. In addition, the sequence of alphabets used was different if the rotors were started in position ABC, as opposed to ACB. As long as the message was not longer than 17576 characters, there would be no repeated use of a substitution alphabet. And yet this 'key' can be easily communicated to another user: it's simply three letters long.

Encoding Methodology

Of course, if those settings were intercepted, a code-breaker could simply set their copy of an Enigma to the same settings and decode the message. One could send out books of settings to use, but these could be intercepted. Instead the Germans settled on a clever system that blended the two designs.

Enigma operators were at first given a new book every month that contained the initial settings for the machine. For instance, on a particular day the settings might be to put rotor number 7 in slot 1, 4 in 2 and 6 in 3. They are then spun, so that slot 1 is at X, slot 2 at J and slot 3 at A. Since the rotors could be moved around in the machine, with three rotors in three slots you have another 3 x 2 x 1 = 6 combinations to consider, for a total of 105456 possible alphabets.

At this point the operator would then select some other settings for the rotors, this time defining only the positions, or "spins" of the rotors. A particular operator might select ABC, and these become the message settings for that encryption session. They then typed their message settings into the machine, which is still set up in the initial settings. To be on the safe side, they typed it twice. The results would be encrypted, so the ABC typed twice might turn into XHTLOA. The operator then spins the rotors to his message settings, ABC. The rest of the message is then typed in, and sent it over the radio.

At the receiving end the operation is reversed. The operator sets the machine to the inital settings and types in the first six letters of the message. Upon doing this he will see ABCABC light up on the machine. He then spins the rotors to ABC and types in the rest of the encrypted message, decoding as it goes.

This system was excellent because cryptanalysis fundamentally relies on frequency counting of some sort. Although lots of messages would be sent in any one day with six letters from the initial settings, those letters were intended to be random. While an attack on the cypher itself ought to have been possible, every message used a different cypher key, making frequency counting useless in practice. With modern computers, things might have been different, but with pencil and paper...

Enigma was very secure. So secure in fact that the Germans relied very heavily on it. The Enigma-encrypted traffic included everything from from high-level messages about tactics and plans, to trivialities such as weather reports and even birthday congratulations.

Breaking the Enigma

The effort which broke the German cypher began in 1929 when the Poles intercepted an Enigma machine being shipped from Berlin and mistakenly not protected as diplomatic baggage. It was not the military version of the machine, but it provided a hint that the Germans would be using an Enigma type machine in the future. When the German Army first began using modified Enigmas a few years later, the Poles attempted to 'break the system' by finding the wirings of the rotors used in the Army version and by finding a way to recover the settings used for particular messages.

A young Polish mathematician, Marian Rejewski, made one of the most signficant breakthroughs in cryptanalytic history by using fundamental mathematical and statistical techniques to find a way to do both. Rejewski noticed a pattern that was to prove vital; since the message code was repeated twice at the beginning of the message, you could guess the wiring of a rotor not by the letters themselves, but by the way they changed.

For instance, let's say an operator picked QRS as their message settings. They would set the machine to the day's ground settings, and then type QRSQRS. This would turn into something like JXDRFT. Now this looks like complete gibberish, but the clue Rejewski exploited was that the disk had moved three positions between the two sets of QRS – we know that J and R are originally the same letter, and the same for XF and DT. We don't know what the letters are, but nor do we care, because while there are a huge number of rotor settings, there are only a small number of rotors that will have a letter go from J to R, X to F and D to T. Rejewski called these patterns chains.

Finding the proper chains from the 105456 possiblilities was quite a task. In order to expedite this the Poles developed a number of methods. One technique used clear strips for each rotor showing which letters could be chained, with the letters that could not chain being blacked out. Users would pick up the strips and lay them over each other, looking for selections where the three letters were clear all the way through.

Of course, a few thousand possibilites is still a lot to try. To solve this problem the Poles eventually built several "parallel enigma" machines which they called the bomba kryptologiczna (cryptologic bomb). (Suggestions are that the name was chosen from a kind of local ice-cream dish, or from the ticking noise the machine made as it ran through the possibilities; the French later changed the name to 'bombe' and the English to 'bomb'). Possible sets of disks would be loaded into the machine and then a message could be tried on all of the settings at once. Now you were down to hundreds of possibilites. Hundreds is a reasonable number to attack by hand.

The Poles were able to determine the wiring of the rotors then in use by the German Army and, using them, to decrypt a large portion of German Army traffic for much of the 1930s. They received some assistance from the French, who had an agent (Hans Thilo-Schmidt, codenamed Asch by the French) in Berlin who had access to Enigma key schedules, manuals, etc. Rejewski's cryptanalytic breakthrough did not, however, depend on that information.

Some sources claim (without much support from participants' accounts) that in 1938 a Polish mechanic employed in a German factory producing Enigma machines took notes of the components before being repatriated and, with the help of the British and French secret services, constructed a wooden mockup of the machine. There's also a story about an ambush by the Polish resistance of a German Army vehicle carrying an Enigma machine... In neither case would the ground settings, much less the individual message settings chosen by the operators, be available. These stories are, thus, less than inherently plausible.

However, in 1939 the German Army increased the complexity of their Enigmas. Whereas in the past they had only three rotors and simply moved them from slot to slot, they now introduced an additional two rotors to the mix. They also had their operators stop sending the message settings twice, which eliminated the original method of attack.

The Poles, realizing time was running out before the Germans invaded, decided in mid-1939 to share their work, and passed to the French and the British some of their ersatz 'Enigmas', information on Rejeski's breakthrough, and on the other techniques they had developed. The information was shipped to France in diplomatic baggage, and the British share on to Bletchley Park in England. Up until this point German military Enigmas had utterly defeated both British and French attempts, and they faced the terrifying possibility that German communications would remain "black" for the entire anticipated war. In fact, nearly all the personnel of the Polish cryptography section left Poland during the invasion and most of them ended up in France, working with French cryptographers on German transmissions. The work continued there until the fall of France (and even somewhat after). Some of the French/Polish workers managed to escape to England; none were used to help the British cryptanalytic effort against the Engima networks. When Rejewski learned (shortly before his death) of the work at Bletchley Park and its importance to winning WWII, he was astonished.

Ultra

With this massive Polish assistance, the British began to work on German Enigma traffic themselves. Early in 1939 Britain's secret service installed its Code and Cypher School at Bletchley Park, 50 miles (80 km) north of London, for the purpose of intercepting the Germans' message traffic and breaking it if possible. Eventually, and controlling the distribution of the resultant secret information became an important Bletchley Park effort as well.

There, British mathematicians and cryptographers, chess players, bridge players, and crossword puzzle fans, among them Alan Turing, conquered the problems presented by the many German Enigma variations, and found means of cracking them. The information so produced was eventually termed Ultra. Strict rules were established to restrict the number of people who knew about the existence of the Ultra information and to ensure that no actions would alert the Axis powers that the Allies possessed knowledge of their plans.

British attacks on the Enigmas were similar in concept to the original Polish methods, but based on different specifics. First, the German Army had changed their practices (more rotors etc), and second, the German Navy had always used similar more secure practices.

One new attack relied on the fact that the reflector (a patented feature of the Enigma machines) guaranteed that no letter could be coded back to itself, so an A could never turn back into an A. Another technique counted on various common German phrases, like "Heil Hitler" or "please respond", which were found to likely be in this or that plaintext; successful guesses as to the plaintext were known as cribs. With a probable plaintext fragment and the knowledge that no letter could be encyphered as itself, it wasn't uncommon that a corresponding cyphertext fragment could be identified. This provide a large hint as to the message settings, much in the same way the message setting codes did for the Polish teams.

German operators themselves also gave the decrypters immense help on a number of occasions. In one instance an operator was asked to send a test message, so he simply hit the T key repeatedly and sent it. A British analyst received a long message without a single T in it from the interceptor stations, and immediately realised what had happened. In other cases Enigma operators would constantly use the same settings for their message codes, often their own initals or those of their girlfriends. Analysts were set to finding these messages in the sea of traffic every day, allowing Bletchley to use the original Polish technique to find the initial settings for the day. Other German operators used "form letters" for daily reports, notably weather reports, so the same crib could be used every day.

From the beginning the Naval version of Enigma used a greater variety of rotors than did the Army version, as well as various operational methods that made it much more secure than other Enigma variants. There was no hint at all of the initial settings for the machines, and there was little probable plaintext to use either. Different, and far more difficult methods had to be used to break this system, and with the U-boats running amok in the Atlantic, a direct approach recommended itself.

On May 7 1941 British Commandos captured a German weather ship, together with cipher equipment and coded, and 2 days later U-110 was captured, together with an Enigma machine, code book, operation manual and other information enabling the code to be broken until the end of June.

In addition to U-110, Naval Enigma machines or settings books were captured from a total of 7 U-boats and 8 German surface ships, including U-boats U-505 (1944), and U-559 (1942), as well as from a number of German weather-reporting boats, from some converted trawlers, and so on. Several other more imaginative techniques were dreamed up, including Ian Fleming's suggestion to "crash" captured German bombers into the sea near German shipping, hoping to be "rescued" by the crew, which would then be taken captive by the commandos hiding in the plane.

In other cases the Allies forced the Germans to provide them with a crib. To do this they would drop mines (or take some other action), and then listen for messages being sent. They knew the word "Minen" would be in some of them. This technique was called gardening.

Had the Germans ever replaced every rotor at the same time, it is possible that the British would not have been able to break back into the system. However, both because of the expense and because of the difficulty of getting all those new rotors to all the necessary sites, it was never done. Instead the Germans simply added new rotors to the mix every so often, allowing the settings of the newest ones to be deciphered after a short period.

Even these brief periods were enough to have dramatic effects on the war. Charting the amount of traffic decoded against the British shipping losses for that month shows a strong pattern of increased loss when Naval Enigma was blacked out, and vice versa. But by 1943 so much traffic had been decoded that the code breakers had excellent understanding of the messages coming from various locations and times. For instance a message sent from the west at 6am was likely to be sent by a weather reporting boat in the Atlantic, and that meant the message would contain these cribs. From this point on, Naval Enigma messages were being read constantly, even after changes to the gound settings.

However, like the Polish system, these tricks only reduced the number of possible settings. The number remaining was still huge, and due to the new rotors the Germans had been adding, that number was much larger than the Poles had been left with. In order to solve this problem the Allies "went industrial", and produced large versions of the Polish bomba that could test hundreds of keys at once.

Some Germans had some inkling that all was not right with Enigma. Karl Doenitz received reports of "impossible" encounters which made him suspect some compromise with his communications. In one instance, three U-boats met at a tiny island in the Caribbean and a British destroyer showed up, unable to resist such a tempting target. They all escaped and reported what had happened. Doenitz immediately asked for a review of Enigma's security. The analysis suggested that the signals problem, if there was one, wasn't due to the Enigma itself. Doenitz had the settings book changed anyway, blacking out the British for a period. However the evidence was never enough to truly convince him over the objections of the coders.

In 1941 British intelligence learned that the German Navy was to introduce Triton a new version of Enigma with 4 wheels rather than 3. Fortunately, in Decmber a U boat mistakenly transmitted a messsage using Triton before it was due to be implemented. Realising the error, they re-transmitted the same message using 3 wheel Enigma, giving the British the clue needed to break the new machine when it became operational on February 1 1942. Triton code was given the name Shark.

By 1945 almost all German Enigma traffic could be decoded within a day or two, yet the Germans remained convinced of its security. Had they been aware of Allied progress against Enigma, they simply would have changed systems, forcing the code-breakers to start over. The traffic was considered so secure that they openly discussed their plans and movements, handing the British and the United States a huge amount of very useful information. Not all of which was properly used; the Battle of the Bulge was clearly foreshadowed in German Enigma traffic, but that information was not properly appreciated.

It is commonly claimed that the breaks into Naval enigma resulted in the war being a year shorter, but given its effects on the Battle of the Atlantic (1940) alone, that might be underestimating things.

After the War

The fact that Enigma had been broken during the War remained a secret until the late 1960s. The important contributions of a great many people remained unknown and they were unable to share in the glory of what is likely one of the chief reasons the Allies won the war as quickly as they did. Eventually the story became known.

After the war ended, the British and Americans sold surplus Enigmas and Enigma-like machines to many countries around the world, who remained convinced of the security of this "unbreakable" code machine. Their traffic was not so secure as they believed, which is, of course, one reason the British and Americans made the machines available.

In 1967 David Kahn released his book The Codebreakers, which described the capture of the Naval Enigma from U-505. He went on to mention, somewhat in passing, that Enigma messages were already being read by that time, requiring machines that filled several buildings. By 1970 newer computer-based cyphers were becoming popular as the world increasingly turned to computerised communications, and the usefulness of Enigma copies (and rotor machines generally) rapidly decreased. It was decided at this point to "let the cat out of the bag", and offical reports about some of Bletchley Park's operations were released in 1974.

Many accounts of these events and of other World War II crypto happenings have been published since then. Several are unreliable in many respects. This is due to several reasons:

  • First, not all of the authors were in a position to know (e.g., several books have been published by those on the Ultra distribution side at Bletchley Park, but work there was very seriously compartmentalised, making it difficult to credit some episodes when they are due only to such a source. The story about Churchill deliberately not interfering with a Luftwaffe bombing of Coventry which was known through Enigma decrypts is one such; see P Calvocoressi's book for a more reliable account of this matter than that in Winterbotham's.);
  • second, the work done was tricky and quite technical (those without sympathy for it are not likely to have got the details or the implications of those details quite right);
  • third, documents have been lost in secret archives, those not lost took decades to finally be released to the public, and in any case, none were written originally, nor made available later, with historical clarity in mind;
  • fourth, governments have chosen to keep secret or release information to serve their purposes, not public knowledge;
  • fifth, several authors have their own agendas (at least one incident is known of whole cloth fabrication regarding British cryptanalytic progress on a particular World War II Japanese Navy crypto system -- the account was claimed to have been written from the unpublished memoirs of an Australian cryptanalyst, but important parts of the published version were simply invented to suit the writer's convenience);
  • sixth, many writers have not done their research (the exact fate of the Enigma spy 'Asch' was not publicly known till Hugh Sebag-Montefiore tracked his daughter down ca '99; see his book for the details).

More than in most history, the history of cryptography, especially its 'recent' history, must be read carefully.

A responsible, and mercifully short, account of World War II cryptography which is essentially up-to-date as of this writing is Battle of Wits by Stephen Budiansky. It covers more than just the Enigma story. Hugh Sebag-Montefiore's recent Enigma is both well written and accurate, and includes some previously unknown information -- and many excellent photographs. David Kahn's Breaking the Enigma is essentially about the problem of Naval Enigma; it's also accurate. Finally, an excellent and accessible (in addition to being brief) description of the Enigma, as well as other codes/cyphers, can be found in Simon Singh's The Code Book.

External Links



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Islip Terrace, New York

... there are 96.9 males. For every 100 females age 18 and over, there are 93.6 males. The median income for a household in the town is $66,644, and the median income for ...

 
 
 
This page was created in 83.4 ms