Home Page Hebern's machines The 5 rotors machine home page
|
IntroductionAfter having reconstructed the wiring of the rotors in positions I and V, it is possible to decipher the cryptograms more esasilly. It's even easier if we reconstruct the stator S, equivalent to the Rotors in positions II, III and IV. Of course, the rotor in position III (the slow rotor) must be stationary. It is easy to know it if we know the initial position of the rotors. This was the case (it must be remembered) for Friedman. WARNING! The stator S must be rebuilt once or twice for each message. Indeed, as soon as the rotor in position III advances, we have a new stator S. An example of reconstitution of the stator SWhen we reconstruct the wiring of the cryptogram we can in parallel reconstruct the permuation S which corresponds to the action of the rotors R2, R3, R4 in the case where they are stationary, which is the case for the majority of each cryptogram. Let's take our reconstituted R1 rotor: R1: A U X V I W N E H O T R C Q B Z K S D P J G Y F M LLet's use this wiring to calculate the permutation pKR for i=0 and 1: C:\H5_TOOLS> echo BSXRZTKDNGCHMVOLYQEUPWJAIF | ^ python hebern1_tui.py -K LFS -R 1d -E A -m AUXVIWNEHOTRCQBZKSDPJGYFML C:\H5_TOOLS> echo BSXRZTKDNGCHMVOLYQEUPWJAIF | ^ python hebern1_tui.py -K LFS -R 1d -E B -m TWUHVMDGNSQBPAYJRCOIFXELKZ Let us then present for each line of a message, the clear (p), pK (after the action of the Keyboard), pKR[i] and finally c', the ciphertext before the action of the rotor V and the lampboard and finally the cryptogram (c). (i=0) m 0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 920 1 2 3 4 5 p B S X R Z T K D N G C H M V O L Y Q E U P W J A I F PK 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 pKR(0) A U X V I W N E H O T R C Q B Z K S D P J G Y F M L c’ U S D A L C N E T P Y Z I O G H F Q W K X J B R V M c Q S G E E H V Y F R C E G E Z E U M A W D O N C I J (i=1) m 0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 920 1 2 3 4 5 p B S X R Z T K D N G C H M V O L Y Q E U P W J A I F PK 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 pKR(1) T W U H V M D G N S Q B P A Y J R C O I F X E L K Z c’ Y C S T A V W J N Q O G K U B X Z I P L R D E M F H c U M F N I T W H K E L S X J I X H R U U B J J K F B The permutation S is easily deduced: Since S is the same for every 26 letters, in the following expression, i can have any value. (pKR(i))S = c’Thus the following correspondences are valid whatever the value of i: a.S = u, u.S = s, x.S = d, ...According to the formula “y = PI[x]”, we therefore have: u = S[a], a = S[v], n = S[n], p = S[o], i = S[c], h = S[z], s = S[u], l = S[i], e = S[e], y = S[t], o = S[q], f = S[k], d = S[x], c = S[w], t = S[h], Z = S[r], g = S[b], q = S[s], w = S[d], k = S[p], x = S[j], j = S[G], b = S[y], r = S[f], v = S[m], m = S[l] etc...Ultimately, the permutation S is as follows: 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 U G I W E R J T L X F M V N P K O Z Q Y S A C D B H Reading a cryptogramAs soon as S is reconstituted, we can easily read the entire part of a cryptogram for which the rotor in position III does not move. Note: remember that the text keyb_inv.cry corresponds to the cryptogram and that the plain text corresponds to the inverse Keyboard permutation, repeated several times. C:\H5_TOOLS> more MSGS\keyb_inv.cry QSGEEHVYFRCEGEZEUMAWDONCIJUMFNITWHKELSXJIXHRUUBJJKFBMVXHLL MKBFWLMVGHOXSCGXLWBFGOEPQUAWENYQETSLCBAGPFTFWO C:\H5_TOOLS> more ROTORS\1d.rot AUXVIWNEHOTRCQBZKSDPJGYFML C:\H5_TOOLS> more ROTORS\234.rot UGIWERJTLXFMVNPKOZQYSACDBH C:\H5_TOOLS> python hebern5_tui.py -I 1d:0:234:0:5 -E ZZAAAZN -d ^ < MSGS\keyb_inv.cry BSXRZTKDNGCHMVOLYQEUPWJAIFBSXRZTKDNGCHMVOLYQEUPWJAIF BSXRZTKDNGCHMVOLYQEUPWJAIFBSXRZTKDNGCHMVOLYQEUPWJAIF- Conclusion: From the moment we know the wiring of the rotors in positions I and V, it is easy to reconstruct the permutation S (R2.R3.R4) for each message. In some cases, a message uses two S permutations if the rotor in position III moves forward. In any case, the cryptologist is able to decipher more than 95% of the texts of the day's messages easily, assuming that the enemy uses encryption mode (DIRECT mode). Web Links
|