Homepage
Crypto
Index
Enigma
Hagelin
Fialka
Siemens
Philips
Nema
Transvertex
Gretag
Telsy
Tadiran
Racal
USA
USSR
UK
Voice
Hand
Mixers
Phones
Spy sets
Burst encoders
Intercept
Covert
Radio
PC
Donate
Kits
Shop
News
Events
Wanted
Contact
Links
Logo (click for homepage)
Hagelin B-21
The B-21 was the first cipher machine developed by Boris Hagelin. He designed the machine in 1925 when he was working for the company A.B. Cryptograph of Arvid Gerhard Damm in Stockholm (Sweden). The B-21 was in production for many years, even after WWII when the company had moved to Switzerland. It was available in many different versions and variations.
 
At the request of the invenstors - the Nobel family - Hagelin was placed in the company in 1922 as a controller. From 1925 onwards, Hagelin was the acting director, whilst Damm was persuing business in France.

When the Swedish Army wanted to buy Enigma machines in 1925, Hagelin proposed his own machine: the B-21. It was based on Damm's initial patented design of the B-18, using two coding wheels. Hagelin improved the design by adding two of his famous pin-wheels to each of the coding wheels [1] .
  
Early B-21 machine by AB Cryptograph

Over the years, the design of the B-21 was changed and improved a number of times. The image above shows one of the first versions and was probably conceived in 1927, or shortly thereafter, as it still carries the original company name: AB Cryptograph. It is battery powered and is likely to have been modified at least once during its lifetime. It was delivered to L.M. Ericsson (the phone company) for use by its subsidaries in South America, hence the presence of the Ericsson label on the wooden transit case.

At the request of the French Army, an improved version of the B-21, the B-211, was developed. It featured a printer instead of the light bulbs. Eventually, the developments for the French Army led to a range of power-less designs, the so-called C-machines, starting with the C-35.
 
Wooden transit case Ericsson Mexico label Early B-21 machine by AB Cryptograph B-21 without the top lid showing the interior The coding wheels (rear) and the driving pin-wheels The programmable matrix Commutator Diode array with five groups of five diodes each

 
Enigma alternative
At first glance, it resembles the German Enigma machine. It has a similar keyboard, is battery powered and uses a lamp panel for its output. But that's where the similarity ends. In order to avoid patent infringement, Hagelin used a completely different operating principle. Rather than using alphabet substitution, he used coding wheels to scramble a 5 x 5 matrix. This allowed only 25 letters to be used (5 x 5). As a result, the letter W was omitted.

Another difference with the Enigma was that the coding wheels were stepped irregularly, whereas most of the Enigma variations featured regular stepping. According to Hagelin, this made the machine far less predictable. The B-21 was therefore considered more secure than the Enigma. Although the latter isn't true - Arne Beurling of the Swedish Cipher Bureau broke it in 1931 in less than 24 hours [3] - it was good enough for its time and it was Hagelin's first commercially successful machine.
 
Technical description
The design of the B-21 is based on an earlier patient by Arvid Gerhard Damm, modified by Boris Hagelin in 1925. It is based on two electrical coding wheels and four so-called pin-wheels that control the stepping of the coding wheels. Although the actual circuit is far more complex, the simplified circuit diagram below shows the situation when the machine is in Ciphering Mode.


The keyboard consists of a mechanical matrix and two groups of five electrical switches each. Pressing a key activates one switch in each of the two groups. It also turns on power by activating the ACT-switch for the duration of the key-press. One group of switches is connected to the negative pole of the battery (rows, marked 1 to 5). The other group is connected to the positive pole (columns, I to V).

Each of the signals in then fed through a coding wheel, followd by a programmable matrix. The outputs of the two programmable matrices is then used to active a lamp on the lamp panel matrix. In order to avoid current through all of the lamps, a diode is connected in series with each lamp. In the B-21 shown here, the diodes are mounted together as an array of selenium diodes at the right hand side of the machine. The layout of the lamp-matrix is identical to the layout of the keyboard-matrix.
 
