From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | olly(at)lfix(dot)co(dot)uk |
Cc: | Daniel Martini <dmartini(at)uni-hohenheim(dot)de>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: libpq: passwords WAS: scripting & psql issues |
Date: | 2004-08-19 14:44:57 |
Message-ID: | 15747.1092926697@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> I think the password can't be stored hash-digested because it has to be
> encrypted with a salt established at runtime. If you could just send
> the same hash-digested password over and over, it would be no more
> secure than a plaintext one.
[ looks at code... ] The actual algorithm is
t = md5hash(cleartext_password || username);
p = md5hash(t || salt);
transmit p;
where || means string concatenation. On the server side, t is the value
actually stored in pg_shadow, so it just has to do the second step to
obtain the value to compare to the password message.
In theory we could make libpq accept the password in the form of t
rather than cleartext_password, but I pretty much fail to see the point.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | peter@remindex | 2004-08-19 14:51:10 | Re: select count(*) from pg_stat_activity in V8.0.0 |
Previous Message | Oleg Bartunov | 2004-08-19 14:44:42 | Re: Finally tsearch works ... somehow... remain a few |