During the second world war, the German military used a special encryption machine called ``Enigma'' to encode its messages. Basically, the Enigma machine generated, given a ``seed'', a sequence of numbers that appeared sufficiently random to make them very difficult to crack, even if the internal details of the machine were known.
The allies had captured some of the Enigma machines, so they did know the internal workings, but much of the foundations of modern computer science were developed in an attempt to crack the German messages (usually with a fair amount of success).
It's beyond the scope of this paper to describe the internals of the Enigma machine and encoding technique, but here are a couple of references. See ``The Code Book'', by Simon Singh, or take a look at the web site: