The first version of Turing’s Bombe


Enigma Home Page

Introduction

The Turing and Welchman Bombe was the most effective tool to find the Enigma keys during World War II. This Bombe actually derives from an early version made by Alan Turing. This later version was derived directly from the Bombe created by the Polish Rejewski. Maybe we should rename the Bombe as the Bombe of Rejewski, Turing and Welchman?

History

As soon as Knox returned from Pyry, he signaled to Denniston the main flaw of the Polish methods (Bombe and Zygalski’s sheets): they depended on the indicator method. If, unfortunately, the Germans were to change it, their methods would become useless overnight.

Knox talked to Alan Turing about what he saw in Pyry. Their Bombe was impressive with how it automatically tested all the starting positions of the three rotors for a given Walzenlage and stopped in the event that a position of the rotors was plausible.

How the Turing's Bombe works

Based on the theory of Rejewski’s cycles that he generalizes, Turing invents a machine (the Turing Bombe) which, like the Polish one, scans all the configurations of the rotors, but which is independent of the indicator method, because it is based on the presence of a Crib. Like the Polish Bombe, it stops when the configuration is plausible, that is to say, for which the presence of loops is possible. These loops (a female being a loop of length 1) are insensitive to the presence of Steckers. On the contrary, they even allow for the deduction of one of the Steckers.

If a loop is possible, the Bombe stops (The electrical circuit is closed). Unfortunately there are too many stops. To reduce these so that the Bombe can be really usable, you need at least 3 or 4 loops.

      Position                         a b c d e f g h i j
      Crib (the supposed plain text)   G E B E N X S I E X (no turnover)
      Cryptogram                       J N J N M G U D K B
               stecker BH      c                         c
      Loop:  B ==========> H-------E                 B-------J
              (input of    |       |        with     |       |
               electric   j|       |a     steckers: j|       |a
               current)    |   f   |                 |   f   |
      Without steckers:    X-------O                 X-------G

      The whole Key: Walz: VI-III-II, Ring: AAN, Grund: CBH
                     Steckers: RY:JE:OG:HB:NK:TS:UW:PA:QZ:FL
      From the stop to the Grund:  CBV+N=CBH  (stop+ring=grund)

The Turing’s Bombe was based on the presence of Cribs. In addition each loop was associated with a input letter (to put the current into the machine) and which corresponded to a stecker (possibly a self-stecker). To minimize these inputs (two inputs maximum), the loops had to have one letter in common.

In its first version, the bombe did not allow multi-scanning: for each input, you had to test all the steckers possible (26), one after the other. In addition, you need to know the turnover position in the Crib (actually like the final version of the Bombe). Because of all these restrictions, the Turing Bombe was interesting from Theoretical point of view but was almost useless in practice.

The only time it was used in practice was against messages from the navy for which Turing had several messages with the cryptogram and the corresponding plain text and therefore it owned multiple Cribs with loops.

Making

When Turing arrived at BP, presumably, he had already completed the design of his Bombe and quickly talked with the British Tabulating Machine Company (BTM) to start its construction, which would be carried out under the direction of Harold Keen.

Examples

Print the syntax

$ python3 first_turing_bombe.py
Usage:
 -h          Online Help
 -d          Debug
 -W X,Y,Z    The Walzenlage, default: -W I,II,III
 -U UKW      The Reflector, default: B
 -T a,b,...  The terminal letter(s)
 You can put only one letter if it is the same
 It takes as many letters as there are loops
 -M menu     The menu, for example:
 -M ZZA:ZZB,ZZC:ZZC:ZZD : 2 loops
 Note: The input letter start each loop
 -I XYZ      The indicator position
             by default, the first entry of the menu

Example of a query menu to emulate Polish Bombe

Key: B IV–V–II, Steckers: RV, ZF, EC, IG, YW, UT, NA, BJ, DL, OM, Ring: JSY

A list of Grundstellung and the corresponding indicator (as well as the message key):

		Key – Grund. – Indicator
		DIJ BKT HFEHNK
		RFC KBQ HPSHHE
		DAY TIA HOLHYK
		BWP MGT QHTFHV
		UQT FZM MHHDZH
