We know the plain text, recovery of rotors (Poem)


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

Introduction

In his secret report, Friedman had studied the possibility of reconstructing the wiring of the rotors in the case where the plain text of a message was known. Chance allowed him to demonstrate it.

Brigman's feat

A cryptologist, Benjamin R. Brigman, was assigned to the army's signal service. Previously he had been in contact with Mr Hebern's company (Hebern Electric Code).

This company sent a message to Brigman asking him to try to decipher it, probably to prove the hermiticity of the 5-rotor machine.

The message was a poem presented with the separation of words. Here is this poem with the external key.

          Key : GORDON-Z, write ELEANOR
       Setting of wheels: 5-4-3-2-1, width #4 and #5 inverted.

          KB  BTR  EKSMO  DG  TNS  GDNX  AAT  XCN  ICA
          IDUSEA  AJEF  HI  RGZ  TKCD  FP  AQWDJ  YD  MON
          ZK  DA  JGE  ONW  HXTCHQC  WOSG  WTMCP  BN  RF
          GUUKHEJ  II  XHR  WARHVH  FQ  QIKCW  HGBQLY
          PWVHHROT  SMHLME  PHGEEPNFY

Brigman, aided by the separation of words, searched a library for all the poems compatible with the structure of the cryptogram. Finally he found it:

          KB  BTR  EKSMO  DG  TNS  GDNX  AAT  XCN  ICA
          in  the  photo  of  her  hero  she  can  see

          IDUSEA  AJEF  HI  RGZ  TKCD  FP  AQWDJ  YD  MON
          things  that  do  not  show  so  clear  to  you

          ZK  DA  JGE  ONW  HXTCHQC  WOSG  WTMCP  BN  RF
          or  me  for  her  outlook  ever  seens  to  be

          GUUKHEJ  II  XHR  WARHVH  FQ  QIKCW  HGBQLY
          colored  by  her  dreams  in  which  golden

          PWVHHROT  SMHLME  PHGEEPNFY
          sunshine  gleams  endlessly

Note: While searching the web, I couldn't find the title of this poem. Some help would be appreciated!

Friedman's feat

After Brigman joined the cipher department, he informed Friedman of his exploit. Friedman thus had an opportunity to prove his theories. At first, he rebuilds the basic cipher text sequences table. At the end of his analysis, Friedman was able to reconstruct the wiring of the rotors in position V. Finally, he found rotor I and the stator S equivalent to the action of the rotors in positions II, III and IV. Here is the solution he found:

AL5:    FIZDTMPGAVUBHQWLRCJXSOYKEN
AL1:    EHLNSVZCFKMQUYDJPRWAGIOTBX
(234):  YQWTBUMXKRDLIZGESFPVONHCAJ

Note: Friedman did not use the key provided. He thought the key was generated by positioning the external key to GORDON-Z and entering the ELEANOR indicator.

You can read Friedman's report for details of his rotor wiring recovery.

IMPORTANT REMARK: Unfortunately the solution given by Friedman does not provide me with a correct decipherment. As a result I tried to reconstruct rotor wiring (I, II+III+IV, V).

My reconstruction of the wiring of the rotor V

Introduction

To reconstruct the rotor V wiring, I used the established formulas to find the rotor wiring of a Hebern 1 rotor machine (plain known, using formula).

	y = L[ R[ x + i ] - i ]

The basic formula used here gives the ciphered letter (y) from the plain letter (x) undergoing the permutation of a rotor (R) and the Lampboard permutation (L).

In our case, permutation L corresponds to pseudo stator equivalent to rotors I+II+III+IV. The permutation R corresponds to the inverse rotor V. Don’t forget we are in decipher mode.

The value x corresponds to the decipherment of a letter of the cryptogram after elimination of the RFS permutation. The value y corresponds to the cipherment of the plain letter by the LFS permutation.

There is a difficulty, we do not know the external key and therefore we do not know to which position the rotor I advances. This information is essential if we want to be able to consider the permutation L as a stator.

A simple solution is to try the 26 possible positions of the RAW ratchet wheel.

1st step: Remove the influence of RFS and LFS permutations

