Spy sets
Burst encoders
Logo (click for homepage)
Enigma M4
U-Boot Enigma

The Enigma M4 was an electromechanical cipher machine, developed during WWII, exclusively for the U-Boot division of the Kriegsmarine (Germany Navy). It was intended as the successor to the Enigma M3, which in turn was based on the standard German Army Enigma I. The Enigma M4 played a vital role in the Battle of the Atlantic and was introduced completely unexpected on 2 February 1942. It caused great upset with the allied codebreakers at Bletchley Park (BP), who called it the Shark-key. It remained unbroken for 9 months until new codebooks were captured.
Like the Naval M3 Enigma, the design of the M4 is based on the Enigma I, that was already in use by the Wehrmacht and Luftwaffe. It has three moving code wheels, a fixed reflector (UKW) and a Steckerbrett (plug board) at the front.

It was supplied with 8 different coding wheels, (marked I to VIII), three of which were in the machine at any given time. The wiring of wheels I to V was identical to those of the Enigma I. Unlike the Army however, the Navy choose to have letters (A-Z) on the circumference of each wheel, rather than numbers (01-26). The wiring of each wheel is given in the table below.

Besides the 3 extra wheels to choose from, an extra wheel (Zusatzwalze) was added to the M4, to the left of the 3 'normal' wheels. This extra wheel forms an additional stage in the ciphering process. The extra wheel is not moved during encypherment and can not be exchanged with the other three wheels. When the extra wheel is placed at position A, the machine is backwards compatible with the 3-wheel Enigma I and the Enigma M3. Two different versions of the extra wheel are known: Beta and Gamma (see below).
Click to enlarge
In the U-boats, the Enigma was usually located in the radio room, although in some cases it was carried out to the captain's quarters, e.g. in case of a double encipherment (Sonderschlussel M). Most U-boats even had two Enigma machines available to cope with different keys around the switch-over point at midnight. One Enigma would then be left with the settings of the previous day, whilst the other one was configured with the settings for the new day. As some messages were received with a delay, they could quickly be tried with both keys.
The image on the right shows the earlier Enigma M3 (3-wheel variant) aboard the U-124 in March 1941 [3]. The Enigma machine is located in a recessed bay in the table and is visible in the bottom left of the picture. In the enlargement, a power cable is visible in the corner of the bay. It was used to supply 4V directly to the machine.

The person in the image is the radio operator. The Enigma was probably operated by a different person positioned to his left. To the left of the Enigma is a table which might have been used to (partly) code the message (e.g. bigram table).
Enigma M3 in U-Boot U-124. Photograph courtesy German Federal Archive [3]. Click to enlarge.

Behind the back of the radio operator (to the right of the large radio) is a message form (Funkspruch) that was used by the radio man to write down received morse code messages. After reception, the form was passed to the cipher clerk for decipherment. A small interesting detail in the above image is the presence of a domestic Radione receiver in front of the radio operator. It was probably used for reception of music from regular broadcast stations whilst at the surface.
Wooden case of Enigma M4 Perspective view of Enigma M4 with open lid and open flap Enigma M4 with removed top lid Removed top lid Close-up of the spare light bulbs inside the top lid Close-up of the Steckerbrett of the Enigma M4 Enigma M4 control panel Frontal view of an Enigma M4 with open lid and open flap Top view of Enigma M4
Close-up of the wheels of the Enigma M4 Top view of the wheels of the Enigma M4 Metal placard with voltage Enigma M4 lamp panel, keyboard and plug board Lifting the Enigma M4 Rightmost bracket Removing the lamp panel Lamp panel and wheels of Enigma M4

The image below shows the various controls and features of the Enigma M4. Unlike with the Enigma I, that was used by the Luftwaffe and Wehrmacht, the top lid of the wooden case of the M4 can be removed. This was done for two reasons: (1) because inside a U-boat with its limited space the lid was considered impractical, and (2) the hinges are needed for attaching the optional Schreibmax printer. For this reason, the removable lamp panel is separated from the wheel cover.

