Re: So we're in agreement....

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vince Vielhaber <vev(at)michvhf(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Hannu Krosing <hannu(at)tm(dot)ee>, The Hermit Hacker <scrappy(at)hub(dot)org>, "Sverre H(dot) Huseby" <sverrehu(at)online(dot)no>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: So we're in agreement....
Date: 2000-05-07 19:34:09
Message-ID: 19075.957728049@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Vince Vielhaber <vev(at)michvhf(dot)com> writes:
> You're right, it wouldn't work. It should've been like this:

> CLIENT: md5(salt_from_server + md5(username + password)))

> SERVER: md5(salt_from_server + stored_password)

> The "salt_from_server" is your random salt. The fixed salt is the
> username.

You're still not getting the point. I refer you to Ben Adida's
original, correct description of the way to do this:

> - client requests login
> - server sends stored salt c1, and random salt c2.
> - client performs hash_c2(hash_c1(password)) and sends result to server.
> - server performs hash_c2(stored_pg_shadow) and compares with client
> submission.
> - if there's a match, there's successful login.

There have to be *two* random salts involved, one chosen when the
password was set (and used to cloak the stored password against people
with access to pg_shadow) and one chosen for the duration of this
password challenge (and used to cloak the challenge transaction against
people sniffing the packet traffic). If you give up either one of those
bits of randomness then you lose a great deal.

Using the username instead of an independent random value to salt the
stored password is not a small change, it is a fundamental weakening of
the security system. If you don't see that this is so then you don't
understand anything about cryptography.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hannu Krosing 2000-05-07 20:11:34 Re: So we're in agreement....
Previous Message Hannu Krosing 2000-05-07 19:29:39 Re: You're on SecurityFocus.com for the cleartext passwords.

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2000-05-07 20:11:34 Re: So we're in agreement....
Previous Message Hannu Krosing 2000-05-07 19:29:39 Re: You're on SecurityFocus.com for the cleartext passwords.