Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a264e164b81589da

Jump to content

Talk:Enigma-M4

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 1 year ago by Permissiveactionlink in topic Keyspace : the roller position

Incorrect Calculation !

[edit]

"This measure halved the number of possible roller positions (from 8-7-6 = 336 to 8-7-3 = 168), which meant a weakening of the combinatorial complexity, but at the same time strengthened the machine against the recognized weakness." There is a choice of five single-notch rotors and three double-notch rotors. If you have three double-notch rotors to choose from for the right-hand rotor position and select one of them, there are still seven rotors to choose from for the left-hand rotor. If you select one of these again, six rotors remain, one of which is selected for the centre position. Consequently, you have a total of 7*6*3 = 126 of 336 rotor selection alternatives (3/8 = 37.5%) if the right-hand rotor in every day- or eight-hour key must be a double-notch rotor. (8*7*3 = 168 alternatives would have required the Enigma M4 to offer SIX single-notch rotors. But that was not the case). For the Enigma M4 there are 8*7*6 = 336 rotor sequences for the three right-hand, thick rotors. These can be divided into four groups: X means any rotor, 1 means single-notch rotor, 2 means double-notch rotor. There are (counting from left to right) 120 rotor arrangements of type X-1-1, 90 rotor arrangements of type X-1-2, a further 90 rotor arrangements of type X-2-1 and 36 rotor arrangements of type X-2-2. Because the German High Command of the Navy ("OKM", "Oberkommando der Marine") had ordered that a two-notch rotor should ALWAYS be used as the right-hand rotor, only rotor arrangements of categories X-1-2 or X-2-2 remain. Of these, only 90 + 36 = 126 exist. 210 rotor arrangements were condemned and could no longer be used. I was foolhardy enough to correct the calculation in the article after I pointed it out in the discussion forum. Permissiveactionlink (talk) 07:42, 26 June 2025 (UTC)Reply

Keyspace of Rotor-Groundsettings

[edit]

If you enter a plain text, starting with a groundsetting (e.g. DRY), there are two possibilities: 1. The key alphabet in position DRY belongs to the key period. The first time a letter is pressed, the machine switches to DRZ OR DSZ OR ESZ and only then (!) carries out the first ciphering step WITHIN THE CYCLE PERIOD. The alphabet represented in the rotor setting DRY will be used after 16,900 enciphering steps for the first time ! 2. the key alphabet DRY does NOT belong to the key period. Even then, the machine switches to DRZ OR DSZ OR ESZ when a letter is pressed for the first time, and performs the first cipher step with a key alphabet that is now automatically WITHIN THE CYCLE PERIOD again. (PLEASE TEST THIS WITH THE ENIGMA APP PROVIDED BY BLETCHLEY PARK MUSEUM). Pressing a letter button first moves at least one rotor, and only if this has happened, the en/decryption takes place. For this reason, depending on the rotor combination, the machine has a rotor position key space that corresponds to the respective period length. This depends on the selection and sequence of the three rotors (Deavours and Kruh, "Machine cryptography and modern cryptanalysis", 1985, page 140 : combined effect of the "double stepping anomaly" of the middle rotor and the notch number of 2 in rotors VI, VII and VIII, which is NOT relatively prime to 26). There are four period lengths: 120 of 336 rotor combinations (three rotors from eight) have period lengths of 16,900 (26*25*26), 90 of 336 rotor combinations each have period lengths of 8,450 (26*25*13) and 8,112 (26*12*26) respectively, and 36 of 336 rotor combinations have a period length of only 4,056 (26*12*13) cipher steps. Therefore, the calculation of the effective number of "Groundsettings" ("Grundstellungen" in German) leading to different cipher sequences is incorrect : it is 26*16,900 = 439,400 for every rotor selection and sequence with a cycle length of 16,900. The keyspace for every possible effective M4-Groundsetting is : 26 * ((120/336)*16,900 + (90/336)*8,450 + (90/336)*8,112 + (36/336)*4,056) = 3,969,979/14 = 283,569 + (13/14) Permissiveactionlink (talk) 11:01, 26 June 2025 (UTC)Reply

Keyspace of Ringsettings

[edit]

An Enigma machine cannot read. That's why it doesn't care about letters or digits on the adjustable ring, which also bears the notch(es). The only important thing is the rotational position of the rotors relative to the entry rotor (ETW, "Eintrittswalze" in German) AND the position of the notch(es) of the rightmost and middle Rotor relative to their internal rotor wirings! This relative position can be set in twenty-six different ways for single-notch rotors. And of course the ring position on the third, left-hand rotor is completely irrelevant, it only serves to confuse unauthorized persons: the left-hand rotor does not turn any rotor further to the left! However, the Germans made a second serious mistake with the two-notch rotors (the first was that 2 is not relatively prime to 26, three notches would have been much more successful, and without a serious shortening of the period length !) : the notches are located SYMMETRICALLY exactly opposite each other, at the letter positions A and N of the letter ring respectively. Consequently, the notches can only be adjusted in THIRTEEN ways relative to the internal wiring of the rotor. Depending on the sequence of the three rotors in use, there are therefore three different ring setting keyspaces. For 120 rotor combinations with a period length of 16,900 and only single-notch rotors on the right and centre position, there are 26*26 = 676 ring positions each, for 180 rotor combinations with a two-notch rotor (Period length 8,450 or 8,112), EITHER on the right OR in the centre, there are 26*13 (or 13*26) = 338 ring positions each, and for 36 rotor combinations with a two-notch rotor on the right AND in the centre (length of period 4,056), there are ony 13*13 = 169 ring positions each.