The machine has three normal cipher wheels (selected from a total of 8 wheels), plus an extra chipher wheel to their left. The layout of the keyboard and the lamp panel is in the standard (German) QWERTZU... order. Like the other military Enigma machines (Enigma I and Enigma M3), the M4 has a plugboard at the front that is covered by a wooden flap. The flap needs to be closed when the machine is operated, to ensure that all plugs are fully inserted.
Below is the simplified circuit diagram of the M4. It is similar to the circuit diagram of the Enigma I (or the M3 for that matter), but has an extra coding wheel at the left (4). If you don't understand how the Enigma works, you might want to read about the working principle first.
Simplified circuit diagram of the Enigma M4

The M4 is in fact a modified 3-wheel machine. The width of the UKW has been halved and the remaining space is taken up by the 4th wheel, which has spring-loaded contacts at either side. As it is thinner than the other wheels, it is sometimes called the thin wheel. It is also referred to as the Griechenwalze (Greek wheel) as it was identified with the Greek letter Beta or Gamma. The official name for the 4th wheel in German nomenclature was Zusatswalze (additional wheel).

 More about the Enigma working principle
The cipher wheels inside the Enigma M4 Cipher wheels removed from the M4 Cipher wheels removed from the M4. At the right is the ETW. Entry disc (ETW) Three M4 wheels on a spindle, seen from the front Three M4 wheels on a spindle The wheels removed from the spindle Two M4 cipher wheels

The following accessories were used in association with the M4. Click any of the thumbnails below to jump straight to the relevant section:
Additional cipher wheels in wooden storage box Wheels Additional wheel (Zusatzwalze) Beta and thin reflector B Beta Additional wheel (Zusatzwalze) Gamma and thin reflector C Gamma Field-rewirable reflector D for the M4 UKW-D Physical key to lock the wheel compartment Key Narrow battery manufactured by Tanax Battery Schreibmax printer Schreibmax

Wooden box with spare cipher wheels (see below)

Extra wheels VI-VIII
Whereas the Enigma machines of the German Wehrmacht and Luftwaffe were supplied with 5 cipher wheels, all Naval machines had 8 wheels to choose from. The first five wheels (I-V) were identical to the five wheels supplied to the rest of the Army, allowing some level of compatibility, but the additional three wheels (VI-VIII) were used exclusively by the Kriegsmarine (Navy).

Of the 8 wheels supplied with the Enigma M4, three would be placed in the machine at any time, subject to the current key settings. Although 3-of-8 wheels theoretically gives a total number of 336 wheel orders (8 x 7 x 6), this was limited in practice by the operational procedures. There were instruction that one of the 3 wheels in the machine had to be a Naval wheel (VI-VIII) and that that particular naval wheel could not be used in the same position on two successive days.
The remaining 5 (unused) wheels were stored in a special wooden box. The image on the right shows such a box with the unused wheels in it.

The box has space for seven wheels but only five positions were used. The remaining positions were probably meant for a future extra wheels or for storing additional gadgets, such as UKW-D.

More pictures of this box below. Click any of the images to enlarge. Note that the serial number of the wheels is present on the box' ID-plate and is also engraved in the lock of the wooden box.
Spare Naval wheel in wooden box

Wheels I to V each have one turnover notch, but the three extra Naval wheels (VI-VIII) each have two notches. This was done to generate more frequent wheel-turnovers and, hence, make wheel stepping less predictable. The problem however, is that the cipher period is reduced, as 26 (letters) is dividable by 2 (notches). As you can see in the images below, these two notches are positioned opposite each other. Details of the wheel wiring can be found in the table below.

The construction of the Naval wheels is different from other Enigma wheels. Rather than using a spring-loaded pin to set the Ringstellung (common on all other wheels), the user has to press two pawls simultaneously. Furthermore, the M4 wheels are marked with the 26 letters of the alphabet (A-Z) rather than numbers (01-26). The overall dimensions of the wheels are identical however and the wheels of a naval Enigma fit and work perfectly inside an Enigma I and vice versa.
Wooden box front view Wooden box with spare Naval Enigma wheels Wooden box with 6 wheels (open) Spare Naval wheel in wooden box Wheel 4 (left) and wheel 7 (right). Note the presence of 2 turnover notches on the rightmost wheel. Two levers for altering the ring-setting Pressing the two levers in order to change the ring-setting

Extra wheel Beta, side view

