Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS) - Mailing list pgsql-hackers
From | Joe Conway |
---|---|
Subject | Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS) |
Date | |
Msg-id | 18dd5810-8225-8e95-a2e7-2feb59eba626@joeconway.com Whole thread Raw |
In response to | Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS) (Robert Haas <robertmhaas@gmail.com>) |
Responses |
Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)
|
List | pgsql-hackers |
On 06/18/2018 09:49 AM, Robert Haas wrote: > On Wed, Jun 13, 2018 at 9:20 AM, Joe Conway <mail@joeconway.com> wrote: >>> Also, if I understand correctly, at unconference session there also >>> were two suggestions about the design other than the suggestion by >>> Alexander: implementing TDE at column level using POLICY, and >>> implementing TDE at table-space level. The former was suggested by Joe >>> but I'm not sure the detail of that suggestion. I'd love to hear the >>> deal of that suggestion. >> >> The idea has not been extensively fleshed out yet, but the thought was >> that we create column level POLICY, which would transparently apply some >> kind of transform on input and/or output. The transforms would >> presumably be expressions, which in turn could use functions (extension >> or builtin) to do their work. That would allow encryption/decryption, >> DLP (data loss prevention) schemes (masking, redacting), etc. to be >> applied based on the policies. > > It seems to me that column-level encryption is a lot less secure than > block-level encryption. I am supposing here that the attack vector is > stealing the disk. If all you've got is a bunch of 8192-byte blocks, > it's unlikely you can infer much about the contents. You know the > size of the relations and that's probably about it. Not necessarily. Our pages probably have enough predictable bytes to aid cryptanalysis, compared to user data in a column which might not be very predicable. > If you've got individual values being encrypted, then there's more > latitude to figure stuff out. You can infer something about the > length of particular values. Perhaps you can find cases where the > same encrypted value appears multiple times. This completely depends on the encryption scheme you are using, and the column level POLICY leaves that entirely up to you. But in any case most encryption schemes use a random nonce (salt) to ensure two identical strings do not encrypt to the same result. And often the encrypted length is padded, so while you might be able to infer short versus long, you would not usually be able to infer the exact plaintext length. > If there's a btree index, you know the ordering of the values under > whatever ordering semantics apply to that index. It's unclear to me > how useful such information would be in practice or to what extent it > might allow you to attack the underlying cryptography, but it seems > like there might be cases where the information leakage is > significant. For example, suppose you're trying to determine which > partially-encrypted record is that of Aaron Aardvark... or this guy: > https://en.wikipedia.org/wiki/Hubert_Blaine_Wolfeschlegelsteinhausenbergerdorff,_Sr. Again, this only applies if your POLICY uses this type of encryption, i.e. homomorphic encryption. If you use strong encryption you will not be indexing those columns at all, which is pretty commonly the case. > Recently, it was suggested to me that a use case for column-level > encryption might be to prevent casual DBA snooping. So, you'd want > the data to appear in pg_dump output encrypted, because the DBA might > otherwise look at it, but you wouldn't really be concerned about the > threat of the DBA loading a hostile C module that would steal user > keys and use them to decrypt all the data, because they don't care > that much and would be fired if they were caught doing it. Again completely dependent on the extension you use to do the encryption for the input policy. The keys don't need to be stored with the data, and the decryption can be transparent only for certain users or if certain session variables exist which the DBA does not have access to. Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
pgsql-hackers by date: