The Enigma Cypher Machine
This was actually one of very first electronic computers. The Germans came up with this little device that sent specially encrypted messages to their military units. To keep the Allies from breaking their codes they used a series of cylinders inside that were reset frequently to confuse them. Early in the war Polish codebreakers were able to figure out how these things worked and passed the info onto the English. Throughout the war the Germans thought all their military secrets were indeed secret, but in fact, the Allies were reading all their messages. The trick was too not let on to the Germans that they knew all this lest they change their methods. Therefore the good guys couldn't just react to every single German advance. They had to chose their spots and to figure out clever ways to convince the Germans that they were just lucky or had discovered the information through some other source. The Germans also had no idea that every German spy in England had been discovered, arrested, then released to send back erroneous information back to Hitler.