Chapter 7: Analysis of the six-wheel Hagelin cipher machine where indicators are unciphered --- Explanations: Problem 1: ========== 1) First step: find the absolute positions of each message: Indicator: YQPFI => Message Key: YYQPFI: indx = 24, 23, 16, 15, 5, 8 total = 89705175 * (24+1) + 56787276 * (23+1) + 92587950 * (16+1) + 82090450 * (15+1) + 42697200 * (5+1) + 41755350 * (8+1) position = (total % 101405850) – 1 = (7124947699 % 101405850) – 1 = 26,538,198 We calculate the positions for each message: YYQPFI: 26,538,198 DDVUKN: 26,538,203 HHCDOA: 26,538,207 RRMNFK: 26,538,217 VVQRJO: 26,538,220 2) Now, we can put the messages "in depth" and search for probable word (example: we try the word "British" at the beginning of the second message) 198 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 (1)A G J V R F L L Z J D C F I A O N R T E J M Q A Z F L D D B S B ... a n d z a p r i (2) I Z X L A X Y W L E I X N D N Y K M T Q X E O ... b r i t i s h z (3) N Q U D A F M K Q H Y R E ... (4) D G K G K B F J E M G C V O H B Y E B T R T T R Y N S ... z p a v e d z t (5) S L G J Y A L W T N ... 3) The following steps are known (rebuild the plain text of message in depth, then calculate key and find lugs and pins setting). Annexe: Algorithm (in Python) for find the absolute position from message Key #=========================================================== alpha_roues = [ "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "ABCDEFGHIJKLMNOPQRSTUVXYZ", "ABCDEFGHIJKLMNOPQRSTUVX", "ABCDEFGHIJKLMNOPQRSTU", "ABCDEFGHIJKLMNOPQRS", "ABCDEFGHIJKLMNOPQ" ] constC38 = [ 89705175, 56787276, 92587950, 82090450, 42697200, 41755350 ] def calpos( cle ): total = 0 for i in range( len(cle) ): indx = alpha_roues[i].find( cle[i] ) v = constC38[i] * ( indx + 1 ) total += v return (total % 101405850) – 1 #=========================================================== Problem 2: ========== We don’t use new methods.