|
Home Page Kryha Home Page Kryha Cryptanalysis Home Page |
IntroductionIn 1982, Alan G. Konheim wrote an article on the cryptanalysis of Kryha cipher machine (see References). He proposed a mathematical attack on a long cryptogram (over 2000 characters). The wheel used is assumed to be unknown. I confess I understood almost nothing of his mathematical proofs :-( In the rest of this page, I found the plain text of the message, primarily by using Sacco's method and Friedman's method. I only partially utilize Konheim's method. The Wheel UsedIn fact, as shown in the solution, the offsets found correspond to the standard wheel but with a systematic offset of three notches instead of four. Is Konheim using an experimental model of the Kryha machine? At the end of his article, Konheim thanks Dr. Kjell-Ove Widman of Crypto AG for his help regarding the historical aspects. Perhaps this person provided him with the description of the wheel?
The cryptogram
$ more MSGS/konheim.cry CECZDHYCFWGNVRTUA MZEDCQAMRUDWGAKCQ GQUSIFIZBMXMDOGOY WTSZRJBDOLZESLLSO VVFBPHTKYMFXDGNRN MIIPITFWNRRIZCRGN LMKNXXIDHAARQEGAH PLIYXSQYARQRQSSVX BVLUIULXQGISVXIKU YNUIZQUQVIJFEEQNH YGKIXTNIKOOQYIBFB UUGPLRJOSIYBACPGV QYFZOWOGKRLPHTKNE YLAPCOYZEXBJAYGWI EHNDHRHZKNVTVXJXS KCDNKNEKSLXMFEDGB XSKSZSBRCKKFOJDCF EEYXAHWSYMFIOUDBC BYXPMHQSDGFZGHVYO MSYMUBTVNKXHMCECA GNXAVGPCCVBBBIRFM UJQJGSKMHCGSHGXFR QMUUZOWWVWMABUAWT LNOUIGGLRHWTIKWBV XARTAYYWYYCPWXNNZ BXBLYJJHUDEYTPLLE IJCGFKHACOIOCNIKL MFOINMZOYTHRMKAMC RREFOSOPBPWRJOGVJ AZPZXAKUZIPUGVGZW WPFZKWWYITNAGLWSN ZBVKXRDVDQXFKJIWO DSYLEKXANBMTKWVVT FNLNKDPJADRPFHPHD VTKVKBEZLNIPTGFSW LJEWNQUQQCESWKEUF NWAGUHAVYMARMXKDI UAUCKXTSFKPTLENNU NEUUJDYFVRZMNEWJA YKLNCPDEROIWUXUWH HZAISFAMOKSYIOKLG JYXZCIIDITHEPGDNO WYUXPWMDLPBGPKIAL VXFADSSXTXNCORDJG NFQYOGOZZECVPQHJV FCEQPABYPFBJFZBAZ HYPQYPKICOPXKRKHR XAQJXTPSJUGKHDDTG BDGGNQUQRCWBMFSSC PABNHPCCSHJPNKTNV CVLSJMOZFVITJZGGR JRGPLGSGVSMDOALQR VUGPQKDCPKPOKHNPG DAHEMYFESLBPFZOMQ WEBOBDMGCEYDWCGXQ PJMZVWPPLXGWXCGHT XWFCELCAPZOAISTKZ VPPPMVXZEQOVJZOIG DSYLEKBVGHSUATFZA XAQCBFJFARNFSSDQY XOXUJMTXEUMQEYXVQ BWNOQLYCBFSXCDTWT IHLDNOYPKQOEKNVSQ HPWZTLZXZUYEFVKCS AUJSLBRIHMMWLKFAV VEAPGOVZEKWOVKCTM OHLXODFIXZXPFVTML UHFFUIVOCLYLQVOEN DFIHXAUWNNAUFTNAU CFNGCEMIJJWXLDWYD SMSTQBSHLWFSIDHJV MBGSEXSMGOMKROVKA SIKHDODLJUQRTSZOZ SGVTVSISYFESAXOKF BWWXWRWNJSYNBETPC PICCAYMUKHIRNXWHI YYWAVNVLZOZPGUJSL YDCKLBDDBRESGOJQU YKKGFOWSAIQETLNFC XRZPCUCOGXHOGAUMX The key lengthIf we use the superposition method, we can calculate the length of the key and deduce the number of sectors of the wheel used.
$ python3 superpose.py -c MSGS/konheim.cry -m 500 -t 110 0 => 2272, 1.000 61 => 115, 0.051 82 => 113, 0.050 94 => 113, 0.050 116 => 110, 0.048 141 => 113, 0.050 157 => 116, 0.051 165 => 117, 0.051 221 => 140, 0.062 249 => 116, 0.051 320 => 110, 0.048 322 => 120, 0.053 327 => 110, 0.048 381 => 120, 0.053 442 => 142, 0.062 468 => 111, 0.049Two peaks are noticeable: 221 and 442 (17*26 et 17*13). Clearly, the wheel has 17 sectors.
Sacco's Method: Offsets between columnsWe distribute the cryptogram letter by letter into the cells of a table where each cell contains letters belonging to the same alphabet (see sacco). Each column in this table contains the same sequence of alphabets, but shifted from one another. We test all possible shifts between any two columns, whether adjacent or not. For each shift, we group the letters belonging to the cells assumed to belong to the same alphabet and calculate the index (IC). The maximum value of the IC indicates the right shift. Here are the results (for adjacent columns and 5 and 2 columns apart):
$ python3 chi2.py -c MSGS/konheim.cry -m 17 -t 1
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0: 0.050 0.044 0.049 0.047 0.024 0.039 0.034 0.032 0.033 0.042 0.024 0.039 0.038 0.042 0.035 0.039 0.033
1: 0.056 0.047 0.055 0.039 0.025 0.039 0.021 0.023 0.023 0.039 0.044 0.031 0.023 0.045 0.035 0.033 0.033
2: 0.039 0.036 0.053 0.042 0.042 0.032 0.054 0.057 0.059 0.057 0.035 0.057 0.028 0.029 0.040 0.042 0.047
3: 0.046 0.039 0.033 0.065 0.039 0.037 0.055 0.045 0.034 0.031 0.065 0.033 0.060 0.050 0.040 0.068 0.040
4: 0.035 0.021 0.046 0.031 0.038 0.036 0.036 0.034 0.037 0.037 0.037 0.038 0.038 0.031 0.026 0.032 0.039
5: 0.028 0.019 0.032 0.035 0.027 0.022 0.032 0.025 0.037 0.052 0.046 0.025 0.033 0.022 0.031 0.029 0.041
6: 0.027 0.024 0.045 0.045 0.021 0.035 0.036 0.051 0.032 0.032 0.034 0.030 0.041 0.033 0.024 0.049 0.036
7: 0.035 0.039 0.053 0.046 0.055 0.041 0.052 0.056 0.045 0.031 0.039 0.056 0.043 0.038 0.055 0.032 0.060
8: 0.055 0.021 0.029 0.025 0.035 0.040 0.033 0.028 0.027 0.030 0.029 0.042 0.033 0.053 0.030 0.026 0.043
9: 0.033 0.029 0.021 0.031 0.034 0.037 0.053 0.019 0.035 0.043 0.025 0.043 0.022 0.026 0.038 0.040 0.036
10: 0.039 0.033 0.040 0.024 0.039 0.040 0.023 0.062 0.041 0.046 0.029 0.042 0.027 0.025 0.032 0.042 0.038
11: 0.057 0.042 0.069 0.029 0.043 0.061 0.032 0.041 0.048 0.032 0.034 0.049 0.043 0.063 0.048 0.046 0.053
12: 0.024 0.051 0.040 0.045 0.050 0.045 0.060 0.034 0.061 0.033 0.036 0.046 0.038 0.041 0.033 0.037 0.040
13: 0.045 0.035 0.034 0.054 0.035 0.031 0.037 0.035 0.027 0.039 0.029 0.037 0.038 0.049 0.038 0.036 0.033
14: 0.036 0.039 0.039 0.028 0.028 0.043 0.015 0.035 0.016 0.045 0.034 0.022 0.038 0.046 0.034 0.026 0.035
15: 0.036 0.058 0.041 0.041 0.049 0.041 0.047 0.041 0.056 0.042 0.051 0.051 0.033 0.043 0.059 0.038 0.040
16: 0.052 0.058 0.029 0.059 0.048 0.029 0.051 0.041 0.033 0.029 0.072 0.030 0.055 0.028 0.051 0.072 0.033
17: 0.053 0.034 0.025 0.031 0.039 0.042 0.043 0.029 0.025 0.042 0.045 0.036 0.035 0.036 0.039 0.034 0.032
18: 0.025 0.030 0.027 0.031 0.043 0.034 0.028 0.028 0.031 0.035 0.042 0.028 0.039 0.016 0.032 0.036 0.026
19: 0.024 0.031 0.022 0.055 0.041 0.030 0.037 0.039 0.030 0.034 0.040 0.022 0.040 0.032 0.042 0.038 0.028
20: 0.029 0.043 0.044 0.039 0.027 0.043 0.057 0.052 0.045 0.026 0.045 0.034 0.029 0.042 0.045 0.038 0.055
21: 0.050 0.019 0.032 0.033 0.021 0.037 0.034 0.030 0.036 0.041 0.029 0.034 0.024 0.054 0.027 0.046 0.032
22: 0.025 0.029 0.045 0.030 0.033 0.035 0.045 0.028 0.041 0.031 0.028 0.035 0.025 0.029 0.034 0.031 0.033
23: 0.037 0.047 0.037 0.033 0.028 0.041 0.026 0.054 0.046 0.043 0.034 0.035 0.036 0.048 0.025 0.022 0.043
24: 0.058 0.034 0.065 0.034 0.041 0.065 0.039 0.035 0.045 0.025 0.040 0.046 0.030 0.074 0.048 0.032 0.042
25: 0.044 0.041 0.054 0.046 0.062 0.038 0.046 0.042 0.061 0.033 0.033 0.044 0.028 0.039 0.043 0.054 0.053
$ python3 chi2.py -c MSGS/konheim.cry -m 17 -t 5
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0: 0.068 0.049 0.056 0.056 0.049 0.035 0.036 0.044 0.048 0.036 0.049 0.036 0.059 0.031 0.047 0.065 0.045
1: 0.045 0.041 0.052 0.041 0.034 0.038 0.034 0.033 0.027 0.022 0.026 0.042 0.025 0.025 0.029 0.038 0.026
2: 0.029 0.033 0.031 0.025 0.027 0.032 0.045 0.050 0.027 0.027 0.047 0.047 0.041 0.038 0.019 0.037 0.034
3: 0.057 0.044 0.049 0.038 0.035 0.034 0.063 0.062 0.033 0.034 0.044 0.036 0.036 0.035 0.024 0.041 0.040
4: 0.030 0.033 0.033 0.042 0.052 0.033 0.034 0.026 0.046 0.036 0.035 0.037 0.021 0.042 0.035 0.042 0.032
5: 0.041 0.029 0.031 0.032 0.043 0.025 0.038 0.034 0.048 0.049 0.063 0.059 0.057 0.048 0.034 0.047 0.056
6: 0.038 0.028 0.023 0.030 0.036 0.043 0.036 0.050 0.037 0.034 0.039 0.033 0.027 0.037 0.036 0.029 0.028
7: 0.034 0.029 0.043 0.027 0.041 0.043 0.046 0.038 0.045 0.039 0.029 0.023 0.028 0.027 0.026 0.034 0.032
8: 0.031 0.042 0.035 0.033 0.072 0.053 0.046 0.043 0.039 0.066 0.051 0.033 0.047 0.044 0.033 0.052 0.045
9: 0.022 0.043 0.039 0.055 0.040 0.051 0.033 0.023 0.046 0.018 0.037 0.037 0.030 0.045 0.077 0.034 0.039
10: 0.032 0.047 0.048 0.029 0.042 0.046 0.034 0.028 0.036 0.046 0.043 0.034 0.043 0.046 0.033 0.037 0.033
11: 0.035 0.053 0.037 0.023 0.039 0.066 0.038 0.035 0.043 0.034 0.028 0.032 0.027 0.033 0.033 0.040 0.051
12: 0.048 0.044 0.035 0.047 0.052 0.020 0.043 0.046 0.046 0.041 0.035 0.015 0.046 0.039 0.044 0.032 0.041
13: 0.057 0.076 0.067 0.051 0.032 0.044 0.035 0.039 0.033 0.025 0.030 0.039 0.041 0.036 0.033 0.034 0.046
14: 0.045 0.031 0.044 0.036 0.024 0.040 0.027 0.032 0.027 0.031 0.027 0.047 0.032 0.025 0.042 0.035 0.028
15: 0.038 0.040 0.035 0.030 0.035 0.028 0.051 0.039 0.045 0.024 0.053 0.048 0.049 0.047 0.039 0.037 0.032
16: 0.065 0.045 0.036 0.034 0.024 0.041 0.061 0.057 0.030 0.046 0.038 0.034 0.031 0.041 0.046 0.029 0.033
17: 0.037 0.039 0.054 0.050 0.046 0.042 0.042 0.033 0.043 0.039 0.029 0.019 0.037 0.032 0.023 0.035 0.050
18: 0.025 0.023 0.033 0.036 0.045 0.038 0.044 0.034 0.030 0.042 0.065 0.060 0.039 0.040 0.044 0.037 0.042
19: 0.027 0.025 0.033 0.033 0.032 0.043 0.041 0.043 0.035 0.033 0.034 0.049 0.036 0.030 0.041 0.016 0.028
20: 0.018 0.023 0.024 0.025 0.021 0.040 0.048 0.027 0.056 0.038 0.028 0.028 0.019 0.029 0.045 0.029 0.031
21: 0.038 0.037 0.039 0.049 0.074 0.030 0.036 0.034 0.046 0.078 0.058 0.037 0.041 0.037 0.034 0.048 0.047
22: 0.032 0.047 0.035 0.040 0.048 0.031 0.025 0.037 0.050 0.048 0.047 0.033 0.031 0.045 0.072 0.042 0.029
23: 0.048 0.042 0.040 0.027 0.037 0.047 0.027 0.027 0.029 0.042 0.032 0.027 0.051 0.035 0.030 0.033 0.030
24: 0.047 0.051 0.033 0.020 0.052 0.069 0.029 0.034 0.041 0.035 0.039 0.037 0.040 0.027 0.063 0.026 0.039
25: 0.030 0.048 0.025 0.053 0.036 0.039 0.040 0.028 0.059 0.044 0.020 0.026 0.045 0.033 0.040 0.021 0.029
$ python3 chi2.py -c MSGS/konheim.cry -m 17 -t 2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0: 0.040 0.058 0.047 0.035 0.052 0.055 0.034 0.046 0.024 0.043 0.048 0.017 0.032 0.041 0.040 0.047 0.030
1: 0.055 0.044 0.057 0.043 0.054 0.046 0.034 0.042 0.044 0.025 0.044 0.045 0.077 0.055 0.039 0.036 0.040
2: 0.049 0.027 0.040 0.044 0.032 0.036 0.027 0.031 0.036 0.042 0.034 0.051 0.055 0.029 0.057 0.033 0.042
3: 0.025 0.034 0.044 0.033 0.038 0.019 0.025 0.019 0.033 0.044 0.033 0.018 0.039 0.039 0.042 0.033 0.033
4: 0.036 0.016 0.036 0.025 0.033 0.035 0.031 0.036 0.070 0.026 0.033 0.033 0.046 0.040 0.041 0.031 0.035
5: 0.051 0.042 0.038 0.053 0.045 0.046 0.048 0.061 0.021 0.046 0.054 0.039 0.043 0.048 0.046 0.039 0.081
6: 0.047 0.033 0.030 0.038 0.040 0.029 0.055 0.041 0.032 0.029 0.040 0.047 0.037 0.026 0.056 0.051 0.038
7: 0.052 0.021 0.049 0.021 0.021 0.030 0.032 0.025 0.060 0.048 0.033 0.017 0.029 0.046 0.034 0.050 0.040
8: 0.040 0.036 0.031 0.036 0.025 0.021 0.031 0.044 0.021 0.056 0.027 0.025 0.030 0.026 0.037 0.041 0.049
9: 0.037 0.039 0.033 0.036 0.038 0.033 0.061 0.071 0.036 0.027 0.028 0.036 0.026 0.037 0.020 0.034 0.044
10: 0.029 0.048 0.036 0.039 0.053 0.039 0.043 0.035 0.025 0.021 0.046 0.045 0.037 0.035 0.045 0.048 0.031
11: 0.042 0.022 0.039 0.018 0.032 0.038 0.041 0.032 0.034 0.039 0.040 0.040 0.039 0.037 0.032 0.038 0.026
12: 0.030 0.046 0.033 0.041 0.034 0.024 0.043 0.051 0.030 0.029 0.036 0.043 0.032 0.023 0.037 0.024 0.036
13: 0.047 0.043 0.045 0.031 0.060 0.050 0.035 0.024 0.026 0.045 0.028 0.038 0.036 0.046 0.034 0.053 0.028
14: 0.040 0.036 0.077 0.034 0.050 0.041 0.036 0.036 0.047 0.028 0.046 0.055 0.069 0.040 0.042 0.030 0.036
15: 0.021 0.041 0.039 0.046 0.031 0.048 0.021 0.037 0.032 0.033 0.053 0.055 0.049 0.044 0.053 0.049 0.040
16: 0.031 0.037 0.027 0.028 0.039 0.042 0.033 0.024 0.039 0.037 0.045 0.022 0.031 0.032 0.044 0.021 0.034
17: 0.044 0.027 0.036 0.021 0.034 0.020 0.035 0.046 0.066 0.030 0.033 0.025 0.032 0.030 0.036 0.039 0.027
18: 0.043 0.054 0.039 0.054 0.028 0.032 0.046 0.044 0.044 0.042 0.031 0.058 0.025 0.054 0.057 0.036 0.074
19: 0.041 0.037 0.028 0.021 0.040 0.032 0.047 0.031 0.026 0.024 0.046 0.043 0.045 0.027 0.039 0.040 0.042
20: 0.039 0.035 0.030 0.031 0.028 0.044 0.040 0.022 0.050 0.039 0.040 0.030 0.038 0.035 0.034 0.053 0.028
21: 0.028 0.042 0.031 0.033 0.026 0.041 0.033 0.027 0.028 0.057 0.042 0.034 0.026 0.035 0.029 0.041 0.046
22: 0.038 0.046 0.039 0.031 0.028 0.037 0.046 0.076 0.040 0.057 0.036 0.026 0.035 0.041 0.025 0.048 0.042
23: 0.045 0.051 0.037 0.039 0.042 0.044 0.048 0.038 0.017 0.024 0.056 0.041 0.043 0.048 0.048 0.057 0.034
24: 0.052 0.031 0.048 0.020 0.027 0.028 0.048 0.045 0.032 0.042 0.032 0.038 0.040 0.027 0.026 0.039 0.024
25: 0.032 0.045 0.047 0.031 0.041 0.022 0.035 0.045 0.039 0.032 0.033 0.039 0.040 0.027 0.041 0.033 0.021
We observe that columns 0 and 1 are shifted by 11 positions. Similarly, columns 2 and 3 are also shifted by 11 positions (IC=0.069). However, columns 3 and 4 are only shifted by 3 positions. We thus measure all the shifts. Finally, we notice a particular behavior: The maximum ICs occur twice per column and are always 13 positions apart. So, in the same column, we only have 13 alphabets repeated twice (which gives 26 lines). When we looked for the length of the key, the superposition method gave two peaks, one of which has a distance of 221=13*17. Now we understand why. Furthermore, the columns are divided into two distinct families. Columns 0 and 1 belong to the same family and therefore share the same alphabets. However, columns 2, 3, and 4 belong to a different family of alphabets. By studying all possible shifts, we obtain the following result: We obtain two sets of values:
As a check of the previous results, we can calculate the IC for each of the 26 alphabets, divided (let's not forget) into two groups:
$ python3 sacco_13.py -c MSGS/konheim.cry \ -m 0,11,-1,-1,-1,0,11,-1,9,-1,11,1,-1,-1,-1,3,6 0, 0.058 93 P:10,O:9,V:9,A:8,Y:8, 1, 0.065 93 Y:12,M:10,D:9,R:9,O:8, 2, 0.054 95 J:10,U:9,G:8,F:7,I:7, 3, 0.066 95 A:12,H:11,Z:9,C:8,F:7, 4, 0.059 94 V:10,E:9,H:9,I:9,B:6, 5, 0.055 94 K:11,V:9,B:8,R:7,S:7, 6, 0.050 91 B:9,F:9,R:7,W:7,E:6, 7, 0.051 92 F:12,S:8,G:6,M:6,P:6, 8, 0.073 91 S:17,B:12,C:6,M:6,X:6, 9, 0.066 91 Q:14,N:10,B:8,R:7,A:6, 10, 0.057 91 T:11,P:10,F:7,G:7,A:6, 11, 0.062 91 M:12,U:9,W:8,A:7,C:7, 12, 0.065 92 N:12,J:11,G:9,O:9,A:6, Debug: False $ python3 sacco_13.py -c MSGS/konheim.cry \ -m -1,-1,0,11,1,-1,-1,0,-1,9,-1,-1,3,6,4,-1,-1 0, 0.073 83 C:16,Z:8,S:7,A:6,W:6, 1, 0.065 83 O:13,H:10,I:7,E:6,L:6, 2, 0.069 84 D:10,G:9,P:9,U:9,V:8, 3, 0.072 83 D:12,C:8,I:8,P:8,R:7, 4, 0.072 82 F:10,K:10,I:9,X:8,O:7, 5, 0.058 82 U:9,E:8,S:7,X:7,Z:7, 6, 0.058 81 B:8,M:8,Y:8,E:7,K:7, 7, 0.067 82 K:11,P:10,N:9,I:7,X:7, 8, 0.058 81 X:9,A:8,L:8,M:7,Z:7, 9, 0.064 82 Q:12,N:10,G:7,U:7,C:5, 10, 0.073 82 T:10,V:10,J:9,K:8,A:7, 11, 0.066 82 L:12,G:9,R:6,S:6,W:6, 12, 0.068 82 G:11,F:9,C:8,D:7,H:7, Debug: FalseNote: since there are more than 80 letters in each alphabet, we could skip the following steps and try to decipher the cryptogram right away. If we have probable words, it's actually quite easy. The Konheim's Method: The Value of Each SectorNow, let's apply the Konheim method (the part that allows us to find the sectors) (see Konheim). Two letters belong to the same alphabet if and only if:
s * L = L[c1] – L[c2]
By applying this formula to cells belonging to the same alphabet (derived from the shifts found by Sacco's method) we establish a whole set of equations: L[1]-L[8]=9L L[5]-L[15]=3L L[3]-L[7]=2L L[4]-L[9]=8L L[11]-L[0]=12L L[7]-L[9]=9L L[1]-L[15]=5L L[10]-L[0]=2L L[9]-L[14]=8L L[7]-L[13]=6L L[2]-L[14]=4L L[11]-L[1]=10L L[1]-L[16]=8L L[12]-L[14]=L L[6]-L[0]=2L We can make the following deductions L[0]=7L L[5]=7L L[10]=9L L[15]=4L L[1]=3L L[6]=9L L[11]=6L L[16]=L[1]-8L L[2]=L[1]+l[2] L[7]=L[2] L[12]=L[2]+10L L[3]=L[2]+2L L[8]=0 L[13]=L[2]-6L L[4]=L[2]+12L L[9]=L[2]+4L L[14]=L[2]+9LThere are several ways to solve these equations. Personally, I first calculated L. To do this, I tested the following equations for all possible even values of L from 2 to 26. L must be even because the same letter appears twice in each column.
L[0] - L[1] = L * 11 L[10] - L[11] = L * 3 L[16] - L[0] = L * 7 => L[0] - L[16] = -L * 7The only value of L that gives plausible values for sectors is 16. We also obtain l[0] = 8, l[1] = 6, and l[11] = 4. Using these values, we can deduce some of the sectors and their cumulative sum. l[3]=6, l[4]=4, l[6]=6, l[13]=4, l[14]=6, l[16]=4. L[0]=l[0]=7L=8, L[1]=9L=14, L[5]=7L=8, L[6]=9L=14, L[8]=0, L[10]=9L=14, L[11]=6L=18, L[15]=4L=12, L[16]=L=L[1]-8L=16 (verification)However, for the moment, we are unaware of L[2], on which all the other sectors depend. We can restrict the possible values of these sectors:
L[8]=0 = L[7]+l[8] = L[5]+l[6]+l[7]+l[8] = 8+6+l[7]+l[8] => l[7]+l[8] = -8-6 = -14 = 12 (modulo 26) L[5]=8 = L[4]+l[5] = L[2]+12L+l[5] = L[1]+l[2]+10+l[5]=8 => l[2]+l[5]=10 L[15]=12 = L[11]+l[12]+l[13]+l[14]+l[15] = 19+l[12]+4+6+l[15] => l[12]+l[15] = 10 L[10]=14 = L[8]+l[9]+l[10]= 0 + l[9]+l[10] => l[9]+l[10] = 14 L[2] = L[1]+l[2] and L[7]=L[6]+l[7] and L[1]=L[6]=14 => l[2]=l[7] L[12]=L[2]+10L = 14+l[2]+10L=18+l[12] => l[2]=l[12]Similarly, we deduce that l[5] = l[15] and finally l[2] = l[9]. What is the value of l[2]? I tried several values until all the equations involving L[2] were consistent. I found the value to be 5. From there, all the other sectors can be deduced. In short, here are the shifts: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 6 5 6 4 5 6 5 7 5 9 4 5 4 6 5 4 Note: Determining the value of the sectors was complicated because we had two families of alphabets. The number of teeth required to move from one family to the other was not easily deducible. Friedman's MethodNow that we know the wheel, we can apply Friedman's method to find the alphabets (see Friedman).
First attempt
$ python3 friedman_end.py -c MSGS/konheim.cry -w 8,6,5,6,4,5,6,5,7,5,9,4,5,4,6,5,4 ... Interior Alphabet: KP.U.BZ.C.N.FRJV..OQ.SIWGM , Collision: TrueThe method fails, why? Second attemptPerhaps we need to move the wheel forward before we start calculating? In conclusion, we find that the fixed (outer) alphabet corresponds to the direct alphabet (ABC...Z) but shifted. If we shift the inner alphabet by the same amount, we obtain the normal direct alphabet.
$ python3 friedman_end.py -c MSGS/konheim.cry -w 6,5,6,4,5,6,5,7,5,9,4,5,4,6,5,4,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
0:13 1 5 0 0 0 0 5 4 3 3 0 0 1 9 10 0 4 1 5 4 7 4 0 8 6
1: 2 4 1 1 6 0 1 10 7 0 5 6 3 1 13 1 3 2 5 0 4 2 0 0 2 4
2: 1 9 1 0 2 2 3 5 0 2 12 2 5 1 0 4 2 6 7 6 4 11 0 0 1 7
3: 5 8 3 4 7 0 4 0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2 5 9 7 6 0 6 4 10 : 94
O: 9 13 0 1 5 5 0 0 4 2 8 5 2 1 4 6 9 2 1 1 0 0 0 7 0 3 : 88
P:10 1 4 5 10 0 1 8 6 0 1 2 2 6 6 2 1 9 7 10 2 2 1 0 0 0 : 96
Q: 0 3 2 1 0 0 3 3 5 4 3 0 6 6 14 0 2 0 0 2 0 6 0 2 5 12 : 79
R: 4 2 6 1 0 6 6 7 3 1 1 0 1 0 8 0 7 2 9 2 1 1 4 1 0 2 : 75
S: 1 5 7 0 0 6 1 4 9 4 0 7 4 7 2 0 2 0 2 0 4 0 5 5 20 2 : 97
T: 5 0 6 5 12 0 1 0 0 2 0 4 1 4 2 10 0 0 4 3 0 0 3 3 5 3 : 73
U: 4 4 4 0 6 4 9 7 0 0 0 0 0 9 0 5 2 9 3 0 9 6 0 0 3 7 : 91
V: 7 2 11 5 4 3 5 0 0 2 3 0 10 4 0 10 1 8 2 2 1 0 2 0 2 2 : 86
W: 4 0 0 3 4 6 6 2 0 5 4 6 5 1 0 0 0 0 7 0 8 2 7 1 1 5 : 77
X: 0 0 0 2 0 4 2 1 5 9 3 1 4 7 1 0 3 6 4 7 7 0 6 8 6 2 : 88
Y: 8 2 1 8 6 6 5 0 2 0 2 0 8 0 4 2 12 4 0 5 7 0 1 3 1 3 : 90
Z: 6 4 7 1 0 1 0 1 0 7 0 8 5 7 2 1 3 6 0 0 4 2 9 7 4 0 : 85
10
[[10, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0],
[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0],
[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]
[[10, 0], [18, 5], [5, 15], [15, 11], [2, 18], [13, 17], [1, 21], [0, 7], [6, 2],
[20, 24], [24, 23], [12, 1], [23, 16], [14, 8], [21, 9], [8, 4], [25, 20], [7, 19],
[3, 14], [4, 10], [16, 6],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 3 6 0 0 ,20
H: 1 2 7 11 0 1 4 5 10 5 0 1 0 1 0 6 0 5 3 9 4 0 3 6 0 0 ,19
D: 3 0 9 10 2 0 6 7 7 1 0 0 0 1 0 4 0 5 5 12 4 1 1 5 0 0 ,14
E: 2 3 6 8 3 0 6 3 9 2 2 0 0 0 0 5 0 6 2 7 6 2 6 4 0 0 ,10
Q: 3 3 5 4 3 0 6 6 14 0 2 0 0 2 0 6 0 2 5 12 0 3 2 1 0 0 , 6
J: 1 5 9 9 2 0 4 4 5 1 0 0 0 3 0 2 0 3 5 11 0 2 4 9 0 0 ,13
W: 3 4 6 6 2 0 5 4 6 5 1 0 0 0 0 7 0 8 2 7 1 1 5 4 0 0 , 3
L: 1 3 7 7 3 0 4 5 4 2 1 0 1 1 0 6 2 3 3 12 1 0 2 8 0 1 ,12
R: 2 4 2 6 1 0 6 6 7 3 1 1 0 1 0 8 0 7 2 9 2 1 1 4 1 0 ,25
T: 3 3 5 3 5 0 6 5 12 0 1 0 0 2 0 4 1 4 2 10 0 0 4 3 0 0 ,22
Interior Alphabet: KRUYTBZHCNXFDJLPEVOAQSIWGM , Collision: False
$ python3 kryha_tui.py -o -i KRUYTBZHCNXFDJLPEVOAQSIWGM -d -m \
-s 8,6,5,6,4,5,6,5,7,5,9,4,5,4,6,5,4 < MSGS/konheim.cry \
>| /tmp/konheim_pseudo.txt
$ python3 ic.py /tmp/konheim_pseudo.txt
QEBFPPRBLCMBOCLOJXKZBBSXIRXQFLKXKAMOBAFZQFLKEXPZLKZBOKBARPBO
...
0.06708669010983559
$ pypy3 hc_substi.py -c /tmp/konheim_pseudo.txt
0 17170.500085762113 THEISSUEOFPERFORMANCEEVALUATIONANDPREDICTIONHASCON
1 17105.547620270587 THEISSUEOFPERFORMANCEEKALUATIONANDPREDICTIONHASCON
2 17170.500085762113 THEISSUEOFPERFORMANCEEVALUATIONANDPREDICTIONHASCON
...
9 17170.500085762113 THEISSUEOFPERFORMANCEEVALUATIONANDPREDICTIONHASCON
Key: XYZABCDEFGHIJKLMNOPQRSTUVW Score: 17170.500085762113
THEISSUEOFPERFORMANCEEVALUATIONANDPREDICTIONHASCONCERNEDUSERSTHROUGHOUT
THEHISTORYOFCOMPUTEREVOLUTIONPERIODINFACTCOMMAASINANYOTHERTECHNOLOGICAL
DEVELOPMENTCOMMATHEISSUEISMOSTACUTEWHENTHET...
The key (Solution)
Standard Wheel: 3, 2, 3, 1, 2, 3, 2, 4, 2, 6, 1, 2, 1, 3, 2, 1, 5 Konheim Wheel : 8, 6, 5, 6, 4, 5, 6, 5, 7, 5, 9, 4, 5, 4, 6, 5, 4 -3 : 5, 3, 2, 3, 1, 2, 3, 2, 4, 1, 6, 1, 2, 1, 3, 2, 1If we subtract 3 from each sector and shift the values to the left, we obtain the values of the sectors of the standard wheel! The plain text
$ python3 kryha_tui.py -o \ -i WGMKRUYTBZHCNXFDJLPEVOAQSI \ -e ABCDEFGHIJKLMNOPQRSTUVWXYZ \ -s 8,6,5,6,4,5,6,5,7,5,9,4,5,4,6,5,4 -d -m \ < MSGS/konheim.cry | fold -w 70 THEISSUEOFPERFORMANCEEVALUATIONANDPREDICTIONHASCONCERNEDUSERSTHROUGHOU TTHEHISTORYOFCOMPUTEREVOLUTIONPERIODINFACTCOMMAASINANYOTHERTECHNOLOGIC ALDEVELOPMENTCOMMATHEISSUEISMOSTACUTEWHENTHETECHNOLOGYISYOUNGTHEPERSIS TENTPURSUITOFPRODUCTSWITHIMPROVEDCOSTHYPHENPERFORMANCECHARACTERISTICST HENCONSTANTLYLEADSTODESIGNSWITHUNTRIEDANDUNCERTAINFEATURESPERIODFROMTH EINITIALCONCEPTIONOFASYSTEMSARCHITECTURALDESIGNTOITSDAILYOPERATIONAFTE RINSTALLATIONPERIODINTHEEARLYPLANNINGPHASEOFANEWCOMPUTERSYSTEMPRODUCTC OMMATHEMANUFACTURERMUSTUSUALLYMAKETWOTYPESOFPREDICTIONPERIODTHEFIRSTTY PEISTOFORECASTTHENATUREOFAPPLICATIONSANDTHELEVELSOFSYSTEMWORKLOADSOFTH ESEAPPLICATIONSPERIODHERETHETERMWORKLOADMEANSCOMMAINFORMALLYCOMMATHEAM OUNTOFSERVICEREQUIREMENTSPLACEDONTHESYSTEMPERIODWESHALLELABORATEMOREON WORKLOADCHARACTERIZATIONINSECTIONONEPOINTFOURPERIODTHESECONDTYPEOFPRED ICTIONISCONCERNEDWITHTHECHOICEBETWEENARCHITECTURALDESIGNALTERNATIVESCO MMABASEDONHARDWAREANDSOFTWARETECHNOLOGIESTHATWILLBEAVAILABLEINTHEDEVEL OPMENTPERIODOFTHEPLANNEDSYSTEMPERIODHERETHECRITERIONOFSELECTIONISWHATW ECALLCOSTHYPHGNPERFORMANCETRADEOFFPERIODTHEACCURACYOFSUCHPREDICTIONRES TSTOACONSIDERABLEEXTENTONOURCAPABILITYOFMAPPINGTHEPERFORMANCECHARACTER ISTICSOFTHESYSTEMCOMPONENTSINTOTHEOVERALLSYSTEMHYPHENLEVELPERFORMANCEC HARACTERISTICSPERIODSUCHTRANSLATIONPROCEDURESAREBYNOMEANSSTRAIGHTFORWA RDORWELLESTABLISHEDPERIODONCETHEARCHITECTURALDECISIONSHAVEBEENMADEANDT HESYSTEMDESIGNANDIMPLEMENTATIONSTARTEDCOMMATHESCOPEOFPERFORMANCEPREDIC TIONANDEVALUATIONBECOMESMORESPECIFICPERIODWHATISTHEBESTCHOICEOFMACHINE ORGANIZATIONQUESTIONWHATISTHEOPERATINGSYSTEMTOSUPPORTANDWHATARETHEFUNC TIONSITSHOULDPROVIDEQUESTIONTHEINTERACTIONSAMONGTHEOPERATINGSYSTEMCOMP ONENTSHYPHENALGORITHMSFORJOBSCHEDULINGCOMMAPROCESSORSCHEDULINGCOMMAAND STORAGEMANAGEMENTHYPHENMUSTBEUNDERSTOODCOMMAANDTHEIREFFECTSONTHEPERFOR MANCEMUSTBEPREDICTEDPERIODTHETECHNIQUESUSEDFORPERFORMANCEEVALUATIONAND PREDICTIONDURINGTHEDESIGNANDIMPLEMENTATIONPHASESRANGEFROMSIMPLEHANDCAL CULATIONTOQUITEELABORATESIMULATIONPERIODCOMPARINGTHEPREDICTEDPERFORMAN CEWITHTHEACTUALACHIEVEDPERFORMANCEOFTENREVEALSMAJORDEFECTSINTHEDESIGNO RERRORSINTHESYSTEMPROGRAMMINGPERIODITISNOWAWIDELYACCEPTEDBETIEFTHATTHE PERFORMANCEPREDICTIONANDEVALUATIONPROCESSSHOULDBEANINTEGRALPARTOFTHEDE VELOPMENTEFFORTSTHROUGHOUTPERIOD $ python3 kryha_tui.py -o -i WGMKRUYTBZHCNXFDJLPEVOAQSI \ -w konheim -d -m < MSGS/konheim.cry | fold -w 70 | head -5 THEISSUEOFPERFORMANCEEVALUATIONANDPREDICTIONHASCONCERNEDUSERSTHROUGHOU TTHEHISTORYOFCOMPUTEREVOLUTIONPERIODINFACTCOMMAASINANYOTHERTECHNOLOGIC ALDEVELOPMENTCOMMATHEISSUEISMOSTACUTEWHENTHETECHNOLOGYISYOUNGTHEPERSIS TENTPURSUITOFPRODUCTSWITHIMPROVEDCOSTHYPHENPERFORMANCECHARACTERISTICST HENCONSTANTLYLEADSTODESIGNSWITHUNTRIEDANDUNCERTAINFEATURESPERIODFROMTH $ cat keys/konheim.whl 4, 2, 1, 2, 0, 1, 2, 1, 3, 1, 5, 0, 1, 0, 2, 1, 0 Reference
|