Re: How to use public key file to encrypt data

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: ROS Didier <didier(dot)ros(at)edf(dot)fr>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to use public key file to encrypt data
Date: 2018-07-04 13:17:32
Message-ID: CAMkU=1yCPmBq0bJXEYPUcpnZOhw6MuprGpJOv4i83CGg_bJTsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 3, 2018 at 6:17 AM, ROS Didier <didier(dot)ros(at)edf(dot)fr> wrote:

> Hi
>
> I Would like to know how to encrypt data with *physical*
> public key files. I can’t find any documentation about this subject.
>
> Thanks in advance
>

This isn't really a suitable question for pgsql-hackers, as you aren't
talking about development of the PostgreSQL system itself, but rather usage
of that system. That type of question should probably go to pgsql-general.

I don't know what it means for a key file to be "physical". Does that mean
stored on disk?

The functions you get from pgcrypto extension do not automatically detect
the format of the key file, so you have to de-armor them explicitly if they
are stored in base64. I wish it would detect that. I just do it on the
fly.

Here is a program I have used for testing and benchmarking pgcrypto,
perhaps you would find it useful as an example.

Cheers,

Jeff

Attachment Content-Type Size
pgcrypto_public.pl application/octet-stream 618 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2018-07-04 13:34:17 Re: Allow auto_explain to log to NOTICE
Previous Message Laurenz Albe 2018-07-04 13:14:38 Re: Libpq support to connect to standby server as priority