From: lwloen@rchland.vnet.ibm.com (Larry Loen)
Subject: Re: Encryption algorythm/code needed...
Date: Thu, 17 Dec 1992 19:03:05 GMT
Reply-To: lwloen@rchland.vnet.ibm.com
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
Organization: IBM Rochester

In article <13DEC92.17873883.0049@music.mus.polymtl.ca>, CT80@music.mus.polymtl.ca (Steph) writes:
|> In article <1992Dec8.131745.13670@ncsu.edu> jlnance@eos.ncsu.edu (JAMES LEWIS NANCE) writes:
|> >
|> >In article <1992Dec7.160128.18678@sbcs.sunysb.edu>, clane@csws2.ic.sunysb.edu (Charles F Lane) writes:
|> >|>
|> >|> >the usernames and passwords.  The code need not be extravagent...  I only
|> >|> >need to encrypt single words (letters and numbers both).
|> >|> >
|> >
|> >|> A very easy way to encrypt data is to use a random number generator.  Suppose
|> >|> you have a string "CHAIR".  Assign a value to your random number generator's
|> >|> seed.  Then add random(256) to the ord of the first character (C, in this
|> >|> case), then random(256) + ord("H"), random(256) + ord("A"), etc.  When adding
|> >|> the random number you should wrap around if the sum is > 255.  In tp just
|> >|> disable range checking.  Decrypting is just as easy -- reassign the original
|> >|> seed value and subtract the "random" number rather than adding.  Code (TP) to
|> >|> encrypt/decrypt a string follows:
|> >|>
|> >
|> >Be careful if you use this, as it is not secure encode multiple things using
|> >the same starting seed.  For example, if you keep your entries like this:
|> >
|> >myusername:mypasswd
|> >urusername:urpasswd
|> >
|> >And you encrypt each line using this method, starting with the same initial
|> >seed, then I can take my username and password, which I know and figure out
|> >what you added to them to encrypt them.  Then I can subtract these numbers
|> >from your username and your passwd.  Since they were encrypted with the same
|> >method and the same key, this will give me your unencrypted name and password.
|> >
|> >
|> >
|> >Jim
|> >.
|> >.
|> I used the same method, with a variant : I would seed a new value to
|> my random number generator, based on the current letter.  So, you
|> start the same way (one seed), but then the encrypted data will not
|> be the same at all after but a few letters since the random number
|> generator will be shooting 'totally' different numbers.
|> 
|> <
|> 
|> 
|> Steph.
|> Who needs a .sig?


AAAAAAAAAAAAAAAAAAAAAAAaaaaaaaaaaaaaaaauuuuuuuuuuggggggggggghhhhhh.

Sorry about that, but I had to get it out.  Nothing personal.

This vampire cannot be killed.  Please, please, please, people, give it up.
This is not something that can be done on the back of an envelope.  You
are all nicely re-inventing known methods that do not work.  They provide
more or less security, but are all well-behind the state of the art by
minimum of forty years.  You will probably defeat the programmer in the
next cublicle and thereby think you are doing well, but a real expert will
simply make mincemeat of all of this stuff.  Some of these methods don't
even require a computer to break!

Could I ask this discussion move over to sci.crypt where others can weigh
in and explain all of this?

-- 
   Larry W. Loen        |  My Opinions are decidedly my own, so please
                        |  do not attribute them to my employer
Newsgroups: comp.lang.c