Arthur Scherbius, a German engineer, patented his "Chiffriermaschine" in 1918 and marketed the Enigma commercially from 1923 — to banks and businesses who, mostly, did not buy. The German military did: the Navy adopted the machine in 1926, the Army in 1928, and the Air Force followed. Through the 1930s the Wehrmacht's confidence in it grew into doctrine: the machine was considered unbreakable.
In December 1932, mathematician Marian Rejewski of the Polish Cipher Bureau — aided by French intelligence documents from a German spy, Hans-Thilo Schmidt — reconstructed the Enigma's internal wiring using pure mathematics on the machine's key procedure. With Henryk Zygalski and Jerzy Różycki he built tools to recover daily keys: the cyclometer and the perforated sheets ("Zygalski sheets"), then a search machine they called the bomba. By 1938 Polish cryptanalysts could read Enigma traffic routinely — years before anyone in London or Paris believed it possible.
German changes in 1938 (more rotors, altered key procedure) strained the Polish tools. In July 1939, weeks before the war, the Poles handed replicas, documentation and their methods to British and French intelligence at the Pyry conference near Warsaw. The British had been sceptical that a machine could be attacked mathematically; the Polish results changed the entire course of the work that followed.
At Bletchley Park, Alan Turing designed a new machine — the bombe — around Turing-Welchley crib-based logic, refined from the Polish idea. The first bombe, Victory, ran in March 1940; dozens followed, working around the clock against the daily traffic. Naval Enigma was the hardest prize: when the U-boats moved to the four-rotor M4 in February 1942, the Atlantic convoy lifeline went dark for about ten months until the capture of cipher materials and new methods restored the reading.
At its height Bletchley read thousands of messages a month and supplied commanders with decrypted enemy intentions — intelligence codenamed Ultra. Historian Harry Hinsley judged that it shortened the war by two to four years. And then came silence: the entire enterprise stayed secret into the 1970s. The veterans who returned to civilian life could not tell anyone what they had done; the history of the century's most consequential codebreaking was written decades late.