9
$\begingroup$

The British decrypted the German enigma because they knew that they would repeat the message key twice at the start of every message.

Of course, technology to encrypt enigma without the repetition using cribs was developed later but only after it was cracked before.

The encryption key for the Enigma messages changed daily but what if the Germans also specified an amount of nulls before the message begins. Then they wouldn't just have changed plugboard settings and rotor settings every day but would have also put X amount of gibberish in front of every message.

Would this have made the Engima significantly harder to crack?

$\endgroup$
11
$\begingroup$

No, padding would make the message much easier to crack. This is a great example of why cryptography is left to the professionals (I am not a professional cryptographer, I'm not even a very good amateur one). Amateurs tend to just make things worse.


First problem is the Enigma had no way to produce a "null". It was only capable of producing letters.

Military Enigma Machine

The nearest equivalent of your scheme would be to pick a letter to use as padding (for example, A) and then add that at the start of the message. Yes, it makes it a bit harder to find the KEYKEY repetition, but not much. You just need to slide your window of six characters over a bit and cryptographers were already doing such sliding window analysis to find other cribs.

But because it's always the same letter at the start of the message it gives the cryptographer a very reliable crib.

(For this answer I'm ignoring the plugboard and rings, there were other techniques to work those out).

Let's say the Germans always put at least two padding letters before the key. And let's be generous and say they choose a different padding letter every day. Now the cryptographer knows at least the first 2 letters are going to be the same letter, and there's a very good chance the next letters are also the same. This provides the cryptographer with a very small set of possible texts to work through. Since they're right at the start of the message, they can reveal the rotor settings.

Now any setting can quickly be eliminated if decryption does not result in a message which starts with at least two identical letters.

It doesn't even do a very good job at masking the key, since it's still known that the repeated key will start somewhere in the first N characters (where N is the maximum amount of padding the Germans use). It adds, at most, N - 1 more possibilities.

A A K E Y K E Y

A A A K E Y K E Y

A A A A K E Y K E Y

...and so on...

This is not worth the cryptography gold that is the padding.


The British decrypted the German enigma because they knew that they would repeat the message key twice at the start of every message.

While this was the first and most important crib, and it was found by the Poles, different branches of the German government and armed forces had different procedures for using the Enigma which changed over the war. This flaw did not last long. For example, by 1937 the German Naval Enigma had already rectified this flaw but was cracked anyway.

Key repetition was just one of many the Poles and British had available to them. "Pinches" (stealing code books) were one, but the most reliable was the methodical Germans themselves.

The cryptographers knew, for example, that certain operators would always end a message with H E I L H I T L E R, or begin a weather report with the same phrasing, or that somewhere in the message would appear the name of their unit, or location, or any number of other likely texts.

The operators also provided their own cribs. The person encrypting the message had to come up with a key. Humans are very bad at producing randomness. A radio operator, possibly in the field, possibly tired, hungry, cold, has to come up with dozens of unique keys every day. They're going to get sloppy. The cryptographers could use this to guess what the key is likely to be, or eliminate unlikely keys (for example, it's not going to be AAA).

Furthermore, they could identify individual radio operators by how they transmitted their Morse Code, known as a "fist". Certain operators would have certain ways of picking their keys, or certain ways of writing their messages to provide cribs, and the cryptographers could use this to their advantage.

The Enigma machine had other mathematical flaws which were exploited. Rather than going into them here, I recommend Numberphile's excellent videos on the subject.

In addition Simon Singh's book on code breaking, "The Code Book".

$\endgroup$
  • $\begingroup$ Regarding the "fist", did this information actually reach cryptographers at Bletchley Park? The cryptographers weren't listening to the transmissions themselves, but reading transcriptions produced by the listening stations. Did the listening stations record information about the "fist" on these transcriptions? $\endgroup$ – Max Jun 27 '16 at 10:12
  • $\begingroup$ @Max Good question! I know the cryptographers generally worked with paper transcriptions of the message. I don't know at what point in the chain things like radio direction finding and fist were analyzed to determine the transmitting unit. I lost my copy of The Hut Six Story which would probably contain this detail. $\endgroup$ – Schwern Jun 27 '16 at 20:50
  • 1
    $\begingroup$ The transmitting and receiving unit were identified by callsign: "For each message the traffic analysis recorded the radio frequency, the date and time of intercept, and the preamble—which contained the network-identifying discriminant, the time of origin of the message, the callsign of the originating and receiving stations, and the indicator setting." (en.wikipedia.org/wiki/Cryptanalysis_of_the_Enigma) Analysis of "fist" would have only helped to distinguish individual operators within a unit. $\endgroup$ – Max Jun 27 '16 at 20:56
  • $\begingroup$ I did not understand from the question that the 'nulls' had to be a specific character. They could be random hammering on the keyboard. $\endgroup$ – Will Jun 28 '16 at 8:14
  • 1
    $\begingroup$ @Schwern the day key specifies how many random nulls there are, not what they are. The decrypter would decrypt them, but ignore them. I've played with and amateur attacked the the Enigma and I can't see the problem here. If the viable number of random nulls were between the first and second instance of the message key they would complicate the Polish attack. $\endgroup$ – Will Jun 29 '16 at 5:50
2
$\begingroup$

All that would have done is change the length of the message. Enigma is a per-character substitution cipher. This means that pre-pending padding will not change anything about the security of the message. So the solving method would not have been affected.

After putting X amount of gibberish then the resulting settings is exactly the same as another set of rotor positions (with possibly only the last rotor changing).

$\endgroup$
  • $\begingroup$ It does change the security, but not by much, and it adds a critical flaw. Without the padding it is known that the first three letters repeat (this operational flaw didn't last long). They will always be of the form A B C A B C. That repetition can be exploited. With the padding this crib has been slid over an unknown number of letters. This adds a small amount of additional complexity to finding the repeated key. But the padding itself acts as a very reliable new crib. $\endgroup$ – Schwern Feb 13 '16 at 21:01
  • $\begingroup$ @Schwern the repetition of the message key was stopped before the war began. This is why the Polish attack stopped working. $\endgroup$ – Will Jun 28 '16 at 8:15
  • $\begingroup$ @Will The naval enigma corrected that flaw long before the war, but others did not until May 1940. $\endgroup$ – Schwern Jun 29 '16 at 3:06
  • $\begingroup$ @Schwern you are right about the dates. $\endgroup$ – Will Jun 29 '16 at 6:00
0
$\begingroup$

The British decrypted the German enigma because they knew that they would repeat the message key twice at the start of every message.

The Poles decrypted the Enigma because the message key was repeated at the start of each message.

The encryption key for the Enigma messages changed daily but what if the Germans also specified an amount of nulls before the message begins. Then they wouldn't just have changed plugboard settings and rotor settings every day but would have also put X amount of gibberish in front of every message.

Some variable number of random letters between the two message keys would have made the Polish attack dramatically harder. I have not done any amateur cryptanalysis on this but at first glance it is N^26 harder where N is the maximum number of random letters that a day key can specify.

Would this have made the Engima significantly harder to crack?

Yes. The Poles were very motivated to crack the Enigma, so perhaps they would have succeeded anyway. Perhaps they would have attacked the Enigma in the manner it was attacked by the Brits when the war started. But nobody else believed it crackable. My own notes: http://williamedwardscoder.tumblr.com/post/145745642718/a-brief-history-of-the-enigma-and-the-pre-war

Of course, technology to en?crypt enigma without the repetition using cribs was developed later but only after it was cracked before.

Exactly. The crucial history is that the Enigma was believed unbreakable by the British and French until they were told by the Poles that they had broken it. Mindset is very important. Would the Brits have cracked it if the Poles hadn't shown them their attacks?

However, some variable number of random nulls between the two copies of the message keys is nothing compared to simply omitting the repetition of the message key in the first place! And that's what the Germans eventually did. If they'd never repeated the message key, perhaps the Poles would have failed to develop other attacks and perhaps the Brits wouldn't even have tried?

What is interesting about this is that perhaps Bayes theorem - which Alan Turing discovered (probably independently) to break Enigma - could be used to assign some probability to this alternative history? :)

$\endgroup$
  • $\begingroup$ How would the receiving station know what the random letters are? Without that they can't decrypt the message. Is it not just a longer key? $\endgroup$ – Schwern Jun 29 '16 at 3:08
  • 1
    $\begingroup$ @Schwern they just have to know how many. The day key is basically saying "between the first and second copy of the message key, advance the rotors this many positions. Then verify the message key as expected.". Here is my hobby attack on Enigma williamedwardscoder.tumblr.com/post/145830743193/… $\endgroup$ – Will Jun 29 '16 at 5:52
  • $\begingroup$ You're right. I forgot the particular key pressed doesn't matter to the state of the machine, just the number. I'll have to think about the implications. $\endgroup$ – Schwern Jun 29 '16 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.