Note: Friedman does not.
C:\H1_TOOLS> type poem.cry
KB  BTR  EKSMO  DG  TNS  GDNX  AAT  XCN  ICA
IDUSEA  AJEF  HI  RGZ  TKCD  FP  AQWDJ  YD  MON
ZK  DA  JGE  ONW  HXTCHQC  WOSG  WTMCP  BN  RF
GUUKHEJ  II  XHR  WARHVH  FQ  QIKCW  HGBQLY
PWVHHROT  SMHLME  PHGEEPNFY


C:\H1_TOOLS> type poem.pln
in  the  photo  of  her  hero  she  can  see
things  that  do  not  show  so  clear  to  you
or  me  for  her  outlook  ever  seens  to  be
colored  by  her  dreams  in  which  golden
sunshine  gleams  endlessly

C:\H1_TOOLS> python striplamp.py TYOEUMXDFJQVKWBNSHCILRZAGP ^
	poem.cry  > poem_stri_L.cry
C:\H1_TOOLS> type poem_stri_L.cry
MOOAVDMQFCHYAPQYHPGXXAGSPTSXTHEQDXXJDIRTVYWAMSHIZXKNHJBHFCPWM
HXJYDCPNRGASRKSNCQYNAFSZOPVIYEEMRDJTTGRVNXVRLRIKKTMSNRYOKUBZN
LRRVCAQFRUFDZRYDDZPIB

C:\H1_TOOLS> python hebern1_tui.py -R 0 -L LFS < poem.pln  ^
	> poem_stri_K.pln
C:\H1_TOOLS> type poem_stri_K.pln
YIFLSULOFOOZLSDLSDOBLSKXIBSSFLYIJBFLXFHOIOFBLOVBOKPSXDFOQOTOD
MSZODLSDOTFPOOGSNSDBSSIBFOASKOPODSHAQLSDHDSXMBYIVLYKLJOPHSIBT
IBLYISJPSXMBSIHPSBBPQ

2nd step: Try RAW at position N

We cut the messages into sections of 26 letters. We start by assuming that RAW is at position N. So the first 26 letters will be encrypted with rotor I stationary (and the following slices).

       i  abcde fghij klmno pqrst uvwxy z
          01234 56789 01234 56789 01234 5 (25)

line 0,y  yifls ulofo ozlsd lsdob lskxi b
       x  MOOAV DMQFC HYAPQ YHPGX XAGSP T

line 1,y  ssfly ijbfl xfhoi ofblo vbokp s
       x  SXTHE QDXXJ DIRTV YWAMS HIZXK N

line 2,y  xdfoq otodm szodl sdotf poogs n
       x  HJBHF CPWMH XJYDC PNRGA SRKSN C 

line 3,y  sdbss ibfoa skopo dshaq lsdhd s
       x  QYNAF SZOPV IYEEM RDJTT GRVNX V 

line 4,y  xmbyi vlykl jophs ibtib lyisj p 
       x  RLRIK KTMSN RYOKU BZNLR RVCAQ F 

line 5,y  sxmbs ihpsb bpq
       x  RUFDZ RYDDZ PIB
If the other rotors (1,2,3,4) do not move, The following formula applies:
  y = L[ R[ x + i ] - i ]

If we are in the same line, the permutation L (corresponding to rotors 1+2+3+4) is identical, therefore:
  y = R[ x + i ] - i ]
So, let's take line number 0:
  If y == L, we have
     i=D, R[A+3]-3 = R[D]-3
     i=G, R[M+6]-6 = R[S]-6
     i=M, R[A+12]-12 = R[M]-12
     i=P, R[Y+15]-15 = R[N]-15
     i=U, R[X+20]-20 = R[R]-20

So, let's take line number 1:
  If y == S, we have
     i=A, R[S+0]-0 = R[S]
     i=B, R[X+1]-1 = R[Y]-1
     i=Z, R[N+25]-25 = R[M]-25

If we compare the results:
  Line 0: R[S] = R[M]-6
  Line 1: R[S] = R[M]-25

We can see that the results are incompatible. Consequently, we can say that every line of 26 letters there is rotor I moving forward. The RAW ratchet wheel position isn't N. Note: In our first test we were unlucky because the indices i tested are in the range 0 to 25. On the other hand, if we notice an inconsistency with i in a range of 10 to 15, we drastically reduce the number of tests to be carried out. Likewise if we have confirmations.

2nd step: Try other RAW positions

Now we need to try a different RAW position. In total there are 26 possible values.

