Enigma
The Enigma was a portable cipher machine, roughly the size of a typewriter, that could encrypt and decrypt secret messages. It used electro-mechanical rotors to convert a message to a secret code, and then another machine could decode that same message and print out the original message. This machine was commercially available beginning in the early 1920s.
Nazi Germany used the Enigma during World War II to send messages about its military maneuvers. Allied mathematicians (cryptologists) broke the code and could anticipate German military maneuvers, although sometimes the Allies would allow an attack to occur successfully in order to avoid signalling to the Germans that their code had been broken. The Allied code-breaking effort was known as ULTRA.