        README.txt

THE REJEWSKI'S BOMBA
  The Rejewski’s Bombe is based on the presence of females in 
  the indicators. Rejewski only uses three females, 
  but the repeated letter must also be the same. When the german 
  have only three rotors, it takes six Bombes to explore all 
  possible keys simultaneously, which would take two hours.

Example of using my Bombe simulator
- The Daily key (the solution)
  UKW          : B 
  Walzenlage   : IV-V-II 
  Ringstellung : JSY
  Steckers     : RV, ZF, EC, IG, YW, UT, NA, BJ, DL, OM

- Several headers from traffic
  A list of Grundstellung and the corresponding indicator (as well 
  as the message key which is unknown to the cyrptolog):

        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.

- Using my simulator
  a) Print the syntax:
$ python3 bombe_poles.py
usage:
  -h             Online Help
  -g FZM,KBQ,MGT The grunds for female (3 or more values)
  -v             Verbose (mode Debug)
  -W X,Y,Z       The Walzenlage, example: -W I,II,III
  -G XXX:ZZZ     The Grund domain. Examples:
     -G AAA:ZZZ [by default], -G DGJ, AGA:AGZ, ...
  -L letter      The Letter (female)
  -S Letter      The other letter of the stecker (by default the female)
  -R XXX:ZZZZ     The Ringstellung domain (AAA by default)
  -U UKW         The Reflector, by default B
  -s steckers    The Steckers, ex: AH:JQ:LP:EZ:RT:NF, nothing by default
Ctrl-C prints the progression, two Ctrl-C stops the program

  b) Find a key
   The repeated letter is H (-L H), and we use the Ringstellung AAA
   (-R AAA). The Walzenlage tested is IV-V-II (-W IV,V,II). The -g
   option specifies the list of Grundstellung associated with females:

$ python3 bombe_poles.py -W IV,V,II -R AAA -L H -g BKT,KBQ,TIA
Walzenlage:IV,V,II ,Stecker:HH ,stop:DIN
Walzenlage:IV,V,II ,Stecker:HH ,stop:SSV

   For each stop (here, only two), we obtain:
      The Walzenlage, The Ringstellung used, The Grundstellung
      and the positions associated to the grundstellungs given.
      The first of theses grundstellung is used to deduce the 
      genuine Ringstellung using the following formula: 
      (for example for the second stop): 

            Ring = AAA - SSV + BKT = JSY

   With only three Grundstellung we get 65 stops for the 60 Walzenlages 
   of the army’s Enigma model (with 3 rotors among 5). 

    c) Use the English Polish Bombe (with 8 Enigmas)
I think, we can specify the Stecker (with -L and -S options)
$ python3 bombe_poles.py -W IV,V,II -R AAA -L H -S H -g BKT,KBQ,MGU,TIA
Walzenlage:IV,V,II ,Stecker:HH ,stop:SSV

    d) If I want to scan all possible steckers, I use the bombe_poles.sh
software.
Note: you need a Unix Shell (ksh, bash, dash, zsh, ...).
$ sh bombe_poles.sh IV,V,II H BKT,KBQ,MGU,TIA
Walzenlage:IV,V,II ,Stecker:HF ,stop:CVO
Walzenlage:IV,V,II ,Stecker:HH ,stop:SSV

