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 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)
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.
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.
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 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 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).
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.
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.
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
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?
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 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.
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.
The 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.
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.
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.