Re: How to encrypt data in Postgresql

From: Benjamin Jury <benjamin(dot)jury(at)mpuk(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to encrypt data in Postgresql
Date: 2003-07-25 15:23:40
Message-ID: 24DC688F52AAD611B60900096BB0B440015D83AE@chapar.mpuk.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> I think if you encrypt MD5 before storing it into the table,
> then there is no
> way to retrieve the corresponding clear text right? since MD5
> is one-way
> encryption..

MD5 is a hash, not encryption. MD5 creates a 16 byte hash of a set of data.
You can then use the hash to compare against a second piece of data to see
if they match. As you can not get back to the original data, its perfect for
passwords, etc.

>From http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html
[The MD5 algorithm] takes as input a message of arbitrary length and
produces as output a 128-bit "fingerprint" or "message digest" of the input.
It is conjectured that it is computationally infeasible to produce two
messages having the same message digest, or to produce any message having a
given prespecified target message digest. The MD5 algorithm is intended for
digital signature applications, where a large file must be "compressed" in a
secure manner before being encrypted with a private (secret) key under a
public-key cryptosystem such as RSA.

Browse pgsql-general by date

  From Date Subject
Next Message Cory 'G' Watson 2003-07-25 15:31:27 Re: Solaris, Postgresql and Problems
Previous Message Doug McNaught 2003-07-25 15:15:17 Re: Solaris, Postgresql and Problems