Re: Encrypted column

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Brian Mathis" <brian(dot)mathis(at)gmail(dot)com>
Cc: "Tino Wildenhain" <tino(at)wildenhain(dot)de>, "Ranieri Mazili" <ranieri(dot)oliveira(at)terra(dot)com(dot)br>, pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Encrypted column
Date: 2007-06-05 14:39:36
Message-ID: e51f66da0706050739v4d504853va2d3f60719690da@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On 6/5/07, Brian Mathis <brian(dot)mathis(at)gmail(dot)com> wrote:
> On 6/5/07, Marko Kreen <markokr(at)gmail(dot)com> wrote:
> > Both md5 and sha1 are bad for passwords, no salt and easy to
> > bruteforce - due to the tiny amount of data in passwords.
> >
> > Proper ways is to use crypt() function from pgcrypto module.
> > Due to historical accident is has bad name which hints at
> > encryption, actually its only purpose is to hash passwords.
> > Read more in pgcrypto doc.
>
> If you salt them yourself, there's no problem with md5 or sha1, and
> they are arguably more secure than the old "crypt" call. Most modern
> linuxes use md5 for password storage.

No, both md5 and sha1 are actually easier to bruteforce than
the old DES-based crypt. Ofcourse that does not mean that
old DES-crypt is good idea. Pgcrypto's crypt() supports bit
more modern md5crypt and bf-crypt algoriths which give much
higher security margin. It can be argued that bf-crypt is the
"state-of-the-art" algorithm for password hashing.

--
marko

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-06-05 14:40:50 Re: CREATE RULE with WHERE clause
Previous Message Oliver Elphick 2007-06-05 14:32:45 Re: Can someone have a look at my pg_hba.conf file ?

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2007-06-05 14:40:50 Re: CREATE RULE with WHERE clause
Previous Message Oliveiros Cristina 2007-06-05 14:30:41 Re: [SQL] JOIN