Re: You're on SecurityFocus.com for the cleartext passwords.

From: Benjamin Adida <ben(at)mit(dot)edu>
To: "Sverre H(dot) Huseby" <sverrehu(at)online(dot)no>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Vince Vielhaber <vev(at)michvhf(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, The Hermit Hacker <scrappy(at)hub(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: You're on SecurityFocus.com for the cleartext passwords.
Date: 2000-05-06 17:17:22
Message-ID: B539CBE2.36F0%ben@mit.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

on 5/6/00 12:45 PM, Sverre H. Huseby at sverrehu(at)online(dot)no wrote:

> Does anyone here really _know_ (and I mean KNOW)
> security/cryptography? If so, could you please comment on this
> scheme? And while you're at it, whats better of MD5 and Unix crypt
> (triple DES ++, isn't it?) from a security perspective?

Finally something I can comment on with a tiny bit of authority :)

The unix crypt command is a sneaky version of DES (I've never heard of
Triple-DES being used for this). Your password is transformed into a DES key
which is then used to encrypt a block of 0's. The result is what's stored in
the password file. Poor Man's Hash, in a sense :)

MD5 is quite standard (as hashing algs go) and much more secure. It allows
for longer passwords, and it's quite fast (easily tens of thousands of MD5
hashes per second on today's midlevel processors). I strongly recommend you
use that.

| store the password in pg_shadow like a unix-style password with salt
| pass the random salt and the salt from pg_shadow to the client
| client crypts the password twice through the routine:
| once using the pg_shadow salt
| another time using the random salt

My first impression of this scheme is that it's quite good. Use MD5 instead
of crypt, and it's great. You've got a good challenge-response setup here,
and with MD5 you can even make your salt much longer than the 2 bytes of
unix crypt salt, thus much more secure.

I like it!

-Ben

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vince Vielhaber 2000-05-06 17:19:16 Re: You're on SecurityFocus.com for the cleartext passwords.
Previous Message Trond Eivind=?iso-8859-1?q?_Glomsr=F8d?= 2000-05-06 17:03:10 Re: You're on SecurityFocus.com for the cleartext passwords.

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2000-05-06 17:19:16 Re: You're on SecurityFocus.com for the cleartext passwords.
Previous Message Trond Eivind=?iso-8859-1?q?_Glomsr=F8d?= 2000-05-06 17:03:10 Re: You're on SecurityFocus.com for the cleartext passwords.