Now let's test the value found by Friedman: the RAW G position.

       i  abcde fghij klmno pqrst uvwxy z
          01234 56789 01234 56789 01234 5 (25)

line 0,y                        y iflsu l   
       x                        M OOAVD M   

line 1,y  ofooz lsdls dobls kxibs sflyi j  
       x  QFCHY APQYH PGXXA GSPTS XTHEQ D  

line 2,y  bflxf hoiof blovb okpsx dfoqo t 
       x  XXJDI RTVYW AMSHI ZXKNH JBHFC P 

line 3,y  odmsz odlsd otfpo ogsns dbssi b  
       x  WMHXJ YDCPN RGASR KSNCQ YNAFS Z  

line 4,y  foask opods haqls dhdsx mbyiv l   
       x  OPVIY EEMRD JTTGR VNXVR LRIKK T   

line 5,y  ykljo phsib tibly isjps xmbsi h 
       x  MSNRY OKUBZ NLRRV CAQFR UFDZR Y  
 
line 6,y  psbbp q
       x  DDZPI B

So, let's take line number 3:
    If y == S, we have
	i=T, R[Q+19]-19 = R[J]-19
	i=W, R[A+22]-22 = R[W]-22
    Then
	R[J] = R[W]-3
    If y == D, we have
	i=G, R[D+6]-6 = R[J]-6
	i=J, R[N+9]-9 = R[W]-9
    Then
	R[J] = R[W]-3
Here, not only do we have no contradiction, but rather a confirmation. We will study all the combinations to be able to reconstruct the wiring of the rotor V.
So, let's take line number 1:
	If y=O, then R[Q] = R[E]-2 = R[K]-3 = R[R]-11
So, let's take line number 2:
	If y=O, then R[Z]-6 = R[G]-8 = R[E]-12 = R[O]-15 =
	        R[D]-22 = R[A]-24
	If y=S, then R[B]-7 = R[Q]-16 = R[K]-19 = R[W]-23
So, let's take line number 3:
	If y=D, then R[N]-1 = R[J]-6 = R[W]-9 = R[S]-20
	If y=O, then R[W] = R[D]-5 = R[B]-10 = R[F]-14 = R[Z]-15
	If y=S, then R[A]-3 = R[X]-8 = R[E]-17 = R[J]-19 =
	        R[W]-22 = R[C]-23 
So, let's take line number 4:
	If y=O, then R[Q]-1 = R[J]-5 = R[T]-7
We set R[A]=0 arbitrarily. Thanks to the previous deductions, we obtain the following wiring (partial wiring of the inverse of Rotor V):
      a b c d e f g h i j k l m n o p q r s t u v w x y z
      A D U Y O H K . . Q P . . . R . M X . . . . T F . I
