pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua Tolley <eggyknap@gmail.com>
To: Hengky Lie <hengkyliwandouw@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Field or record level encryption / decryption
Date: Fri, 14 Aug 2009 16:28:20 -0600
Message-ID: <20090814222820.GC3940@eddie> (raw)
In-Reply-To: <B0DCC3D1-A4B7-48B3-B0BD-B38333A56CC0@gmail.com>
References: <697B993A-8A8A-4271-AE98-B7BB4D192608@gmail.com>
	<8763cqqv4c.fsf@dba2.int.libertyrms.com>
	<B0DCC3D1-A4B7-48B3-B0BD-B38333A56CC0@gmail.com>

On Sat, Aug 15, 2009 at 12:07:54AM +0800, Hengky Lie wrote:
> Thanks to all who response my question.
>
> I have checked the doc, but it seems too advance for my postgresql  
> knowledge.
>
> Other question is where can i get pgcrypto modules ?

You haven't told us how you installed PostgreSQL, but you probably did it with
some operating system package. In that case, there's most likely a
postgresql-contrib package (or some other similarly named package) you can
install that will include pgcrypto. Within that package there should be some
SQL file full of "CREATE FUNCTION" statements, which you need to run in each
database where you'd like to use pgcrypto.

> For simple record encryption that contains date field, varchar, integer 
> and text, what encryption i can use ? As far as i know, there is no way 
> to return MD5 result back to its original value. Is this true or not ?

That's a bit beyond the scope of this mailing lists. Different methods and
algorithms have different attributes, benfits, and drawbacks. I'd recommend
studying the subject if you're trying to protect anything seriously. As to
MD5, you're correct that the idea is you can't recreate the original value
without an awful lot of computing time. But again, study the field before
trying to do something serious. It's complex, and easy to get wrong.

- Josh / eggyknap

Attachments:

  signature.asc (application/pgp-signature, 196B) download

view thread (5+ messages)

Message-ID: <20090814222820.GC3940@eddie>
Permalink:  ../20090814222820.GC3940@eddie/
Also on:    postgresql.org/message-id/20090814222820.GC3940@eddie

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: eggyknap@gmail.com, hengkyliwandouw@gmail.com
  Subject: Re: Field or record level encryption / decryption
  In-Reply-To: <20090814222820.GC3940@eddie>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox