Turing was assigned to a team working in Hut 8 that was trying to break the German Enigma code, which was generated by a portable machine with mechanical rotors and electrical circuits. It encrypted military messages by using a cipher that, after every keystroke, changed the formula for substituting letters.

