Re: Where do you store key for encryption

From: "Naoko Reeves" <naoko(at)lawlogix(dot)com>
To: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Where do you store key for encryption
Date: 2009-11-18 04:00:32
Message-ID: 076DC33A3D38CE4BBC64D35DDD9DE70C098DA73E@mse4be2.mse4.exchange.ms
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Got it.
Thank you very much for your advice.

-----Original Message-----
From: Merlin Moncure [mailto:mmoncure(at)gmail(dot)com]
Sent: Tuesday, November 17, 2009 8:54 PM
To: Naoko Reeves
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Where do you store key for encryption

On Tue, Nov 17, 2009 at 10:12 PM, Naoko Reeves <naoko(at)lawlogix(dot)com>
wrote:
> Hi,
>
> We have web application and encrypt PII columns. We use
encrypt/decrypt
> function for this.
>
> Currently we hard coded the key in postgresql function which I am not
sure
> of it.
>
> I did google it and people suggest that it needed to be stored in
physically
> isolated location (storing decryption key on the same server as the
data is
> kind of like writing your PIN on your ATM card).

Key management is a complicated topic, but I can tell you this for
sure: storing the key in the function is one of the worst places to do
it :-) Any user can pull down the entire pg_proc table and see all
your functions! (this is somewhat fixable, but It's still not the
right place IMO).

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2009-11-18 04:16:36 Re: passing parameters to multiple statements
Previous Message Merlin Moncure 2009-11-18 03:54:05 Re: Where do you store key for encryption