The Polish cryptographers who cracked the Enigma code

Ask most people who broke the Enigma code and they’ll more than likely reply that it was the boffins and eggheads stationed in Bletchley Park headed by the legendary Alan Turing. However, were it not for the work of a team of Polish mathematicians, Turing and his team would have faced a far more daunting task. Overlooked for decades, this is the story of a team of mathematicians who raced to crack the Enigma machine as the storm clouds gathered over Europe.

Poland was a young country that had only gained its independence after World War I. Its military leaders knew the country had to stay one step ahead of its potential enemies if it had any hope of keeping that independence. One way to ensure it did was to intercept and decode encrypted messages. To this end, Lieutenant Józef Serafin Stanslicki of the Polish Army was charged with setting up a new cypher section in May 1919. The section was the precursor of what would eventually become the Polish Cypher Bureau.

The section soon proved its worth during the Polish-Soviet War of 1919-1921. It became very adept at intercepting the Russians’ rather creaky encrypted signals, which had not advanced from the system they used in World War I. As a result, the Poles were able to keep one step ahead of their enemies and eventually emerge victorious from the conflict after the decisive Battle of Warsaw. After their victory, it was clear to the Poles that successful interception of enemy traffic was one key to securing success in any future conflict.

In 1924, the German Navy began broadcasting a new type of encrypted message that baffled the Poles. Where the Russian messages had been crude and easy to decipher, these new messages appeared impenetrable. It would later emerge that the Navy had switched to encrypting and sending messages by the German-invented Enigma machine.
Enigma was a whole different ball game. Designed at the end of the First World War by German engineer Arthur Scherbius, the Enigma was a commercial cypher machine that would later be adapted for military use by all branches of the German armed forces.

Resembling an oversized typewriter, the purpose of the Enigma machine was to encrypt messages by scrambling them into supposedly indecipherable strings of random letters. When a message was typed on the Enigma’s keyboard, three rotors inside the machine changed each letter of the message into a different one, which would then light up on a display above the keyboard. Each letter was then written down and once the whole message had been scrambled, it was sent via morse code to the operator of a second machine. This operator would then enter the garbled message into his machine and a reflector inside his Enigma would reverse the rotor process, lighting up the original letters that had been entered into the first machine. A plugboard attached to the front of each military version of Enigma further complicated matters by changing each letter typed into the machine before it was altered by the rotors. When Enigma messages started to be picked up by the British, the French and the Poles, linguists were set to work decoding them. These efforts proved fruitless, but the British in particular carried on regardless. The Poles, on the other hand, realised they needed to change tack.

In 1931, the cypher section was merged with the Polish Radio-Intelligence Office to form the Cypher Bureau, headed by Major Gwido Langer and his deputy, Captain Maksymilian Ciężki. Ciężki had long been convinced that the key to cracking encrypted messages lay not in linguistics, but in mathematics. He had taught a secret course in cryptology at Poznań University, three of the students who attended the course showed tremendous promise by approaching codebreaking mathematically instead of linguistically. In 1932, Ciężki hired these students to join the bureau. They were Marian Rejewski, Jerzy Różycki and Henryk Zygalski, and their contribution would prove invaluable in the coming years. But for all their brilliance, they would need a little help from their friends.

In France, the equivalent of the Cypher Bureau was headed by military intelligence officer, Gustave Bertrand. The French unit was very different to its Polish counterpart, relying much more heavily on subterfuge to gain knowledge of German intelligence secrets. Bertrand had recruited Rudolf Stallmann, a silver-tongued German card-sharp, who wormed his way into the company and friendship of one Hans-Thilo Schmidt. Schmidt agreed to work for the French, handing over secret documents obtained from Schmidt’s brother - a high-ranking officer in the German army. One of these documents was a manual to the Enigma machine, as well as the German Enigma settings for September and October 1932. Bertrand, who by this time had already set up an intelligence-sharing network between France, Britain and Poland, passed on the manual and the settings to the British and the Poles.

Armed with this new information, Rejewski was able to work out the precise interconnections between the rotors and the reflector in the Enigma machine. This meant that he was able to commission replicas to be built of the Enigma, alongside electromechanical machines he named ‘bombes’ that rapidly sped up the decryption process. These machines allowed Rejewski’s team to finally decrypt German military messages, but their success was soon hampered when the enemy upped their game.

In 1936, the Germans increased the security of their Enigma machines. The settings for the rotors had been changed every quarter of a year, but this was now changed to every month and finally to every day from October onwards. In the same month, the plugboards attached to the front of the German military Enigmas were fitted with extra leads, increasing the number of ways letters could be changed when entered on the keyboard. A further setback occurred in 1937 when the reflectors that Rejewski had exploited to make decryption easier were changed to have different interconnections. Rejewski again managed to work out the changes between the rotors and the new reflectors and by 1938 his team was decrypting 75% of all Enigma messages.

Two further rotors were introduced to German military Enigmas in December 1938, again increasing their complexity. Luckily for Rejewski and the Cypher Board, the Germans made no further changes to the way the machines were set up, meaning the Poles could bypass this increased security, figure out the internal wiring between the rotors and the reflectors and plough on with decryption. Thanks to the efforts of the Cypher Bureau, the Polish knew 95% of the Germans’ order of battle before the invasion of Poland on the 1st of September 1939.

With the storm clouds rapidly gathering, it became obvious to the bureau that a decision needed to be taken before their country was invaded and its work discovered. It was decided that the bureau’s work, its replica Enigmas and its bombes should be passed on to the British and the French.

A meeting was arranged in the Kabaty woods outside of Warsaw on the 26th of July 1939. There, Cypher Bureau chiefs Gwido Langer, Maksymilian Ciężki and Rejewski and his team handed over everything the bureau had on their work cracking the Enigma machine to French cypher chief Gustave Bertrand and his British counterpart, Alastair Denniston. Denniston and the head British cryptanalyst, Dilly Knox, were stunned when they discovered just how advanced Polish codebreaking was. So far, the British had relied on linguists to try to crack Enigma messages. The Poles had proven that the key to cracking the code lay not in linguistics but mathematics. 

When war broke out and Poland fell, it was the work of Rejewski and the Polish Cypher Bureau that led the way for Alan Turing and his team to not only decipher Enigma messages, but also to build the Colossus machine at Bletchley Park that would break the much more sophisticated German Lorenz cypher that superseded Enigma. This, it has been argued, shortened World War II by as much as two years.

After the war, the achievements of Rejewski and the Cypher Bureau were all but forgotten as Poland went into a communist deep freeze for nearly fifty years. To the outside world, it was Turing that had cracked the Enigma and shortened the war. Indeed, by the time The Imitation Game film about Turing was released in 2014, the efforts of the Polish cryptographers had been reduced to just one line.

Luckily, thanks mainly to the efforts of the Polish government, the names of Marian Rejewski, Jerzy Różycki and Henryk Zygalski are finally getting the recognition they deserve. Today, a plaque commemorating their contribution to the war effort stands outside Bletchley Park, reminding everyone that were it not for the efforts of the cryptographers of the Polish Cypher Bureau, World War II could have dragged on for a lot longer than it did.