Spy sets
Burst encoders
Logo (click for homepage)
Wheel-based cipher machine

NEMA was an electromechanical wheel-based cipher machine, developed by Zellweger AG in Uster (Switzerland) during WWII, as a replacement for the German Enigma K that was used by the Swiss Army. NEMA is the abbreviation of NEue MAchine (New machine). The machine is also known as T-D, which stands for Tasten-Drücker Maschine (key-press machine). This is reflected in the serial number, which takes the form TD-xxx. The official name is NEMA Modell 45.
During WWII, the Swiss Army used a modified version of the commercial Enigma K machine, which is (sometimes called the Swiss K). After the Swiss discovered that their Enigma K traffic was being read by both the Allied forces and the Germans, they started the development of their own — improved — machine, which they called NEMA.

The image on the right shows a typical NEMA, which is similar to the Enigma machine. At first glance, the machine appears to have 10 wheels, but only 5 of them are electrically wired. Four of them are the coding wheels, with 26 contacts at either side, just like on the Enigma. The 5th wheel (at the left) is the reflector which is moved during encipherment, unlike the reflector of the Enigma K, which can be set, but does not move.

The other 5 wheels are the stepping-wheels. They are mounted on an axle in pairs with the coding wheels. A drive wheel has several mechanical notches that control the turnover of the adjacent coding wheel.

Like the Enigma, the NEMA has a lamp panel with the 26 letters of the alphabet (A-Z). These lamps match with 26 of the keys on the keyboard (A-Z), but unlike Enigma, the NEMA has some additional keys to toggle between letters (BU) and numbers (ZL), and for carriage return (WR). Like the spacebar, these keys were only used when connected to an electronic typewriter or a teleprinter (teletype).

The machine contains several improvements over the Enigma design and is difficult to break, even by todays standards [6]. It features, for example, irregular stepping, caused by the addition of the stepping-wheels, which makes the machine far less predictable than an Enigma K. But it has also inherited some of the weaknesses of the Enigma, such as the fact that a letter can never be enciphered into itself. The latter is a result of the use of a reflector (or Umkehrwalze, UKW). The NEMA has no plugboard (Steckerbrett) but has instead a movable reflector (UKW).

The machine was developed between 1941 and 1943 by a team led by Captain Arthur Alder, professor in Bern. The team consisted of Hugo Hadwiger, professor of analytical mathematics at the University of Bern, Dipl. Ing. Heinrich Emil Weber (later professor at the ETH in Zurich) and Dipl. Math. Paul Glur, also of the University of Bern (later chief of the Swiss Cipher Bureau) [1].

The first prototype was ready in early 1944. After a few modifications and improvements, the machine was finally approved in March 1945. Production started in 1946, with the first machines entering service in 1947, too late for the war effort. The NEMA was used by the Swiss Army in the years following WWII, and by the Diplomatic Service, until it was replaced by other — more advanced cipher machines, such as the ones developed by Hagelin and Gretag.
Side view of the opened machine Front view of the opened machine Close-up of the wheels (rotors) The lamp panel and the wheels The spare wheels stored inside the top lid Power connector and connector for the lamp panel Power can be taken from a regular lamp Mains cable and contact cleaning tool Close-up of the wheels and the serial number tag

NEMA is housed in a black leightweight aluminium case with a leather carrying strap and a cylinder lock at one end. Inside the case, the NEMA is mounted on the bottom plate, whilst the accessories, such as the lamp panel, the mains cable and the spares, are stored in the case lid.

