The Enigma machines were a series of electro-mechanical rotor cipher machines developed and used in the early- to mid-twentieth century to protect commercial, diplomatic and military communication. Enigma was invented by the German engineer Arthur Scherbius at the end of World War I. Early models were used commercially from the early 1920s, and adopted by military and government services of several countries, most notably Nazi Germany before and during World War II. Several different Enigma models were produced, but the German military models are the most commonly recognised. However, Japanese and Italian models were also in use.
Around December 1932, Marian Rejewski of the Polish Cipher Bureau used the theory of permutations and flaws in the German military message procedures to break the message keys of the plugboard Enigma machine. Rejewski did that without knowing the machine wiring, so the result did not allow the Poles to read any messages. The French had a spy with access to German cipher materials that included the daily keys used in September and October 1932. Those keys included the plugboard settings. The French gave the material to the Poles, and Rejewski used that material and the message traffic in September and October to solve for the unknown rotor wiring. Consequently, the Poles could build their own Enigmas (Polish Enigma doubles). Rejewski was then aided by Polish cryptanalysts Jerzy Różycki and Henryk Zygalski; all three had been hired at the same time. The Polish Cipher Bureau then developed techniques to defeat the plugboard and find all components of the daily key. The Poles began reading the German's Enigma messages. Over time, the German cryptographic procedures improved, and the three mathematicians developed techniques and designed mechanical devices so they could continue breaking the Enigma traffic. As part of that effort, the Poles exploited quirks of the rotors, compiled catalogs, built a cyclometer to help make a catalog with 100,000 entries, built the cryptologic bomb to mechanically search for rotor settings, and made Zygalski sheets. From 1938 onwards, the Germans added complexity to the Enigma machines that finally became too expensive for the Poles to counter. The Poles had six bomby; when the Germans added two more rotors, the Poles needed ten times as many machines, and they did not have the resources.