From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2ea9abfbe071a56f X-Google-Attributes: gid103376,public From: "Robert I. Eachus" Subject: Re: Saving and Encoding Passwords Date: 1999/12/01 Message-ID: <38458D86.1C6BB433@mitre.org>#1/1 X-Deja-AN: 555467878 Content-Transfer-Encoding: 7bit References: <38315e1a.0@silver.truman.edu> <87u2m8exf8.fsf@deneb.cygnus.argh.org> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.mitre.org X-Trace: top.mitre.org 944081924 7567 129.83.41.77 (1 Dec 1999 20:58:44 GMT) Organization: The MITRE Corporation Mime-Version: 1.0 NNTP-Posting-Date: 1 Dec 1999 20:58:44 GMT Newsgroups: comp.lang.ada Date: 1999-12-01T20:58:44+00:00 List-Id: Florian Weimer wrote: > Do you need the passwords themselves, or do you want to check whether > the password entered by the user is correct? In the latter case, you > should not store the password itself, but a cryptographic hash of it. > It is considered close to impossible to recover the password from > the hash value if the cryptographic hash function is one of the most > commonly used and thoroughly analyzed (i.e. MD5 or SHA-1). > > If your program needs the passwords themselves (for example, to > authenticate itself with a POP mail server) and you don't want any user > interaction, you can't get much security, because your software must > be able to decrypt the passwords -- and so is a possible attacker. Hmmm... Cryptographic protocols--lots of fun! If the idea is to store multiple passwords for a single user in a fashion that allows the user to enter a single password to access all acounts, the best idea would be to use a hash of the user-entered password as a symmetric (say 3DES) key to decrypt the stored passwords. (Of course you should "whiten" the key by using say the SHA-1 hash of the user-entered password as the ky.) This way a particular user needs only to enter one password to access multiple accounts, even if several people have access to the stored data. One last point, you probably should store ALL information about the accounts, including the number of accounts an individual has, encoded using 3DES. The reason for this is that the user may not want others with access to the same machine to know which accounts he has.... -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...