Introduction
Typex was the cipher machine the British armed forces trusted for their own communications throughout WWII, and no Axis power ever broke it. It looked like an Enigma variant, and it was: the British built on Enigma's design in the 1920s and 1930s, then added two static stator rotors that Enigma did not have. This tool simulates the five-rotor signal path (two stators, three active rotors, a reflector) in your browser. Set the rotor start positions, type a message, and watch the active rotors step while the stators stay fixed. The step trace shows which rotors moved for each character. Everything runs client-side.
What this tool does
- Encrypts and decrypts text using a simulation of the Typex cipher machine, the British WWII rotor machine that was never broken by Axis forces
- Models five rotors: two static stator rotors that do not step but whose wiring affects the signal path, and three active stepping rotors that advance in odometer fashion
- Passes each letter through both stators forward, all three active rotors forward, a reflector, then back through the active rotors and stators in reverse
- Supports independent A-Z start positions for all three active rotors and both stator rotors, matching the machine's daily key settings
- Includes a simplified double-stepping mechanism for the middle active rotor, the same anomaly that Marian Rejewski identified in Enigma
- Displays rotor position columns for the stators and active rotors, highlighting which active rotors stepped on each character, and produces a step-by-step trace table
How this tool works
The tool maintains two groups of rotors. The stator group has two rotors with fixed positions that you set manually. They do not step during encryption, but their wiring scrambles the signal as it passes through. The active group has three rotors that step in odometer fashion: the rightmost active rotor advances every character, the middle advances when the rightmost wraps from Z to A, and the left advances when the middle wraps. The tool also implements a simplified double-stepping anomaly for the middle rotor, which can cause it to step twice in a row near its notch position.
For each input letter, the signal enters the first stator, passes forward through the second stator, then forward through all three active rotors, hits the reflector, and returns backward through the active rotors and then the stators in reverse order. The reflector makes the system reciprocal: encryption and decryption use the same operation. Feed ciphertext through the same settings and you recover the plaintext.
The tool displays all five rotors as columns showing the current position letter. Stator columns have a dashed border to distinguish them from active rotors. The active rotor that stepped on the most recent character is highlighted. The step trace table lists each character with its input, output, which active rotors stepped, and the full active rotor positions after stepping.
The rotor wirings in this tool are example permutations for education. The real Typex had additional features including multiple wiring positions per rotor, plugboard-like enhancements, and some versions that omitted the reflector entirely. The core principle that this tool demonstrates (the stator-rotor-reflector signal path with five rotors) is what made Typex more secure than the standard Enigma.
How the Typex cipher machine works
Typex (sometimes written Type X) was developed by the British government in the 1920s and 1930s as an improvement on the commercial Enigma machine. The Bletchley Park Trust holds surviving Typex machines and documents from the period. The machine entered service with the British armed forces before WWII and remained in use into the 1950s.
The design built on Enigma but added two key features. First, Typex used five rotors instead of three: two static stators at the front of the rotor bank and three active stepping rotors behind them. The stators did not move during operation, but their wiring added a fixed permutation that an attacker would need to determine separately from the stepping rotors. Second, some Typex models had multiple wiring positions per rotor (the rotors could be rotated to different internal positions and locked in place), which expanded the key space beyond what a simple three-rotor Enigma could offer.
Bob Watson's research on Typex, published through the Bletchley Park Trust and the Cryptomuseum, documents the machine's variants and operational history. Watson noted that Typex was used at Bletchley Park itself for British communications, creating an irony: the same site that broke Enigma used a rotor machine that was itself an Enigma derivative, but one that the Germans never cracked.
The reflector made Typex reciprocal, like Enigma. This meant operators did not need separate encrypt and decrypt modes. It also meant a letter could never encrypt to itself (the reflector has no fixed points), which was a structural weakness shared with Enigma. However, the two stators and the larger key space made this weakness far harder to exploit in practice. The Enigma Machine tool demonstrates the base design that Typex extended. The SIGABA machine was the US counterpart, and the Purple machine was the Japanese diplomatic system. The Lorenz Cipher was a different class of machine (a teleprinter cipher) used by the German High Command.
How to use this tool
- Set the two stator rotor positions (A-Z each). These are fixed during operation but their wiring affects every letter
- Set the three active rotor start positions (A-Z each). These rotors step in odometer fashion during encryption
- Type or paste your message. Non-letter characters pass through without affecting the rotor state
- Watch the rotor columns update after each character. The active rotors that stepped are highlighted, while the stators stay fixed
- Read the output in the cipher text field. Because Typex uses a reflector, the same operation decrypts: paste ciphertext with the same settings to recover plaintext
- Expand the step trace to see which active rotors stepped and the full rotor positions for each character
Real-world examples
Encrypting a British military message
Input: CONVOY DEPART LIVERPOOL with active positions AAA and stator positions AA. The tool passes each letter through both stators, the three active rotors, the reflector, and back. The rightmost active rotor steps every character, so the second C uses a different rotor state than the first. The output differs from Enigma because the stators add a fixed permutation that Enigma does not have. A student can compare this output with the Enigma Machine tool using similar rotor settings to see the stator effect directly.
Observing the stator effect
Encrypt the same 10-letter message twice: once with stator positions AA and once with stator positions AZ. The ciphertexts differ completely even though the active rotor start positions are identical. This demonstrates that the stators are an independent key component. An attacker who knew the active rotor settings but not the stator settings would still be unable to decrypt the message, because the fixed stator permutation would scramble the signal differently.
Decrypting with the same settings
Take the ciphertext from the first example, keep the same active and stator start positions, and paste it into the input field. Because the reflector makes Typex reciprocal, the output matches the original plaintext. The active rotors step identically during decryption as during encryption, so the signal path reverses exactly. This is the same self-reciprocal property that Enigma operators relied on.
Watching the double-stepping anomaly
Set the middle active rotor to position L (one position before the notch at M) and type a sequence of 10 letters. The step trace shows the middle rotor stepping on two consecutive characters when it reaches the notch position, which also causes the left rotor to step early. This is the double-stepping anomaly that Rejewski identified in Enigma and that Typex inherited. The trace labels which rotors stepped for each character so you can spot the double step.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| Caesar cipher | Very low (25 keys) | Basic substitution teaching |
| Enigma (3-rotor) | High (3 rotors, plugboard) | WWII German field communications |
| Typex (simplified) | High (5 rotors with 2 stators) | WWII British armed forces communications |
| SIGABA | Very high (irregular stepping) | WWII US high-level communications |
| Purple (simplified) | High (stepping switches) | WWII Japanese diplomatic communications |
| Lorenz SZ40 | Very high (12 wheels, teleprinter) | WWII German High Command traffic |
Limitations or considerations
This is a simplified educational model of Typex. The real machine had additional features that this tool does not reproduce, including multiple wiring positions per rotor (the rotors could be rotated internally and locked in place), plugboard-like enhancements on some models, and versions that omitted the reflector entirely. The rotor wirings in this tool are example permutations, not the actual Typex wirings.
The double-stepping mechanism in this tool is simplified. It uses a fixed notch position (M) for the middle rotor, while the real Typex had configurable notch positions. The stepping logic is also simplified compared to the real machine's mechanical implementation.
Typex is completely obsolete by modern standards. It was a 1930s electromechanical design, and while it was never broken by Axis forces, it would not withstand modern cryptanalysis. The reflector's no-fixed-point property and the predictable odometer stepping (aside from double-stepping) are structural weaknesses that modern algorithms do not share. Never use this tool for real encryption. For modern security, use the AES Encrypt / Decrypt tool or another NIST-approved algorithm.
Frequently asked questions
How is Typex different from Enigma?
Typex used five rotors (two static stators plus three active stepping rotors), while the standard Enigma used three active rotors with no stators. The stators in Typex added a fixed permutation that an attacker had to determine separately from the stepping rotors. Typex also had multiple wiring positions per rotor on some models, expanding the key space. Both machines used a reflector for reciprocity, and both shared the weakness that a letter could never encrypt to itself.
Was Typex ever broken by the Germans?
No. Axis forces never demonstrated the ability to break Typex traffic. The two stators and the larger key space made Typex significantly harder to attack than Enigma. The British used Typex for their own high-level communications throughout the war, including at Bletchley Park itself, which is the same site that broke Enigma. The irony of using an Enigma derivative to protect British traffic while breaking German Enigma traffic was not lost on the people involved.
What are stator rotors and why do they matter?
Stator rotors are rotors that do not step during operation. Their position is set manually as part of the daily key and then left fixed. Their wiring still affects the signal path, adding a permutation that every letter passes through. Because they do not move, an attacker cannot observe their effect changing over the course of a message, which makes them harder to isolate and analyze than stepping rotors. This is the main security improvement Typex offered over Enigma.
Did Typex use a plugboard like Enigma?
Some Typex models had plugboard-like enhancements, but they were not the same as the Enigma Steckerbrett. The details varied by model. This simplified tool does not model any plugboard. The real Typex's additional features (multiple rotor wiring positions, plugboard variants, and reflector options on some models) made it more flexible than the standard Enigma but also more complex to operate.
How long was Typex used after WWII?
Typex remained in British service into the 1950s, gradually replaced by newer machines. The British government continued to trust Typex because no adversary had broken it, and the machine's mechanical reliability had been proven over years of wartime use. Some Typex machines were also sold or lent to Commonwealth countries for their communications.
Conclusion
Typex is the British answer to Enigma: same family of rotor machine, but with stators and a larger key space that kept it secure throughout the war. This tool lets you watch the five-rotor signal path and see how the stators add a fixed layer that the active rotors alone do not provide. To compare with other WWII machines, try the Enigma Machine, SIGABA, Purple, and Lorenz Cipher tools. For modern encryption, use the AES Encrypt / Decrypt tool instead.