When using the NEMA, the above diagram can be used as a guide. At the front of the machine is the keyboard, with the lamp panel immediately behind it. At the top left is a metal lid, below which the coding wheels are located. At the right is the character counter. The sockets for an external 4V power source, the mains (110/220V) and the external lamp panel, are at the right.
There are basically three NEMA models, but only two of these have been released to collectors. Although the operation of all models is more or less identical, there are some significant differences, making the machines incompatible with each other. The following models are known:
  • Training machine
    This machine was used for training the operators. In order to avoid the risk of leaking details about the machine, its wiring and its operation to the enemy, these machines were different from the actual war-time machine. By far the most surviving NEMA machines are of this type. They are usually in reasonable to bad (worn-out) condition, as they have been used extensively for training over the years. In German, this machine is known as Schulmaschine (school machine). They have the following label on the case:

    Nur für Schulen und Kurse abgeben
    A remettre uniquement aux écoles et cours
    A solo uso di scuole e corsi

  • War machine
    For the event of a war, a number of machines were kept under wraps. These machines were slightly different in operation, had extra wheels and had different notches on the stepping wheels. The machines were only occasionally used for testing, and remained in war-reserve storage for many years. They would only be issue in case of war. In German, this machine is known as Kriegsmobilmachungs-Maschine or K-Mob-Maschine. Machines of this type are very rare. They can be recognized by the following label:

    Nur bei Kriegsmobilmachung abgeben !
    Ne délivrer qu'en cas de mobilisation de guerre !
    Da consegn. solo in caso di mobilitazione di guerra !

  • Foreign Office machine
    This version was used exclusively by the Swiss Foreign Office (Diplomatic Service). As far as we know, these machines have never been released to the public, so we can not give exact details about it. It has been established though that these machines were issued with differently wired wheels, different stepping wheels and a differently configured stepping mechanism [2 p. 84] as described under (3) below.

These NEMA models are different in the following ways:
  1. Number of wheels
    The war machine has two extra wheels (E and F) that are stored in the leftmost and rightmost cylindrical containers inside the case lid.

  2. Stepping wheels
    The number and positions of the notches on the stepping wheels of each model, are completely different (see the tables below).

  3. Stepping configuration
    The behavior of the wheel transport mechanism of a NEMA can modified by adjusting a set of four screws behind a hatch at the rear of the machine. With these four adjustment screws a total of 6 different configurations is possible.

The operating priciple of the NEMA is rather simple and resembles that of the Zählwerk Enigma (Enigma G). Electrically it is more or less identical to a commercial Enigma machine, without a plugboard, albeit with an extra cipher wheel. It is illustrated in this simplified circuit diagram:

Simplified electrical circuit diagram of the NEMA

When pressing a key on the keyboard (here the letter Q), the current from the 4.5V battery is led to a static contact ring at the right, called the Entry Wheel (Eintrittswalze, ETW). From there it passed through the four coding wheels until it hits the reflector (UKW) at the left. The reflector passes the current back into the coding wheels until it exits the ETW at the right again. From there, the current is led to the lamp panel where the encoded letter is lit (here the letter W).

The fact that there are multiply notches on each wheel (just like on the Zählwerk Enigma extends the cipher period of the machine (i.e. the number of steps before its repeats itself) and makes the machine far less predictable. Unlike the Enigma however, the stepping notches can be moved to another cipher wheel, which greatly increases the number of possibilities. Furthermore the wheel transport mechanism of the NEMA is far more complex than that of the Enigma, making it even less predictable. NEMA has to plugboard (Steckerbrett) like the military Enigma variants. As it remains unchanged during the encryption it was thought not to contribute to security [2].
Cipher wheels
The coding wheels of the NEMA are located below a hinged black rectangular lid at the top left of the machine. After lifting the lid, the 10 wheels become visible. The rightmost wheel (red) is the entry wheel (Eintrittswalze, ETW) through which the electric current enters the wheels (drum). The wheels are made from Bakelite and have the letters of the alphabet (in yellow) around the rim.
The wheel at the left is the reflector (UKW or Umkehrwalze). In between the ETW and the UKW are four wheel pairs. Each pair consists of an electric coding wheel with 26 contacts on either side, and a mechanical wheel that controls the stepping of the wheel. Each electrical wheel can be combined with any of the stepping wheels.

All wheels, except for the ETW, are mounted on a spindle that is a permanent part of the UKW. The wheels can be removed by first pushing the red lever at the left towards the rear. Next the top cover is opened by releasing two red bolts.
Altering the basic position of the wheels (Grundstellung)

Once the top cover is open, the red lever should be pushed all the way towards the rear (using some force), so that the wheels are released. The drum (i.e. the spindle with all wheels but the ETW) can then be removed from the machine, by pressing the wheels together and lifting them.
The ETW (the red wheel) stays inside the machine. It consists of the 26 static contacts (that do not move) through which the electric current is fed into the drum. Mounted around the ETW is the primary driving gear consisting of a comb of which the initial position can be set.

The four wheel pairs can now be removed from the spindle, so that their order can be changed or new wheel pairs can be created. The UKW is permanently attached to the spindle and can not be removed. The wiring of the reflector is fixed and was identical for both machine types.
Removing the wheel-pairs from the spindle

A NEMA cipher wheel is similar to the cipher wheel of an Enigma machine, in that it has 26 electrical contacts at either side, one for each letter of the alphabet. The letters are scrambled by the internal wiring of the electric wheel. Each wheel (A-F) has its own unique scrambling pattern.
One side of the wheel (right) has straight knife-shaped spring-loaded contacts, whilst the other side has V-shaped contacts. This is different to Enigma, where one side has circular pads and the other side has rounded spring-loaded pins.

Another difference with the Enigma is the way the stepping notches are implemented. Although there are Enigma machine with multiple notches (Zählwerk Enigma), these notches are always fixed to their wheels. On the NEMA however, the notches are part of a separate stepping wheel that can be paired with any cipher wheel.
Separating the stepping wheel from the electrical wheel

Each wheel pair consists of an electric cipher wheel (right) and a mechanical stepping wheel (left). The two are mounted together, but can move independently as the stepping wheel has a ball-bearing ring. The stepping wheel is fitted around the wiring core of the cipher wheel. The two wheels can be separated by pushing the side with the V-shaped contacts out of the stepping wheel. Next the wheels can be rearranged as per code book, and mounted on the spindle again. If necessary, the contacts on the wheels could be cleaned by using the special messing brush.
The rightmost wheel is the so-called entry wheel, or Eintrittzwalze (ETW). As it works differently from the other wheels, it is red and remains inside the machine when the drum is removed (see above). Although the electric contacts of the ETW are static (i.e. they never move), the notched wheel surrounding it, does.

The ETW has notches at either side. The notches on the left side control the stepping of the cipher wheel to its left, while the notches on the right side cause a reduction in the transmission system. This further explained below.
Entry wheel (ETW) with main driving gear

The cipher wheels are marked with a letter of the alphabet. Depending on the model, four or six cipher wheels are supplied, of which four are in the machine. The training machine is supplied with four wheels (ABCD), whilst the war machine comes with all six wheels (ABCDEF). The unused wheels are stored inside the cylindrical containers in the case lid, marked as Walze I and Walze II.
Wheel cover closed Wheel cover open, revealing the 10 cipher wheels Altering the basic position of the wheels (Grundstellung) Pushing the red lever towards the rear Counter, counter reset lever and red cover locking bolt (front) NEMA with open top cover Unlocking the wheels Removing the drum from the machine
Wheel transport mechanism after removing the drum Entry wheel (ETW) with main driving gear The drum (with the UKW at the left) View from the left of the drum (UKW at the left) Removing the wheel-pairs from the spindle The UKW is a permanent part of the spindle Side view of a wheel pair Spare wheel 'F' stored inside the case lid
Electrical wheel 'A' Stepping wheel '12' attached to electrical wheel 'A' Close-up of the v-shaped contacts Splitting a wheel pair by pushing in at the center Separating the stepping wheel from the electrical wheel The bare electrical cipher wheel, with the wiring core covered by tape. The bare stepping wheel Other side of the stepping wheel, showing the ball bearing

Wheel stepping mechanism
The wheel stepping mechnism of the NEMA is extremely complex and difficult to comprehend. For a full and detailed description (in German) please refer to Walter Schmid's excellent book Die Chiffriermaschine Nema [2]. In the drawing below the stepping mechanism of the NEMA machine is illustrated. The wheels are moved by a set of narrow and wide fingers, or tongues, that are located behind the wheels. An upwards movement of a finger causes a single step of the corresponding wheel. As a result, a wheel can only step backwards (Z → Y → X → W, etc.).

Simplified diagram of the wheel stepping mechanism

Each pair of wheels consists of a stepping wheel (S) and a cipher wheel (C). The narrow fingers are only used to cause a single step of a stepping wheel (S). The wide fingers are used to cause a single step on a cipher wheel (C). As the wide fingers overlap between wheel pairs, a stepping wheel (e.g. S3) can inhibit the stepping of the cipher wheel to its left (e.g. C2) by pushing away the finger. A wide finger is therefore effectively a logic AND function: a cipher wheel will only move when the transmission moves (T) AND the stepping wheel to its right has a gap.

Two transmission systems are responsible for wheel stepping, indicated here as T1 and T2. T1 is activated by the keyboard mechanism and will make a single step on each key press. As a result, stepping wheels S1, S3 and S5 (the ETW) will make a single step every time a key is pressed. The notches that are mounted on the left side of each stepping wheel, determine whether the cipher wheel to its left also moves. The secundary transmission system (T2) is controlled by an extra set of notches that are mounted to the right of the ETW (S0). S0 always has 5 gaps, which means that when T1 has caused a full revolution of the stepping wheels (i.e. 26 steps), T2 has made 5 steps.
Stepping configuration
To add an extra layer of complexity, there are four adjustment screws, located behind a hatch at the rear of the machine, that control to which transmission system (T1 or T2) the fingers of the four wheel pairs are linked. The simplified diagram below shows how this linking works (L1-L4).

Positions of the configuration screws of the military NEMA machines (simplified)

In order to obtain the maximum cipher period, we assume that two pairs are always linked to T1, whilst the other two are linked to T2. This means that two screws would always be in, whilst the other two are out. Adjusting these screws is not easy and requires special tools and training. The military machines use the configuration shown here. It has been established that machines used by the Diplomatic Service used a different configuration than the military machines [2 p. 84.].
Wheel wiring
The table below gives the wiring of the electrical cipher wheels A-F, using the right hand side of each wheel as the input (A-Z). Please note that the wiring of the first four wheels (A-D) is identical for both machine types, but that the stepping wheels are completely different.

Note that the above permutations are measured directly from each wheel, without taking into consideration which letter is visible at the bottom row of the wheel window (i.e. the area under the wheel cover where the basic key is set). The offset between the letter in the window and the actual contact pin, is 12 positions. That means that the incoming letter (right side of the wheel) should be shifted 12 further in the alphabet, before wheel scrambling is applied.
Stepping wheels
The table below show in which cases a stepping event occurs. A '1' marks the absence of a notch (i.e. a gap), allowing a step to be made. A '0' marks the presence of a notch, which inhibits stepping. The rightmost column (#) shows the total number of stepping events, which should always be a relative prime of 26 and should not share any common factor, in order to guarantee the maximum possible cipher period. Wheel 1 is always paired with 22 as part of the ETW of a war machine (22/1). Likewise, wheel 2 is paired with 23 on the ETW of a training machine (23/2).
1 01000000010000000010000011 War, reverse side of 22 5
2 01011001000000001000000000 Training, reserve side of 23 5
12 01111111111100011110111111 War 21
13 11011110011011011101111110 War 19
14 00101111011111111010010101 War 17
15 10011010000010111111010111 War 15
16 11111101111111101111111110 Training 23
17 01000001111000001010110110 War 11
18 11111111111110101111111011 War 23
19 11101111000111111111110111 Training 21
20 11111101110101010101101111 Training 19
21 10111011110111101110100100 Training 17
22 11001011001011011110011100 War, reverse side of 1 15
23 10111111111101111111111110 Training, reverse size of 2 23

Setting the key
When setting the cryptographic key of the NEMA, we have to consider both the internal key and the external key. The internal key specifies which stepping wheels are paired with which cipher wheels, and in what order they are placed on the spindle. For example:

15-C / 12-A / 14-D / 13-B

The external key specifies the initial position of the wheels at the start of a message. This is the bottom row of characters that is just visible when the cover over the wheels is opened. E.g.:


The initial position can be changed after setting the read lever at the left to the rearmost position. All ten wheels can than be turned forward and backward, until the desired key is set. The red lever should then be returned to the operational position. The counter should then be reset.
Calculating the total number of possible start positions is relatively straightforward. If we take the war machine, we have 6 cipher wheels (A-F) of which 4 are placed in the machine. This gives 360 possible wheels orders (6 × 5 × 4 × 3). The same is true for the stepping wheels (360 wheel orders). The number of possible starting positions of the 10 wheels is 2610. The total number of possible settings is calculated as 360 × 360 × 2010, which roughly adds up to:


The maximum cipher period (i.e. the number of steps before the system repeats itself) is a bit more difficult to determine. Given the complex stepping mechanism (using relative primes for the number of notches on each wheel) and the high number of possible start positions, one might be inclined to think that the machine has a very long cipher period. However, this is not the case.

Since stepping wheels S1 and S3 are always moved on each key press, and the number of notches are relative primes, the UKW and C2 will return to their starting position after 676 steps (26 × 26). As the number of notches on the remaining stepping wheels (S2, S4 and S5) are also relative primes, they return to their starting position after 17576 steps (26 × 26 × 26). These two groups of wheels should be considered independent of each other, as one group can not be influenced by the other. As there is a common factor (676 × 26 = 17576), the maximum cipher period is:


Although this might seem a bit disappointing, it was less of a problem in actual use as the length of a message hardly ever exceeded 17,576 characters. There are however some weaknesses in the system. The most obvious one is that, like on the Enigma, a letter can never be enciphered into itself. This is caused by the fact that a reflector (UKW) is used, causing the return path to be different from the forward path. Furthermore, there are a large number of starting positions that may cause non-stepping of several consecutive letters. This is well described in [1 p. 323].
Power supply
The NEMA can be powered by a variety of sources. By default it is powered by the internal 4.5V battery which is stored in a large compartment at the rear right, below the top cover. The battery compartment itself is closed by a rectangular lid with a side-shifting lock at the front.
The battery compartment accepts the same 4.5V battery as the Enigma machine. Later batteries, like the one shown on the right, had a green plastic body. The image on the right shows the battery half way out of the battery compartment.

Batteries of this type are no longer being made, so it might be useful to empy an existing old battery and put a modern battery holder inside it. As an alternative it is also possible to use a standard flat-pack 4.5V battery, bend both of its messing contact pins in a V-shape and place it at the bottom of the battery compartment.
The battery half-way in

It is also possible to apply an external 4V source to the NEMA, by connecting it either to the two terminals to the right of the keyboard, or to the banana-type sockets at the right side. Alternatively, the NEMA can be powered directly from a variety of mains voltages, by using the internal transformer. In order to allow the NEMA to be used virtually anywhere in the world, a large voltage selector at the right can be used to adapt it to the local (mains) voltage.
The socket for connection to the mains power, is also located at the right, just below the voltage selector. A suitable, long, mains cable is present with the machine and is stored inside the case lid. At one end of the cable is a plug that fits the power socket at the right side of the NEMA. At the other end is a standard domestic power plug that fits most continental (Europe) wall sockets.

Unlike today, mains power sockets were not commonly available in every home at the time the NEMA was introduced (shortly after WWII), although most homes did have electric light.
Edison E27 fitting adapter

For that reason, a suitable Fitting Adapter with Edison E27 thread was supplied. It was installed in between the fitting and the light bulb and had two power sockets at the sides, allowing the NEMA to 'steal' power from the lamp socket. As the mains voltage wasn't always the same during and after WWII, the voltage selector allows a variety of voltages to be used, ranging from 110 to 250V.
Unlocking the battery compartment Removing the 4.5 battery from the battery compartment The battery half-way in Using a standard (flat-pack) 4.5V instead of the usual (large) battery pack $V terminals and sockets for external battery Mains voltage selector and mains (input) socket Power cable stored inside the case lid Edison E27 fitting adapter

Lamp panel
When encrypting or decrypting a message on the NEMA, the output can be read letter-by-letter from the lamp panel, just like on the Enigma. In order to allow a high level (Secret) message only to be read by an officer, it was possible to connect an external lamp panel to the machine.
When not in use, the lamp panel is stored inside the case lid, where it is held in place by an adjustable strap. It connects to the machine by means of a thick cable with 29-pin plugs at either end. This cable is also stored inside the case lid and is held in place by metal clips.

The original cable may be a bit stiff after all these years of storage. As bending the cable might cause permanent damage to it, we've used a flexible rubber-encapsulated cable instead for the photographs on this page. This flexible cable was formerly used in a NEMA repair centre.
The letter 'G' lighting up on the external lamp panel

One end of the expansion cable is connected to the lamp panel, whilst the other end mates with a socket at the right side of the machine. Once the cable is in place, the external lamp panel is operated in parallel to the lamps on the normal lamp panel, allowing a separate person to write down the message. For convenience, the lamp panel can be tilted using the pedestal at the rear.

A similar external lamp panel was also added to the Swiss version of the German Enigma K during WWII. This modification was carried out by the Swiss themselves and was used for the same purpose. As far as we currently know, the Swiss were the only ones that used a cipher machine with an external lamp panel.
External lamp panel External lamp panel with the socket at the left Interior of the external lamp panel 29-pin socket on the left side of the external lamp panel External lamp panel cable Connecting the expansion cable to the external lamp panel External lamp panel with cable attached at the left The letter 'G' lighting up on the external lamp panel
Case lid with the external lamp panel removed Removing the plug from the case lid Unlocking one of the connectors of the expansion cable from the case lid Connecting the external lamp panel to the NEMA External lamp panel connected to the NEMA External lamp panel connected to the NEMA External lamp panel connected to the NEMA Tilted lamp panel

Serial numbers
The NEMA didn't become available before the end of WWII. After the machine was approved in March 1945, it took quite a long time before it became available, as the first machines entered service in 1947. In total, 640 machines were built by the Swiss manufacturer Zellweger AG. Three different variants were in circulation, which can be descriminated by their serial numbers:
  • TD-100 to TD-199, Foreign office
  • TD-200 to TD-419, Training Machines
  • TD-420 to TD-740, Operational Machines

Operational machines differ from training machines, in that they have 2 additional wheels (stored inside the top lid) and have different notches on the stepping wheels. They can be recognized by a label on the outer case, saying that it should only be released in case of war (see above).

The wiring of the machines used by the Foreign Office (FO) has been kept secret. As far as we know, these machines have never been released. One machine is kept in the archives of the Swiss intelligence service. The remaining machines have been destroyed. The training machines were used by the Swiss Army between 1947 and 1975. After that, there were only kept for emergency purposes. The Operational Machines, sometimes referred to as K-Mob-Maschinen, were always kept under wraps. They were to be issued only in the event of a war.
The NEMA was officially declassified on 9 July 1992. A few years later, on 4 May 1994, the training machines and the operational machines were offered for sale to the public and are now in the hands of collectors. The FO machines were never released and remain classified.
NEMA Simulators
Version 1.0.1 - Build 001 2002

A very good computer simulation for a NEMA is available from the Computer Simulation Group (CSG). In 2002, Geoff Sullivan released a fully operational graphical simulation that runs on most versions of WindowsTM. The image on the right shows the basic screen.

It can simulate both military models (the training machine and the war machine) and can fully be configured, just like a real NEMA. Furthermore it allows messages to be entered directly (using separate input and output windows) and has a window to show the scrambler permutations.

 Download simulator (off-site)

  1. Geoff Sullivan and Frode Weierud, The Swiss Nema Cipher Machine
    Cryptologia, October 1999, Volume XXIII, Number 4.

  2. Walter Schmid, Die Chiffriermaschine Nema
    Self-published book with CD. March 2005.

  3. Zellweger AG, Bedienungs-Anleitung zur Chiffriermaschine NEMA
    Original user manual (German/French). 30 April 1947. Declassified 9 July 1992.

  4. Swiss Army, Ersatzteilkatalog
    Spare parts list (German/French). ALN/NSA: 5810-607-0310. 1972.

  5. Christoph Lechleitner and Andreas Rumpler, Chiffriermaschine NEMA
    Student project, Johannes-Kepler University Linz, Austria (German). 1995.

  6. Ehret, Jonczy, Nietlispach and Zwahlen, NeMa - Analyzing the Swiss Cipher Machine
    Paper (English). 5 September 2007.

Further information

Any links shown in red are currently unavailable. If you like this website, why not make a donation?
Copyright 2009-2013, Paul Reuvers & Marc Simons. Last changed: Monday, 27 May 2013 - 15:39 CET
Click for homepage