"This is the key to cracking the Enigma cipher machine!" Song Hongfei said, writing two lines on the blackboard as he spoke:

First letter (plain text): ABCDE FGHIJ KLMNO PQRST UVWXYZ

The fourth letter (ciphertext): FQHPL WOGBM VRXUY CZITN JEASDK

“Write a pair of the first six ciphertexts of a large number of coded telegrams intercepted in a day into a corresponding table, until all 26 letters are complete. (f1)(f4) represents such letter substitution relationships.”

"Well, for the sake of demonstration, I'll use a few letters as examples here, assuming we have a complete substitution cipher table like this." Song Hongfei then wrote:

Plain text: ABCDEFGH

Ciphertext: CHEFABDG

“We find that A(f1)(f4)=C, C(f1)(f4)=E, E(f1)(f4)=A, denoted as A->C->E->A. This gives us a closed letter ring. Similarly, we can also get another ring: B->H->G->D->F->B. This continues until all the other letters in this cipher table that are not in a ring can be included in a letter ring.”

“Written in a more intuitive form: (A, C, E), (B, H, G, D, F), it can intuitively represent an inherent characteristic of this cipher table, namely the characteristic value representing the number and length of the letter rings in this cipher table. It is composed of two letter rings with lengths of 3 and 5 respectively, and the substitution relationship is A replaced by C, C replaced by E, E replaced by A, and so on.”

The complete 26-letter correspondence table for the combination of the first and fourth letters listed above can be written as: (A,F,W), (B,Q,Z,K,V,E,L,R,I), (C,H,G,O,Y,D,P), (J,M,X,S,T,N,U).

Similarly, the correspondence table for the chain loops formed by the letter combinations of the second and fifth, and the third and sixth can all be written in this form. It can be verified that the 'feature value'—the number and length of the chain loops—are different for different daily keys!

"The reason these letter rings appear is because the three scrambling rotors rotate periodically," Song Hongfei continued. "The number, length, and letter order of these rings are determined by the 'key of the day,' that is, the order and initial position of the three rotors and the settings of the power strip."

"In the structural design of the Enigma machine, the input signal path is connector board -> rotor -> connector board. It can be seen that the replacement setting of the connector board affects the signal entering the rotor and the signal output by the rotor after the change is completed, but does not affect the periodic change of the rotor. Therefore, this is reflected in the fact that some letters in the letter ring will change due to the replacement of the connector board in pairs, but no matter how they are replaced, the length and number of rings remain unchanged, and the characteristic values ​​of the rings can be preserved to the greatest extent!"

Song Hongfei stated firmly: "In other words, the number of rings and the length of each corresponding table are determined solely by the rotor's sequence and initial position, and have nothing to do with the letter replacement settings on the connector board!"

Song Hongfei added, "I have established several mathematical models of matrix permutations, which can be mathematically proven to hold true for any permutation change, and I have already programmed them to be verified on the computer at the ballistics institute."

Song Hongfei pondered for a moment, then said, "From this, I have a vague feeling that we can even deduce the circuit connection state inside the rotor from the ciphertext and the key, since they are essentially just replacements. However, it's too rushed, and I feel that the theoretical proof is not sufficient or rigorous enough. Commander Yu is an expert in mathematical logic, so please review it for me."

Yu Dawei was deeply moved and overwhelmed with shock. He was completely stunned, staring wide-eyed at the deduction process on the blackboard.

He pondered for a long time, as if only then coming to his senses, and exclaimed, "My God! I really can't figure out how you came up with such a brilliant idea!"

"In this way, the 100 billion keys of the power strip will be useless!" Yu Dawei concentrated intently, his mind racing. "We only need to test the different sequences and settings of the rotors one by one, and then we can generate the corresponding letter rings. By comparing them with the letter rings in the correspondence table formed by the 6 keys of the intercepted messages that day, we can determine the sequence and initial settings of the rotors!"

"That reduces the possibilities from a hundred trillion to only one hundred thousand! No, based on the number and length of the letter rings, it's a much smaller number than one hundred thousand! Trying all the possibilities is something we can do!"

Song Hongfei said, "The codebreaker can classify and record all the parent and child loops generated by the combination of the order and initial position of all 100,000 rotors in advance, thus forming a feature value dictionary. Then, by searching in this dictionary, the rotor settings can be obtained more quickly. This method is called 'dictionary attack' in cracking codes."

"After obtaining the rotor settings, do not connect the power strip. Input the intercepted ciphertext according to these settings to obtain scrambled plaintext—because 6 pairs of letters in the message have been randomly swapped. However, you will still get many recognizable words. This letter swapping is just a very simple substitution encryption, which is easy to crack. For example, 'herro' can be reasonably inferred to be 'hello', thus obtaining the power strip settings."

