pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Antonin Houska <ah@cybertec.at>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Toshi Harada <harada.toshi@po.ntt-tx.co.jp>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: "WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3
Date: Sat, 06 Apr 2019 15:29:13 +0200
Message-ID: <18846.1554557353@localhost> (raw )
In-Reply-To: <CA+TgmoZ+47eRKo+tstrHffH7re3RMf24S=Ht-LMEWaFrK-gOSg@mail.gmail.com >
References: <5907.1534140361@localhost >
<201808150211.w7F2ApMj023097@ccmail04.silk.ntt-tx.co.jp >
<19039.1536933944@localhost >
<CA+TgmoawhAmdVaSYt3YLA5dsgoc-oXf72O3ybFAqiARfyTL4iA@mail.gmail.com >
<14646.1552570130@localhost >
<CA+Tgmoawc7hQW2SrcvVSfw8JyYV8UU4fyQ56nxKn_BtPhXfhdQ@mail.gmail.com >
<13456.1552684223@sss.pgh.pa.us >
<27465.1553168779@localhost >
<CA+TgmoY1aWOGB06bDLDXY0O5Doc-NDvnbdz=Wajb2Fqcd9O_2g@mail.gmail.com >
<13531.1554477762@localhost >
<CA+TgmoZ+47eRKo+tstrHffH7re3RMf24S=Ht-LMEWaFrK-gOSg@mail.gmail.com >
Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Apr 5, 2019 at 11:22 AM Antonin Houska <ah@cybertec.at> wrote:
> > > Wouldn't Tom's proposal to use a stream cipher fix all this?
> >
> > Yes it would make the extra alignment unnecessary, but our solution tries to
> > meet specific requirements of disk encryption. Stream cipher appears to be
> > incompatible with these requirements:
> >
> > https://en.wikipedia.org/wiki/Disk_encryption_theory
>
> Hmm. Well, I don't know what to do about that, but I think this patch
> is going to be facing an uphill battle if the encrypted and
> unencrypted WAL formats use different alignment.
Once you said this could be a problem, I thought about it a bit more. The link
above tells that stream cipher is not good for disk encryption because it's
risky to encrypt different data (e.g. old an new version of disk sector) with
the same key (or rather with the same combination of key and initialization
vector).
However WAL is a special case because here we should never need to change the
data at given position. The only exception is that unused space (sequence of
zeroes) becomes a valid record. So if we avoid encryption of the unused space,
it might be o.k. to use the stream cipher for WAL.
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
view thread (37+ messages) latest in thread
Message-ID: <18846.1554557353@localhost>
Permalink: ../18846.1554557353@localhost/
Also on: postgresql.org/message-id/18846.1554557353@localhost
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ah@cybertec.at, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, harada.toshi@po.ntt-tx.co.jp
Subject: Re: "WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3
In-Reply-To: <18846.1554557353@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox