Re: Encrypted column - Mailing list pgsql-general

From Marko Kreen
Subject Re: Encrypted column
Date
Msg-id e51f66da0706050935u38a08566v57f1005b724315dd@mail.gmail.com
Whole thread Raw
In response to Re: Encrypted column  ("Brian Mathis" <brian.mathis@gmail.com>)
Responses Re: Encrypted column  (Joe Conway <mail@joeconway.com>)
List pgsql-general
On 6/5/07, Brian Mathis <brian.mathis@gmail.com> wrote:
> pgcrypto also supports md5, so I'm not sure what you're referring to
> here.

digest(psw, 'md5') vs. crypt(psw, gen_salt('md5'))

> As I already mentioned, *salting* before you hash is a very
> important step.  I'm not sure if you saw that in my post.  Without a
> salt, it's trivial to generate a list of all combinations of md5'd
> strings and their results, up to reasonable lengths.  Then it would be
> very simple to look up each hash and get the original text.  With a
> salt, you need to generate all possible md5s for all possible salts --
> a much harder task.

I dont think its practical method tho'.  Rather, when doing
dictionary-based or bruteforce attack, then if hashes do not
have salts you attack them all at once.

But if they have salts then for each word you try you need to
hash it for each salt.  Which basically gives the effect that
each hash needs to be attacked separately.

In case of attacking one hash the salt does not matter,
only the algorithm counts then.  In that case as i said,
event salted md5 is weaker than des-crypt.

--
marko

pgsql-general by date:

Previous
From: veejar
Date:
Subject: Join field values
Next
From: Marco Colombo
Date:
Subject: Re: PITR Base Backup on an idle 8.1 server