My crypto Home Page Enigma Cryptanalysis home Page
|
Introduction : TICOM DF-38After the end of World War II, US cryptographic agencies investigated through German archives and questionned POW (Prisonner Of War) about German cryptogaphic methods. This organization was called TICOM (Target Intelligence COMmittee). The documents produced by TICOM were tagged TOP SECRET. Recently, these documents were declassified and many of them can be downloaded on Internet. There are different kinds of document: A, D, DF, I, IF, … "I" correspond to the Interrogation of a POW (written P/W too) and "DF" a translation of a German document. The DF-38 document is written by Dr. Rudolf Kochendörffer, a Geman mathematician belonging to OKH/In 7/IV (a cryptologic service of the Army). This document deals with the mathematical analysis of the commercial Enigma using permutations (like report written by Rejewski). This analysis allows the author to indicate how to recover the rotor wiring from in-depth messages. According to Frode Weierund (the editor of this document), the report from which document DF-38 comes dates back to 1944. The structure and the content of the DF-38 documentThe structure of DF-38
The Content of DF-38
Mathematical vision of the Enigma encryptionThe Dr. Rudolf K. (like Rejewski) used group theory and more specifically permutations to describe the Enigma encryption. Consider the following permutations:
Note: In this formula, the input permutation, which can be the Qwertzu of the commercial Enigma or the steckers of the military Enigma, is not taken into account. Indeed, this permutation is fixed and must be known to the cryptanalyst. It is easy to eliminate it from the plaintext and the ciphertext, and ultimately we can ignore it from our reasoning. In this Web Page, we have not used the same conventions as Dr. Rudolf. Indeed, we believe his method is almost equivalent to Turing's Boxing method. Consequently, we have used the same notation as in our page describing this method Boxing. Moreover, we will use our Simplified Enigma view but with two rotors.
Here is the correspondence between Dr Rudolf's conventions and mine:
Cryptanalytic and true reconstruction of the EnigmaThe cryptanalysis made by Dr.K. does not allow an exact description of the rotors due to the twist and offset effects (cf. rotor). In fact, in the header of the enemy messages the indicator contained the initial position of the rotors. In addition, this position corresponded to a pronounceable four-letter word. Thanks to this, the real wiring of the rotors could be reconstructed. Reconstruction of the Fast Rotor Wiring - TheoryThe general approach to finding the Enigma's wiringIn the general formula stated above, each permutation of the Enigma is related to the position of the rotors. Here are the results for two consecutive positions.
\( E_{00} = N(MUM^{-1})N^{-1} \) If we then know N, we can create sequences Q that depend only on M.
If we pose: \( Q_{0,0} = N^{-1} E_{0,0} N = MUM^{-1} \) We can therefore deduce M and then U (in the real Enigma, we can also find the left rotor). The X permutation
If we pose: \( X = N \; P \; N^{-1} \; P^{-1} \) Note: I didn't understand the demonstration of the equation which links \( E_{00} \: and \: E_{01} \). After a complete revolution of the fast rotor we obtain a similar formula. Finally, we have three equations from which we can find X:
In general : \( E_{m+1,i+1} = Y \; E_{m,i} \; Y^{-1} \) X and the fast rotor wiring (N)We can create an equation from which we can find N.
\( X = N \; P \; N^{-1} \; P^{-1} \) Then ConclusionWe see that Dr. Rudolf's method is very similar to Turing's Boxing method. Indeed, Dr. Rudolf's X-permutation is simply the inverse of Turing's gamma permutation. The main difference between the two methods is that Turing uses the concept of Box, and Dr. Rudolf uses alphabets directly. In my opinion, using Boxes greatly speeds up calculations but is not theoretically necessary. Reconstruction of the Fast Rotor Wiring - PraticeIntroductionDr. Rudolf's method allows, at a minimum, the reconstruction of the wiring of the right rotor (the fast rotor) and the middle rotor. Under good conditions, it allows the reconstruction of the wiring of all the rotors and the reflector. The Qwertzu is supposed to be known and correspond to the Qwertzu of the commercial Enigma. In this section, we are only interested in the reconstruction of the right rotor (the fast rotor). The data collectedBy listening to the enemy traffic, the Germans realized that it was in-depth messages originating from an Enigma machine. From these in-depth messages, the Germans deduced the plaintext of the messages and ultimately the substitution alphabets for several positions of the Enigma rotors. Note: The fact that the enemy indicated the external key as an indicator was a great help in verifying the in-depth aspect of the messages.
Notes:
Calculate the X permutation
We have two equations from which we can deduce the permutation X.
We know E00 and E01. If we want to find the X permutation, we just put E00 under E01 and assume that it is the encryption of E01. Unfortunately, for each pair E01/E00, there are several solutions. In fact there are 12 solutions (n = 2 * 3!, cf. rotors). Let's give three solutions: E01 = ((0,4)(1,5)(2,3)) ((0,4)(3,2)(1,5)) ((0,4)(1,5)(2,3)) E00 = ((0,1)(2,5)(3,4)) ((0,1)(2,5)(3,4)) ((4,3)(1,0)(2,5)) Ya1 = ((0)(4,1,2,3)(5)) Ya2 = ((0)(4,1,3,2,5)) Ya3 = ((0,4,3,5)(1)(2)) ... For the E10/E11 pair, there are also 12 solutions, among them, there are: E11 = ((0,2)(1,4)(3,5)) ((0,2)(4,1)(3,5)) ((0,2)(1,4)(3,5)) E10 = ((0,5)(1,3)(2,4)) ((0,5)(1,3)(2,4)) ((4,2)(1,3)(5,0)) Yb1 = ((0)(2,5,4,3)(1)) Yb2 = ((0)(2,5,4,1,3)) Yb3 = ((0,4,3,5)(2)(1)) ... The correct solution must be common for each pair (E00/E01 and E10/E11). Unfortunately there are still 6 solutions common to the two pairs (including Ya2 and Ya3):
Fortunately, X can also be calculated from E20 and E21: E21 = ((0,1)(2,3)(4,5)) ((0,1)(2,3)(4,5)) ((0,1)(2,3)(4,5)) E20 = ((0,3)(1,4)(2,5)) ((0,3)(2,5)(1,4)) ((0,3)(5,2)(1,4)) Yc1 = ((0)(1,3,4,2)(5)) Yc2 = ((0),(1,3,5,4)(2)) Yc3 = ((0)(1,3,2,5,4)) ... The correct value of Y is then ((0)(4,1,3,2,5)) which corresponds to Ya2, Yb2 and Yc3. This is the only solution common to all three pairs (E00/E01, E10/E11 and E20/E21). Then X is equal to the reverse permutation ((0)(5,2,3,1,4)).
Important note: number of Alphabet pairs requiredIn an earlier version of this page, I thought I'd found the solution with only the pairs E00/E01 and E10/E11. In fact, I hadn't calculated the 12 solutions for each pair. If I had, I would have found 6 plausible solutions.Manuel Vázquez & Paz Jiménez–Seral pointed out my error. They also pointed out the link between Rejewski's solution, the Boxing method, and Dr. Rudolf's method: to find the permutation N corresponding to the fast rotor, several alphabets are required, at least five. As you can see, an alphabet corresponds to the permutation of an Enigma at a particular rotor position. But furthermore, when using pairs of alphabets (like Turing or Dr. Rudolf), at least three pairs are required, therefore at least six alphabets (complete or partial). As a reminder, Rejewski found the wiring of the fast rotor from the five alphabets A, B, C, D, E (but he calculated six: A to F). Reconstitution of the permutation N (the fast rotor)If we take the formula which links X to the rotor wiring (N) we have: \( X \; P = N \; P \; N^{-1} \) We have a conjugation, so we can calculate N as we did previously for calculation of X. We obviously have several solutions, for example:
X * P = ((0,1,5,3,2,4)) P = ((0,1,2,3,4,5)) N0 = ((0)(1)(5,2,4)(3))With Sympy: >>> X = Permutation(0)(5,2,3,1,4) >>> P Permutation(0, 1, 2, 3, 4, 5) >>> X * P Permutation(0, 1, 5, 3, 2, 4) >>> N0 = Permutation([[0],[1],[5,2,4],[3]]) >>> X * P == N0 * P * ~N0 True >>> Verification (a posteriori) of the formula linking X and EWith Sympy: >>> E00 Permutation(0, 1)(2, 5)(3, 4) >>> E01 Permutation(0, 4)(1, 5)(2, 3) >>> N.full_cyclic_form [[0], [1], [2, 4, 5], [3]] >>> X = N * P * ~N * ~P >>> E01 == ~X * E00 * X True >>> E11 == ~X * E10 * X True Origin of the traffic analyzed: the Swiss hypothesisThe report by Dr. Rudolf K. aims to show how to find the wiring of a commercial Enigma from in-depth messages. But where does this traffic come from? I think it comes from the Swiss army. Indeed, we know that the Swiss were equipped with Commercial Enigmas. On the other hand, that at least at the beginning of their use, dozens (or even hundreds) of messages were sent with the same key (in-depth messages). On the other hand, the reflector had not been modified (This is the case of the machine analyzed by Dr. Rudolf K.). Finally, we know that the Germans deciphered the Swiss Enigma traffic. All these clues together lead us to deduce that the messages analyzed by Dr. Rudolf K. come from the Swiss army. Christos' article (see References) describes the breaking of the Swiss Commercial Enigma by several countries, including Germany. It so happened that it was precisely the OKH/In 7/VI service, to which Dr. Rudolf K. belonged, which was responsible for analyzing Swiss traffic. Still in Christos' article, we learn that Originally the indicator (showing the starting position of the rotors) was sent in the clear but from August 1942 it was enciphered (see below). As far as I am concerned, this last clue convinces me that it is indeed a Swiss traffic that is handled by Dr. K. The American Coast Guard, in 1940, were confronted with the a Commercial Enigma whose traffic had the same characteristics and it was indeed traffic of Swiss origin (link). We are not certain about the origin of the messages but we can say that the cryptologists who created the encryption procedures used were not experts. Indeed, two major mistakes were made:
AcknowledgementsI would like to thank Manuel Vázquez & Paz Jiménez–Seral for enlightening me on several elements concerning the mathematics of the Enigma. ReferencesInternet links
|