The Enigma machine is a tool used in the early to mid-1900s to keep messages safe for business, government, and military use. It was widely used by Nazi Germany during World War II in all parts of the German military. The Enigma machine was thought to be very secure and was used to protect the most secret messages.
The Enigma machine uses a system of moving parts to mix up the 26 letters of the alphabet. When someone types a message on the keyboard, another person records which light above the keyboard turns on with each key press. If the message is typed normally, the lights show the secret code. Typing the secret code changes it back into the original message. The moving parts change how letters are connected with each key press. This means each letter is encoded using a different key, making it hard to break using regular methods that look for patterns in the code.
For the system to work both ways, the person receiving the message needed to use the same settings as the person sending it. These settings were usually changed daily, based on secret lists given ahead of time. Because many messages were sent each day, this system could be attacked if enough messages were captured. To make this harder, operators would choose random settings, such as "GTZ," and use the daily settings to encode those settings before sending the message. They would then switch the machine to those settings for the rest of the message. This meant only the three letters were set to the daily code, even though they were typed twice for a total of six letters. This made it seem impossible to gather enough code to break the system.
Even though the Enigma seemed hard to break, it had design problems that left clues in the code. Poland first solved the Enigma in December 1932 and was able to read messages before and during the war. Sharing this information helped the Allies use Enigma-encrypted messages as a major source of intelligence. Although Nazi Germany improved the Enigma over time, making it harder to break, experts continued to study it throughout the war. Many say that the information gained from breaking Enigma and other codes, called Ultra, helped shorten the war and may have changed its outcome.
History
The Enigma machine was created by German engineer Arthur Scherbius after World War I ended. Scherbius and his business partner, Ritter, started a company called Scherbius & Ritter. They got patents for ideas about a cipher machine in 1918 and began selling the finished product as "Enigma" in 1923. Early versions were used by businesses, and later, military and government groups in several countries, including Nazi Germany, adopted the machine for use before and during World War II.
The German military used the most complex Enigma models, which included a plugboard. Other countries, like Japan and Italy, also used their own versions of the machine. The German Navy began using Enigma in 1926, and the Army and Air Force followed soon after. This made the name "Enigma" well-known among military groups. Before the war, German military plans focused on fast, mobile forces, known as blitzkrieg, which required secure radio communication. Because enemies might intercept radio messages, the Enigma machine was used to protect these messages. It was small and easy to carry, making it useful for soldiers.
Hans-Thilo Schmidt, a German man, worked for France and gave them secret German cipher materials, including daily keys used in September and October 1932. These keys included plugboard settings. France shared this information with Poland. In 1932, Marian Rejewski, a Polish mathematician and codebreaker, used the French materials and flaws in German encryption methods to break the Enigma’s message keys. He used data from September and October 1932 to solve the unknown wiring of the machine’s rotors. This allowed Polish scientists to build their own Enigma machines, called "Enigma doubles." Rejewski worked with Jerzy Różycki and Henryk Zygalski, who were recruited from Poznań University because of their knowledge of the German language. The Polish Cipher Bureau developed techniques to read German Enigma messages starting in 1933.
As German encryption methods improved, the Poles created new tools to keep up. They used quirks in the machine’s rotors, built a cyclometer (invented by Rejewski) to create a catalog of 100,000 entries, and made Zygalski sheets. They also built an electromechanical device called the bomba (invented by Rejewski) to find rotor settings. In 1938, the Poles had six bomby (plural of bomba), but when Germany added two more rotors, they would have needed ten times as many.
On July 26 and 27, 1939, in Pyry, near Warsaw, the Poles shared their Enigma-decryption methods and equipment with French and British intelligence. They gave each group a Polish-rebuilt Enigma machine.
In September 1939, British military officials tried to bring Marian Rejewski, Jerzy Różycki, and Henryk Zygalski to safety in France. However, the men had already been sent to Romania, a country allied with Poland, by their superiors. Before leaving, they destroyed their records and equipment for security. From Romania, they traveled to France, where they continued their work with British cryptologists.
A group of seven Spanish cryptographers, called "Equipo D" (Team D), joined the effort in France. Led by Antonio Camazón, who had worked for the Spanish Republican Army during the Spanish Civil War, the team was recruited by French intelligence officer Gustave Bertrand. They worked at the PC Bruno center near Paris with Polish codebreakers, helping to adapt Polish decryption methods.
During the Norwegian campaign (April 8–June 10, 1940), three intact Enigma machines from the German Army and Air Force were captured. Starting on May 17, 1940, these machines were used at the British intelligence center at Bletchley Park.
After Germany invaded France in 1940, the Spanish team moved to the Cadix center in the Vichy-controlled area and later to Algiers, continuing their work with the Allies. Their tasks included manual decryption, finding rotor settings, and analyzing message traffic. Though their contributions were not widely known for many years, recent research has shown their important role in breaking Enigma.
Gordon Welchman, who led Hut 6 at Bletchley Park, said, "Hut 6 Ultra would never have started without the help of the Poles, who shared the details of the German Enigma machine and its operating procedures just in time." The knowledge the Poles shared in Pyry was essential for the British Enigma-decryption efforts at Bletchley Park.
During the war, British codebreakers decrypted many Enigma messages. These messages, called "Ultra" by the British, greatly helped the Allied war effort.
Although Enigma had some weaknesses, Allied success in breaking it came from
Design
The Enigma machine is a device that uses both mechanical and electrical parts to encrypt messages. The mechanical parts include a keyboard, several rotating disks called rotors that are lined up on a spindle, a component that causes the rotors to turn when a key is pressed, and a set of lamps, each labeled with a letter. These features explain why the Enigma was first called a rotor-based cipher machine when it was created in 1915.
An electrical pathway is a route through which electric current can flow. The Enigma machine uses this to scramble messages. When a key is pressed, the mechanical parts create a changing electrical circuit. The rotors rotate on the spindle, and their sides have electrical contacts that align with contacts on other rotors or fixed wiring at the ends of the spindle. When the rotors are properly aligned, each keyboard key connects to a unique electrical path through the contacts and wiring. Current from a battery flows through the pressed key, through the newly formed circuits, and back out, lighting a specific lamp that shows the encrypted letter. For example, if the message starts with "ANX…", pressing the "A" key might light the "Z" lamp, making "Z" the first letter of the encrypted message. The operator would then press "N" and "X" in the same way.
Current flows from the battery through a keyboard switch to the plugboard. It then passes through the plugboard, through the entry wheel, and into the rotors. The current travels through the wiring of the rotors, into the reflector, and back through the rotors and entry wheel. It exits through another plug connected by a cable and lights the correct lamp.
The Enigma machine uses repeated changes in the electrical path to create a type of encryption called a polyalphabetic substitution cipher. This makes the machine secure. Each time a key is pressed, the rightmost rotor rotates, changing the electrical path. For example, the letter "A" might first encrypt to "G" and then to "C" because the rotor moves, sending the signal through a different route. Over time, other rotors also rotate.
The rotors, also called wheels or drums, are the main part of the Enigma machine. Each rotor is a disk about 10 cm in diameter, made of Ebonite or Bakelite. One side has 26 brass pins arranged in a circle, and the other side has matching circular plates. The pins and plates represent the alphabet (A–Z). When rotors are placed on the spindle, the pins of one rotor connect to the plates of the next. Inside each rotor, wires connect the pins to plates in a complex pattern. Most rotors are labeled with Roman numerals, and all copies of the same rotor are wired identically. Special thin rotors called Beta and Gamma were used in the M4 naval version.
A single rotor performs a simple substitution cipher, where each letter is replaced by another letter. For example, the pin for "E" might connect to the plate for "T." The Enigma’s security comes from using multiple rotors in series and the rotors’ regular movement, creating a polyalphabetic substitution cipher.
Each rotor can be set to one of 26 starting positions. After inserting a rotor, the operator turns it to the correct position using a finger wheel on the Enigma cover. An alphabet ring on the rotor shows its position through a window on the cover. Early models had fixed alphabet rings, but later models allowed the ring to be adjusted relative to the rotor. This adjustment, called the Ringstellung, was part of the setup before using the machine.
Each rotor has one or more notches that control when it rotates. In military versions, these notches are on the alphabet ring.
The Army and Air Force Enigmas initially used three rotors, but this changed to five rotors in 1938. Operators selected three rotors for each session. Rotors were labeled I, II, III, IV, and V, each with a single notch at different positions. This variation was a security measure but also helped attackers like the Poles and British break the code.
The Naval version of the Enigma had more rotors: first six, then seven, and finally eight. These additional rotors, labeled VI, VII, and VIII, had different wiring and two notches, causing more frequent rotation. The M4 naval version used four rotors by replacing the original reflector with a thinner one and adding a fourth rotor. This fourth rotor, either Beta or Gamma, did not rotate but could be set manually.
To prevent a simple substitution cipher, each key press caused one or more rotors to rotate slightly before the electrical connections were made. This changed the substitution pattern, making the encryption more complex. The stepping mechanism varied slightly between models. The rightmost rotor rotated with every key press, while others rotated less frequently.
The movement of a rotor other than the leftmost was called a "turnover" by the British. This was achieved using a ratchet and pawl system. Each rotor had a ratchet with 26 teeth. When a key was pressed, spring-loaded pawls moved forward to engage the ratchet. The alphabet ring on the right rotor normally blocked this, but a notch on the ring would align with the pawl, allowing the rotor to rotate. The rightmost pawl had no rotor to its right, so it rotated with every key press. A single-notch rotor would rotate in this way.
Operation
A German Enigma operator would receive a message to encrypt. After preparing the machine, the operator would type the message on the Enigma keyboard. Each letter typed caused a lamp to light up, showing a different letter based on the machine’s electrical connections. The letter shown by the lamp was written down by another operator as the encrypted message. Pressing a key also moved one or more rotors inside the machine, changing the electrical path for the next letter. This ensured that even if the same letter was typed again, a different encrypted letter would appear. For every key press, the right rotor always turned, and sometimes the other rotors turned too. This process continued until the entire message was encrypted. The encrypted message was then sent, usually by radio using Morse code, to another Enigma machine. The receiver typed the encrypted message into their machine. If the receiver’s machine had the same settings as the sender’s machine, the original message would appear again.
To use the Enigma, operators needed daily settings and special documents. In the German military, messages were sent through different networks, each with unique settings. These networks were called "keys" at Bletchley Park and had code names like Red, Chaffinch, and Shark. Each group using the same network received the same settings list for their Enigma machine, which was valid for a specific time period. The German Navy used more complex procedures and special codebooks printed in red ink on pink paper so they could be destroyed if needed.
An Enigma machine’s settings (called a "Schlüssel" in German) determined how it operated. For a message to be encrypted and decrypted correctly, both the sender and receiver had to use the same settings: rotor choices, rotor order, ring positions, plugboard connections, and starting rotor positions. Most settings were set ahead of time and changed daily. For example, on the 18th day of the month, the German Luftwaffe Enigma key list number 649 had specific settings for rotors, rings, and plugboard connections.
The Enigma was designed to be secure even if someone knew the rotor wiring. In practice, the wiring was kept secret. If the wiring was unknown, the number of possible configurations was very large, making brute-force attacks impossible. However, most settings remained the same for a day, and a new starting position was used for each message. This helped prevent attacks that relied on patterns in repeated messages. The starting position was sent before the encrypted message, usually after being encoded. This method was called the "indicator procedure." Weaknesses in this process, along with mistakes by operators, made the Enigma easier to break.
An early indicator method used a shared starting position (called the "Grundstellung") for all messages. For example, if the Grundstellung was AOH, the operator would set their rotors to AOH and then choose a random starting position, like EIN, for the message. They would type EIN twice, resulting in an encrypted code, such as XHTLOA. This code was sent, and the receiver would use the shared Grundstellung to decode XHTLOA, revealing EINEIN. This showed the receiver the message’s starting position (EIN), which they used to decrypt the rest of the message.
This method had two problems. First, all messages used the same Grundstellung, making patterns easier to find. Later methods allowed each operator to choose their own starting position, which was sent clearly. Second, the message’s starting position was repeated twice, creating predictable patterns. These flaws helped Polish cryptanalysts break the Enigma system as early as 1932. The flawed method was later called the "faulty indicator technique."
During World War II, codebooks were used daily to set up the Enigma’s rotors, ring positions, and plugboard. For each message, the operator chose a random starting position (e.g., WZA) and a random message key (e.g., SXT). They set the rotors to WZA, encrypted SXT to get a code like UHL, and then used SXT as the starting position to encrypt the message. The receiver would use WZA to decode UHL, revealing SXT, and then use SXT to decrypt the message. This avoided the earlier security flaw of repeating the message key.
This method was used by the German Army and Air Force. The Navy used more complex procedures. Before encrypting, messages were converted into four-letter groups using a codebook called the Kurzsignalheft. This book included tables for converting sentences into codes, covering topics like logistics, positions, and weather. Another codebook listed "Kenngruppen" and "Spruchschlüssel," which identified the key and message.
The Army Enigma machine used only the 26 letters of the alphabet. Punctuation was replaced with rare letter combinations, and spaces were omitted or replaced with the letter X. The letter X was often used as a full stop. Other parts of the military used different punctuation rules, such as the Wehrmacht.
Models
The Enigma family had many different designs. The first were commercial models made in the early 1920s. Starting in the mid-1920s, the German military began using Enigma and made several security changes. Many countries either used Enigma or adapted it for their own cipher machines.
About 40,000 Enigma machines were built. After World War II ended, the Allies sold captured Enigma machines to developing countries. These machines were still thought to be secure.
On February 23, 1918, Arthur Scherbius applied for a patent for a ciphering machine that used rotors. Scherbius and E. Richard Ritter started a company called Scherbius & Ritter. They showed their design to the German Navy and Foreign Office, but neither was interested. Scherbius & Ritter then gave the patent rights to Gewerkschaft Securitas. This group formed the Chiffriermaschinen Aktien-Gesellschaft (Cipher Machines Stock Corporation) on July 9, 1923. Scherbius and Ritter were on the company’s board of directors.
Chiffriermaschinen AG began advertising a rotor machine called the Enigma Handelsmaschine. It was displayed at the International Postal Union Congress in 1924. The machine was large and heavy, with a typewriter. It measured 65×45×38 cm and weighed about 50 kilograms (110 pounds).
This model also had a typewriter. Early versions had problems with the printer and were not stable until 1926. Both early Enigma models lacked a reflector and had to switch between encrypting and decrypting messages.
The reflector, suggested by Scherbius’ colleague Willi Korn, was added in the glow lamp version.
The machine was also called the military Enigma. It had two rotors and a manually rotatable reflector. The typewriter was removed, and glow lamps were used for output. The operation was different from later models. Before pressing the next key, the operator had to press a button to move the right rotor one step.
Enigma model B was introduced late in 1924 and had a similar design. Models A and B were different from later versions. They were larger and shaped differently. They also lacked a reflector. This model was called the Glowlamp Enigma or Glühlampenmaschine because it used a lamp panel instead of paper for output. This method was more reliable and cheaper. Because of this, the machine cost 1/8th the price of its predecessor.
Model C was the third in the "glowlamp Enigmas" series (after A and B) and also lacked a typewriter.
Enigma C was quickly replaced by Enigma D in 1927. This version was widely used, with shipments to Sweden, the Netherlands, the United Kingdom, Japan, Italy, Spain, the United States, and Poland. In 1927, Hugh Foss at the British Government Code and Cypher School showed that commercial Enigma machines could be broken if suitable clues were available. Enigma D also introduced a standard keyboard layout used later in German computing. This "QWERTZ" layout is similar to the American QWERTY keyboard used in many languages.
Other countries used Enigma machines. The Italian Navy adopted the commercial Enigma as "Navy Cipher D." The Spanish used commercial Enigma machines during their Civil War. British codebreakers cracked these machines, which lacked a plugboard. Enigma machines were also used by diplomatic services.
There was also a large, eight-rotor printing model called Enigma H, known as Enigma II by the Reichswehr. In 1933, the Polish Cipher Bureau found that it was used for high-level military communication, but it was soon stopped because it was unreliable and jammed often.
The Swiss used a version of Enigma called Model K or Swiss K for military and diplomatic use. This model was similar to commercial Enigma D. The machine’s code was cracked by Poland, France, the United Kingdom, and the United States, which called it INDIGO. An Enigma T model, code-named Tirpitz, was used by Japan.
The Wehrmacht used different Enigma versions and replaced them often, sometimes using models adapted from other services. Enigma rarely carried high-level strategic messages. When not urgent, these messages were sent by courier. When urgent, they used other systems like the Geheimschreiber.
The Reichsmarine was the first military branch to adopt Enigma. This version, called Funkschlüssel C ("Radio cipher C"), was produced by 1925 and used starting in 1926.
The keyboard and lampboard had 29 letters — A-Z, Ä, Ö, and Ü — arranged alphabetically, unlike the QWERTZUI order. The rotors had 28 contacts, with the letter X wired to bypass the rotors unencrypted. Three rotors were chosen from a set of five, and the reflector could be placed in one of four positions, labeled α, β, γ, and δ. The machine was slightly revised in July 1933.
By July 15, 1928, the German Army (Reichswehr) introduced its own version of the Enigma machine, called Enigma G.
The Abwehr used Enigma G. This version was a four-wheel machine without a plugboard and had multiple notches on the rotors. It had a counter that increased with each key press, so it was also called the "counter machine" or Zählwerk Enigma.
Enigma G was modified into Enigma I by June 1930. Enigma I, also called the Wehrmacht or "Services" Enigma, was widely used by German military services and government groups, like the railways, before and during World War II.
The main difference between Enigma I (the German Army version from 1930) and commercial Enigma models was the addition of a plugboard, which swapped pairs of letters and greatly improved security.
Other differences included a fixed reflector and moving the stepping notches from the rotor body to the movable letter rings. The machine measured 28 cm × 34 cm × 15 cm (11.0 in × 13.4 in × 5.9 in) and weighed about 12 kg (26 lb).
In August 1935, the Air Force introduced the Wehrmacht Enigma for their communications.
By 1930, the Reichswehr suggested the Navy adopt their machine, citing better security (with the plugboard)
Surviving machines
The effort to break the Enigma was not revealed until 1973. Since then, people have shown more interest in the Enigma machine. These machines are now displayed in museums worldwide and owned by private collectors and those who study computer history.
The Deutsches Museum in Munich shows both three- and four-rotor versions used by the German military, as well as civilian models. The Deutsches Spionagemuseum in Berlin displays two military versions. Enigma machines are also shown at the National Codes Centre in Bletchley Park, the Government Communications Headquarters, the Science Museum in London, Discovery Park of America in Tennessee, the Polish Army Museum in Warsaw, the Swedish Army Museum in Stockholm, the Military Museum of A Coruña in Spain, the Nordland Red Cross War Memorial Museum in Norway, the Artillery, Engineers and Signals Museum in Finland, the Technical University of Denmark, Skanderborg Bunkerne in Denmark, the Australian War Memorial, and the Australian Signals Directorate in Australia. The Jozef Pilsudski Institute in London displayed a rare Polish Enigma made in France in 1940. In 2020, with help from the Ministry of Culture and National Heritage, this machine became part of the Polish History Museum.
In the United States, Enigma machines are shown at the Computer History Museum in California and the National Cryptologic Museum in Maryland, where visitors can try to encode and decode messages. Two machines captured during World War II are displayed with the submarine U-505 at the Museum of Science and Industry in Chicago. A three-rotor Enigma is at Discovery Park of America in Tennessee. A four-rotor model is on display in the Pentagon’s ANZUS Corridor, loaned by Australia. The United States Air Force Academy in Colorado Springs shows a machine in its Computer Science Department. The National WWII Museum in New Orleans and the International Museum of World War II near Boston also display Enigma machines. The International Museum of World War II has seven models, including a U-boat four-rotor version, one of three surviving Enigmas with a printer, one of fewer than ten surviving ten-rotor machines, a machine damaged by a retreating German unit, and two three-rotor models for visitors to use. The Mimms Museum of Technology and Art in Georgia displays a three-rotor model with two extra rotors, fully restored with original purchase records from 1936. The National Museum of Computing in England and Carnegie Mellon University Libraries also have Enigma machines in their collections.
In Canada, a Swiss Army Enigma-K is displayed at the Naval Museum of Alberta in Calgary. A four-rotor model is shown at the Military Communications and Electronics Museum in Kingston, Ontario.
Enigma machines are sometimes sold at auctions. In 2017, prices ranged from $40,000 to $547,500. Replicas are available, including copies of the Naval M4 model, electronic versions, and paper-based simulators.
A rare Abwehr Enigma, labeled G312, was stolen from Bletchley Park in 2000. A man named "The Master" demanded £25,000, threatening to destroy the machine if the money was not paid. Bletchley Park officials said they would pay the ransom, but the deadline passed without a response. The machine was later sent to a journalist, missing three rotors. In 2000, an antiques dealer named Dennis Yates was arrested for arranging the return of the missing parts. The machine was later returned to Bletchley Park. Yates was sentenced to ten months in prison and served three months.
In 2008, 28 Enigma machines were found in an attic in Madrid. These four-rotor models helped Franco’s Nationalists during the Spanish Civil War. Though British cryptologist Alfred Dilwyn Knox broke the code in 1937, this was not shared with the Republicans. The Nationalist government used its 50 Enigmas until the 1950s. Some machines are now displayed in Spanish museums, and two were given to Britain’s GCHQ.
Bulgaria used Enigma machines with Cyrillic keyboards. One is displayed in Sofia’s National Museum of Military History.
In December 2020, divers found a destroyed Enigma machine in the Baltic Sea, likely from a sunken U-boat. It will be restored by the Archaeology Museum of Schleswig Holstein.
An M4 Enigma was recovered from a German minesweeper sunk in 1945 and displayed in Slovenia in 2023.
In November 2025, an Enigma M4 used by Karl Dönitz was sold at an auction in Paris for 482,600 euros.
Derivatives
The Enigma machine was important in the design of cipher machines, inspiring other rotor machines. After the British learned how Enigma worked, they created the Typex rotor cipher, which the Germans thought could not be solved. Typex was based on Enigma patents, and it includes features described in the patents that were not used in the actual Enigma machine. The British did not pay any fees for using the patents. In the United States, cryptologist William Friedman began designing the M-325 machine in 1936, which works in a similar logical way.
Machines like SIGABA, NEMA, Typex, and others are not considered Enigma derivatives because their internal methods for encoding messages are not mathematically the same as Enigma’s process.
A special rotor machine called Cryptograph was built in 2002 by Tatjana van Vark of the Netherlands. This device uses 40-point rotors, allowing letters, numbers, and some punctuation to be used. Each rotor has 509 parts.