Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Sehrope Sarkuni <sehrope@jackdb.com>, Joe Conway <mail@joeconway.com>, Antonin Houska <ah@cybertec.at>, Stephen Frost <sfrost@snowman.net>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Haribabu Kommi <kommi.haribabu@gmail.com>, "Moon, Insung" <Moon_Insung_i3@lab.ntt.co.jp>, Ibrar Ahmed <ibrar.ahmad@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-08-06T00:50:55Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Revamp the WAL record format.
- 2c03216d8311 9.5.0 cited
On Wed, Jul 31, 2019 at 04:11:03PM +0900, Masahiko Sawada wrote: > On Wed, Jul 31, 2019 at 5:48 AM Bruce Momjian <bruce@momjian.us> wrote: > > I am thinking for the heap/index IV, it would be: > > > > uint64 lsn; > > unint32 page number; > > /* only uses 11 bits for a zero-based CTR counter for 32k pages */ > > uint32 counter; > > > > +1 > IIUC since this would require to ensure uniqueness by using key+IV we > need to use different keys for different relations. Is that right? No. My other email states that the LSN is only used for a single relation, so there is no need for the relfilenode in the nonce. A single LSN writing to multiple parts of the relation generates a unique nonce since the page number is also part of the nonce. > > and for WAL it would be: > > > > uint64 segment_number; > > uint32 counter; > > /* guarantees this IV doesn't match any relation IV */ > > uint32 2^32-1 /* all 1's */ > > I would propose to include the page number within a WAL segment to IV > so that we can encrypt each WAL page with the counter always starting > from 0. And if we use different encryption keys for tables/indexes and What is the value of that? > And if we use different encryption keys for tables/indexes and > WAL I think we don't need 2^32-1. I see little value to using different encryption keys for tables/indexes and WAL. -- 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 +