Find the External Key of a message with help of a probable word =============================================================== Suppose we know the Internal Key. We have plenty messages ciphered with this key. How to find the External Key ? A manual method is to suppose that the message begins by a probable word. Example: Ciphered message: WUHDU AJRJT LRG Plain message (supposed): ATTAC KZAT. ... Internal Key: Position of key wheels pins Wheel 1 (26): AB_D___HI_K_MN____ST_VW___ Wheel 2 (25): A__DE_G__JKL__O__RS_U_X__ Wheel 3 (23): AB____GH_J_LMN___RSTU_X Wheel 4 (21): __C_EF_HI___MN_P__STU Wheel 5 (19): _B_DEF_HI___LN_P__S Wheel 6 (17): AB_D___H__K__NO_Q Position of drum bar lugs 1. 3-6 10. 2-0 19. 2-0 2. 0-6 11. 2-0 20. 2-5 3. 1-6 12. 2-0 21. 2-5 4. 1-5 13. 2-0 22. 0-5 5. 4-5 14. 2-0 23. 0-5 6. 0-4 15. 2-0 24. 0-5 7. 0-4 16. 2-0 25. 0-5 8. 0-4 17. 2-0 26. 0-5 9. 0-4 18. 2-0 27. 0-5 LugsByWheels = [2, 12, 1, 5, 10, 3] Overlaps exist because some bars have two lugs in effective position: LugsXY[] = {'25': 1, '34': 1, '14': 2, '04': 1, '05': 1} The method: we can guess the pins setting which explains the K Key values. C[i] = (25 + K[i]) - P[i] => K[i] = C[i] + P[i] + 1 C P K Pins[0] Pins[1] Pins[2] Pins[3] Pins[4] Pins[5] 2 lugs 12 lugs 1 lugs 5 lugs 10 lugs 3 lugs ------------------------------------------------------------------ W A 23 1 0 1 = 12+10-2+... U T 14 H T 1/27 D A 4 0 0 0 = 0+0+0+... U C 23 1 0 1 = 12+10-2+... A K 11 0 J Z 9 0 0 R A 18 J T 9 0 0 For example, for the first letter, the first Pin of Wheel with 25 letter and the first Pin of Wheel with 19 must be active because their weight are important. Converselly, for the 4th letter, the Pins for the same Wheels must be ineffective. From this table, we can search for External key for the 2nd and 5th wheel. Result: - External Key for the 2nd wheel: "S" - External Key for the 5th wheel: "D" Here is the method (for 2nd Wheel): Actual setting (x2): A__DE_G__JKL__O__RS_U_X__A__DE_G__JKL__O__RS_U_X__ 1st try: 1..0100.0 => wrong 2nd try: 1..0100.0 => wrong 3rd try: 1..0100.0 => wrong ... 19th try: 1..0100.0 => possible (E.K="S") From this result we can fill the 2nd and 5th columns and deduce new Pins. We also deduce that the 3rd K value is 27 rather 1. C P K Pins[0] Pins[1] Pins[2] Pins[3] Pins[4] Pins[5] 2 lugs 12 lugs 1 lugs 5 lugs 10 lugs 3 lugs ------------------------------------------------------------------ W A 23 1 0 1 = 20+(3 or 2+1) U T 14 0 0 0 1 1 0 = 10+5-1=14 H T 27 1 1 1 = D A 4 1 0 0 0 1 = 2+3-1 U C 23 1 0 1 = 20+(3 or 2+1) A K 11 0 0 1 0 1 0 = 10+1 J Z 9 1 0 1 0 1 = 5+2+3-1 R A 18 0 1 1 1 0 0 = J T 3 0 0 0 = 3 or 2+1 Frow this new table, we can find the External key: - External Key for wheel with 26 letters is "E" or "X" - External Key for wheel with 21 letters is "G" - External Key for wheel with 17 letters is "E" or "O" We test the four combinaisons (for wheel 0 and 5): "E"-"E": impossible at the first letter (0-1-?-0-1-0) "E"-"O": possible "X"-"E": impossible at the first letter "X"-"O": impossible at the 5th letter (1-1-?-0-1-1) K >=24 (impossible) Then, we have found the external key for the fisrt and last wheel: "E"-"O" We can fill the correspond columns C P K Pins[0] Pins[1] Pins[2] Pins[3] Pins[4] Pins[5] 2 lugs 12 lugs 1 lugs 5 lugs 10 lugs 3 lugs ------------------------------------------------------------------ W A 23 0 1 0 1 1 = 20+(3 or 2+1) U T 14 0 0 0 1 1 0 = 10+5-1=14 H T 27 0 1 1 1 1 = D A 4 1 0 0 0 1 = 2+3-1 U C 23 1 1 0 1 1 = 20+(3 or 2+1) A K 11 0 0 1 0 1 0 = 10+1 J Z 9 1 0 1 0 1 = 5+2+3-1 R A 18 0 1 1 1 0 0 = J T 3 1 0 1 0 0 0 = 2+1 We can't determine completly the pin setting of the 3rd wheel because of the overlap between this wheel and last wheel. The external key for the 3rd wheel is "E" or "P". We try to solve the message and to determine the last external key unknown. C P K Pins[0] Pins[1] Pins[2] Pins[3] Pins[4] Pins[5] 2 lugs 12 lugs 1 lugs 5 lugs 10 lugs 3 lugs ------------------------------------------------------------------ Q ? ? 1 0 1 1 1 0 = 16 => Z T ? ? 0 1 ? 0 1 1 = 23 => D L ? ? 0 1 ? 0 0 0 = 12|13 => A|B R ? ? 0 0 ? 1 1 0 = 14|15 => W|X G ? ? 0 1 ? 1 0 1 = 20 => N We guess that the last word is "DAWN" and then we can find the last external key (of the 3rd wheel): "E". The whole key is "ESEGDO". But we have used the active pins. If we want the letters which appears at the bench mark, we must add these values: [15,14,13,12,11,10]. Then the true External key is "PEOPLE".