Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encrypt columns in postgresql?

I'm new to PostgreSQL and never worked with encryption. I read some links about encryption in PostgreSQL, like this one, but I'm a little bit confused about what it wants to say (or what I understand:)). Can you guide me with some thoughts or links in this problem?

Thanks.

like image 531
artaxerxe Avatar asked Nov 13 '22 13:11

artaxerxe


1 Answers

Look into the pgcrypto addon. Note that db-level cryptography is tricky. You have key management issues that are not trivial to resolve. In general if you really need this, it is probably worth hiring a professional consultant to do some code review and another one to provide some design review ahead of time.

In general, I don't recommend doing all your encryption in the db at present unless it is required due to regulatory or similar regimes.

like image 168
Chris Travers Avatar answered Dec 24 '22 13:12

Chris Travers