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
The machine contains several improvements over the Enigma design
and is difficult to break, even by todays standards .
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) .
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
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
- 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
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
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:
- 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.
- Stepping wheels
The number and positions of the notches on the stepping wheels of
each model, are completely different (see the tables below).
- 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
The operating priciple of the NEMA is rather simple
and resembles that of the Zählwerk Enigma
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:
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 .
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.
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
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.
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
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.
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 .
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.).
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.
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
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.].
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.
||War machine only
||War machine only
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.
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).
||War, reverse side of 22
||Training, reserve side of 23
||War, reverse side of 1
||Training, reverse size of 2
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.
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.
B X L R R T V Y L Z
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
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].
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.
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.
For that reason, a suitable Fitting Adapter with Edison E27 threat
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.
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 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
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
The training machines were used by the Swiss Army between
1947 and 1975. After that, there were only kept for emergency
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.
- 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
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
Download simulator (off-site)
- Geoff Sullivan and Frode Weierud, The Swiss Nema Cipher Machine
Cryptologia, October 1999, Volume XXIII, Number 4.
- Walter Schmid, Die Chiffriermaschine Nema
Self-published book with CD. March 2005.
- Zellweger AG, Bedienungs-Anleitung zur Chiffriermaschine NEMA
Original user manual (German/French). 30 April 1947. Declassified 9 July 1992.
- Swiss Army, Ersatzteilkatalog
Spare parts list (German/French). ALN/NSA: 5810-607-0310. 1972.
- Christoph Lechleitner and Andreas Rumpler, Chiffriermaschine NEMA
Student project, Johannes-Kepler University Linz, Austria (German). 1995.
- Ehret, Jonczy, Nietlispach and Zwahlen, NeMa - Analyzing the Swiss Cipher Machine
Paper (English). 5 September 2007.
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: Wednesday, 27 February 2013 - 00:20 CET