Typex Technical Information

Typex - Overview

This page will give some detail on the components of Typex so you can hopefully get an understanding of how it works. The image below gives a general overview of the main sections of the machine. The detail discussed is of the Typex Mark 23, which has the same main components as the Mark II and Mark 22 (Virtual Typex simulates the Mark 22) but has a few additions to allow the fitting of the CCM (Combined Cipher Machine) rotor. These include the four pillars and the connector visible at the rear behind the right-hand printer.

Typex was built from the same principles as the Enigma machine, allowing it to be compatible with machines like the Enigma I, but with the addition of a few extra modifications as models progressed increasing the security of the machine.

These additions came at the cost of the machine's weight and size, it was not a portable machine like Enigma and required a mains power supply. The Mark II for example weighed around 120lb (54kg) and measured around 30 in (760 mm) × 22 in (560 mm) × 14 in (360 mm).

  • Typex has a total of five rotors, the left three moving in the same manner as Enigma. The two on the right can be moved to change the start position, but do not move during encryption.
  • Typex rotors could have more turnover notches than the standard Enigma rotors (the place where each rotor turns the next one along).
  • Later rotors had a removable insert which housed the wiring could be replaced reversed, increasing the possible wiring combinations.
  • An optional plugboard which allowed each letter to be mapped to any other. Enigma's only allowed swapping in pairs.
  • The addition of printers rather than a lamp board meaning less chance of error when recording the ciphertext.
  • The ability to write numbers and punctuation and the possibility to be connected directly to a teleprinter allowing messages to be sent directly.

Rotors

Typex Rotor
A Typex rotor with wiring insert removed. Note the use of multiple notches to increase security.
Photo by Martin Gillow, rotor from Bletchley Park collection.
Typex Rotor
The ring setting pin was used to change the wiring relative to the input connectors.

Typex RotorTypex rotors are very similar to their Enigma counterparts but with two rings of contacts to improve reliability.

Each rotor had 26 letters around its circumference lined up with one of the 26 contacts on either side. The letter wheel and wiring insert could also be rotated relative to the input contacts by releasing a spring-loaded pin and rotating the body, this was equivalent to the Enigma Ringstellung (ring setting). Typex rotors could have several notches (e.g. 5, 7 & 9 were common) which when lined up, would rotate the wheel to the left one step.

The original rotors had fixed wiring cores, but later versions included an insert (or slug) which contained the wiring with a contact on either side. This meant that each rotor casing could use a few different inserts which also could also be fitted in reverse, greatly increasing the number of potential wiring combinations.

TICOM document ADM 1-27186, "Review of the security of naval codes and cyphers - September 1939 to May 1945", gives some information on their use and a number of changes that were introduced to increase security.

It states that initially, in 1939, a set of five "black" rotors were in use by the R.A.F and Army. On 1st June 1941, two additional "red" drums (from an original set of five) were added giving a total of seven available to be chosen.

In February 1943, a further two sets of 7 rotors were put into use by the Navy. One was called "Code X" and used for normal secure traffic while the second set was for "Cyper X", more secure traffic. The original set of seven rotors was kept for inter-service traffic only in future.

Unfortunately, as of Jan 2020, the official rotor wiring is still classified for Typex so all rotor wiring within the Virtual Typex simulation is either a random selection or duplicated from other simulations already released (GCHQ CyberChef and Typex a Windows simulator written by Geoff Sullivan)

Typex Rotor
A set of five test rotors used to check during maintenance.
Typex Rotor
Typex test rotors, output terminals.
(Images from www.cryptomuseum.com, used with permission.)

When a Typex machine required fixing and needed to be taken away for maintenance, the actual live rotors would be removed and kept at the secure location. Without a set of five rotors, the electrical circuit would not be complete and therefore, the Typex would not print or move correctly. This meant that a set of test rotors, like those shown above, were used by engineers to test the functionality of the Typex while it was under repair. These rotors did not have removable inserts and appear to all have been wired directly through with no crossed wires internally.

Drum unit

The drum unit, sometimes referred to as the rotor basket, wiring maze or stepping unit, is the central part of the cipher machine which does the encryption/decryption of the input letters. It comprises of a bay where five rotors can be inserted between the input head on the right and the reflector head on the left. The rotors are moved by the pawl bar at the rear which is lifted from behind by a lever attached to the actuator. All five pawls, one for each rotor, are lifted simultaneously, but the two right hand ones are held away from the rotors by the brackets shown, meaning these two rotors remain static.

Typex Mark 23, drum unit
Typex drum unit has space for five rotors to be fitted between the reflector head on the left and the entry head on the right. The three left hand rotors move as per Enigma while the two right hand ones are static during encryption.
(Image from www.cryptomuseum.com, used with permission.)

The rotors are released from the drum unit by firstly opening the top cover and lifting the wheel locking lever to the left-hand side of the keyboard. This brings the rotor set forward and down slightly so they are no longer against the red pressure rollers you can see at the top of this picture above. Next, the button on top of the reflector head is pressed which allows the reflector to move to the left, releasing the rotors and axle they are mounted on. (Note, the axle holding the rotors is not simulated on Virtual Typex to make it easier to swap single rotors).

