Re: Encoding passwords

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>, Mike Arace <mikearace(at)hotmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Encoding passwords
Date: 2001-09-27 23:15:58
Message-ID: 200109272315.f8RNFwN17489@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > That said if hostile people get to the stage where they can read the
> > encoded passwords, you're probably screwed anyway - they're likely to be
> > able to do other things some even more undesirable. So it's not really a
> > big deal compared to other issues.
> >
>
> We have new code in 7.2 that will do MD5 encryption of passwords stored
> in pg_shadow. We add the salt to the front of the password before
> passing through MD5. You are suggesting putting the salt at the end.
>
> I guess the issue is that if you can get the salt part found out, you
> can use that to attack the password part. Also, consider that we use
> the username as the salt as stored in pg_shadow. We can easily put the
> salt in the back, but then there is the risk that a long password would
> not take into account the salt. My feeling that this is more a
> theoretical concern and we may be opening ourselves up to more problems
> if we make the change.

OK, I have applied the following patch to the MD5 code that puts the
salt at the end. We can't change the crypt() stuff because that is
being used in older releases.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 1.4 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2001-09-27 23:20:27 Re: Performance question (stripped down the problem)
Previous Message Randal L. Schwartz 2001-09-27 22:47:15 Re: Randomize Result Set Order