Article View: comp.os.ms-windows.programmer.tools
Article #934Re: Password encryption/de-cryption
From: bdiesel
Date: Wed, 09 Aug 1995 16:51
Date: Wed, 09 Aug 1995 16:51
23 lines
2129 bytes
2129 bytes
In <NEWTNews.807898837.21140.shah@shah.wg.com>, shah@wg.com writes: > >Hi there ! > >I am developing a windows 3.1 app. This app needs to authenticate a user >login by the user name and his/her password. I need to store this password in >some sort of a format in some sort of a file (maybe an ini file). But first I >need to encrypt this password and later on de-crypt to check against the >entered password (or maybe there is a better way - I just don't know yet). >Could any of you please point me in a better way or point me to some known >used technique for this procedure ? The best way I know of is to use a one-way function or a hash function. This is essentially an algorithm that takes some data and encrypts it in such a fashion that the original information cannot be recovered in any way (hence the name one-way function). The ciphered data is unique!! ie there is a one to one mapping from input to output. Thus when a user sets a password, the cipher text is computed and stored (in a clear file). When the user then enters his password, the password is passed through the same algorithm and then compared with the stored cipher text. If they are the same the password is accepted. This means that the ciphered password never has to be deciphered which means that it is difficult to break. I believe this technique is used extensively for storing and checking passwords in Unix. Cheers Bruce Diesel
Technical Details
Message-ID:
<40ap1l$f1@aztec.co.za>Path:
arc1-ca.pugleaf.net!aztec.co.za!usenetReferences:
<NEWTNews.807898837.21140.shah@shah.wg.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!aztec.co.za!usenet From: bdiesel@aztec.co.za@aztec.co.za Newsgroups: comp.os.ms-windows.programmer.tools,comp.os.ms-windows.programmer.networks,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.controls,comp.os.ms-windows.apps.utilities,comp.os.ms-windows.apps.misc,comp.os.ms-windows.apps.comm,comp.lang.c++ Subject: Re: Password encryption/de-cryption Date: 9 Aug 1995 16:51:01 GMT Organization: Aztec Information Management Message-ID: <40ap1l$f1@aztec.co.za> References: <NEWTNews.807898837.21140.shah@shah.wg.com> Reply-To: bdiesel@aztec.co.za@aztec.co.za NNTP-Posting-Host: bdiesel.aztec.co.za X-Newsreader: IBM NewsReader/2 v1.2