From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Ants Aasma <ants(at)cybertec(dot)at>, Antonin Houska <ah(at)cybertec(dot)at>, Robert Haas <robertmhaas(at)gmail(dot)com>, Sasasu <i(at)sasa(dot)su>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: storing an explicit nonce |
Date: | 2021-10-13 15:00:22 |
Message-ID: | 20211013150022.GB2354@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 13, 2021 at 09:16:37AM -0400, Stephen Frost wrote:
> Greetings,
>
> * Ants Aasma (ants(at)cybertec(dot)at) wrote:
> > On Wed, 13 Oct 2021 at 02:20, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > > On Wed, Oct 13, 2021 at 12:48:51AM +0300, Ants Aasma wrote:
> > > > On Wed, 13 Oct 2021 at 00:25, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > > >
> > > > On Tue, Oct 12, 2021 at 11:21:28PM +0300, Ants Aasma wrote:
> > > > > Page encrypting to all zeros is for all practical purposes
> > > impossible to
> > > > hit.
> > > > > Basically an attacker would have to be able to arbitrarily set the
> > > whole
> > > > > contents of the page and they would then achieve that this page
> > > gets
> > > > ignored.
> > > >
> > > > Uh, how do we know that valid data can't produce an encrypted
> > > all-zero
> > > > page?
> > > >
> > > >
> > > > Because the chances of that happening by accident are equivalent to
> > > making a
> > > > series of commits to postgres and ending up with the same git commit
> > > hash 400
> > > > times in a row.
> > >
> > > Yes, 256^8192 is 1e+19728, but why not just assume a page LSN=0 is an
> > > empty page, and if not, an error? Seems easier than checking if each
> > > page contains all zeros every time.
> > >
> >
> > We already check it anyway, see PageIsVerifiedExtended().
>
> Right- we check the LSN along with the rest of the page there.
Very good. I have not looked at the Cybertec patch recently.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2021-10-13 15:43:06 | Re: pg14 psql broke \d datname.nspname.relname |
Previous Message | Mark Dilger | 2021-10-13 14:40:44 | Re: pg14 psql broke \d datname.nspname.relname |