public key functions for postgresql ?

Started by Gianni Marianiover 22 years ago7 messagesgeneral
Jump to latest
#1Gianni Mariani
gianni@mariani.ws

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gianni Mariani (#1)
Re: public key functions for postgresql ?

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

#3Gianni Mariani
gianni@mariani.ws
In reply to: Tom Lane (#2)
Re: public key functions for postgresql ?

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.

#4Bruce Momjian
bruce@momjian.us
In reply to: Gianni Mariani (#3)
Re: public key functions for postgresql ?

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
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#4)
Re: public key functions for postgresql ?

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

#6Franco Bruno Borghesi
franco@akyasociados.com.ar
In reply to: Tom Lane (#5)
Re: public key functions for postgresql ?

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.

#7Gianni Mariani
gianni@mariani.ws
In reply to: Franco Bruno Borghesi (#6)
Re: public key functions for postgresql ?

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&gt;

Download:
http://www.dimensional.com/~bgiles/index1.html
<http://www.dimensional.com/%7Ebgiles/index1.html&gt;

hope it helps.

Thanks, it does.

How much is this being used ?