The Turing/Welchman Bombe simulator (in C)


Enigma Home Page

Special uses

US 6812 Bombe Report

Introduction

This software, in C language, emulates in text mode, a Turing/Welchman three rotors Bombe. This model allows you to find the daily key for messages encrypted with the Enigma I or M3 which only uses three rotors.

These are the main features

By default, a stop displays only one connector (stecker). An option (machine gun) allows you to see all the connectors.

The order of the rotors (grundstellung) must be completely specified.

The cabling of the rotors is stored in files in the ROT directory. It is easy to add more.

You can use Bletchley Park conventions and compare your results with real data from the war, especially those provided in the document “US 6812 Bombe Report” (see links).

This simulator passes all of the tests described in the previous report.

The simulator supports the Query-Menu.

Easy to use

1)We create a file describing a "Crib"

$ cat ellsbury.cri4
ZZABE
ZZBED
ZZCAB
ZZDCG
ZZEHE
ZZFHA
ZZGEH
ZZHAD
ZZIDB
=E=A=
+++++

2)We start the search, example

$ bombe ellsbury.cri4 II I III 
STOP ellsbury.cri4 II I III BGX E:X
++++++++++++++++++++++++++++++++++++++++++++

The format of a Crib file

Each line begins with the position of the three rotors followed by a couple of letters: the letter in clear and the corresponding ciphered letter. Then we have a line, for example "=E=A=" which specifies that the electric current is sent to the terminal "A" of the letter "E". The end of the file is specified by the line “+++++”.

Menu
	         Enigma 012345678
                        ZZZZZZZZZ  (position of the left rotor)
      5                 ZZZZZZZZZ  (position of the middle rotor)
   A-----H       Grund. ABCDEFGHI  (position of the right rotor)
  /|     ||      plain  BEACHHEAD
7/ |2   4||6     cipher EDBGEAHDB
D--B-----E
|8    0  |       Input letter: E, terminal: A
|   1    |       4 loops
----------

The arguments of the bombe software:
First, we have the name of the Crib file .
Then the three rotors used.

The software displays, if it finds solutions, the word "STOP" followed by the order of the rotors (Walzenage), the position of each rotor (Grundstellung) and the stecker that corresponds to the letter choosen in the menu (here, the letter "E").

Exhaustive search

The Bombe software only searches for a specific combination of rotors, for example "IV-I-III". Another software, les_bombes.pl, written in Perl, allows you to search for a set of combinations. It just calls the software Bombe and he gives it these combinations. Without argument, the software only uses the first three rotors (I, II, III). with the argument "soixante" he uses the five Army (or Air) rotors. Finally, with the argument "naval", it uses the eight rotors of the navy.

Example:
+++++++++++++++++++++++++++
$ perl les_bombes.pl ellsbury.cri4 soixante
===> ( 1) I II III
===> ( 2) I III II
===> ( 3) II I III
STOP ellsbury.cri4 II I III BGX E:X
===> ( 4) II III I
===> ( 5) III I II
===> ( 6) III II I
STOP ellsbury.cri4 III II I EFO E:N
===> ( 7) I II IV
…

Advanced use

The Bombe software has several options. To show them, just launch the software without arguments.

$ ./bombe.exe
Usage: bomb3r [options] crib left middle right
  -step     : Stop after each grundstellung
  -stop     : Stop after each stop
  -register : Print registers
  -printall : Print all registers
  -testall  : Test all registers
  -back     : Back one a position for a stop
  -mg       : Machine Gun
  -sss      : Self-steckers needed (SSS)
  -csko     : Steckers no adjacent (CSKO)
  -nodiag   : Not use the Diagonal Board
  -bp       : Use BP notation, use drums B-* !
  -ts       : Use Tony Sale notation, use -ring ZZZ
  -ukw XXX  : Uncle Walter (Default: B)
  -ws XXX   : Wheels Start (Default: AAA)
  -ring XXX : Ringstellung (default: AAA)

You can download the softwares here

A Bombe simulator in Excel

Alberto Bernasconi created a Bombe of Turing / Welshman in Excel. Alberto gave me permission to host his software. The multiple colors make it very educational.

Links