Zusatzwalze Beta
Although the Commercial Enigma had 4 wheels protruding the top lid, it was in effect a 3-wheel machine with a settable reflector (UKW). The Enigma M4 however, has an extra cipher wheel to the left of the 3 normal coding wheels, which is why it is the only Enigma machine that can truly be called a 4-wheel machine. The additional 4th wheel was called the Zusatzwalze (extra wheel) or Griechenwalze (Greek wheel) as it was identified with the Greek letter Beta or Gamma.
The problem with the Zusatzwalze however, was that it could not be picked from the total set of 8 wheels. In other words: it could not be swapped with the other wheels. The reason for this is that it was constructed differently. It is narrower that the others and has spring-loaded contacts at either side. In addition, the UKW is smaller and has 26 flat-faced contacts, rather than pins.

Furthermore, the wheel is not driven by the other wheels. In other words: it is never moved during encipherment. In fact, together with the UKW, it is just a selector for 26 different UKWs.
Side view of extra wheel Beta, showing the engraved red letter β

Initially, only one Zusatzwalze (Beta) was supplied together with a thin version of UKW B. The UKW and the Zusatzwalze were wired in such a way that when the Zusatzwalze was set to the A-position the combination (Beta + UKW b) was compatible with UKW B on the Enigma I and M3.
Cipher wheels removed from the M4 UKW-B and Betal wheel Removing the Beta wheel Removing thin UKW-B from the shaft Left side of extra wheel Beta Right side of extra wheel Beta Thin UKW-B Side view of extra wheel Beta, showing the engraved red letter β

Zusatzwalze Gamma
Later in the war, probably in July 1943, a new set was supplied consisting of UKW c and Zusatz­walze Gamma. If both Beta and Gamma were present with a machine, another wooden box was used to store the unused UKW and Zusatzwalze. Although the Gamma-wheel was not distributed as widely as the Beta-wheel, it was used on some networks until the end of World War II.

The reflectors were only changed once a month. It was technically possible to mix the wheels of the two sets, i.e. use UKW-b with Gamma or UKW-c with Beta, and according to Mahon [7] this was done on several occasions. Below an overview of the combinations that have been recorded by Mahon between June 1943 and April 1945. b and c are the thin reflectors (UKW), whilst β and γ represent the Zusatzwalze (ZW) Beta and Gamma.
Year Month UKW ZW Remark
1943 June b β  
  July c γ  
  August b γ  
  September c β  
  October b β  
  November b γ  
  December c γ  
1944 January c β  
  February b β  
  March c γ  
  April b γ  
  May c β  
  June c γ  
  July b β  
  August b γ  
  September c γ  
  October b β  
  November c β  
  December b γ  
1945 January c γ  
  February b β  
  March b γ  
  April c β  

Wheel turnover
Please note that althoug the Zustzwalze can be set to any position, it does not move during the ciphering process. In other words: it can't be moved by the wheel to its right. This could be considered a weakness as it limits the possible number of permutations of the entire system. The combination UKW+Zusatzwalze can be regarded as a selector between 26 different UKWs.

Another weakness of the wheelturnover mechanism is the fact that the wheels move regularly. Only after the rightmost wheel has completed a full revolution, does it cause the next wheel to make a single step. As a result, the 2nd wheel (from the right) will only make one step every 26 characters and the 3rd wheel will hardly ever move. This makes the machine predictable and easier to break. The only machine with irregular stepping was the Enigma G (Zählwerkmaschine).
The three extra wheels (VI, VII and VIII) have two notches each, which causes a more frequent wheel turnover and less regular stepping. This was done as the 3rd wheel (from the right) hardly ever moved during the ciphering process.

Note however, that the wheels have 2 notches which is not a relative prime of 26 (26 can be divided by 2) and that the notches are positioned opposite each other (see the image on the right). The result is that the cipher period is effectively halved, which was yet another weakness of the system and a bonus for the codebreakers.
Wheel 4 (left) and wheel 7 (right). Note the presence of 2 turnover notches on the rightmost wheel.

Furthermore, operational procedures instructed the use of at least one of the extra 3 Naval wheels (VI-VIII) every day, and that such a wheel could not be used in the same position on two successive days. This was known by the code breakers at Bletchley Park and reduced the number of possible combinations, making it easier to guess to order in which the wheels were placed.
The Enigma M4 came standard with thin reflector b and extra wheel β (Beta) fitted. They were wired in such a way that together, with the β-wheel set to 'A', the combination behaved exactly like UKW-B in the Enigma M3 and Enigma I. This made the machine backwards compatible.
The Enigma M4 was built on the chassis of the M3 (which in turn was based on the chassis of the Enigma I). In order to fit the extra β-wheel in the existing space, the new reflector, UKW-b, had to be smaller and the standard UKW-B.

