Crytpanalysis with ciphertext only - statistical method ======================================================= Introduction ------------ The method is similar to the known plain text attack : The cipher text (not the key sequence) is written on a width of each wheel. We begin with the width of 17. The first step is to put each column into one of two classes. One class corresponds to an active Pin and the other to an inactive Pin, but we don't know which one. When all Pins of each Wheel are found, we can determine the Lug Pins. This method needs a great quantity of cipher text: several thousands of characters. References ---------- "Cryptanalysis of the Hagelin cryptograph", by Wayne G. Barker, Aegean Park Press (1977). "Cipher Systems, the Protection of Communications", by Henry Beker & Fred Piper, Northwood Books (1982). "Classical Cryptography Course, Lesson 21 : Cryptanalysis Of The Navy CSP 1500 Cipher Machine [Hagelin C-38 Family]", by Randy Nichols (LANAKI). http://www.ahazu.com/papers/lanaki/lesson21.php First stage: analysis of the Wheel 6 (with 17 pins) --------------------------------------------------- [Excerpt of "Cipher Systems, the Protection of Communications", by Henry Beker & Fred Piper, Northwood Books (1982)] The first step is to consider all possible (i,l) positions [i=Wheel,l=position%length_of_wheel]. We choose first the Wheel 6, then we analyse all possible (6,l) positions. We calculate frequency of each letter (A, B, ...) at each "l" position. We expect that column (indexed by "l") with active pin to have a certain similarity. Those corresponding to an inactive pin should have common similarities but are likely to be different to those of the active pins. Our aim, then is to divide the pins of each wheel into two classes: the actives ones and the inactives ones. But before we do it we must point out that, even if we succed, we will not know which of the two sets of pins is active. [Excerpt of Lanaki] One way we might achieve this division is to use the Chi test defined by Solomon Kullback. [Remark: the following example is mine] Cipher text (we use only the wheels 3,4,5 and 6 [with pins 23,21,19,17]): KLLSF FKKAZ OMJFS XMQJH KPJOR DVZZM UQQUK BHMBI ALYFN IXBVU WBIYA LTQZE FYGJV GHHAR FQUKS DXMMX WWAUN KWJBP RHLHQ ZAVOL SAGUQ EQSSS AQLAQ IPHJP FKIOW QDOHO YWYAD PWACM EUBPI OGMXG PQUVP ECVFR AGFHA JQWPM CUWDW PBHBX XPPEH UMMBU WWMBT AGPPS INZTM PAVNL YEIBF SBXLG KVMQE YONSK ELWEK LXDKU KMRHC NNKBA IWZUB AKUWS CFORM HLXDD EKXFU HPQWI GHJBJ RALRH UFGMV SPEDQ GGHAK IAQUL PQSUO IVAHX ZYQLC MWUQU IPQPH MTRDJ BJQAM BNGRS EVIRV MDVET MFXTC RBMXE VDWIA TGRSR KRACH APNOV MSAGB ZUYRS EPMEJ GLQTS LBDJO YPPTZ MSGHU AIIWN XCLBT EACSO JDRWU SIYJB AFVQU EIXSS QUAEN KUKWK XHRZU TKLHD MFILL ONEEJ XXYMU YZUHM MVXFP OFMBE JHEMT DFLAB YPKRM SUMYQ PHAYZ BOLRC MHECK PJBGK XZPDD WKIOL AKCMO JCGMT FLPVT GDUKA XMXHT XHPSG SLBGG YWLMA MDXTM HZPLQ HGMBM WDCXM YOHBR DEEXL ACAQF QNPAQ MAEWX CXRST JEIJG EVYXQ XSJVN EEIEP JZPVX YVSJQ EUOYE IXLHJ CTIXD QDYCX REFKC OLLJV KDUWX SRWMD IIOWM WJTKC HAWBE RTVLJ XBDJG MROHS MBNMB RWJLR FHSKJ AHFPS XXRQG GXLAD XYLJL MFTJL MDMHE AWUEM HFLRF QPSEV ENTFV RLSMB LIBHL EAVCL KVIAI UHPXB LKFDB CMIWX LWLIV KSPOJ THQMR WEOVJ WBXTM 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 (position "l") A 8 4 1 4 1 1 1 1 6 1 1 7 1 2 4 - 2 B 2 3 1 6 2 1 6 1 3 3 2 3 1 1 1 1 1 C 1 3 2 1 - 3 2 2 - 1 1 - 4 - - 1 2 D - - - 2 2 2 1 2 1 3 2 1 - 2 5 3 4 E 1 1 3 4 4 2 - 1 2 5 2 2 5 3 1 3 3 F - 2 4 - 3 6 2 - - 6 2 - 1 2 1 - - G 1 - 2 1 1 - 1 1 3 2 2 3 1 2 4 2 2 H 2 3 3 2 1 3 1 2 3 2 5 3 2 2 2 4 2 I - 3 1 2 2 3 3 3 2 1 - 1 3 3 2 - 3 J 1 3 3 - 2 2 2 2 1 3 1 1 6 2 - 2 4 K 8 1 2 1 - 3 4 1 3 1 1 - 2 2 2 2 2 L 5 2 5 2 2 1 - 9 2 1 6 1 1 3 3 3 - M 6 1 5 8 4 3 1 4 1 3 4 4 3 3 3 1 4 N - 1 - - 3 1 2 2 1 - 2 - 1 1 1 - 1 O 1 - 1 1 1 1 2 1 5 4 2 - 1 1 3 - 1 P 1 3 - 2 5 1 1 4 4 3 3 5 3 - 2 1 1 Q 1 2 4 1 2 3 4 - 1 3 2 1 2 2 2 3 3 R 1 2 1 2 3 2 1 5 3 - - 2 1 4 2 1 2 S 2 4 1 2 3 1 5 2 2 1 1 1 2 2 3 3 1 T 1 1 1 1 1 3 3 1 2 1 2 1 - 4 - - 2 U - 6 7 - 3 2 1 2 - - - - 1 1 - 7 5 V 4 1 - 1 2 1 1 - 1 1 5 2 3 3 2 3 - W 1 5 1 7 2 1 1 - 1 2 - 3 2 2 3 3 2 X 3 - 2 - 1 5 4 2 1 3 1 5 4 3 2 6 2 Y 2 1 2 1 1 1 3 1 2 - 2 2 1 1 - 1 2 Z - - - 1 1 - - 3 1 1 2 3 - - 3 1 - Chi test (#1 and #2) = (Sum of cross-products) / ( N1 x N2 ) For example, with column #1 and #2: (8x4+2x3+1x3+0x0+1x1+0x2+1x0+2x3+0x3+1x3+8x1+5x2+6x1+0x1+1x0+1x3+1x2+1x2+2x4+1x1+0x6+4x1+1x5+3x0+2x1+0x0) / ( (8+2+1+1+1+2+1+8+5+6+1+1+1+1+2+1++1+3+2) x (4+3+3+1+2+3+3+3+1+2+1+1+3+2+2+4+1+6+5+1)) = (8x4 + 2x3 + 3 + 1 + 2x3 + 3 + 8 + 5x2 + 6 + 3 + 2 + 2 + 2x4 + 1 + 4 + 5 + 2 ) / ( (52 x 52 ) = 0.038 Then, we make Chi test on each pair of frequency distributions: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0: ----- 0.038 0.043 0.053 0.033 0.038 0.040 0.044 0.052 0.033 0.048 0.054 0.041 0.044 0.047 0.038 0.036 1: 0.038 ----- 0.047 0.046 0.043 0.038 0.040 0.038 0.038 0.033 0.031 0.040 0.041 0.036 0.034 0.045 0.043 2: 0.043 0.047 ----- 0.039 0.042 0.047 0.035 0.045 0.030 0.043 0.042 0.032 0.043 0.041 0.032 0.053 0.048 3: 0.053 0.046 0.039 ----- 0.045 0.033 0.037 0.041 0.044 0.044 0.041 0.055 0.040 0.042 0.047 0.034 0.042 4: 0.033 0.043 0.042 0.045 ----- 0.038 0.034 0.044 0.037 0.044 0.040 0.041 0.042 0.040 0.038 0.039 0.040 5: 0.038 0.038 0.047 0.033 0.038 ----- 0.044 0.035 0.031 0.047 0.036 0.034 0.044 0.043 0.033 0.041 0.042 6: 0.040 0.040 0.035 0.037 0.034 0.044 ----- 0.029 0.039 0.038 0.031 0.034 0.039 0.038 0.033 0.037 0.038 7: 0.044 0.038 0.045 0.041 0.044 0.035 0.029 ----- 0.040 0.031 0.048 0.040 0.037 0.041 0.043 0.039 0.036 8: 0.052 0.038 0.030 0.044 0.037 0.031 0.039 0.040 ----- 0.038 0.040 0.050 0.034 0.038 0.046 0.029 0.035 9: 0.033 0.033 0.043 0.044 0.044 0.047 0.038 0.031 0.038 ----- 0.042 0.040 0.045 0.039 0.040 0.037 0.038 10: 0.048 0.031 0.042 0.041 0.040 0.036 0.031 0.048 0.040 0.042 ----- 0.042 0.037 0.040 0.042 0.039 0.031 11: 0.054 0.040 0.032 0.055 0.041 0.034 0.034 0.040 0.050 0.040 0.042 ----- 0.041 0.039 0.048 0.039 0.037 12: 0.041 0.041 0.043 0.040 0.042 0.044 0.039 0.037 0.034 0.045 0.037 0.041 ----- 0.040 0.032 0.044 0.044 13: 0.044 0.036 0.041 0.042 0.040 0.043 0.038 0.041 0.038 0.039 0.040 0.039 0.040 ----- 0.040 0.040 0.041 14: 0.047 0.034 0.032 0.047 0.038 0.033 0.033 0.043 0.046 0.040 0.042 0.048 0.032 0.040 ----- 0.038 0.037 15: 0.038 0.045 0.053 0.034 0.039 0.041 0.037 0.039 0.029 0.037 0.039 0.039 0.044 0.040 0.038 ----- 0.047 16: 0.036 0.043 0.048 0.042 0.040 0.042 0.038 0.036 0.035 0.038 0.031 0.037 0.044 0.041 0.037 0.047 ----- The larger the value of the result, the more likely the pair of distributions come from the same class. The lower the result is, the less likely it is that the pairs are of the same class. (1) The higest results are: #3 & #0 = 0.053 #8 & #0 = 0.052 #11 & #0 = 0.054 #15 & #2 = 0.053 #11 & #3 = 0.055 #11 & #8 = 0.050 (2) The lowest results are: #9 & #7 = 0.031 #10 & #6 = 0.031 #8 & #5 = 0.031 #10 & #1 = 0.031 #8 & #2 = 0.030 #16 & #10= 0.031 #15 & #8 = 0.029 #7 & #6 = 0.029 We conclude that: Group X: 0, 3, 8, 11 Group Y: 2, 5, 15 If we inspect again the frequency distributions, we can complete (almost) the two groups: Group X: 0, 3, 7, 8, 10, 11, 14 Group Y: 1, 2, 5, 6, 15, 16 No conclusive: 4, 9,12,13 Our Pin configuration: X Y Y X ? Y Y X X ? X X ? ? X Y Y Remark: my software (barker_tui.py) found the following setting: Y ? X Y ? X X Y Y X Y Y X ? Y X X This solution is completly compatible with the above solution. We can only spot that X/Y are exchanged. Second stage: analysis of the other wheels ------------------------------------------ a) Wheel 5 (19 pins) 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 A 2 3 4 1 1 5 3 1 3 4 1 2 2 3 1 1 4 - 4 B 2 1 1 5 1 4 1 3 1 2 1 1 3 2 2 3 2 3 - C 1 2 - 2 2 1 1 2 - 2 - 3 - 2 1 1 1 - 2 D 1 2 4 2 2 - 2 1 2 1 2 - 4 2 1 1 1 1 1 E 4 2 3 2 2 2 - 2 3 1 3 1 5 1 - 5 1 2 3 F 3 - - 3 1 3 6 4 - 1 1 - 1 2 2 1 - - 1 G 1 - - 2 2 4 2 2 2 1 1 - - 2 2 3 4 - - H 2 1 2 2 4 1 4 1 1 3 1 2 - 2 4 4 2 4 2 I 1 4 1 2 1 - 2 3 3 2 2 3 1 1 1 1 - 3 1 J - - 1 2 6 4 1 1 - 1 - 2 1 2 5 - 5 1 3 K 6 3 - 1 - 3 3 3 1 4 2 2 2 2 - 1 1 1 - L 4 2 5 6 5 3 - 3 3 2 1 1 1 - 2 - 3 4 1 M 2 3 6 1 2 2 5 - 3 2 3 6 3 6 3 3 2 3 3 N - - - - 1 - 1 1 2 1 - 4 - 1 - - - 1 4 O 1 - 2 2 2 - 1 1 1 1 3 1 2 3 - 3 - 2 - P - 2 7 - 2 1 2 2 5 - 6 2 - 2 - 1 1 4 2 Q 3 1 - 1 1 1 1 3 2 2 - 4 2 3 5 - 3 1 3 R 1 2 - 1 1 4 2 1 - 1 1 1 2 2 4 - 5 1 3 S 3 3 3 3 - 1 1 1 3 3 2 1 5 1 2 1 - 2 1 T 2 1 1 1 2 2 - 1 1 1 - - - 2 5 - 1 1 3 U 3 - - 1 2 2 3 3 3 2 2 3 - 1 2 1 2 1 4 V - 1 1 1 - 1 1 3 1 4 3 2 3 1 1 3 1 2 1 W 1 3 - 4 4 1 1 2 - - 6 2 4 - 1 4 1 2 - X 2 5 2 1 - - 1 1 5 3 3 2 3 2 2 6 2 2 2 Y - 3 1 - 2 - 1 1 - - 2 1 1 1 - 2 3 3 2 Z 2 2 2 - - 1 1 - 1 2 - - 1 - - 1 1 2 - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 0: ----- 0.042 0.039 0.046 0.034 0.046 0.043 0.045 0.043 0.047 0.035 0.037 0.045 0.038 0.039 0.039 0.036 0.037 0.036 1: 0.042 ----- 0.049 0.037 0.032 0.033 0.037 0.035 0.048 0.043 0.048 0.042 0.049 0.038 0.032 0.046 0.037 0.044 0.036 2: 0.039 0.049 ----- 0.040 0.044 0.037 0.041 0.030 0.060 0.039 0.054 0.042 0.046 0.047 0.032 0.042 0.037 0.054 0.041 3: 0.046 0.037 0.040 ----- 0.050 0.046 0.035 0.046 0.035 0.038 0.039 0.032 0.046 0.034 0.042 0.042 0.038 0.043 0.028 4: 0.034 0.032 0.044 0.050 ----- 0.043 0.036 0.037 0.033 0.030 0.039 0.039 0.032 0.037 0.049 0.037 0.049 0.044 0.041 5: 0.046 0.033 0.037 0.046 0.043 ----- 0.044 0.042 0.034 0.042 0.030 0.034 0.036 0.043 0.049 0.032 0.056 0.031 0.041 6: 0.043 0.037 0.041 0.035 0.036 0.044 ----- 0.041 0.038 0.042 0.040 0.044 0.034 0.049 0.041 0.039 0.038 0.036 0.040 7: 0.045 0.035 0.030 0.046 0.037 0.042 0.041 ----- 0.038 0.040 0.040 0.038 0.037 0.034 0.037 0.036 0.035 0.037 0.034 8: 0.043 0.048 0.060 0.035 0.033 0.034 0.038 0.038 ----- 0.043 0.049 0.045 0.042 0.041 0.034 0.044 0.035 0.045 0.044 9: 0.047 0.043 0.039 0.038 0.030 0.042 0.042 0.040 0.043 ----- 0.034 0.043 0.042 0.041 0.039 0.041 0.038 0.037 0.038 10: 0.035 0.048 0.054 0.039 0.039 0.030 0.040 0.040 0.049 0.034 ----- 0.041 0.051 0.038 0.025 0.055 0.030 0.049 0.032 11: 0.037 0.042 0.042 0.032 0.039 0.034 0.044 0.038 0.045 0.043 0.041 ----- 0.037 0.048 0.042 0.038 0.038 0.041 0.050 12: 0.045 0.049 0.046 0.046 0.032 0.036 0.034 0.037 0.042 0.042 0.051 0.037 ----- 0.039 0.034 0.052 0.034 0.040 0.033 13: 0.038 0.038 0.047 0.034 0.037 0.043 0.049 0.034 0.041 0.041 0.038 0.048 0.039 ----- 0.046 0.040 0.043 0.036 0.044 14: 0.039 0.032 0.032 0.042 0.049 0.049 0.041 0.037 0.034 0.039 0.025 0.042 0.034 0.046 ----- 0.031 0.053 0.036 0.048 15: 0.039 0.046 0.042 0.042 0.037 0.032 0.039 0.036 0.044 0.041 0.055 0.038 0.052 0.040 0.031 ----- 0.034 0.045 0.032 16: 0.036 0.037 0.037 0.038 0.049 0.056 0.038 0.035 0.035 0.038 0.030 0.038 0.034 0.043 0.053 0.034 ----- 0.035 0.046 17: 0.037 0.044 0.054 0.043 0.044 0.031 0.036 0.037 0.045 0.037 0.049 0.041 0.040 0.036 0.036 0.045 0.035 ----- 0.034 18: 0.036 0.036 0.041 0.028 0.041 0.041 0.040 0.034 0.044 0.038 0.032 0.050 0.033 0.044 0.048 0.032 0.046 0.034 ----- b) Wheel 4 (21 Pins) 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 A 2 1 2 1 1 3 1 5 3 3 - 3 4 2 4 - 1 5 2 2 - B 1 1 1 2 7 1 2 - 2 3 4 - 1 1 2 1 3 2 - 2 2 C - 1 1 - - 3 - 1 2 3 - 2 1 1 1 2 1 1 2 - 1 D 2 1 2 2 2 2 1 3 2 1 - 1 1 2 2 - 2 2 1 - 1 E 3 4 1 1 3 3 1 - 4 - 1 - 4 - 5 3 - 5 2 - 2 F 1 1 2 2 5 1 1 1 - 3 1 2 1 1 - 3 - - 2 1 1 G 1 1 5 1 - 1 3 3 1 2 - 1 - - 1 1 - - 2 3 2 H 1 1 3 3 2 1 2 2 2 3 1 - 2 3 - 2 9 2 - 3 - I 1 1 2 1 - 1 3 3 - - 2 3 - 3 - 3 3 1 2 1 2 J 2 2 1 2 1 2 4 1 3 1 - 3 2 1 1 1 - 1 2 3 2 K 1 2 1 3 1 1 1 4 - 1 5 2 - 1 2 2 2 1 1 3 1 L 4 3 2 2 3 2 - 3 3 1 2 1 4 4 3 4 - - 1 - 4 M 2 3 2 5 1 1 1 - 3 1 9 1 4 3 2 5 4 2 3 2 4 N 1 - 2 1 - - 1 - - 2 1 - 1 2 1 1 - 2 - 1 - O - 2 2 1 - - 1 - 1 - 4 1 4 - 1 1 1 - 3 2 1 P 4 - 2 2 - 3 1 3 3 2 - 1 1 1 2 - 3 4 4 1 2 Q 1 2 1 1 3 2 2 3 3 2 2 1 1 3 - 1 - 4 - 2 2 R 1 3 1 4 - 1 2 1 1 - 1 3 3 1 - 2 1 3 - 1 3 S 4 3 2 2 2 2 1 1 - 1 3 1 - 3 2 - 2 1 5 1 - T 1 1 2 - - 1 1 1 - 1 2 - 1 2 4 1 - 1 1 3 1 U 1 3 - 2 2 2 - 1 1 3 1 1 3 1 3 1 1 2 1 3 3 V 2 3 1 - 1 2 3 1 1 - 1 4 2 2 1 1 2 - 3 - - W 1 2 3 1 2 2 4 - 4 3 1 3 - 1 - 1 - 1 2 2 3 X 2 1 1 1 3 3 1 3 2 3 1 3 1 2 4 4 3 - 1 3 2 Y 2 - - 2 3 - 4 1 1 1 - 3 1 - - 1 2 - - 2 - Z 1 - - - - 2 1 1 - 2 - 2 - 2 - - 1 1 1 - 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 0: ----- 0.043 0.039 0.042 0.043 0.045 0.036 0.043 0.045 0.035 0.037 0.037 0.043 0.044 0.049 0.039 0.039 0.044 0.048 0.033 0.041 1: 0.043 ----- 0.037 0.044 0.041 0.041 0.036 0.033 0.045 0.031 0.051 0.039 0.051 0.040 0.046 0.046 0.034 0.042 0.044 0.037 0.046 2: 0.039 0.037 ----- 0.039 0.033 0.036 0.041 0.043 0.040 0.040 0.039 0.034 0.036 0.040 0.037 0.039 0.041 0.036 0.044 0.042 0.038 3: 0.042 0.044 0.039 ----- 0.043 0.034 0.038 0.038 0.041 0.036 0.057 0.036 0.046 0.041 0.036 0.048 0.053 0.042 0.037 0.043 0.046 4: 0.043 0.041 0.033 0.043 ----- 0.039 0.039 0.034 0.046 0.048 0.044 0.033 0.039 0.039 0.043 0.045 0.042 0.038 0.030 0.039 0.041 5: 0.045 0.041 0.036 0.034 0.039 ----- 0.034 0.045 0.048 0.043 0.029 0.041 0.040 0.040 0.048 0.038 0.036 0.047 0.044 0.034 0.041 6: 0.036 0.036 0.041 0.038 0.039 0.034 ----- 0.036 0.041 0.035 0.032 0.048 0.031 0.034 0.025 0.034 0.039 0.033 0.037 0.044 0.037 7: 0.043 0.033 0.043 0.038 0.034 0.045 0.036 ----- 0.040 0.041 0.029 0.044 0.035 0.045 0.044 0.037 0.043 0.044 0.037 0.042 0.036 8: 0.045 0.045 0.040 0.041 0.046 0.048 0.041 0.040 ----- 0.042 0.037 0.038 0.050 0.039 0.046 0.043 0.039 0.053 0.040 0.038 0.048 9: 0.035 0.031 0.040 0.036 0.048 0.043 0.035 0.041 0.042 ----- 0.031 0.036 0.033 0.039 0.038 0.036 0.043 0.040 0.034 0.044 0.038 10: 0.037 0.051 0.039 0.057 0.044 0.029 0.032 0.029 0.037 0.031 ----- 0.029 0.048 0.046 0.043 0.057 0.052 0.035 0.045 0.045 0.049 11: 0.037 0.039 0.034 0.036 0.033 0.041 0.048 0.044 0.038 0.036 0.029 ----- 0.036 0.037 0.031 0.039 0.034 0.031 0.041 0.037 0.038 12: 0.043 0.051 0.036 0.046 0.039 0.040 0.031 0.035 0.050 0.033 0.048 0.036 ----- 0.039 0.052 0.048 0.038 0.049 0.039 0.037 0.045 13: 0.044 0.040 0.040 0.041 0.039 0.040 0.034 0.045 0.039 0.039 0.046 0.037 0.039 ----- 0.039 0.044 0.048 0.039 0.038 0.035 0.041 14: 0.049 0.046 0.037 0.036 0.043 0.048 0.025 0.044 0.046 0.038 0.043 0.031 0.052 0.039 ----- 0.043 0.033 0.049 0.043 0.040 0.041 15: 0.039 0.046 0.039 0.048 0.045 0.038 0.034 0.037 0.043 0.036 0.057 0.039 0.048 0.044 0.043 ----- 0.045 0.033 0.036 0.039 0.051 16: 0.039 0.034 0.041 0.053 0.042 0.036 0.039 0.043 0.039 0.043 0.052 0.034 0.038 0.048 0.033 0.045 ----- 0.040 0.037 0.045 0.032 17: 0.044 0.042 0.036 0.042 0.038 0.047 0.033 0.044 0.053 0.040 0.035 0.031 0.049 0.039 0.049 0.033 0.040 ----- 0.037 0.036 0.040 18: 0.048 0.044 0.044 0.037 0.030 0.044 0.037 0.037 0.040 0.034 0.045 0.041 0.039 0.038 0.043 0.036 0.037 0.037 ----- 0.034 0.037 19: 0.033 0.037 0.042 0.043 0.039 0.034 0.044 0.042 0.038 0.044 0.045 0.037 0.037 0.035 0.040 0.039 0.045 0.036 0.034 ----- 0.039 20: 0.041 0.046 0.038 0.046 0.041 0.041 0.037 0.036 0.048 0.038 0.049 0.038 0.045 0.041 0.041 0.051 0.032 0.040 0.037 0.039 ----- c) Wheel 4 (23 pins) 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 A - 2 2 2 3 1 2 1 3 2 1 3 1 3 1 - - 3 4 2 1 3 5 B 1 2 2 1 2 2 2 1 - 2 - 1 2 1 1 4 1 3 4 2 3 1 - C 4 1 1 - - - - 1 1 1 3 - - - 4 1 1 2 1 2 - - - D - 2 2 2 3 - 4 1 - 2 - 2 1 - - 2 2 - 1 2 1 2 1 E 1 2 1 4 2 4 2 1 - 1 - 2 2 5 - 1 1 4 1 - 1 5 2 F 1 3 - - 2 2 - 1 3 - 1 - 1 2 3 1 1 - 1 1 4 1 1 G 2 1 3 - 1 - - - 4 - 2 1 2 1 2 2 3 - 1 3 - - - H 1 2 4 1 - 2 - 2 2 1 1 3 5 4 - 1 2 1 3 2 1 2 2 I 2 - 2 1 1 3 4 3 3 1 - - 1 1 - - 4 - 1 2 1 - 2 J - 1 - 4 2 1 4 1 2 1 - 2 1 3 - - - 3 5 1 - 1 3 K 1 - 1 2 5 2 2 2 1 2 1 1 1 3 - 2 3 1 1 - 3 - 1 L 3 6 4 - - 1 - 3 2 1 2 4 1 1 - 2 2 2 3 3 3 - 3 M 2 2 2 3 - 1 4 1 4 3 3 7 1 2 3 2 4 4 2 1 2 2 3 N - 2 - 1 1 - 1 - - - - - - - - 4 2 1 - 1 2 1 - O 3 - 2 - - - 2 3 1 2 1 1 2 - 1 3 1 - - 1 1 - 1 P 2 3 2 1 1 2 1 1 - 4 1 2 2 1 2 1 3 - 1 - 5 4 - Q 5 1 2 - - 2 1 - 2 1 2 3 4 1 3 1 3 1 1 1 1 - 1 R 2 1 - 4 - 1 - 1 1 3 4 1 3 3 - 1 - 1 - 1 1 3 1 S 1 1 2 2 2 2 1 1 4 - 3 - 1 3 1 3 1 2 1 2 - 2 1 T 1 1 - - 1 3 - 2 1 2 2 - - - 3 1 - 2 1 1 1 - 2 U 1 2 1 3 1 3 1 4 - 2 3 2 - - 7 1 - 1 - - 1 1 1 V 1 1 2 3 1 1 2 - - 3 - - 2 - 1 2 - 2 3 3 - 2 1 W 2 - 2 1 4 1 3 1 1 1 1 2 2 1 3 - 1 2 - 2 2 3 1 X 3 1 1 1 2 1 1 5 1 1 6 1 1 - 2 1 2 2 1 4 3 4 - Y - 1 - 1 1 - 1 2 1 1 1 - 1 1 1 2 1 1 1 1 1 - 4 Z - - - 1 3 3 - - 1 1 - - 1 2 - - - - 1 - - 1 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 0: ----- 0.039 0.047 0.026 0.024 0.036 0.032 0.044 0.043 0.039 0.055 0.046 0.046 0.030 0.051 0.037 0.049 0.037 0.031 0.045 0.042 0.034 0.028 1: 0.039 ----- 0.048 0.036 0.030 0.038 0.031 0.041 0.039 0.039 0.039 0.054 0.037 0.039 0.039 0.043 0.041 0.043 0.048 0.042 0.053 0.042 0.043 2: 0.047 0.048 ----- 0.032 0.033 0.036 0.040 0.041 0.046 0.039 0.038 0.055 0.050 0.039 0.035 0.042 0.050 0.039 0.046 0.049 0.040 0.039 0.039 3: 0.026 0.036 0.032 ----- 0.044 0.044 0.053 0.036 0.034 0.047 0.037 0.047 0.039 0.055 0.032 0.035 0.030 0.052 0.045 0.032 0.031 0.056 0.046 4: 0.024 0.030 0.033 0.044 ----- 0.043 0.048 0.036 0.035 0.036 0.028 0.031 0.032 0.046 0.031 0.034 0.035 0.039 0.039 0.035 0.043 0.046 0.039 5: 0.036 0.038 0.036 0.044 0.043 ----- 0.037 0.042 0.037 0.039 0.035 0.037 0.040 0.050 0.042 0.030 0.037 0.042 0.038 0.029 0.041 0.044 0.040 6: 0.032 0.031 0.040 0.053 0.048 0.037 ----- 0.039 0.039 0.044 0.026 0.051 0.035 0.039 0.031 0.037 0.046 0.047 0.046 0.038 0.037 0.044 0.046 7: 0.044 0.041 0.041 0.036 0.036 0.042 0.039 ----- 0.036 0.039 0.054 0.040 0.033 0.032 0.046 0.036 0.040 0.037 0.035 0.043 0.046 0.038 0.040 8: 0.043 0.039 0.046 0.034 0.035 0.037 0.039 0.036 ----- 0.030 0.046 0.049 0.040 0.048 0.039 0.035 0.048 0.040 0.044 0.045 0.033 0.031 0.048 9: 0.039 0.039 0.039 0.047 0.036 0.039 0.044 0.039 0.030 ----- 0.039 0.048 0.041 0.036 0.041 0.037 0.038 0.041 0.041 0.034 0.044 0.046 0.039 10: 0.055 0.039 0.038 0.037 0.028 0.035 0.026 0.054 0.046 0.039 ----- 0.045 0.037 0.033 0.058 0.037 0.040 0.042 0.028 0.047 0.041 0.044 0.032 11: 0.046 0.054 0.055 0.047 0.031 0.037 0.051 0.040 0.049 0.048 0.045 ----- 0.047 0.048 0.044 0.035 0.052 0.054 0.051 0.038 0.046 0.048 0.053 12: 0.046 0.037 0.050 0.039 0.032 0.040 0.035 0.033 0.040 0.041 0.037 0.047 ----- 0.050 0.030 0.037 0.043 0.036 0.042 0.040 0.038 0.045 0.037 13: 0.030 0.039 0.039 0.055 0.046 0.050 0.039 0.032 0.048 0.036 0.033 0.048 0.050 ----- 0.021 0.031 0.037 0.049 0.048 0.030 0.036 0.053 0.051 14: 0.051 0.039 0.035 0.032 0.031 0.042 0.031 0.046 0.039 0.041 0.058 0.044 0.030 0.021 ----- 0.033 0.035 0.039 0.026 0.035 0.041 0.034 0.030 15: 0.037 0.043 0.042 0.035 0.034 0.030 0.037 0.036 0.035 0.037 0.037 0.035 0.037 0.031 0.033 ----- 0.042 0.039 0.037 0.041 0.042 0.032 0.029 16: 0.049 0.041 0.050 0.030 0.035 0.037 0.046 0.040 0.048 0.038 0.040 0.052 0.043 0.037 0.035 0.042 ----- 0.033 0.034 0.041 0.049 0.035 0.033 17: 0.037 0.043 0.039 0.052 0.039 0.042 0.047 0.037 0.040 0.041 0.042 0.054 0.036 0.049 0.039 0.039 0.033 ----- 0.053 0.041 0.036 0.050 0.048 18: 0.031 0.048 0.046 0.045 0.039 0.038 0.046 0.035 0.044 0.041 0.028 0.051 0.042 0.048 0.026 0.037 0.034 0.053 ----- 0.046 0.037 0.039 0.053 19: 0.045 0.042 0.049 0.032 0.035 0.029 0.038 0.043 0.045 0.034 0.047 0.038 0.040 0.030 0.035 0.041 0.041 0.041 0.046 ----- 0.036 0.039 0.036 20: 0.042 0.053 0.040 0.031 0.043 0.041 0.037 0.046 0.033 0.044 0.041 0.046 0.038 0.036 0.041 0.042 0.049 0.036 0.037 0.036 ----- 0.046 0.032 21: 0.034 0.042 0.039 0.056 0.046 0.044 0.044 0.038 0.031 0.046 0.044 0.048 0.045 0.053 0.034 0.032 0.035 0.050 0.039 0.039 0.046 ----- 0.037 22: 0.028 0.043 0.039 0.046 0.039 0.040 0.046 0.040 0.048 0.039 0.032 0.053 0.037 0.051 0.030 0.029 0.033 0.048 0.053 0.036 0.032 0.037 ----- Third stage: find all Pins by iteration --------------------------------------- At the previous steps, we have found this Pins setting: (thanks to my software: "python barker_tui.py -c book_4w.cry -W 23:21:19:17") 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 Wheel 23: Y ? ? X X X X Y ? ? Y ? ? X Y Y Y X X Y Y X X Wheel 21: Y Y ? Y Y Y X ? Y ? Y X Y Y Y Y ? Y ? ? Y Wheel 19: ? X X ? Y Y ? ? X ? X ? X ? Y X Y X Y Wheel 17: Y ? X Y ? X X Y Y X Y Y X ? Y X X To find the unknown Pins, we analyze the frequencies of letters in each column of each wheel but these frequencies are divided into two groups: One group corresponds to the "X" of another reference wheel. The other group corresponding to the state "Y". The new Pins configurations found help in turn to find the unknown Pins of another wheel. This iterative procedure is continued until the Pins configuration stops changing. Remark: This procedure is very long. With only four wheels, I spent about one hours to have a stable Pins configuration. For example, we analyze the Pins Setting of Wheel 19. The Setting of Wheel 17 helps us. In the "a" distribution, we use only Pins of Wheel 17 in "X" position. In the "b" distribution, we use only Pins of Wheel 17 in "Y" position. Remark: at first, the wheel which can help to divide the setting into 2 sets is choosen as the more accurate Wheel (with less unknown columns). (# 0) ------------------------------------------ a - 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 1 0 1 0 3 2 0 1 0 0 5 1 0 0 0 0 3 0 0 1 1 0 0 0 0 0 b - 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 1 1 0 1 0 0 1 1 1 0 1 2 2 0 1 0 0 0 2 1 0 0 1 2 0 2 (# 1) ------------------------------------------ a - 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 0 0 0 1 1 0 0 0 3 0 0 0 2 0 0 0 0 0 2 0 0 0 2 5 3 0 b - 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 3 1 1 1 1 0 0 0 0 0 3 1 1 0 0 1 1 1 0 0 0 1 0 0 0 2 (# 2) ------------------------------------------ a - 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 1 0 0 2 1 0 0 1 0 1 0 2 3 0 0 1 0 0 2 1 0 1 0 2 1 0 b - 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 3 1 0 1 2 0 0 0 0 0 0 1 2 0 2 4 0 0 1 0 0 0 0 0 0 2 (# 3) ------------------------------------------ a - 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 0 3 1 0 2 3 1 2 1 2 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 b - 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 0 2 1 2 0 0 0 0 1 0 0 4 1 0 1 0 0 0 2 1 0 0 3 1 0 0 (# 4) ------------------------------------------ a - 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 0 1 1 1 2 0 1 1 1 4 0 0 0 1 2 2 0 0 0 0 1 0 1 0 0 0 b - 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 0 0 1 1 0 0 1 3 0 0 0 5 2 0 0 0 0 1 0 1 0 0 2 0 2 0 (# 5) ------------------------------------------ a - 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 0 3 1 0 2 2 1 1 0 1 2 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 b - 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 5 0 0 0 0 1 3 0 0 2 1 2 0 0 0 1 0 2 0 1 0 0 0 0 0 1 (# 6) ------------------------------------------ a - 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 1 1 0 1 0 5 1 0 1 1 1 0 1 0 1 1 0 0 0 0 3 1 0 0 0 0 b - 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 2 0 1 1 0 0 1 3 0 0 1 0 4 1 0 0 0 2 1 0 0 0 0 1 1 1 (# 7) ------------------------------------------ a - 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 0 2 2 0 0 2 0 0 1 0 1 1 0 0 0 1 3 1 1 0 3 1 0 0 0 0 b - 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 1 1 0 1 0 0 2 1 2 1 1 2 0 0 1 1 0 0 0 1 0 1 1 1 1 0 (# 8) ------------------------------------------ a - 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 0 0 0 0 2 0 0 1 1 0 0 2 0 2 0 0 2 0 1 1 2 0 0 4 0 0 b - 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 3 1 0 1 1 0 2 0 1 0 1 1 0 0 1 5 0 0 1 0 0 1 0 0 0 1 (# 9) ------------------------------------------ a - 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 1 1 2 1 1 0 0 1 1 1 2 0 1 0 0 0 2 0 1 0 1 2 0 0 0 1 b - 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 2 0 0 0 0 1 1 2 0 0 1 2 1 1 0 0 0 1 1 1 1 1 0 2 0 1 (# 10) ------------------------------------------ a - 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 0 0 0 0 2 1 1 1 1 0 0 0 2 0 1 0 0 0 1 0 1 0 3 3 2 0 b - 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 0 1 0 2 1 0 0 0 0 0 2 1 0 0 2 5 0 0 0 0 1 3 1 0 0 0 (# 11) ------------------------------------------ a - 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 1 1 2 0 1 0 0 0 1 2 1 1 1 0 1 1 3 0 0 0 1 0 1 1 0 0 b - 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 1 0 0 0 0 0 0 2 2 0 1 0 5 2 0 1 0 0 1 0 0 1 1 1 1 0 (# 12) ------------------------------------------ a - 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 0 0 0 3 0 0 0 0 1 1 1 0 3 0 1 0 0 0 2 0 0 0 4 2 0 1 b - 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 1 3 0 1 4 0 0 0 0 0 1 0 0 0 1 0 2 1 1 0 0 3 0 0 1 0 (# 13) ------------------------------------------ a - 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 0 1 2 1 1 1 1 1 0 2 0 0 1 1 1 0 1 1 1 1 1 0 0 1 0 0 b - 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 3 1 0 0 0 0 1 1 1 0 2 0 4 0 2 0 1 0 0 0 0 0 0 1 1 0 (# 14) ------------------------------------------ a - 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 1 1 0 1 0 2 1 2 0 3 0 0 0 0 0 0 2 1 0 2 2 1 0 0 0 0 b - 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 0 1 0 0 0 0 1 2 0 0 0 2 3 0 0 0 2 2 2 1 0 0 1 2 0 0 (# 15) ------------------------------------------ a - 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 0 0 1 1 2 0 1 4 1 0 0 0 2 0 1 0 0 0 1 0 0 1 0 3 1 0 b - 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 1 3 0 0 2 1 2 0 0 0 1 0 0 0 2 0 0 0 0 0 0 2 3 2 0 0 (# 16) ------------------------------------------ a - 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 1 0 1 1 0 0 2 0 0 3 1 1 1 0 0 1 2 1 0 1 1 1 0 1 0 0 b - 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 2 0 0 0 0 0 0 2 0 2 0 2 1 0 0 0 1 3 0 0 0 0 1 1 2 1 (# 17) ------------------------------------------ a - 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 0 0 0 0 0 0 0 1 1 0 1 1 2 0 2 1 0 1 1 1 1 0 1 2 3 0 b - 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 0 2 0 0 1 0 0 1 1 1 0 2 1 1 0 3 1 0 0 0 0 2 1 0 0 2 (# 18) ------------------------------------------ a - 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 0 0 1 0 1 1 0 0 0 1 0 0 0 1 0 2 3 1 0 2 4 0 0 2 0 0 b - 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 3 0 1 1 1 0 0 1 1 0 0 1 3 1 0 0 0 2 1 1 0 0 0 0 1 0 Pins: ("a" distribution): [['Y', 'X', 'X', 'Y', 'Y', 'Y', 'Y', 'Y', 'X', 'Y', 'X', 'Y', 'X', 'Y', 'Y', 'X', 'Y', 'X', 'Y'], [0.059833795013850416, 1, 0.06260387811634349, 0.06371191135734072, 0.0443213296398892, 0.06278855032317636, 0.0664819944598338, 0.06024930747922438, 0.05604288499025341, 0.04916897506925208, 0.10526315789473684, 0.049465769687376336, 0.08587257617728532, 0.046814404432132965, 1, 0.07017543859649122, 0.04770698676515851, 0.0664819944598338, 0.05355493998153278]] Pins: ("b" distribution): [['Y', 'X', 'X', 'Y', 'Y', '?', 'Y', '?', 'X', 'Y', 'X', 'Y', 'X', 'Y', 'Y', 'X', 'Y', 'X', 'Y'], [0.05433333333333333, 0.05988455988455989, 0.0931174089068826, 0.047987616099071206, 0.07894736842105263, 0.054293628808864264, 0.06696428571428571, 0.043134151167392165, 0.09736842105263158, 0.05504218561671354, 1, 0.06662933930571109, 0.05263157894736842, 0.06637168141592921, 0.07112375533428165, 0.048938134810710986, 1, 0.06896551724137931, 0.06725146198830409]] Remark: Plus the value of the Chi2 is high, greater the likelihood of the configuration is important. Fourth stage: find the Lug setting ---------------------------------- At the previous stage, we have found this Pins Setting: 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 Wheel 23: Y Y Y X X X X Y X Y Y X X X Y Y Y X X Y Y X X Wheel 21: Y Y X X X Y X Y Y X X Y Y X Y X X Y Y X Y Wheel 19: Y X X Y Y Y Y Y X Y X Y X Y Y X Y X Y Wheel 17: Y X X Y X X X Y Y X Y Y X X Y X X Now, Finding the Lugs Setting is very straighforward. Once the pins setting is known, we can break up our ciphertext into 16 sets (64 sets if we use 6 wheels), Each set corresponds to a given setting of the Pins, for example: XYXX (Wheel 23:"X", Wheel 21:"Y", Wheel 19:"X", Wheel 17:X"). Furthermore, each set is the result of the same substitution. If we compare the different sets, each set corresponds to a rotation of the inverse ordered alphabet: "Z A B C D ...". We can search the best rotation by calculate Chi2 at each step. We can deduce the key for each set. We can deduce too the values of X and Y for each Wheel. It is evident: if the rotation is null, the Pin setting corresponds to the null key (0000). Wheigh of each letter in the inverse ordered alphabet (English with "Z" as space): Z Y X W V U T S R Q P O N M L K J I H G F E D C B A 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Here there are the different Pins Setting: Pins: XYYX 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 8 6 3 4 15 5 3 2 7 25 11 0 0 0 6 6 7 9 0 3 8 11 7 5 1 0 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 9 ( 17 ) Best Chi2: 0.0691052631579 Pins: YYYX 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 5 6 13 0 7 11 5 4 5 1 2 10 7 4 3 8 12 2 3 14 23 2 0 0 0 0 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 20 ( 6 ) Best Chi2: 0.0672517006803 Pins: XXXX 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 1 0 0 5 5 0 2 9 8 0 0 2 12 1 0 1 0 2 7 4 6 2 4 8 9 3 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 12 ( 14 ) Best Chi2: 0.0694725274725 Pins: YXXX 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 0 0 1 3 2 2 0 0 6 1 3 7 0 0 5 3 2 3 2 1 0 1 9 14 4 0 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 23 ( 3 ) Best Chi2: 0.0703333333333 Pins: YYXX 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 2 0 2 6 4 1 0 1 6 1 1 1 1 2 4 4 2 1 10 1 0 0 9 18 1 0 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 23 ( 3 ) Best Chi2: 0.0814102564103 Pins: XYXX 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 1 2 0 3 7 0 0 11 3 1 0 5 18 1 0 3 0 2 11 1 5 0 2 5 5 1 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 12 ( 14 ) Best Chi2: 0.0805172413793 Pins: XYXY 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 6 4 0 9 14 0 0 0 0 0 3 2 2 0 0 5 3 1 0 0 0 7 2 0 1 5 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 4 ( 22 ) Best Chi2: 0.081203125 Pins: YYXY 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 2 6 1 0 0 0 2 0 1 0 5 5 2 2 4 11 0 0 1 0 0 5 5 3 0 0 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 15 ( 11 ) Best Chi2: 0.0790909090909 Pins: YYYY 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 1 0 3 4 0 2 10 5 3 0 10 9 8 1 2 1 4 11 2 2 1 0 1 9 7 0 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 11 ( 15 ) Best Chi2: 0.0616770833333 Pins: XYYY 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 21 4 1 1 1 0 3 4 3 3 2 12 11 2 3 3 0 3 6 5 0 3 6 4 0 8 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 0 ( 0 ) Best Chi2: 0.067623853211 Pins: XXYY 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 12 8 1 1 1 0 1 11 7 5 0 5 9 4 1 1 0 3 5 5 0 3 11 0 2 3 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 1 ( 25 ) Best Chi2: 0.0648080808081 Pins: YXYY 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 0 0 2 6 0 2 5 7 1 1 1 9 16 3 1 1 3 6 3 2 1 0 0 8 8 0 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 12 ( 14 ) Best Chi2: 0.0718255813953 Pins: YXYX 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 1 11 12 3 1 11 5 9 2 2 2 3 7 8 3 2 13 1 5 5 13 5 0 0 0 1 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 21 ( 5 ) Best Chi2: 0.055568 Pins: XXYX 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 5 8 2 5 9 15 4 3 2 20 18 0 0 2 0 3 10 8 4 1 3 5 5 5 3 0 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 10 ( 16 ) Best Chi2: 0.0665071428571 Pins: YXXY 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 7 8 1 0 0 0 5 1 2 0 2 3 1 0 9 9 0 0 1 0 0 7 3 1 0 0 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 15 ( 11 ) Best Chi2: 0.0749666666667 Pins: XXXY 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 5 3 0 1 9 1 0 0 0 2 3 1 1 0 0 3 2 3 3 0 2 1 0 0 1 7 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 162 16 4 13 13 22 77 51 64 3 22 63 67 21 31 2 1 62 28 14 24109 35 26 8 62 Index: 4 ( 22 ) Best Chi2: 0.0731041666667 What is the Pins setting giving the null key? Solution: "XYYY" = "0000". We can deduce the True Pins Setting: Wheel 23: 1 1 1 0 0 0 0 1 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 Wheel 21: 0 0 1 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 0 Wheel 19: 0 1 1 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 0 WHeel 17: 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 1 1 Then, it is easy to find the Lugs Setting: At first, we can deduce kicks: Pins XYYX = 9/17, then there are 9 lugs front of the Wheel 17 Pins XYXY = 4/22, then there are 4 lugs front of the Wheel 19 Pins XXYY = 1/25, then there are 1 lug front of the Wheel 21 Pins YYYY = 11/15, then there are 11 lugs front of the Wheel 23 Then, we can deduce overlaps: Pins YXYY = 12/14 and YXYY = 11 + 1 = 12, then there are not overlap between Wheel 23 and Wheel 21. Pins XYXX = 12/14, and XYXX = 4 + 9 = 13, then there are one overlap between Wheel 19 and Wheel 17. Pins XXXY = 4/22, and XXXY = 1 + 4 = 5, then there are one overlap between Wheel 21 and Wheel 19. ... Fith stage (the Last one): decipher the cryptogram -------------------------------------------------- Plain_letter = ((Key – 1) – Cipher_letter) % 26 Wheel 23: 1 1 1 0 0 0 0 ... Wheel 21: 0 0 1 1 1 0 1 ... Wheel 19: 0 1 1 0 0 0 0 ... Wheel 17: 0 1 1 0 1 1 1 ... Key: 11 23 23 1 10 9 10 ... Cipher: K L L S F F K ... 10 11 11 18 5 5 10 ... Plain: 0 11 11 8 4 3 25 ... A L L I E D Z ...