Reciprocity
The machine described in the circuit diagram above is not reciproke. For deciphering, a complex system of contacts and wires is used to reverse the operation of each of the coding wheels and matrices. This is mainly done by means of a cleverly designed switching mechanism, controlled by a knob at the left, that is combined with the slide contacts of the coding wheels.
 
The image on the right shows a complex system of brushes and contacts that form in fact five cross-switches. When in ciphering mode, the rearmost brush contacts are touching the rings of the coding wheel. The frontmost contacts are disengaged and are instead connected to a fork-contact immediately below it.

The contacts are moved in tandem with the contacts of the other coding wheel, so that they are always switched simultaneously. Contrary to the Enigma, the coding wheels are fixed in place and cannot be removed or replaced.
  
Commutator

Adding the cross-switches to the simplified circuit diagram above, results in the slightly more complex circuit diagram below. This diagram is also available for download at the bottom of this page. The diagram shows the machine in Ciphering mode. Switching to Deciphering, by rotating the C/D knob to the D-position, reverses the path through each of the coding wheel/matrix combinations. The operation of the cross-switches is illustrated at the centre.


Whether or not the selenium diodes are original parts remains to be seen. In 1925, when the B-21 was developed, selenium diodes had not yet been invented. Furthermore, Boris Hagelin describes in the Hagelin Story [2] that he used electric relays in the initial design. It is quite possible however, that the machine was overhauled for diode-operation at a later date.
 
Later version of the B-21
The images below were taken during the presentation of the book Mythos Enigma by Dominik Landwehr, in Basel in 2008. Hagelin's first employee Oskar Stürzinger was present as the meeting and demonstrated some historical Hagelin machines, including a variant of the B-21.
 
As becomes clear from the image on the right, the mechanical parts are identical to the machine shown above, but electrically it is somewhat different. The programmable matrix has been removed and is now situated behind the coding wheels as a series of 10 plugs. The space at the right is taken up by a mains transformer.

The serial number plate at the front shows the manufacturer name A.B. Ingeniörsfirman Teknik, which was the name of the company after it was taken over by Boris Hagelin in 1932.
  
A view at the interior of the B-21

This particular machine is quite different from the one at the top of this page, but carries the designation B-21 nevertheless. The layout of the keyboard and the lamp panel is different and was probably tailored for the Swedish language. It features the standard Latin alphabet, but the letters W, X and Z have been omitted. Instead, keys for Sk and Me have been added, resulting in the maximum number of 25 keys.

In the image, there is no sign of a relay bank or a diode array, but it is entirely possible that this is hidden under the lamp panel. The machine was mains-powered and the external mains cable was present.
 
Close-up of the B-21 keyboard and lamp panel Perspective view of the closed machine The B-21 with the lid open Close-up of the permutation mechanics Front view of the permutation mechanics Close-up of the wheels Side-view of the machine

 
B-211
A later variant of this machine is the B-211, which had a built-in printer and was motor-driven. This machine became very popular in France where it was used extensively during the Algerian war. It was built in France by an Ericsson subsidary in Colombes (Paris) under licence from the Swedish company. The popularity of the machine within the French Army later led to the development of the C-35.
 
Russian copy
The Russians copied the design of the B-211 and adapated it to contain a 5 x 6 matrix, allowing all characters of the larger Cyrillic alphabet to be used.
 
Download
References
  1. Boris Hagelin, 100 Jahre Boris Hagelin 1892-1992
    Memoires of Boris Hagelin (German).
    Crypto A.G., Crypto Hauszeitung Nr. 11, September 1992.

  2. Boris Hagelin, The Story of Hagelin-Cryptos
    Crypto A.G., Zug, Spring 1981.

  3. Bengt Beckman, Arne Beurling and the Swedish crypto program during WWII
    2002, American Methematical Society (English translation). p. 31-32.
    (Original publication 1996.)
    ISBN 0-8218-2889-4

  4. US Patent US1846105
    Hagelin's patent for the B-21 filed in the US in 1928.

Further information

Any links shown in red are currently unavailable. If you like this website, why not make a donation?
© Copyright 2009-2012, Paul Reuvers & Marc Simons. Last changed: Mon,14 May 2012.09:38:58
Click for homepage