Re: [GENERAL] SHA1 on postgres 8.3 - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: [GENERAL] SHA1 on postgres 8.3
Date
Msg-id e51f66da0801210816t70651787paca33eacbea7b930@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] SHA1 on postgres 8.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [GENERAL] SHA1 on postgres 8.3  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On 1/21/08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > MD5 is broken in the sense that you can create two or more meaningful
> > documents with the same hash.
>
> Note that this isn't actually very interesting for the purpose for
> which the md5() function was put into core: namely, hashing passwords
> before they are stored in pg_authid.

Note: this was bad idea.  The function that should have been
added to core would be pg_password_hash(username, password).

Adding md5() lessens incentive to install pgcrypto or push/accept
digest() into core and gives impression there will be sha1(), etc
in the future.

Now users who want to store passwords in database (the most
popular usage) will probably go with md5() without bothering
with pgcrypto.  They probably see "Postgres itself uses MD5 too",
without realizing their situation is totally different from
pg_authid one.

It's like we have solution that is ACID-compliant 99% of the time in core,
so why bother with 100% one.

-- 
marko


pgsql-hackers by date:

Previous
From: "Marko Kreen"
Date:
Subject: Re: [GENERAL] SHA1 on postgres 8.3
Next
From: Tom Lane
Date:
Subject: Re: contrib like modules in Red Hat problem, Re: A "bug" report for orafce