🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools
Article #937

Re: Password encryption/de-cryption

#937
From: Andy Dingley
Date: Thu, 10 Aug 1995 00:16
26 lines
1887 bytes
As others have written, the way to go is a one-way algorithm, where
you compare two passwords by comparing their encrypted forms.

A good public key one-way function for this is the knapsack algorithm.
It has the advantage over others that it's *very* easy to understand,
not difficult to verify the security of, and easy to implement in
laguages without good bit-shift operations (like Visual Basic).

The basic algorithm is to take a vector (an array) of seemingly random
numbers. You then chop your plaintext into a vector of bits. Calculate
the product of the two vectors (Start with 0, loop through all the
elements in the vectors and if the bit in the plaintext vector is set,
then add the corresponding element from the key vector)

Cryptographic security and decryptability with this method relies on
complex maths, but you can get basic one-way encryption by using 
any well-distributed set of random numbers.

Using a "salt" is also a good idea.  Look it up in your favourite Unix
(or Minix/Linux) reference book.

--
Andy Dingley                          dingbat@codesmth.demon.co.uk                                          

If all it takes is an infinite number of monkeys with typewriters, 
how come AOL haven't written any Shakespeare yet ?
Technical Details
Message-ID: <808013804.20689@codesmth.demon.co.uk>
Path: arc1-ca.pugleaf.net!dispatch.news.demon.net!demon!codesmth.demon.co.uk
References: <NEWTNews.807898837.21140.shah@shah.wg.com> <26VL52$04D@kelseyuk.demon.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!dispatch.news.demon.net!demon!codesmth.demon.co.uk
From: dingbat@codesmth.demon.co.uk (Andy Dingley)
Newsgroups: comp.os.ms-windows.programmer.tools,comp.os.ms-windows.apps.comm,comp.lang.c++
Subject: Re: Password encryption/de-cryption
Date: Thu, 10 Aug 1995 00:16:45 GMT
Organization: Codesmiths Software Development Ltd.
Message-ID: <808013804.20689@codesmth.demon.co.uk>
References: <NEWTNews.807898837.21140.shah@shah.wg.com> <26VL52$04D@kelseyuk.demon.co.uk>
NNTP-Posting-Host: codesmth.demon.co.uk
X-NNTP-Posting-Host: codesmth.demon.co.uk
X-Newsreader: Forte Free Agent 1.0.82