pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix generation of padding message before encrypting Elgamal in p
Date: Tue, 01 Jan 2019 01:40:23 +0000
Message-ID: <E1ge92d-0004nJ-W9@gemulon.postgresql.org> (raw)

Fix generation of padding message before encrypting Elgamal in pgcrypto

fe0a0b5, which has added a stronger random source in Postgres, has
introduced a thinko when creating a padding message which gets encrypted
for Elgamal.  The padding message cannot have zeros, which are replaced
by random bytes.  However if pg_strong_random() failed, the message
would finish by being considered in correct shape for encryption with
zeros.

Author: Tom Lane
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/20186.1546188423@sss.pgh.pa.us
Backpatch-through: 10

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/962da60591dfa01b335e0bc7c1fd0b74ea10bf97

Modified Files
--------------
contrib/pgcrypto/pgp-pubenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



view thread (3+ messages)

Message-ID: <E1ge92d-0004nJ-W9@gemulon.postgresql.org>
Permalink:  ../E1ge92d-0004nJ-W9@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ge92d-0004nJ-W9@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Fix generation of padding message before encrypting Elgamal in p
  In-Reply-To: <E1ge92d-0004nJ-W9@gemulon.postgresql.org>
  References: <E1ge92d-0004nJ-W9@gemulon.postgresql.org>

* 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