# Rotor cipher machine

> Wired discs that change the alphabet at every letter

- Date: 1915
- Era: Electric age
- Domain: [Writing & Communication](https://lastcodex.org/en/domains/communication/)
- Rebuild stage: V (Electric age)
- Difficulty: 4/5
- URL: https://lastcodex.org/en/inventions/rotor-cipher-machine/

A rotor cipher machine enciphers each letter by sending an electric current through wired discs, the rotors, which turn after every key press, so the substitution alphabet changes from one letter to the next. Two Dutch naval officers had one built in the Dutch East Indies in 1915; the German Enigma is the best-known descendant.

![Rotor cipher machine · Wired discs that change the alphabet at every letter](https://lastcodex.org/_astro/plate.akpEA2tu_Z29KGqY.webp)

## Legend

1. Keyboard
2. Plugboard and its cables
3. Fixed entry wheel
4. Wired rotors
5. Reflector
6. Lamp board

## What it is

A rotor cipher machine is an electromechanical device for substitution ciphers. When a key is pressed, a set of wired discs, the rotors, first turns by one step. Then a current runs from the keyboard through the rotors and lights a lamp or prints a letter: the cipher letter. As the rotors move again before every letter, each key press goes through a different path and uses a different alphabet. A message of a thousand letters can be enciphered with hundreds of different alphabets without the operator doing anything but type.

The machines of the 1930s best known today, such as the German Enigma, were a wooden case holding a battery, a keyboard of 26 keys and a board of 26 lamps. Behind the lamps sat three rotors side by side on one axle, between a fixed entry wheel and a fixed reflector. Military versions added a plugboard at the front. The operator typed the message, the letters that lit up were written down one by one, and the cipher text was sent by [radio](/en/inventions/radio/).

## How it works

![A single cipher rotor with part of its rim cut away: a black disc with 26 spring-loaded brass pins on one face and 26 flat brass contacts on the other, insulated wires inside joining each pin to a contact at another angle, and a toothed thumb wheel and notched ring at one side](https://lastcodex.org/_astro/v1.C26hUfTQ_Z123BKW.webp)
_Each wire inside the rotor joins a contact on one face to a contact at another position on the other face._

A rotor is a disc of insulating material with 26 evenly spaced contacts on each face. Inside, each contact on one face is wired to a contact on the other face in a mixed order. A current entering at the position of A may leave at the position of R, one entering at B may leave at F, and so on. On its own, a rotor is a fixed mixed alphabet, much like the inner ring of a [cipher disc](/en/inventions/cipher-disc/). Turning it by one step moves all its wires by one contact and gives another alphabet.

The rotor on the right advances one step every time a key is pressed, before the current flows. In the simplest arrangement, a notch on its edge pushes the next rotor on by one step once per turn, like the wheels of a mileage counter. One rotor then repeats its sequence of alphabets after 26 letters, two rotors after 26 × 26 = 676 and three after 17,576. Enigma's pawls behave slightly differently: when the middle rotor reaches its own notch, it steps again at the next key press, together with the left rotor. Because of this double step, the three-rotor Enigma repeats after 16,900 letters. Each rotor also has a ring that can be set in any of 26 positions relative to its wiring, which shifts where the notch falls.

On Enigma, the current leaves the last rotor and enters the reflector, a fixed disc that joins its contacts in pairs. It sends the current back through the three rotors by another path to a lamp. With this arrangement, deciphering uses exactly the same setting as enciphering: typing the cipher text brings back the plain text. It also means that no letter can ever be enciphered as itself, a flaw that the British codebreakers used to test guesses.

The plugboard sits between the keyboard and the entry wheel. Each cable joins two sockets and swaps two letters before the current enters the rotors and again after it comes out. In wartime about ten cables were plugged in. The key for a day set which rotors were used and in what order, the positions of their rings, the starting position of each rotor and the plugged pairs. Sender and receiver set their machines the same way from the same key sheet.

## How to do it

![A paper model: on the right a fixed strip with one column of cells, to its left a sliding strip with two columns of cells held by a paper band; one pencil line enters the right column on one row and another leaves the left column several rows higher](https://lastcodex.org/_astro/v2.BpKMQSlq_dMFi4.webp)
_The rotors unrolled into paper strips: sliding a strip by one row turns the rotor by one step._

A paper model shows the whole path of the current with no electricity. Each rotor becomes a strip of paper with 52 rows of 5 mm, ruled into two columns. In the left column, write the alphabet from A to Z twice. In the right column, write a mixed alphabet, made by drawing 26 letters out of a cup, and then write the same mixed order a second time below it. Make three strips, each with its own mixed order, and mark one row of each as its notch.

Glue two fixed strips of 26 rows on a sheet of card, one at the right edge and one at the left, with room for the three sliding strips between them. Write A to Z down the right-hand strip: it stands for both the keyboard and the lamps. The left-hand strip is the reflector: write A to Z down it and, beside each letter, its partner in 13 pairs chosen at random, such as A with Q and Q with A. Hold the sliding strips with loops of paper so they move up and down, and draw a line above and below the fixed strips to mark the window of 26 rows.

To encipher a letter, first slide the right-hand rotor strip up by one row. Find the letter on the keyboard strip and move left along its row to the right column of the first rotor strip. Read the letter there, find the same letter in the left column of that strip inside the window, and move left along that new row to the next strip. Repeat through the three strips to reach the reflector, go to the row of the partner letter and come back to the right in the same way, now reading the letter in the left column, finding it in the right column and leaving from that row. The row where you arrive on the keyboard strip gives the cipher letter. When the notch row of a strip passes the top line, slide the next strip up by one row as well, and when a strip has risen 26 rows, slide it back to its first position. Set an identical model to the same starting rows and the cipher text comes back as plain text. Cut the strips with scissors, or with a craft knife on a cutting board, keeping the blade moving away from your fingers.

## History and evolution

The oldest rotor machine known to have been built was the work of two Dutch naval lieutenants, Theo van Hengel and Rudolf Spengler, at the navy department in the Dutch East Indies. They began early in 1915, and in the middle of that year a second copy was made aboard the flagship _De Zeven Provinciën_ by the officer W. K. Maurits. The historian Karl de Leeuw, who published their story from the archives in 2003, thinks the machines probably stayed in service with the squadron until the armistice of November 1918. In 1919 the Minister of the Navy thanked the two officers for a "ciphering typewriter with codewheels", but they could not agree with him on who owned the invention and never obtained a patent. Neither the machines nor their drawings survive.

Edward Hebern in the United States and Arthur Scherbius in Germany came to the same idea on their own. Hebern built a first prototype in 1917, and Scherbius applied for a patent on 23 February 1918. In October 1919 Arvid Damm filed a patent in Sweden, and Hugo Koch filed one in the Netherlands; de Leeuw thinks Koch probably learned of the Dutch design through his brother-in-law, a partner in the patent firm the two officers had consulted. Scherbius's firm sold its machine to businesses as Enigma from 1923. In the middle of the 1920s Willi Korn, a colleague of Scherbius, added the reflector to the lamp models. The German army took up the machine in the late 1920s and added the plugboard.

![Front view of a tall metal cabinet with three banks of round drums on its face, nine rows of twelve, above two plain doors](https://lastcodex.org/_astro/v3.Db-qlRhC_v4qKi.webp)
_From 1940, electromechanical bombes searched for the daily settings._

At the end of 1932 the Polish mathematician Marian Rejewski worked out the wiring of the army's Enigma rotors, and the Polish Cipher Bureau built copies of the machine. On 25 and 26 July 1939, five weeks before the war began, the Poles showed their methods and their copies to French and British cryptanalysts at Pyry, near Warsaw, and promised each country a machine. At Bletchley Park the British built on this work, and from 1940 electromechanical bombes searched for the daily settings.

The American SIGABA, used by the army and navy, moved its five cipher rotors through two further banks of five rotors, and no wartime break of it is known. It stayed in service into the 1950s, when it gave way to newer rotor machines.

## Key facts

- Oldest machine known to have been built: Dutch navy, Dutch East Indies, 1915
- Contacts on each face of a rotor: 26
- Length of the cycle: 26 letters with one rotor, 676 with two
- Enigma rotor wiring reconstructed: Marian Rejewski, Poland, 1932

## Requires

- [Cipher disc](https://lastcodex.org/en/inventions/cipher-disc/): Two turning alphabets that change the key (c. 1466)
- [Typewriter](https://lastcodex.org/en/inventions/typewriter/): Printing letters one keystroke at a time (c. 1808)
- [Battery](https://lastcodex.org/en/inventions/battery/): Chemistry that pushes a current (1800)
- [Drawing iron wire by hand](https://lastcodex.org/en/inventions/wire-drawing/): A steel drawplate and tongs turn soft iron rods into wire (c. 1100)
- [Gears](https://lastcodex.org/en/inventions/gear/): Teeth that trade speed for force (c. 350 BCE)
- [Incandescent Light Bulb](https://lastcodex.org/en/inventions/light-bulb/): A glowing filament in a vacuum (1879)

## Sources

- [The Dutch Invention of the Rotor Machine, 1915–1923, Cryptologia 27, no. 1 (2003), pp. 73–94](https://www.cryptomuseum.com/people/leeuw/files/KdL_200301_dutch_inv_rotor_machine.pdf), Karl de Leeuw, Cryptologia (author's copy hosted by Crypto Museum)
- [Rotor machines](https://www.cryptomuseum.com/crypto/rotor.htm), Crypto Museum
- [History of the Enigma](https://www.cryptomuseum.com/crypto/enigma/hist.htm), Crypto Museum
- [Before ENIGMA: Breaking the Hebern Rotor Machine](https://computerhistory.org/blog/before-enigma-breaking-the-hebern-rotor-machine/), Computer History Museum
- [The components of the Enigma machine](https://codesandciphers.org.uk/enigma/enigma2.htm), Tony Sale, Codes and Ciphers in the Second World War
- [Zygalski sheets: Polish codebreaking and the role of reconstruction in the Top Secret exhibition at the Science Museum](https://journal.sciencemuseum.ac.uk/article/zygalski-sheets/), Science Museum Group Journal
- [SIGABA](https://www.cryptomuseum.com/crypto/usa/sigaba/index.htm), Crypto Museum
- [Keeper of the Codes (cipher machines restored by Tim Koeth)](https://terp.umd.edu/keeper-of-the-codes), Chris Carroll, Terp Magazine, University of Maryland
- [Enigma Variations: An Extended Family of Machines, Cryptologia 22, no. 3 (1998)](https://cryptocellar.org/pubs/enigvar.pdf), David H. Hamer, Geoff Sullivan and Frode Weierud
- [Three-ring Enigma cypher machine in oak wood transit case, with original German battery, 1934 (object 1980-1200)](https://collection.sciencemuseumgroup.org.uk/objects/co35752/three-ring-enigma-cypher-machine-in-oak-wood-transit-case), Science Museum Group
- [Solving the Enigma: History of the Cryptanalytic Bombe (revised 2006)](https://www.nsa.gov/portals/75/documents/about/cryptologic-heritage/historical-figures-publications/publications/wwii/solving_enigma.pdf), Jennifer Wilcox, Center for Cryptologic History, National Security Agency
- [How Enigma works](https://www.cryptomuseum.com/crypto/enigma/working.htm), Crypto Museum
- [How the Enigma works](https://www.pbs.org/wgbh/nova/article/how-enigma-works/), NOVA, WGBH Educational Foundation / PBS

Fact-checked on 2026-10-18.

---

The Last Codex · https://lastcodex.org/en/inventions/rotor-cipher-machine/ · © The Last Codex. Texts, plates and figures: CC BY-NC-ND 4.0.
