>The encryption is performed bitwise by using two shift registers, >one through which the raw data flows and one through which the key >flows. The outputs of the two shift registers are fed to an XOR gate >and the resulting bit is the corresponding bit of the output, called >a "cipher" in some circles.
This scheme is essentially the same as the "one-time pad" scheme used frequently by spy-types until about the 60's (when other schemes using fancy hardware became more common).
Instead of an XOR function, a look-up table was used - it was called a Vigenere's Tableau.
For info on OTP's and such, see this part of my web page:
http://www.geocities.com/saipan59/clan_radio/otp.htmlUsing the XOR scheme as Uli describes is only secure if the key is changed with every message (as with a OTP). If you keep using the same key, a professional or skilled amateur will break it quickly.
Of course, 'secure' is a relative term - are you trying to hide the content from your kids, or from the NSA?
One of the 'rages' these days for encrypting computer-oriented messages is 'public key encryption'. The PGP software uses it.
As I mentioned in 37.4, the algorithm involves using very large
prime numbers. It is very strong encryption - strong enough that the NSA doesn't like the fact that it's in the public domain.
Pete