The German military used the Enigma cipher machine during WW2 to keep their communications secret. The machine was available commercially during the 1920s, but the military potential of the device was quickly realised and the German army, navy and air force all used a more developed model of the machine to encipher their messages believing that it would make these communications impenetrable to the enemy.
The Enigma machine is an electro-mechanical device that relies on a series of rotating 'wheels' or ‘rotors’ to scramble plaintext messages into incoherent ciphertext. The machine's variable elements can be set in many billions of combinations, and each one will generate a completely different ciphertext message. If you know how the machine has been set up, you can type the ciphertext back in and it will unscramble the message. If you don't know the Enigma setting, the message remains indecipherable.
The German authorities believed in the absolute security of the Enigma. However, with the help of Polish mathematicians who had managed to acquire a machine prior to the outbreak of WW2, British code breakers stationed at Bletchley Park managed to exploit weaknesses in the machine and how it was used and were able to crack the Enigma code.
Breaking the Enigma ciphers gave the Allies a key advantage, which, according to historians, shortened the war by two years thus saving many lives.
This Enigma Machine was seen at Bletchley Park.