There are by no means 336*676 = 227,136 different key periods in the Enigma M4. Instead, there are only (120*676 + 180*338 + 36*169) = 148,044 selectable key periods. A loss of 35 %.

The combined keyspace for the Ringsettings of the Enigma M4 therefore is as follows : ((120/336)*676 + (180/336)*338 + (36/336)*169) = 49,348/112 = 440 + (17/28) Permissiveactionlink (talk) 12:43, 26 June 2025 (UTC)Reply

Complete Enigma M4 Keyspace

[edit]

Assuming that the two thin reflectors can be combined with the two thin rotors as required (thin reflector B and thin rotor gamma or thin reflector C and thin rotor beta can be used together), and that exactly 10 connectors must always be plugged into the plug board, the key space of the Enigma M4 is calculated as follows: 4 (possible combinations of thin reflector and thin rotor), 8*7*6 = 336 (possible combinations of three rotors out of eight), 283,569 + (13/14) (keyspace of effective rotorsettings), 440 + (17/28) (keyspace of ringsettings), 150,738,274,937,250 (10-"Stecker" combinations in the plugboard)

The product of these numbers is the Enigma M4 keyspace. Incidentally, it is by no means a miracle that an integer appears as the solution : 25,312,469,471,473,136,518,566,000 = 2.5*10^25. This corresponds to 84.39 bit, and the unicity length is 24,11 letters.

I apologise prophylactically for any errors in the use of the English language. As a German, it goes without saying, that I do not have an acceptable command of the language. Permissiveactionlink (talk) 13:15, 26 June 2025 (UTC)Reply

Ringsetting of the thin rotor

[edit]

"The only requirement for this was that the spell key of the U-boats was chosen so that it began with "A". Then the left cylinder was in exactly the position in which it worked together with the matching VHF in the same way as the corresponding VHF of the other Enigma models."

This only applies if the day key for the ring position of the thin rotor also specifies "A". The thin rotor had no notches, but still had an adjustable rotor ring (see Bletchley Park App, M4, "ringsetting"). It only served to confuse unauthorised persons. If this ring (not the rotor !) is NOT set to "A", then the rotor in viewing window position "A" together with its thin reflector is NOT compatible with the corresponding thick reflector. Permissiveactionlink (talk) 18:40, 26 June 2025 (UTC)Reply

Why not use a settable reflector instead ?

[edit]

A settable reflector has the disadvantage that its contacts (and 13 letter interchanges!) are only shifted cyclically. Therefore, since compatibility with the Enigma M3 of coastal radio stations was to be maintained, the original, thick reflectors B and C would have had to be made adjustable. However, this is not a cryptographic reinforcement, as the opponent only has to move the already known reflector a maximum of 25 times for a single step to find a plaintext (provided the remaining key has been solved). With a duo of thin reflector and adjustable thin rotor, this shiftability is no longer present : in each of the 26 settings of the thin rotor, there is a unique reflector which, by turning it, does not lead to the other 25 shifted old thick reflectors : only in a single position of the thin rotors one of the two thick reflectors is reproduced. The wiring of the thin rotor is therefore much more difficult to reconstruct. Needless to say, the combination of thin reflector B and thin rotor γ is just as incompatible with Enigma M3 machines as a combination of thin reflector C and thin rotor β.

How many possibilities were there on the German side to replace an existing thick reflector with a combination of thin reflector and adjustable thin rotor in such a way that the internal wiring of the thick reflector is exactly reproduced in only one setting of the thin rotor ? If you choose any internal wiring for the thin rotor, then there are 26! wiring possibilities. In order to fulfil the demand for compatibility with the thick reflector, there is then only one possible wiring with 13 contact bridges remaining for the thin reflector. You can also argue the other way round: if you select any thin reflector, then you have 25!! = (26!/(2^13 * 13!)) different wiring options. In order to achieve compatibility with the thick reflector in one setting position of the thin rotor, a thin rotor can then be wired to (2^13 * 13!) different alternatives. The product of both wiring numbers again provides 26! alternatives. Permissiveactionlink (talk) 11:23, 2 July 2025 (UTC)Reply

Keyspace : the roller position

[edit]

"There are 26 different roller positions for each of the four rollers. (The reverse roller cannot be adjusted.) A total of 26^4 = 456,976 roller positions are therefore available (corresponds to just under 19 bit). If the ring position is assumed to be known, 26^3-26^2 = 16,900 initial positions to be eliminated as cryptographically redundant. This leaves 440,076 roller positions as relevant (also corresponds to about 19 bit)."

If the ringsetting key is assumed to be known, no key space can be calculated: it was calculated as 676 in the previous calculation point. The key space is always calculated for the case that NO setting of the machine is known. Since 16,900 relevant rotor settings can be selected for the Enigma I (the remaining 676 lead directly to one of the 16,900 relevant positions in the first cipher step), 26*16,900 = 439,400 different, crytographically relevant start positions of the rotors are possible for the Enigma M4 (strictly speaking only if the two right-hand moving rotors are single-notch rotors).

If only 16,900 start positions are relevant for the three right-hand rotors (26*25*26, only these three actually rotate), and the thin rotor can be set in 26 different positions, why should 26^4 - (26^3 - 26^2) relevant start positions exist for the Enigma M4 ? In reality, there are fewer, namely only 26*(26^3 - 26^2) = 26*16,900 = 439,400 (18,75 bit) cryptographically relevant starting positions, and strictly speaking this only applies if single-notch rotors are used in the two positions on the far right. Permissiveactionlink (talk) 11:05, 16 July 2025 (UTC)Reply