The image on the right shows UKW-b, which has a short hollow shaft fitted at its centre. The hollow shaft is placed over a short shaft inside the machine and an alignment pin is used to keep UKW-b in the correct position. The extra β-wheel is then placed over the hollow shaft so that its contacts line up with UKW-b's contacts.
Thin UKW-B

In July 1943, an alternative reflector, UKW-c, was introduced along with extra wheel γ (Gamma). This combination was compatible with the standard UKW-C when the γ-wheel was set to 'A'. When using other combinations (i.e. UKW-b + γ and UKW-c + β) the machine was no longer backwards compatible with the M3 and with the machines used by the Wehrmacht and Luftwaffe.
Thin UKW-B Rear view of UKW-B UKW-B and Betal wheel Removing the Beta wheel Removing thin UKW-B from the shaft UKW-B outside the M4 Aligning the reflector with the index pin UKW-B correctly installed. Note the index pin protruding the UKW at the left.

During WWII, several attempts were mounted to make Enigma traffic more secure. In January 1944, a field-rewirable reflector, called UKW-D, was introduced by the Luftwaffe (German Air Force). It is little known that a special UKW-D was also developed for the Kriegsmarine (Navy).
The image on the right shows an extremely rare UKW-D with a serial number starting with the letter M, indicating naval-use (Marine). It was developed especially for the M4 machine, and could possibly also be used on the 3-wheel M3.

When in use, it replaces both the reflector (UKW) and the extra wheel (Zusatzwalze). The letter D is engraved in the body of UKW-D at such a position that it can be seen through the leftmost window of the M4's wheel cover.

 More information


Keys and locks
The Enigma M4 has a lock in the top cover that can be used to prevent the internal wheel settings from being changed. This was probably done to allow only an officer to change the wheel settings. The Enigma M3 even has two such locks. As far as we know, locks were only present on the Enigma machines used by the Kriegsmarine (Navy). It is likely however that the lock was only used in a limited number of situations, as only very few keys have been found.
The image on the right shows an extremely rare key for the Enigma M4. Note that the machine's serial number is engraved in the key. M4 keys generally do not match the lock of another M4, but in our case we were lucky; the key shown here fits the lock of our M4 perfectly, despite the fact that it has a different serial number.

If no original key is present, it is also possible to have a replica key made from a so-called blank, even whithout removing and disassembling the lock. For this, one would need to call the help of a skilled lock-picker, such as the one below.
Key for M7782 (Enigma M4)

The rightmost two images below show a replica key that was made in 2008 by Barry Wels of the Dutch lockpickers organisation Toool. He used a technique called impressioning and it took him just under 10 minutes to create a smoothly operating key. More about this on Barry's Weblog.

Another example of an original Enigma M4 key is presented in image #5 below. It belongs to Dutch collector Arthur Bauer, who found it in a small paper bag that was caught between the Enigma machine and its wooden box. One day, when cleaning the machine, the bag simply fell out. His M4 is now on permanent display at the Churchill War Rooms in London.
The lock to the right of the wheels Close-up of the lock The lock seen from the inside The key in the palm of a hand Key for M7782 (Enigma M4) Original Enigma key as found inside the wooden box of an M4 (courtesy Arthur Bauer) A replica key The key inserted into the lock

Power supply
The Enigma M4 can be powered either from the built-in battery or from an external 4V power source, such as the CD supply of a U-Boot.

In order to accomodate the 4V external power socket, a smaller battery was used as shown in the image on the right. As original batteries are no longer available, suitable reproductions can be used instead.

 M4 reproduction battery
Naval battery installed in the M4

4V power socket with built-in switch Close-up of the narrow battery box and the 4V socket Close-up of the lock of the battery box Naval battery installed in the M4 Close-up of the M4 battery

In order to make life in the command centres a bit easier, a small printer, known as Schreibmax, was developed. It consists of two parts and is mounted on top of the machine instead of the lamp panel (which has to be removed first).

