Find the rotor which is in position I


Home Page
Hebern's machines
The 5 rotors machine home page

Introduction

Objective: we want to find which rotor is in position I.

We assume we know the wiring of the rotors as well as the external key and also the rotor which is in position 5.

Thanks to the knowledge of the rotor in position 5, we can achieve a partial decryption which gives a pseudo-cryptogram made of slices of 26 letters, each slice corresponding to a simple substitution.

Example

Creating the example

here is an example

- Here is the ciphertext:

C:\H5_TOOLS> more MSGS\kruh_page_49.cry
GEEDN TKVLM TBTFY CYEDV WYZKQ IEQFO GVVUS OJOXP BUHUF RLDLK
SDLHY BYUVB TTMZX TIQQO FVTVG PKITT EDXZF HNLMG IBFOV DBHVO
PCIRM VRTYI AXOTW OVVVB JCNNT EEBCG JGJUZ DJOWY XXWCQ CKTWL
CJSAY NLGIN WHKCG QSEAF CJAGJ NGWFQ WRITY YMVQZ KFICG EXWKQ
VQAHU HKZBM OAXIY TMKAP CJHWH WGIPM QKVGR GLNPI
- Here is the plain text (decryption of the cryptogram):
Note I: The external key is known: AEQUILA.
Note II: During the reasoning, we will not use this plain text.
C:\H5_TOOLS> python hebern5_tui.py -E AEQUILA -d < MSGS\kruh_page_49.cry
CONFIDENTIALFORJONESSTOPIAMRETURNINGTONIGHTONTHETENFIFTEENTRAIN
STOPMEETMEATPENNSYLVANIASTATIONANDWEWILLDISCUSSTHENEGOIATIONSAT
DINNERSTOPPHILLIPSSTILLINSISXSONTHESAMEPRICEFORTHESTOOKSTOPIFWE
CANSWAETENTHEDEALSOMEWHATHEMIGHTBUDGESTOPHAVEANIDEA

We are looking for the value c’

The value c’ corresponds to an encrypted letter without the influence of the rotor in position V (here rotor 5) and without the influence of output permutation (Lampboard [RFS])

C:\H5_TOOLS> python hebern5_tui.py -E AEQUILA -I 0:0:0:0:5 -d ^
  < MSGS\kruh_page_49.cry 
NOTECXKTYCHBEYQSYBUJJZYRHVXQUZPQBHBGZYBQCFBMWBFRBRWHQHBRRWBJS
QWTBOXJAAWJALWXAVVUTEQLVSLUWLWDHQZQEXVXDNNEDRWFRRJPVQVYHWAVWG
IYAVLWIIBCYVGFFUWMMWFPPSNLLNCPNPVPQCSGXPKZXTRNOYJUHOXYEOUUPEO
UBMJQYWGAEQGGRGNRCGMGQJAZUGVCQRCGUPKCRMUGBIZHPEORXIRCAGIR

Cutting into slices of 26 letters using mono-substitution

As in the previous section, we display the different lines of the cryptogram cut into slices of 26 letters for which the rotor in position I does not move forward.

i=0
p (plain)               CONFIDENTIALF   
c (cipher)              GEEDNTKVLMTBT    
pK (keyb)               KOIZYHSIFYXPZ   
pKRS (c’)               NOTECXKTYCHBE   
              
i=1
p (plain)  ORJONESSTOPIAMRETURNINGTON   
c (cipher) FYCYEDVWYZKQIEQFOGVVUSOJOX
pK (keyb)  ODWOISBBFOUYXMDSFTDIYIJFOI   
pKRS (c’)  YQSYBUJJZYRHVXQUZPQBHBGZYB   

i=2
p (plain)  IGHTONTHETENFIFTEENTRAINST   
c (cipher) PBUHUFRLDLKSDLHYBYUVBTTMZX   
pK (keyb)  YJLFOIFLSFSIZYZFSSIFDXYIBF   
pKRS (c’)  QCFBMWBFRBRWHQHBRRWBJSQWTB   

i=3
p (plain)  OPMEETMEATPENNSYLVANIASTAT
c (cipher) TIQQOFVTVGPKITTEDXZFHNLMGI
pK (keyb)  OUMSSFMSXFUSIIBQPNXIYXBFXF
pKRS (c’)  OXJAAWJALWXAVVUTEQLVSLUWLW

i=4
p (plain)  IONANDWEWILLDISCUSSTHENEGO
c (cipher) BFOVDBHVOPCIRMVRTYIAXOTWOV
pK (keyb)  YOIXIHVSVYPPHYBKTBBFLSISJO
pKRS (c’)  DHQZQEXVXDNNEDRWFRRJPVQVYH

i=5
p (plain)  IATIONSATDINNERSTOPPHILLIP
c (cipher) VVBJCNNTEEBCGJGJUZDJOWYXXW
pK (keyb)  YXFYOIBXFHYIISDBFOUULYPPYU
pKRS (c’)  WAVWGIYAVLWIIBCYVGFFUWMMWF

i=6
p (plain)  SSTILLINSISXSONTHESAMEPRIC
c (cipher) CQCKTWLCJSAYNLGINWHKCGQSEA
pK (keyb)  BBFYPPYIBYBCBOIFLSBXMSUDYK
pKRS (c’)  PPSNLLNCPNPVPQCSGXPKZXTRNO

i=7
p (plain)  EFORTHESTOOKSTOPIFWECANSWA
c (cipher) FCJAGJNGWFQWRITYYMVQZKFICG
pK (keyb)  SZODFLSBFOOGBFOUYZVSKXIBVX
pKRS (c’)  YJUHOXYEOUUPEOUBMJQYWGAEQG

i=8
p (plain)  ETENTHEDEALSOMEWHATHEMIGHT
c (cipher) EXWKQVQAHUHKZBMOAXIYTMKAPC
pK (keyb)  SFSIFLSHSXPBOMSVLXFLSMYJLF
pKRS (c’)  GRGNRCGMGQJAZUGVCQRCGUPKCR

i=9
p (plain)  BUDGESTOPHAVEANIDEA
c (cipher) JHWHWGIPMQKVGRGLNPI
pK (keyb)  ATHJSBFOULXNSXIYHSX
pKRS (c’)  MUGBIZHPEORXIRCAGIR
As for finding the rotor wiring in position I, we are looking for pairs (pK, c’) for which the value of c’ is identical. We easily find those associated with the letter B:
(i=0)   B = P + D[ G + 0 ], 1 = 15 + D[15]   => D[15] = 12
(i=1)   B = I + D[ I + 1 ], 1 =  8 + D[8+1]  => D[9]  = 19
(i=2)   B = F + D[ R + 2 ], 1 =  5 + D[5+2]  => D[7]  = 22
(i=5)   B = S + D[ K + 5 ], 1 = 18 + D[18+5] => D[23] =  9
(i=7)   B = U + D[ R + 7 ], 1 = 20 + D[20+7] => D[1]  =  7
(i=9)   B = J + D[ K + 9 ], 1 =  9 + D[9+9]  => D[18] = 18
By comparing with the different rotors, we can see that the offsets found correspond to those of Rotor 1 (here in position I, it is a coincidence) but where the origin is in position 4 with an offset of 10.

gws: the offsets of rotor number 1 (known) with respect to the index m, R: the offsets (those calculated) with respect to the index m’.

m    0  1  2  3  4  5  6  7  8  9 10 11 12
gws  6 25  1 24 10 23 13  3  5 11 15 12 22
m’  22 23 24 25  0  1  2  3  4  5  6  7  8   
R       9           7                22      R=gws+10

m   13 14 15 16 17 18 19 20 21 22 23 24 25
gws  9 19 16  0  7 17  2 21 17  8 14 20 18
m’   9 10 11 12 13 14 15 16 17 18 19 20 21
R   19                12       18 
- Conclusion

We applied the same method as to find the Rotor wiring but we needed much less data. So only one series was enough.

References

  • Machine Cryptography and Modern Cryptanalysis, by Cipher A. Deavours & Louis Kruh, Artech House Editor, 1985.
  • Analysis of the Hebern Cryptograph Using Isomorphs, by Cipher A. Deavours, Cryptologia, Vo. 1, N°2, April 1977.
  • A Solution of the Hebern Messages, by Carl M. Ellison, Cryptologia, Volume XII, Number 3, July 1988.

Web Links

  • ANALYSIS OF A MECHANICO-ELECTRICAL CRYPTOGRAPH, PART I, TECHNICAL PAPER, BY WILLIAM F. FRIEDMAN Cryptanalyst, Chief of Signal Intelligence Section UNITED STATES GOVERNMENT PRINTING OFFICE, WASHINGTON: 1934, Secret. (link)