Home Page Hebern's machines Home Page Hebern 1 rotor Home Page Cryptanalysis, Home Page
|
IntroductionMost cryptanalysis methods require specific methods. There is a universal method that can be applied to any cryptographic technique includes the most modern: this is the method of Kerckoff superposition. Two problems:
Note: this method was described in the context of a substitution. He is possible to use it for a transposition. Putting messages "in-depth" can also be used to merge several small cryptograms to make just one big cryptogram. CriteriaThe simplest method to detect if two messages are "in-depth", is to count the number of identical characters at the same positions. We thus counts the “coincidences”. Example: Cryptogram 1: YYSIV LAFDV SNWLZ CZMWX NJUMV HJIZP QTEJA YXYMU ZYPYE KKFJN Cryptogram 2: YMCWJ YGORM BNTSJ PWVKF UJLTP LLXHP FQWIM GBXTD XPQUN KZATG Coincidences: * * * * Another method, invented by Alan Turing, is Bamburismus. The interest of this method compared to simple counting of coincidences is to include in the calculation the length of the area compared in the two texts. The presence of bigram coincidences corresponds to added value. BF = ((P ** M) * ((1-P)**(N-M))) / (((1./26)**M)*((25./26)**(N-M))) BFdB = int( 20 * log (BF )) With - M is the number of coincidences - N is the length of superpimposition - P = 0.0667 = value of IC for English (English,0.0667, French,0.0778. German,0.0762, Spanish,0.0770). ExampleCreation of the test gameC:\H1_TOOLS> python hebern1_tui.py -R p17 -E Z < MSGS\p25.pln > MSGS\p25.cry C:\H1_TOOLS> python hebern1_tui.py -R p17 -E G < MSGS\p19.pln > MSGS\p19.cry Finding the Overlay PositionC:\H1_TOOLS> python superimpose.py Syntaxe: superp.py crypto1 crypto2 [IC_threhold [length superp]] by default, the IC_threhold is 0.055 by default, the length of superpimposition is 50 letters C:\H1_TOOLS> python superimpose.py MSGS\p25.cry MSGS\p19.cry 0.1 lenght: 100 321 smallest: 100 Coincidences IC length_msg offset-1 offset-2 Bambu big length_superp 9 0.1111 100 19 0 56.0 3 81 12 0.1200 100 0 7 79.0 1 100 11 0.1100 100 0 111 68.0 0 100 12 0.1200 100 0 189 79.0 3 100 The results are consistent with a key offset of 7 positions (H-A = 7). Offsets 111 and 189 correspond respectively to 26x4+7 and 26x7+7. Because the key has a maximum value of 25, all the 26 characters, we return to the initial key. |