For this reason, the lamp panel of the M4 can be removed separately. The Schreibmax prints the output directly to a paper strip.

 More information
Enigma M4 with Schreibmax

Below is the wiring for each wheel, the ETW and all known UKWs. UKW-b was the standard reflector throughout the war and UKW-c was only temporarily used during the war. The wiring of the first 5 wheels (I-V) is identical to the wiring of the 5 wheels of the Enigma I used by the Wehrmacht and Luftwaffe. This allowed secure communication between the three departments.

The three Naval wheels (VI, VII and VIII) have two notches each, which causes a more frequent wheel turnover, but also introduces another weakness (see above under Wheel turnover).
Operational procedure   TRITON
It is sometimes thought that the name M4 was used because the machine has 4 wheels. The name M4 however, refers to the operating procedure rather than the machine itself. After M1, M2 and M3, the next one was logically called M4. The operating procedure and the setting of the message key of the Naval machines was far more complex than with the Army and Air Force. This is one of the reasons why Naval Enigma traffic was far more difficult to break by the codebreakers of Bletchley Park, where the traffic generated by the M4 was known as SHARK.

The operator would first select a message key from a series of codebooks and tables. Each message was converted into a series of so-called short messages which were then translated into letter-groups. Selecting the message key and converting the message, involved the use of:
  • Schlüsseltafel M Allgemein - Innere Einstellung (internal settings)
  • Schlüsseltafel M Allgemein - Aussere Einstellung (external settings)
  • Zuteilungsliste (allotment list)
  • Tauschtafelplan (table pointer)
  • Kenngruppenbuch (identification groups)
  • Doppelbuchstabentauschtafeln (bigram table)
From the Kenngruppenbuch the operator selected 2 trigrams (i.e. two 3-letter groups):
  • Schlüsselkenngruppe (key identifier)
  • Verfahrenkenngruppe (encryption identifier, in order to obtain messsage key)
The Enigma was set to the basic position for the day (Grundstellung) and the operator entered the Verfahrenkenngruppe in order to obtain the message key. The two trigrams mentioned above (Schlüsselkenngruppe and Verfahrenkenn­gruppe) together were used as the message indicator, which was converted once more with a bigram table (Doppel­buchstaben­tauschtafel).

Enigma codebooks are extremely rare and only a few have survived. Unfortunately, most of these are locked away in the vaults of the NSA. The image on the right shows a bigram table [4].

In addition to this, the messages themselves, were converted into shorter ones using:
  • Kurzsignalheft (short message book)
  • Kenngruppenheft (not to be confused with Kenngruppenbuch)
  • Wetterkurzschlüssel (weather reports)
This key procedure was called TRITON. Additional keys were used for confidential communication between the Captain of a U-Boot and U-Boot-Command. Such keys were called Sonderschlussel M (special key M) and would generally be applied on top of the existing encryption (i.e. double enciphering). Dirk Rijmenants in Belgium has made a very good description of all Enigma operating procedures, complete with examples. More details are available from his excellent website [8], where he describes both the key setting procedure and the short message system [9].

 Download the original naval procedure of 1940
 Download an original bigram table

Real M4 message from Dönitz
On 1 May 1045, U-boat Admiral Dönitz issued a message announcing his appointment as Hitler's successor. This message was part of a total of 50 messages that were recovered from German submarine U-543 in 1996 and broken again in 2012 by Michael Hörenberg in Germany [6].
The message is of particular historical interest as it was sent on 1 May 1945, just a day after Hitler committed suicide. The message was broken again on 20 October 2012. Click the image for a full description of the message.

 Full message description
 About the U-534 messages

