gat kipper
gat kipper

Reputation: 71

Encrypt columns data in postgresql database with pgcrypto

I have a postgres database with some tables having columns containing some sensitive data, i used PGCRYPTO extension (pgp_pub_encrypt/pgp_pub_decrypt) to encrypt and gpg to generate public and private key pairs.

I have two questions :

Upvotes: 1

Views: 1223

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 246033

The public key can be stored anywhere. You could store it in the database.

The private key belongs to your application. It should be stored on the application server, so that the application can supply it to decrypt the data in the database.

Upvotes: 2

Related Questions