pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Encryption / Decryption via PGCrypto
3+ messages / 3 participants
[nested] [flat]

* Encryption / Decryption via PGCrypto
@ 2018-10-24 08:27  Anjul Tyagi <anjul@ibosstech-us.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Anjul Tyagi @ 2018-10-24 08:27 UTC (permalink / raw)
  To: pgsql-admin

Hi Experts,

We are implementing the pgcrypto in our database to encrypt and decrypt 
the Column data. for testing purpose we have generate the PGP public / 
private key and use those when we read and write data.

How can we secure the key, if we keep the key outside how can we use 
that into query.

Thanks for your help.




Regards,

Anjul TYAGI



ü Go Green

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Encryption / Decryption via PGCrypto
@ 2018-10-24 09:00  Stéphane KANSCHINE <stephane@hexack.fr>
  parent: Anjul Tyagi <anjul@ibosstech-us.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Stéphane KANSCHINE @ 2018-10-24 09:00 UTC (permalink / raw)
  To: Anjul Tyagi <anjul@ibosstech-us.com>; pgsql-admin


Hi,

Le mer. 24 oct., vers 08:27, Anjul Tyagi exprimait :
> 
> We are implementing the pgcrypto in our database to encrypt and decrypt the
> Column data. for testing purpose we have generate the PGP public / private
> key and use those when we read and write data.
> 
> How can we secure the key, if we keep the key outside how can we use that
> into query.

We keep the private key on the app server. It communicates with postgres
through SSL and postgres logs aren't too verbose in order to avoid key
exposition.

If there's a better way, i'm curious of it.

Regards,
-- 
Stéphane KANSCHINE - https://www.hexack.fr./ - https://www.nuajik.io./
@ stephane@hexack.fr
  +33 6 64 31 72 52




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Encryption / Decryption via PGCrypto
@ 2018-10-25 03:47  Evan Bauer <evanbauer@mac.com>
  parent: Stéphane KANSCHINE <stephane@hexack.fr>
  0 siblings, 0 replies; 3+ messages in thread

From: Evan Bauer @ 2018-10-25 03:47 UTC (permalink / raw)
  To: Stéphane KANSCHINE <stephane@hexack.fr>; +Cc: Anjul Tyagi <anjul@ibosstech-us.com>; pgsql-admin

All depends on how secure you want to be in the event of a hostile network penetration.

If the answer is “very”, consider using a key management solution — either software (I like Hashicorp Vault) or dedicated HSM hardware from someone like Gemalto or Thales.

Having the key on a separate server doesn’t help if the application server is compromised.

Cheers,

Evan

Sent from my iPhone

> On Oct 24, 2018, at 05:00, Stéphane KANSCHINE <stephane@hexack.fr> wrote:
> 
> 
> Hi,
> 
> Le mer. 24 oct., vers 08:27, Anjul Tyagi exprimait :
>> 
>> We are implementing the pgcrypto in our database to encrypt and decrypt the
>> Column data. for testing purpose we have generate the PGP public / private
>> key and use those when we read and write data.
>> 
>> How can we secure the key, if we keep the key outside how can we use that
>> into query.
> 
> We keep the private key on the app server. It communicates with postgres
> through SSL and postgres logs aren't too verbose in order to avoid key
> exposition.
> 
> If there's a better way, i'm curious of it.
> 
> Regards,
> -- 
> Stéphane KANSCHINE - https://www.hexack.fr./ - https://www.nuajik.io./
> @ stephane@hexack.fr
>   +33 6 64 31 72 52
> 





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-10-25 03:47 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24 08:27 Encryption / Decryption via PGCrypto Anjul Tyagi <anjul@ibosstech-us.com>
2018-10-24 09:00 ` Stéphane KANSCHINE <stephane@hexack.fr>
2018-10-25 03:47   ` Evan Bauer <evanbauer@mac.com>

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