Differences with Enigma I
Looking at an Enigma M4, a number of physical differences with other Enigma machines can be observed. The most obvious differences are listed here. Photographic evidence of each feature can be found at the bottom of the list. Differences in wiring are explained here.
  • Letters on the wheels
    The naval cipher wheels had letters (A-Z) on their circumference rather than numbers (01-26). The reason for this is currently unknown. Wheels with letters were also supplied with the M1, M2 and M3 machines.

  • Different ring-setting
    Although the effect is identical, the ring-setting mechanism (Ringstellung) of the Naval wheel is different. In order to change the ring setting, the operator had to press two levers simultaneously, whilst on other Enigma models, this was done with a spring-loaded pin.

  • Position of the lock
    The lock, that keeps the wooden box closed, is mounted in the top lid and not in the bottom part as on all other machines.

  • Carrying handle
    Most M4 machines have a metal carrying grip that is recessed in the wooden case, whereas most other machine have a leather carrying strap. Early Naval machines were also issued with a leather strap.

  • Removable top lid
    The top lid does not have the metal support brackets that keep it in a stable position when opened. In fact, the top lid has to rest against, say, a wall or has to be removed completely when operating the M4. Removal of the top lid is easy as the M4 only has simple hinges at the rear.

  • Lockable wheel cover
    In order to restict the setting of the inner encryption key (i.e. the wheel order and the ring-settings) to, say, an authorised officer, the lid that covers the wheels can be locked. When circular lock is present at the bottom left of the panel. The Enigma M3 even had two such locks.

  • Metal brackets
    Each M4 also has two grips, one at either side of the main body, that allows the machine to be lifted out of a bay in the U-Boot radio operator's table.

  • Removable lamp panel
    The cover of the lamp panel is removable whereas on all other Enigma machines it is part of the wheel cover. The reason for this is that on the M4 it was possible to remove all lamps and replace them with the Schreibmax printer.

  • Zusatzwalze (extra wheel)
    The M4 is the only machine that has an additional (4th) wheel that is not interchangeable with the other wheels. For this reason the machine is often called a 4-wheel Enigma. See also the description under the heading Zusatzwalze above. Check also the comparison between the M4 and a standard Service Enigma.

  • Different plug length on the Steckerbrett
    The pins of the plugs (Steckern) on the plugboard are about 4 mm longer that on the Enigma I. Using the plugs of an M4 on the Steckerbrett of an Enigma I will cause permanent damage. The reason for this difference is unknown. For the same reason, the Enigma Uhr can't be used on an Enigma M4.

  • Battery size
    The battery used in the M4 is about half the size of the one used in the Enigma I. This allowed space for the power socket (see below).

  • Power socket
    In order to allow the machine to be powered directly from the 4V DC supply of the U-Boot, the M4 has a 2-pin socket at the top right. The socket has a built-in switch that disconnects the battery when external power is used.

Position of the locks (left: M4, right: Enigma I) Different handles (left: M4, right: Enigma I) Removable top lid Metal brackets Removable lamp panel Zusatzwalze (additional wheel) Different plugs Power socket
The key inserted into the lock Two metal levers that have to be pressed simultaneously Inserting a Tanax battery into an Enigma M4 Naval and Army Enigma wheels side-by-side Naval and Army Enigma wheels side-by-side, showing the different ring-setting mechanism. 4V power socket with built-in switch

  1. Arthur Bauer, Foundation for German Communication and related technologies
    Original key for Enigma M4.

  2. Arthur Bauer, Funkpeilung als alliierte Waffe gegen Deutsche U-Boote 1939-1945.
    ISBN: 3-00-002142-6

  3. Deutsches Bundesarchiv (German Federal Archive), Bild 101II-MW-4222-02A
    Dietrich, Lorient (France), U-Boot U-124, 9 March 1441.
    Retrieved from Wikimedia Commons.

  4. Doppelbuchstabentauschtafeln für Kenngruppen
    Bigram substitution table for Message Indicators. Crypto Museum #300356. 1

  5. Oberkommando der Kriegsmarine, Der Schlüssel M, Verfahren M Allgemein
    Operating procedure for Naval Enigma. Berlin 1940.
    Crypto Museum #300359. 1

  6. Michael Hörenberg, Breaking German Navy Ciphers
    Breaking messages from the U-534. July 2012.

  7. A.P. Mahon, The History of Hut Eight 1939 - 1945
    GC&CS Official History. PRO HW 25/2. p. 104.

  8. Dirk Rijmenants, Enigma Message Procedures
    Retrieved June 2014.

  9. Dirk Rijmenants, Enigma Message ProceduresKurzsignalen on German U-boats
    Retrieved June 2014.

  1. Document kindly supplied by Arthur Bauer [1].
Further information

Any links shown in red are currently unavailable. If you like this website, why not make a donation?
Copyright 2009-2015, Crypto Museum. Last changed: Friday, 15 May 2015 - 15:30 CET
Click for homepage