Yu Dawei was filled with admiration.

He looked at Song Hongfei and asked, "Hmm, you said you verified it earlier? You've been coming to the ballistics institute these past few days, saying you're using computers, but it always felt a bit mysterious. It's not just about calculating ballistics; it turns out you've been using it for this too?"

Song Hongfei chuckled and said, "Commander Yu truly has keen insight."

Yu Dawei pointed to the blackboard and said, "Stop flattering me! I really didn't expect you to have such a deep understanding of cryptography! Your deductions really made me use up a lot of brain cells!"

He seemed to remember something else and asked again, "The German cipher machine is absolutely classified. I'm very curious about its internal structure and some of its operating rules. How did you learn such classified information? Well, don't overthink it. This matter is too important. I must report it to the Military Commission—I need to be sufficiently convincing to the higher-ups."

Song Hongfei thought to himself, "I had to ask this question eventually! Of course, I can't say that I actually come from over 70 years in the future, and that I had in-depth knowledge of the cryptography wars of World War II, including the process by which Poland and Britain cracked the German Enigma machine..."

That would be terrible! Yu Dawei might even think he'd gone crazy from overworking his brain.

However, Song Hongfei had already prepared his explanation in the past few days. He slowly said, "The development of the Enigma cipher machine has a long history, from commercial to military applications. There are many models, and some models have been used in countries such as Britain, France, Italy, Poland, the United States, the Netherlands, Switzerland, and Spain, as well as our enemy, Japan. Various countries have long had their own research and application of cipher machines based on the rotary encryption principle."

Song Hongfei added, "However, my country's cryptography development is lagging behind and its technical strength is weak. The creation, application and decryption of cryptography are still in the stage of manual cryptography, and there is very little research on modern cryptographic machines."

Yu Dawei could only manage an awkward smile.

He knew that what Song Hongfei said was true. At that time, due to long-term internal strife and lack of time to deal with external matters, China did not conduct much research on modern cryptography technology.

Song Hongfei said, "I did study this kind of cipher machine based on the rotary encryption principle before, and I even used a computer to perform simulated cracking calculations."

He seemed to ponder for a moment, then slowly said, "The United States has a long history of intelligence gathering against other countries. As early as World War I, they established an organization called the 'Black Room' to decipher foreign coded messages. When I was a graduate student at MIT, the Black Room and the US military were very interested in my research topics, and I participated in their research projects that used computers to perform various calculations. Although they also took measures to keep my information secret, by chance, I was able to learn some secrets from them."

Yu Dawei was taken aback, then nodded as if he had suddenly realized something.

Yu Dawei was secretly surprised, thinking that it was no wonder Song Hongfei knew so many secrets about the German army. If it were American intelligence targeting Germany, this wouldn't be difficult to accomplish. But the fact that he was able to uncover secrets held by American intelligence during their cooperation was astounding. Hmm, this kid is quite capable!

However, the truth of the matter was far beyond Yu Dawei's imagination.

In reality, Song Hongfei's statement was extremely opportunistic. While he was at MIT, the United States did indeed seek to collaborate with him on research, but this was limited to weapon barrel mechanics, precise ballistic analysis and calculation, and electromechanical computers; it did not involve deciphering other countries' codes at all.

What he meant by "using computers to simulate cracking" was that when he was studying cryptography in his later years, he did indeed write programs to crack the German Enigma cipher during World War II.

The truth and falsehood, the reality and the illusion, are the most difficult to distinguish.

Song Hongfei was completely at ease. State secrets are something every country keeps tightly guarded; they would never share them with you, much less help you verify them. Even if intelligence is traded or shared, whether it's reasonable or not, true or false, is for you to judge for yourself! As for the source of the intelligence? No comment!

Song Hongfei, a master of shifting blame, quietly passed the buck to the United States!

Song Hongfei's next words surprised Yu Dawei even more: "The United States has long been able to decipher Japanese coded messages. According to some inside information I have learned, Japan has imported cipher machines similar to Enigma based on the rotary principle from countries such as Germany and Switzerland, and has modified and developed its own cipher machines, which are already in use in its diplomatic and naval departments. The United States has named these Japanese cipher systems 'Green Code,' 'Red Code,' 'Purple Code,' etc."

Yu Dawei was greatly shocked.

In March 1936, the Chinese government established a specialized agency—the Code Deciphering Institute—to conduct research on modern cryptographic technology and decipher Japanese diplomatic codes. However, due to long-term technological backwardness, the institute struggled to make progress, achieving only some success in deciphering low- to medium-level diplomatic codes and manual codes.

In reality, China at that time was not even aware of the existence of Japanese cipher machines, let alone using advanced technology to gather intelligence on foreign powers.

Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like