Thread: public key functions for postgresql ?

public key functions for postgresql ?

From
Gianni Mariani
Date:
I need to store some sensitive data and I want to use public keys so
anyone can encrypt the data but can only be decrupted by certain users.

Anyhow, are there any loadable modules that do public key encryption for
Postgresql ?  I'd like to access these functions in plpgsql.

It's probably not that hard, just don't want to re-invent the wheel.  I
could probably do it from plperl since there are plenty of perl PK tools.

Reccomendations ?

G


Re: public key functions for postgresql ?

From
Tom Lane
Date:
Gianni Mariani <gianni@mariani.ws> writes:
> Anyhow, are there any loadable modules that do public key encryption for
> Postgresql ?  I'd like to access these functions in plpgsql.

Look in contrib/pgcrypto.

            regards, tom lane

Re: public key functions for postgresql ?

From
Gianni Mariani
Date:
Tom Lane wrote:

>Gianni Mariani <gianni@mariani.ws> writes:
>
>
>>Anyhow, are there any loadable modules that do public key encryption for
>>Postgresql ?  I'd like to access these functions in plpgsql.
>>
>>
>
>Look in contrib/pgcrypto.
>
>            regards, tom lane
>
>
Thanks for the pointer, I read the docs and I see no public key crypto
stuff there.  Did I miss somthing ?

I suppose it would be a good point to start adding some new public key
functions.




Re: public key functions for postgresql ?

From
Bruce Momjian
Date:
I think you are right --- there are no public key functions in there.
Perhaps the easiest way would be to detect a public-key library and make
functions in pg_crypto to call them if they exist.

---------------------------------------------------------------------------

Gianni Mariani wrote:
> Tom Lane wrote:
>
> >Gianni Mariani <gianni@mariani.ws> writes:
> >
> >
> >>Anyhow, are there any loadable modules that do public key encryption for
> >>Postgresql ?  I'd like to access these functions in plpgsql.
> >>
> >>
> >
> >Look in contrib/pgcrypto.
> >
> >            regards, tom lane
> >
> >
> Thanks for the pointer, I read the docs and I see no public key crypto
> stuff there.  Did I miss somthing ?
>
> I suppose it would be a good point to start adding some new public key
> functions.
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: public key functions for postgresql ?

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I think you are right --- there are no public key functions in there.

You're right.  Now that I think about it, there was some discussion to
the effect of we couldn't include any actual encryption (as distinct
from crypto hashes) for fear of problems with various benighted export
laws.

            regards, tom lane

Re: public key functions for postgresql ?

From
Franco Bruno Borghesi
Date:
This package seems to be very good, it includes all kind of asymetric encryption/decryption functions, and data types to store keys into postgresql tables.

It still unfinished, but maybe it already incorporates the functionality your looking for.

Docs:
http://www.dimensional.com/~bgiles/pkixdoc/book1.html

Download:
http://www.dimensional.com/~bgiles/index1.html

hope it helps.



Attachment

Re: public key functions for postgresql ?

From
Gianni Mariani
Date:
Franco Bruno Borghesi wrote:

> This package seems to be very good, it includes all kind of asymetric
> encryption/decryption functions, and data types to store keys into
> postgresql tables.
>
> It still unfinished, but maybe it already incorporates the
> functionality your looking for.
>
> Docs:
> http://www.dimensional.com/~bgiles/pkixdoc/book1.html
> <http://www.dimensional.com/%7Ebgiles/pkixdoc/book1.html>
>
> Download:
> http://www.dimensional.com/~bgiles/index1.html
> <http://www.dimensional.com/%7Ebgiles/index1.html>
>
> hope it helps.


Thanks, it does.

How much is this being used ?