Typex simplified wiring diagram
Typex simplified wiring diagram. The example shown is enciphering by pressing the A key which prints A on printer 1 and the enciphered character C on printer 2.

Typex input wiring is backwards vs Enigma: that is, letters enter the rotors in a clockwise order, vs. Enigma's anticlockwise (or vice versa depending on which side you're looking at it from). (ref: Confirmed within notes in Typex library from CyberChef by GCHQ)

The Reflector & Plugboards

The reflector head was originally a fixed wired connection on the original Typex machines up until the Mark 22, it could not be removed or rewired. The Mark 22 added the option of two plugboards, one on either side of the keyboard. The left hand plugboard was wired into the reflector head meaning it could be reconnected as required, either to add more security to Typex or to wire it to emulate the Enigma machine's reflectors.

Both plugboards could be easily removed as a whole unit allowing a quick swap to a different unit without having to rewire each one separately (e.g. swapping between the A, B & C Enigma reflector).

Typex Rotor
Reflector plugboard
Typex Rotor
Input plugboard

As discussed above, the right-hand entry head is wired differently in Typex than in Enigma (where the keyboard letters on Enigma are wired clockwise), which leaves us with a question as to how Typex emulated the Enigma. A specific reference to how this was achieved is tricky to find and can be done a number of ways. I believe that the simplest way, without having to rewire the Typex head itself (and the way that Virtual Typex works), is for an altered plugboard to have been used when deciphering Enigma. This would have the effect of rewiring the letter B from the keyboard to the Z terminal within the plugboard itself, C-Y, D-X through to Z-B reversing the effect of the opposite-handed entry rotor. This appears to be agreed upon by a discussion with developers of GCHQ's CyberChef implementation of Typex.

A reference to the wiring of the default Typex reflector has not currently been officially released, but while searching for any documents referring to Typex, I came across a hand-written document by an engineer who used to repair various models of Typex.

Typex hand written test message

It shows a test message which was used to check that the cipher machine was working again after repair, we can also see it was used on a Typex Mark III, which had a fixed reflector head and no external plugboard. If we take a closer look, we can find there is something we can learn from it!

On closer inspection, you may notice that all of the space characters (which on Typex are enciphered as the letter X) are shown as converting to the letter E. Also, each letter is reciprocal, T ciphers to I while I ends up back at T. This can only be the case if all five of the rotors are wired direct through and it is therefore possible to work out the reflector wiring for Typex as the rotors add nothing to the cipher in this case.

To do this, you'll need one more piece of information, how the input & reflector heads (the connectors on either side of the rotors) are wired. The diagram above shows that on Typex, the input was wired reversed with respect to the reflector. This means that while A input pin is in line with the A reflector pin, B sits opposite Z, C-Y, D-X .. Z-B.

If we take the second letter H as our first example which shows being enciphered to F, we can trace through the H of the input head, straight through all the rotors and end up at the T pin on the reflector. To give the result on the document, we can assume that T is wired to V on the reflector as V connects back through the rotors, to F. Likewise for E, it connects direct to reflector W which must be wired to D in the reflector to give us the final letter X. As the engineer has been kind enough to use a sentence which includes all characters, we can repeat this until we have all 13 connections! This, therefore, is the listing of what I believe to be the fixed reflector settings for the Typex.

Typex Rotor
Test wiring setup
Typex Rotor
Finding the reflector output for letter H
Typex Rotor
Calculated Typex reflector wiring

The official information on the Typex reflector is still classified, but the above deduced wiring has been authorised as acceptable for release by Tony Comer, the previous historian at GCHQ

Keyboard

The Typex was built to enter not only letters, like Enigma, but also, to be able to send via teleprinter, the Typex Mark II is reported as being able to handle 300 characters per minute. It could send and print numbers and also a few punctuation marks but the Enigma style encryption could only use the letters A-Z so how was this achieved?

Typex Keyboard
Typex Keyboard.
(Image from www.cryptomuseum.com, used with permission.)

To switch between letter and figure mode and to use a space character, all while only using A-Z, a clever trick was used. Three of the least used letters of the alphabet (Z, V & X) were used to reference the switch to figure mode, switch back to letter mode and a space character respectively. A separate key marked FIGs, LETTs and a space bar were available as actual keys but did not have a wired switch beneath them. Pressing one of these keys also pressed the letter key via a physically linked bar which then activated that letter, e.g. pressing the FIGs key also pushed the Z key down while pressing the space also depressed the X key. Once in figure shift mode, the printer carriage would be moved so that the punctuation shown in red above each key was typed when the printer hammer fired.

So, what happened when they actually wanted to type the letter Z, X or V? These letters were moved to shifted characters above the H, G and C keys. This meant to type the words TYPEX VARIES MAZE. you would have to press the following keys: T, Y, P, E, FIGs, G, LETTs, Space FIGs C, LETTs, A, R, I, E, S, Space, M, A, FIGs, H, LETTs, E, FIGs, M. The actual letters sent through the cipher encryption rotors would therefore end up as TYPEZGVXZCVARIESXMAZHVEZM. When in cipher mode, this string of letters is then enciphered through the rotors and printed on the right-hand printer. When deciphering, the left-hand printer would type the string of cipher letters which are deciphered using the same rotor settings which retrieves the original string of characters sent. If the deciphered letter Z is received, the second printer would switch to figure mode, the letter V shifts to letter mode while an X character moves on a space.

As a key is pressed, an automatic interlock bar is pushed from the actuator which locks the key down and stops any other key being pressed at the same time until both printers have finished printing and the actuator has completed a full turn. The key is then released ready for the next keypress.

The Actuator

The actuator is a set of electrical and mechanical components which control the sequence of events required to encipher and print characters. Through an ingenious set of five solenoids and several cams, it steps the rotors and enables the printers paper feed and figure/letter shift mechanisms.

Typex Keyboard
Typex Actuator.
(Image from www.cryptomuseum.com, used with permission.)

A motor drives the clutch system and shaft (shown middle centre on the diagram below) with the cams locked in place. Whenever a key is pressed, the cam release solenoid is enabled, pulling down and releasing the dog clutch to mesh which starts the main cam shaft rotating.

Firstly, the lock bar cam releases a lever, which in turn, moves the interlock bar which locks the key pressed in the down position and stops any other key being pressed. The second event is the drum drive eccentric which raises, pulling up the rotor pawl levers within the drum unit, causing the stepping motion of the rotors to the next position.

The next cam, the master switch, then pushes on a contact which completes the circuit through the keyboard, printers and rotors which allows the printers to type the current plain and cipher letter. Next in sequence, the paper ribbon feed cam pushes up on a lever joining it to the tape feed shaft at the rear of the actuator. This releases the spring-loaded lever causing the shaft to rotate backwards which is translated along itself to the printer feed mechanism on each printer via a shaft coupler.

Finally, as the main shaft rotates a full turn, the dog clutch catches back on the cam release solenoid lever and disengages while a slot on the locating roller means the cam shaft is left back at a fixed point, ready for the next keypress. The lock bar cam, returning to its initial position, releases the depressed key.

Typex Keyboard
Typex Actuator
Virtual Colossus

Typex KeyboardThe shift of the printers between letter and figure mode is also controlled by the actuator. Each printer has a set of two solenoids which release a clutch, if it's in the other mode, allowing a shaft to rotate 180 degrees. This is connected to the letter/figure shift cam which sits within a Y-shaped lever (see animation), the action of the cam rotating, pushes the lever which in turn tilts the shaft coupler. The coupler is connected to the printer shift mechanism to set the printer into the correct mode.

The Printers

Two printer units are set on either side on the Mark II, Mark 22 & Mark 23 Typex. The one on the left is designated the plain printer while the one on the right is the cipher printer. They are both identical with coupler shafts on either side, allowing a standard replaceable unit for both printers.

Typex Rotor
Each of the two printers could be removed as a complete unit. They printed onto 3/8" tape (about 9.5mm wide).
(Images from www.cryptomuseum.com, used with permission.)
Typex Rotor
A ring of 26 solenoids could pull on the print head levers causing the head to strike the ribbon & paper.
Typex Rotor
The mechanism for advancing paper and moving the ribbon.
Typex Rotor
Each print head has two characters, one for letters and one for figures.
Typex Rotor
Two seesaw levers connect to the actuator print advance and letter/figure shift mechanism. The small knurled knob allows manual paper advance.

A ring of twenty-six solenoids, connected to levers are arranged in a circular pattern. As each letter is required, the solenoid pulls on a lever making the print head strike through the ribbon onto the paper tape in the centre of the circle. The printer, while complex, allows a quite impressive typing speed or 300 characters per minute.

Each print head has two characters with the shift mechanism moving the strike area so that the second character on each head can hit instead. The shift mechanism is control via one of two shift coupler levers available on either side of the printer. The other coupler controls the spacing mechanism feeding the paper mechanism.

A set of manual override buttons are available on the front on the Typex in front of each printer which enabled the manual setting of the printer to letter or figure mode. This is useful to check that the printer is initially set to letter mode prior to starting a new cipher as the shift carriage may have been left in figure mode at the end of the last character entered.

The paper tape can be fed manually using a small knob which sticks out around the centre on either side of the printer which also attaches to a double feed-out cam which automatically divides the cipher text into five letter groups on the correct printer. The action of the double feed-out cam is inhibited on one printer at a time by a geared shaft connected to the cipher/decipher lever on the front of the Typex. This means that in cipher mode, only the right-hand printer prints into five letter groups while in decipher mode, only the left-hand printer has this function.

The other operation that the cipher/decipher lever has is to alter the function of the Z, X & V keys between typing a letter in decipher mode to activating the letter/figure shift carriage and space. When in cipher mode, the left hand printer, when supplied Z,X or V characters will shift the carriage or space while the right-hand printer will just print the letters. In decipher mode, these functions are reversed.