Note: You should not take the last case (FZM) if you test a Walzenlage whose middle wheel is the V wheel. Indeed, it causes a turnover of the middle wheel and the left wheel.
$ python3 first_turing_bombe.py \
	-W IV,V,II \
	-T H \
	-M BKT:BKW,KBQ:KBT,MGX:MGU,TIA:TID
stop H 4 SSV
Ringstellung: AAA - stop_position + begin_position
Ring = AAA - SSV + BKT = JSY

Example of "double input (H and J)"

$ python3 first_turing_bombe.py \
	-W VI,III,II \
	-T H,J,J \
	-M ZZC:ZZA:ZZF:ZZJ,ZZD:ZZE:ZZS:ZZK:ZZI,ZZD:ZZB
stop J 3 CBW

Example with four loops, search of the stecker

The "Narvik Pinch" (April 1940) belonged to Turing full of cryptograms with the corresponding clear text. Thanks to his Victory Bombe he was able to find the keys.

Note: Thanks to the mini_bombe.sh (written in Unix Shell) software I scan all possible steckers.

$ sh mini_bombe.sh IV,V,VI \
	ZZF:ZBH:ZZJ,ZBG:ZDK,ZZJ:ZDL:ZBL,ZZF:ZZM:ZDK
stop A 4 PIJ
stop E 4 XSE

(the good solution is the stecker EE)

---- Verification
$ python3 first_turing_bombe.py \
	-W IV,V,VI \
	-T E \
	-M ZZF:ZBH:ZZJ,ZBG:ZDK,ZZJ:ZDL:ZBL,ZZF:ZZM:ZDK
stop E 4 XSE

Stop = Crund - Ring,      XSE = HTE - KBA  

                   T
                  /|\
             ZZM / | \
                /  |  \ ZBH
               /ZZF|   \
              / ZBG|ZZJ \
             U=====E----R
              ZDK  |    /
                   |   /
                ZBL|  /ZDL
                   | /
                   |/
                   S


abcde fghij klmno pqrst uvwxyz  turnovers: "m" and "z"
DKTCU EUKOR FYTHM FZZXA NBPLCI  (0)  ZZ.
anluf twafe nfunk stele osloxa

FRZVF QUTQS ZSYNK VAHMG USJPYX  (+2) ZB.
bzwov ierxv ierxh auptf requen

KNEQO NYHSK ERKRH HNDZA JBNAVH  (+4) ZD.
zinna rvika usges chalt etxfun...

Key: B IV V VI AO:BQ:CR:DF:GN:HJ:LW:PV:TZ Ring:KBA Grund:HSZ

Choose the Indicator

a) Not chosen (the first position given in the menu: ZZC)
$ python3 first_turing_bombe.py -W VI,III,II -T H,J,J -M \ 
ZZC:ZZA:ZZF:ZZJ,ZZD:ZZE:ZZS:ZZK:ZZI,ZZD:ZZB
stop VI,III,II ['H', 'J', 'J'] CBW

b) Chosen
$ python3 first_turing_bombe.py -W VI,III,II -T H,J,J -M \
ZZC:ZZA:ZZF:ZZJ,ZZD:ZZE:ZZS:ZZK:ZZI,ZZD:ZZB -I ZZA
stop VI,III,II ['H', 'J', 'J'] CBU

c) Chosen (but we take into account that the rotors advance 
before the encryption)
$ python3 first_turing_bombe.py -W VI,III,II -T H,J,J -M \
ZZC:ZZA:ZZF:ZZJ,ZZD:ZZE:ZZS:ZZK:ZZI,ZZD:ZZB -I ZZB
stop VI,III,II ['H', 'J', 'J'] CBV

Exercice

  1. - Create the menu.
  2. - Try each Rotors order (Walzenlage) for Rotors: I,II,III (there are 6 combinations).
  3. - For each Walzenlage, try every stecker [Input letter: E].
         Enigma 012345678
                ZZZZZZZZZ  (position of the left rotor)
                ZZZZZZZZZ  (position of the middle rotor)
         Grund. ABCDEFGHI  (position of the right rotor)
         Crib   BEACHHEAD   Input letter: E, Try all terminals
         Cipher EDBGEAHDB   Terminal: (stecker: A,B,C...,X,Y,Z)
Solution