Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS) - Mailing list pgsql-hackers
From | Bruce Momjian |
---|---|
Subject | Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS) |
Date | |
Msg-id | 20180621141454.GA24547@momjian.us Whole thread Raw |
In response to | Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS) (Nico Williams <nico@cryptonector.com>) |
Responses |
Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)
|
List | pgsql-hackers |
On Wed, Jun 20, 2018 at 04:57:18PM -0500, Nico Williams wrote: > On Wed, Jun 20, 2018 at 05:16:46PM -0400, Bruce Momjian wrote: > > On Mon, Jun 18, 2018 at 12:29:57PM -0500, Nico Williams wrote: > > > Note that unless the pg_catalog is protected against manipulation by > > > remote storage, then TDE for user tables might be possible to > > > compromise. Like so: the attacker manipulates the pg_catalog to > > > escalate privelege in order to obtain the TDE keys. This argues for > > > full database encryption, not just specific tables or columns. But > > > again, this is for the threat model where the storage is the threat. > > > > Yes, one big problem with per-column encryption is that administrators > > can silently delete data, though they can't add or modify it. > > They can also re-add ("replay") deleted values; this can only be > defeated by also binding TX IDs or alike in the ciphertext. And if you Yes, and if you bind TX IDs so you can detect loss, you effectively have to serialize every transaction, which is going to kill performance. > don't bind the encrypted values to the PKs then they can add any value > they've seen to different rows. Yep, you kind of have to add the primary key into the encrypted value. > One can protect to some degree agains replay and reuse attacks, but > protecting against silent deletion is much harder. Protecting against > the rows (or the entire DB) being restored at a past point in time is > even harder -- you quickly end up wanting Merkle hash/MAC trees and key > rotation, but this complicates everything and is performance killing. Yep. > > > I think any threat model where DBAs are not the threat is just not that > > > interesting to address with crypto within postgres itself... > > > > Yes, but in my analysis the only solution there is client-side > > encryption: > > For which threat model? > > For threat models where the DBAs are not the threat there's no need for > client-side encryption: just encrypt the storage at the postgres > instance (with encrypting device drivers or -preferably- filesystems). Agreed. > For threat models where the DBAs are the threat then yes, client-side > encryption works (or server-side encryption to public keys), but you > must still bind the encrypted values to the primary keys, and you must > provide integrity protection for as much data as possible -- see above. Yep. > Client-side crypto is hard to do well and still get decent performance. > So on the whole I think that crypto is a poor fit for the DBAs-are-the- > threat threat model. It's better to reduce the number of DBAs/sysadmins > and audit all privileged (and, for good measure, unprivileged) access. Yeah, kind of. There is the value of preventing accidental viewing of the data by the DBA, and of course WAL and backup encryption are nice. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
pgsql-hackers by date: