Home Page Hebern's machines Home Page
|
IntroductionThis web page presents my simulation program for the Hebern 1 rotor cipher machine. This program is written in Python and works in text mode. The Python interpreter must be installed. Download, installHere is the download link: (link) Suggestion to install the software:
C:\H1_TOOLS> python hebern_tui.py -h usage: Syntax : hebern1_tui.py [options...] Example: echo AAAAA | python hebern1_tui.py -R c1 Options: -L lamp The lampboard permutation (iden by defaults) -K keyb The keyboard permutation (iden by defaults) -R rotor The rotor (iden by defaults) -E external The external key (Z by default) -d Decipher Mode (cipher mode by default) -t Trigonometric direction (False [clockwise] by default) -T The Rim is different from direction (False by default) -m Dont Move (0 by default) -r Reverse the Rotor (mirror) -D Debug Mode Note: for L,K,R options, if you begins with =, the wiring is given, otherwise, you must give a file which contains the wiring the filename is given without the .rot extension and it must be in the ROTORS/ directory. Note: iden = identity permutation = ABC...ZNote: You can download my Hebern 1-rotor tools which includes my simulator. Here is the download link: (link) Simple use
Using the different optionsPermutationsThe permutations (Lampboard, Keyboard and Rotor) can be given directly as arguments, as in the previous examples or provided as files. We just indicate the name of the rotor. The corresponding file is searched in the ROTORS directory with the extension .rot. So rotor c5 corresponds to the file ROTORS\c5.rot.- The fifth rotor of the Hebern 5 rotor machine. C:\H1_TOOLS> type ROTORS\c5.rot FQTGXANWCJOIVZPHYBDRKUSLEM- The wiring of RFS (lampboard of the Hebern 5 rotors machine). C:\>H1_TOOLS> type ROTORS\RFS.rot TYOEUMXDFJQVKWBNSHCILRZAGP- The wiring of LFS (Keyboard of the Hebern 5 rotors machine). C:\H1_TOOLS> type ROTORS\LFS.rot XAKHSZJLYWGPMIOURDBFTNVCQE- Ciphering with (and without) Lampboard and Keyboard permutations. C:\H1_TOOLS> echo Hello World | python hebern1_tui.py -R c5 WZXMZLEXJM C:\H1_TOOLS> echo Hello World | python hebern1_tui.py -R c5 -K LFS -L RFS FSPTPTUDEN The message keyThe message key of a cryptogram created by a Hebern 1 rotor machine must specify:
C:\H1_TOOLS> echo Hello World | python hebern1_tui.py -R c5 -r -E H TOCHSBBOSCNote: In the example, the external key (the initial position of the rotor) is H and the c5 rotor is reversed. The basic keyDepending on the machine design, some elements are not configurable, such as the Lampboard and Keyboard swaps. It is the same for the advancement of the rotors which is done either clockwise or in the opposite direction (trigonometric direction). In a computer program, it is easy to change these settings. By default, the rotor advances clockwise. With the -t option, it advances in the trigonometric direction. C:\H1_TOOLS> echo Hello World | python hebern1_tui.py -R c5 -t WHLFSGIVOT DebugThe -D option displays the details of the permutations. The -m option blocks rotor advancement. C:\H1_TOOLS> echo Hello World | python hebern1_tui.py -R c5 -D -L RFS Key: Z ... Direction: Clockwise Rotor Reverse: False Edge : ABCDEFGHIJKLMNOPQRSTUVWXYZ ---- (K) :P K R L (Key), Plain, Keyboard, Rotor, Lampboard [cipher] 0001: (Z) :H H W Z 0002: (A) :E E Z P 0003: (B) :L L X A 0004: (C) :L L M K 0005: (D) :O O Z P 0006: (E) :W W L V 0007: (F) :O O E U 0008: (G) :R R X A 0009: (H) :L L J J 0010: (I) :D D M K ZPAKPVUAJK Emulate a 5-rotors machineMy simulator for the 1-rotor Hebern can emulate the operation of a 5-rotor Hebern machine in the case where only the right rotor (the fast rotor) moves forward. Here is an example : H1_TOOLS> echo HELLOWORLD | python hebern1_tui.py -K LFS -L RFS -R 5 FSPTPTUDEN H5_TOOLS> echo HELLOWORLD | python hebern5_tui.py -I 0:0:0:0:5 -E AAAAAZZ FSPTPTUDEN Hebern 1 rotor Simulator written in ExcelRafael Pascual has created an Excel worksheet that simulates the Hebern one rotor machine. This one is available on this site with his permission. |