Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKpaR-0005eT-4Z for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jun 2017 17:26:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dKpaQ-00054y-NO for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jun 2017 17:26:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dKpYt-0002Iv-CF for pgsql-hackers@postgresql.org; Tue, 13 Jun 2017 17:25:03 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKpYq-0008Ok-Ll for pgsql-hackers@postgresql.org; Tue, 13 Jun 2017 17:25:02 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 2A5935F795; Tue, 13 Jun 2017 13:25:00 -0400 (EDT) Date: Tue, 13 Jun 2017 13:25:00 -0400 From: Stephen Frost To: Bruce Momjian Cc: Peter Eisentraut , Ants Aasma , Robert Haas , PostgreSQL-development Subject: Re: WIP: Data at rest encryption Message-ID: <20170613172459.GL3151@tamriel.snowman.net> References: <20170613132416.GD3151@tamriel.snowman.net> <20170613150421.GE3151@tamriel.snowman.net> <20170613160434.GC13873@momjian.us> <20170613162301.GF3151@tamriel.snowman.net> <20170613164442.GD13873@momjian.us> <20170613170132.GH3151@tamriel.snowman.net> <20170613171356.GG13873@momjian.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qzBDQ6ctr7tSevDl" Content-Disposition: inline In-Reply-To: <20170613171356.GG13873@momjian.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-117-generic (x86_64) X-Uptime: 13:21:06 up 35 days, 17:53, 15 users, load average: 0.08, 0.10, 0.13 User-Agent: Mutt/1.5.21 (2010-09-15) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --qzBDQ6ctr7tSevDl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Bruce, * Bruce Momjian (bruce@momjian.us) wrote: > On Tue, Jun 13, 2017 at 01:01:32PM -0400, Stephen Frost wrote: > > > Well, usually the symetric key is stored using RSA and a symetric > > > cipher is used to encrypt/decrypt the data. I was thinking of a case > > > where you encrypt a row using a symetric key, then store RSA-encrypted > > > versions of the symetric key encrypted that only specific users could > > > decrypt and get the key to decrypt the data. > >=20 > > This goes back to key management and I agree that it often makes sense > > to use RSA or similar to encrypt the symmetric key, and this approach > > would allow the user to do so. That doesn't actually give you a > > "write-only" encryption option though, since any user who can decrypt > > the symmetric key is able to use the symmetric key for both encryption > > and decryption, and someone who only has access to the RSA encryption > > key can't actually encrypt the data since they can't access the > > symmetric key. > =20 > I think the big win of Postgres doing the encryption is that the > user-visible file system is no longer a target (assuming OS permissions > are bypassed), while for file system encryption it is the storage device > that is encrypted. If OS permissions are bypassed then the encryption isn't going to help because the attacker can just access shared memory. The big wins for doing the encryption in PostgreSQL are, as Robert and I have both mentioned on this thread already, that it provides data-at-rest encryption in an easier to deploy fashion which will work the same across different systems and allows the encrypted cluster to be transferred more easily between systems. There are almsot certainly other wins from having PG do the encryption, but the above strikes me as the big ones, and those are certainly valuable enough on their own for us to seriously consider adding this capability. > My big question is how many times are the OS permissions bypassed in a > way that would also not expose the db clusters key or db data? This is not the attack vector that this solution is attempting to address, so there really isn't much point in discussing it on this thread. Thanks! Stephen --qzBDQ6ctr7tSevDl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZQB/rAAoJEO1sijiDR2RVZdEQALepM6Kj/w0xkVsr0BHhX6+r 0/GFuT6W6rfFjZ8hgVMCyjEbjeDs+rbBUOa/Ru0vvwobOm+8u6HZKw6qs94bholH J3Ko/D5YCLmt+mjo1K1uoMjKjZ3zhSYOZ4f2lKY4sElSSS5efzMH2QD7pm/y9Oew 90XGSMeugZax2pddih3FuQNopuLhW7Q/2yOUXjwDZ+9/WeCsNRfdluGr2lBi3Jz5 bCQPqA8+i21v35oqnPH18bxusyfdj3rX9Og8Pn/pz383EsoUoGu+GP0xLDZMGjoq YkSco4/1eEdUvkfJLF6K6DC1b0/9NvhUTJF0gUiKhecJYmQ8RPr5GCSf5F59/YFu wEpTRjwHdKiuT6YexWaEGUTqmCUJbqJ89Tsz8uFTV4AZct1v+zaladeUQg6DrIYk Bany77mGNRshDoP5jSA/ojbAN1322Lf2FdjELG4g/u9cDfWBfnoLTqhwIm+YyL4+ aWz+EDM4yB1N0QgWk1rnAdZ+TngA7bDyiR4ZXk6i1JDvTG94MXlzLbaYszqVvHgS a4B3AEfwaZOJajz5GVhdm/96H5HRy9GA2vy4HZ7VBS2pFp3hMQgZ9uPDbjRS2Vmx 8weCkim8aa/3IMIZ74ava8S3TZjFxSoY4wHWOfz9N8rUIF1OBAZS20Sh7KdKNw/1 8H5ZdRXJlj3wz7AEY08/ =VLIE -----END PGP SIGNATURE----- --qzBDQ6ctr7tSevDl--