We could continue (we didn't use lines 1 and 4 a lot and not lines 5 and 6 at all). If I can't find the complete wiring I can try all the remaining possible combinations. But I realized that my solution corresponds to Friedman's solution to the key F and shifted:
      a b c d e f g h i j k l m n o p q r s t u v w x y z
      A D U Y O H K B V Q P W C L R G M X E S N J T F Z I
Here the cipher table of the Fridman's rotor V:
  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
A F I Z D T M P G A V U B H Q W L R C J X S O Y K E N
B H Y C S L O F Z U T A G P V K Q B I W R N X J D M E
C X B R K N E Y T S Z F O U J P A H V Q M W I C L D G
D A Q J M D X S R Y E N T I O Z G U P L V H B K C F W
E P I L C W R Q X D M S H N Y F T O K U G A J B E V Z
F H K B V Q P W C L R G M X E S N J T F Z I A D U Y O
G J A U P O V B K Q F L W D R M I S E Y H Z C T X N G
H Z T O N U A J P E K V C Q L H R D X G Y B S W M F I
I S N M T Z I O D J U B P K G Q C W F X A R V L E H Y
J M L S Y H N C I T A O J F P B V E W Z Q U K D G X R
K K R X G M B H S Z N I E O A U D V Y P T J C F W Q L
L Q W F L A G R Y M H D N Z T C U X O S I B E V P K J
M V E K Z F Q X L G C M Y S B T W N R H A D U O J I P
N D J Y E P W K F B L X R A S V M Q G Z C T N I H O U
O I X D O V J E A K W Q Z R U L P F Y B S M H G N T C
P W C N U I D Z J V P Y Q T K O E X A R L G F M S B H
Q B M T H C Y I U O X P S J N D W Z Q K F E L R A G V
R L S G B X H T N W O R I M C V Y P J E D K Q Z F U A
S R F A W G S M V N Q H L B U X O I D C J P Y E T Z K
T E Z V F R L U M P G K A T W N H C B I O X D S Y J Q
U Y U E Q K T L O F J Z S V M G B A H N W C R X I P D
V T D P J S K N E I Y R U L F A Z G M V B Q W H O C X
W C O I R J M D H X Q T K E Z Y F L U A P V G N B W S
X N H Q I L C G W P S J D Y X E K T Z O U F M A V R B
Y G P H K B F V O R I C X W D J S Y N T E L Z U Q A M
Z O G J A E U N Q H B W V C I R X M S D K Y T P Z L F
Note: We can notice that the wiring found by Friedman corresponds to the inverse of the Rotor V!

Here the wiring of the Rotor V (not its inverse):

      a b c d e f g h i j k l m n o p q r s t u v w x y z
      A H M B S X P F Z V G N Q U E K J O T W C I L R D Y
We can verify our deductions, by removing the effect of the rotor V. If our solution is correct we have a series of simple transpositions.
C:\H5_TOOLS> type ROTORS\poem_V.rot
AHMBSXPFZVGNQUEKJOTWCILRDY

C:\H5_TOOLS> python hebern5_tui.py -I 0:0:0:0:poem_V ^
     -E AAAAASG -d < poem.cry
OSWADTAMGMMYXRIXRIMZXRPTUZRRJXKUWTIPDIOXVXITPXBTXWMLDZ
IXAXEUCOADUCGACUMYPUUTAWACBAAOBQHRUYHGHBUNRWTUBNBUJVDE
ZATXQZCYVKJNMWNMSXNJCVJATMJNKIVSSIT

My reconstruction of the wiring of the rotor I

We have already studied the method to find the wiring of the rotor I (link). The following example uses the same recipes but it is more realistic.

C:\H5_TOOLS> python hebern5_tui.py -I 0:0:0:0:poem_R5jf ^
	-E AAAAASG -d < poem.cry -D 
...
Key:  AAAAASG
001: K ->MOOOOO-> O    AAAAATH
002: B ->OBBBBB-> S    AAAAAUI
003: B ->OVVVVV-> W    AAAAAVJ
004: T ->AXXXXX-> A    AAAAAWK
005: R ->VHHHHH-> D    AAAAAXL
006: E ->DFFFFF-> T    AAAAAYM
007: K ->MXXXXX-> A    AAAAAZN
008: S ->QMMMMM-> M    BBAAAAO
009: M ->FJJJJJ-> G    BBAAABP
010: O ->CMMMMM-> M    BBAAACQ
011: D ->HMMMMM-> M    BBAAADR
012: G ->YQQQQQ-> Y    BBAAAES
...
RAW        OPQRSTUVWXYZABCDEFGHIJKLMN
Rotor V    ABCDEDGHIJKLMNOPQRSTUVWXYZ

(line 0)
p                             intheph
pK                            yiflsul
c’                            OBVXHFX

(line 1)
p          otoofherheroshecanseething   
PK         ofoozlsdlsdoblskxibssflyij 
c’         MJMMQCDYCDYMECDUFTEDDWCGTV   

(line 2)   
p          sthatdonotshowsocleartoyou
pK         bflxfhoiofblovbokpsxdfoqot 
c’         FYUHYOCNCYFUCAFCVMPHEYCXCS

(line 3)
p          ormeforheroutlookeverseens  
pK         odmszodlsdotfpoogsnsdbssib 
c’         TKOXHTKJXKTMQUTTFXVXKAXXOA

(line 4)
p          tobecoloredbyherdreamsinwh 
pK         foaskopodshaqlsdhdsxmbyivl
c’         RLDTQLJLATIDVFTAIATWNHSEXF
(line 5)
p          ichgoldensunshinegleamsend 
pK         ykljophsibtiblyisjpsxmbsih
c’         CREKQNGWIMVIMBCIWKNWXFMWIG

(line 6)
p          lessly
pK         psbbpq
c’         YNBBYF
If we apply the following formula (cf. the concept of rotor) which corresponds to the value of the encrypted letter y(i) in relation to the plain letter x(i) and the offset D[m]:
	y(i) = x(i) + D[ x(i) + i ]
We obtain the final formula (in the case where c' has the same value):
	c’ = pK + D[ pk + i ]
1) In the case where c’ == M, we have:
(i=1)   M = O + D[ O + 1 ], 12 = 14 + D[P] => D[P] = 24
(i=2)   M = P + D[ P + 2 ], 12 = 15 + D[R] => D[R] = 23
(i=3)   M = T + D[ T + 3 ], 12 = 19 + D[W] => D[W] = 19
(i=5)   M = B + D[ B + 5 ], 12 =  1 + D[G] => D[G] = 11
2) In the case where c' == J, we have:
(i=1)   J = F + D[ F + 1 ],  9 =  5 + D[G] => D[G] =  4
(i=4)   J = P + D[ P + 4 ],  9 = 15 + D[T] => D[T] = 20
We still don't know D[G], but we know two values of its wiring (relatively), if c' == M, then D[Q] = 11 but if c' == J, then D[G] = 4. Conclusion: if c' == J is the reference, then c’[M] = c’[J]-7.

We can aggregate the two series by taking the offsets where c’= J is taken as a reference:

	D[G]=4, D[P]=17, D[R]=16, D[T]=20, D[W]=12

If we continue with other series where the value of c' is identical, we can reconstruct all the shifts... but in relative terms! We can also reconstruct S but it is simpler to do so after we have finished reconstituting the rotor R1.

We obtain the following displacements for permutation R (that of Rotor I).

m    0  1  2  3  4  5  6  7  8  9 10 11 12
     A  B  C  D  E  F  G  H  I  J  K  L  M
R    9 13 21  1 12 19  4 10  3 22 15  7 14   


m   13 14 15 16 17 18 19 20 21 22 23 24 25
     N  O  P  Q  R  S  T  U  V  W  X  Y  Z
R    6 24 17 11 16  2 20  8  0 12 18  5 23 

From the formula PI[x] = x + D[x] (cf. The concept of rotor), we can reconstruct the wiring for the rotor I:

    J O X E Q Y K R L F Z S A T M G B H U N C V I P D W

My reconstruction of the wiring of the stator S

We have already studied the method to find the wiring of the rotor S, equivalent to rotors II+III+IV (link). The following example uses the same recipes.

First, we apply the action of Rotor I to the plain text after the action of permutation K (Keyboard).

C:\H1_TOOLS> python hebern5_tui.py -I poem_R1jf:0:0:0:0 ^
	-E AAAAASG  < poem.pln -D
...
Key:  AAAAASG
001: I ->YDDDDD-> E    AAAAATH
002: N ->ILLLLL-> V    AAAAAUI
003: T ->FYYYYY-> G    AAAAAVJ
004: H ->LSSSSS-> C    AAAAAWK
005: E ->SUUUUU-> L    AAAAAXL
006: P ->UCCCCC-> O    AAAAAYM
007: H ->LSSSSS-> C    AAAAAZN
008: O ->OFFFFF-> M    BBAAAAO
009: T ->FJJJJJ-> J    BBAAABP

(line 0)
p                             intheph
pK                            yiflsul
pKR(0)                        DLYSUCS
c’                            OBVXHFX

(line 1)
p          otoofherheroshecanseething   
PK         ofoozlsdlsdoblskxibssflyij 
pKR(1)     FJFFIZMPZMPFWZMRCEWMMJZVEY
c’         MJMMQCDYCDYMECDUFTEDDWCGTV  

(line 2)   
p          sthatdonotshowsocleartoyou
pK         bflxfhoiofblovbokpsxdfoqot 
Pkr(2)     CPRUPDZXZPCRZNCZYFAUWPZSZT
c’         FYUHYOCNCYFUCAFCVMPHEYCXCS

(line 3)
p          ormeforheroutlookeverseens  
pK         odmszodlsdotfpoogsnsdbssib 
pKR(3)     EHDSUEHJSHEFIREECSYSHNSSPN
c’         TKOXHTKJXKTMQUTTFXVXKAXXOA

(line 4)
p          tobecoloredbyherdreamsinwh 
pK         foaskopodshaqlsdhdsxmbyivl
pKR(4)     BQMEIQJQNEOMYCENONEKXUTWSC
c’         RLDTQLJLATIDVFTAIATWNHSEXF

(line 5)
p          ichgoldensunshinegleamsend 
pK         ykljophsibtiblyisjpsxmbsih
pKR(5)     ZBWHIXVKOFYOFWZOKHXKSCFKOV
c’         CREKQNGWIMVIMBCIWKNWXFMWIG

(line 6)
p          lessly
pK         psbbpq
pKR(6)     PXLLPC
c’         YNBBYF

The permutation S is easily deduced: Since S is the same for every 26 letters, in the following expression, i can have any value.

	(pKR(i))S = c’
Thus the following correspondences are valid whatever the value of i:
	d.S = o,  l.S = b,  y.S = v, ...
According to the formula “y = PI[x]”, we therefore have:
o = S[d], b = S[l], v = S[y], x = S[s], h = S[u], f = S[c],
m = S[f], j = S[j], ...
Ultimately, the permutation S is as follows:
	a b c d e f g h i j k l m n o p q r s t u v w x y z
	P R F O T M Z K Q J W B D A I Y L U X S H G E N V C

My solution (my feat ;-)

Here are the rotor wirings that I reconstructed:

    Rotor V        : AHMBSXPFZVGNQUEKJOTWCILRDY (poem_R5jf)
    Rotor I        : JOXEQYKRLFZSATMGBHUNCVIPDW (poem_R1jf)
    Rotor II+III+IV: PRFOTMZKQJWBDAIYLUXSHGENVC (poem_234jf)
Thanks to them, I can decipher the cryptogram:
C:\H5_TOOLS> python hebern5_tui.py ^
	-I poem_R1jf:0:poem_234jf:0:poem_R5jf ^
	-E AAAAASG -d  < poem.cry
INTHEPHOTOOFHERHEROSHECANSEEDHINGSTHATDONOTSHOWSOCLEARTOYOU
ORMEFORHEROUTLOOKEVERSEEMSTOBECOLOREDBYHERDREAMSINWHICHGOLD
ENSUNSFINEGLEAMSENDLESSLY
Note: We notice that there are some errors. Where do they come from?
  • Either from the original cryptogram.
  • Either in the solution of the wiring of the rotor V (which I borrowed from Friedman).
  • Be from me!

Another cryptogram encrypted with the same key

In the NSA archives, we find a cryptogram undoubtedly created by Friedman (see the Web links section bellow). This cryptogram was encrypted with the same key as the poem deciphered by Brigman. This cryptogram is undoubtedly given as an exercise given to cryptology students.

C:\H5_TOOLS> type poem_msg2.cry
QAHOX OSXAO WYKVN XDKJG TTIKN TIHKB ZDFQK
FYCBA DDXXI WNIHY YLZTV PVWAG WHWEQ KRNZY
MTFHZ OCHPO YXKXB CXYVW PPXUA GYVRQ QYHEW
UPMNS TOGHB AEKLF UYYTR LGWKQ OC

C:\H5_TOOLS> python hebern5_tui.py ^
	-I poem_R1jf:0:poem_234jf:0:poem_R5jf ^
	-E AAAAASG -d poem_msg2.cry
POEONCEWROTEQUOTETHEREISNOTHINGTHEINGENUITYOFMANCANINVENTTHAT
THEINGENUITYOFMANCANNOTUNRAVELUNQUOTEDOESNTTHISHELPTOPROVEHIS
CONTENTION

Back to Friedman rotors

I was very intrigued by the fact that I could not use Friedman's rotors to decipher the poem ciphered. Were they false?

I manually tried to find a transformation (inversion, shift, mirror) that would allow me to move from Friedman's wiring to those I discovered. I did not succeed. I then (for other reasons) developed a signature program which allows me to identify a rotor independently of whether it has undergone a rotation or a twist effect. This program is described in my page rotor. It followed the same approach as my manual tests. I tested my program on Friedman rotors. I was happily surprised that they had the same signatures as mine. I incidentally concluded that my manual tests were marred by errors. So the twist effect was the main reason they differed. Here are the signatures of rotors I, V and II+III+IV in mode direct and in reverse mode.

Rotor I, with my wiring (JOXE) and Friedman's (EHLN).

C:\H1_TOOLS> python signature.py -R ^
	=JOXEQYKRLFZSATMGBHUNCVIPDW -r -S -p
PI direct
  PI       :  JOXEQYKRLFZSATMGBHUNCVIPDW
  Signature:  [4, 8, 6, 11, 7, 11, 6, 19, 19, 19]
PI reverse
  PI       :  MQUYDJPRWAGIOTBXEHLNSVZCFK
  Signature:  [1, 3, 3, 3, 4, 5, 5, 1, 4, 3]

C:\H1_TOOLS> python signature.py -R =EHLNSVZCFKMQUYDJPRWAGIOTBX  -S -p
  PI       :  EHLNSVZCFKMQUYDJPRWAGIOTBX
  Signature:  [1, 3, 3, 3, 4, 5, 5, 1, 4, 3]
Rotor V, with my wiring (AHMB) and Friedman’s (FIZDT)
C:\H1_TOOLS> python signature.py ^
	-R =AHMBSXPFZVGNQUEKJOTWCILRDY  -r -S -p
PI direct
  PI       :  AHMBSXPFZVGNQUEKJOTWCILRDY
  Signature:  [1, 6, 4, 14, 16, 4, 17, 15, 19, 21]
PI reverse
  PI       :  ADUYOHKBVQPWCLRGMXESNJTFZI
  Signature:  [2, 16, 3, 15, 18, 2, 16, 19, 20, 24]

C:\H1_TOOLS> python signature.py ^
	-R =FIZDTMPGAVUBHQWLRCJXSOYKEN  -S -p   
  PI       :  FIZDTMPGAVUBHQWLRCJXSOYKEN
  Signature:  [2, 16, 3, 15, 18, 2, 16, 19, 20, 24]
Rotor II+III+IV, with my wiring (PRFO) and Friedman’s (YQWT)
C:\H1_TOOLS> python signature.py ^
	-R =PRFOTMZKQJWBDAIYLUXSHGENVC   -r -S -p
PI direct
  PI       :  PRFOTMZKQJWBDAIYLUXSHGENVC
  Signature:  [1, 13, 8, 4, 18, 12, 10, 5, 18, 12]
PI reverse
  PI       :  NLZMWCVUOJHQFXDAIBTERYKSPG
  Signature:  [5, 18, 24, 19, 20, 23, 8, 14, 17, 5]

C:\H1_TOOLS> python signature.py ^
	-R =YQWTBUMXKRDLIZGESFPVONHCAJ  -S -p
  PI       :  YQWTBUMXKRDLIZGESFPVONHCAJ
  Signature:  [5, 18, 24, 19, 20, 23, 8, 14, 17, 5]
Conclusion : The Friedman’s rotors had the same signatures as mine but they are reversed compared to mine.

How do I get from Friedman's wiring to mine? All I had to do was inspect the cipher tables for each rotor. Here is the answer :

  • Rotor I
    Here is the PI table which identifies my rotor I in reverse mode with the key A. As we can see, it corresponds to the Friedman rotor shifted by 16 positions to the right.
         M Q U Y D J P R W A G I O T B X E H L N S V Z C F K
    
  • Rotor V
    Here is the PI table which identifies my rotor V in reverse mode with the key V. As we can see, it corresponds to the Friedman rotor shifted by 5 positions to the right.
         O Y K E N F I Z D T M P G A V U B H Q W L R C J X S
    
  • Rotor II+III+IV
    Here is the PI table which identifies my rotor II+III+IV in reverse mode with the key H. As we can see, it corresponds to the Friedman rotor shifted 5 positions to the right.
         N H C A J Y Q W T B U M X K R D L I Z G E S F P V O
    

Conclusion: Friedman has found the wiring of the rotors. They differ from mine because of the twist effect. We note that they are all in reverse mode. On the other hand, I still don't understand how Friedman could decipher a message using his rotors.

References

  • The man who broke Purple, by Ronald W. Clark, Gorgi Editor, 1977.

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.
    Section XV - Miscellaneous - p102, paragraph 84, Section VII, p38, paragraph 34 (link)
  • NSA - Friedman's Documents, Challenge won by Brigman. ID:A273674 (link).
    This document is very interesting. It contains Friedman's (a priori) handwritten description of the Challenge won by Brigman. We also find the drafts used by Friedman to find the rotor wiring. Finally, the document also contains a cryptogram which was encrypted with the same key as the poem deciphered by Brigman.