Michael Paquier 2882bab920 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
2019-01-01 10:39:29 +09:00
..
2010-09-20 22:08:53 +02:00
2010-09-20 22:08:53 +02:00
2017-06-21 15:35:54 -04:00
2017-06-21 15:35:54 -04:00
2017-06-21 15:19:25 -04:00
2017-06-21 15:19:25 -04:00
2017-02-06 11:33:58 +02:00
2017-06-21 15:19:25 -04:00
2014-05-06 12:12:18 -04:00
2017-06-21 15:19:25 -04:00
2016-09-30 14:04:16 -04:00
2014-05-06 12:12:18 -04:00
2014-05-06 12:12:18 -04:00
2014-05-06 12:12:18 -04:00
2017-02-06 11:33:58 +02:00
2017-02-06 11:33:58 +02:00
2014-05-06 12:12:18 -04:00
2017-06-21 15:35:54 -04:00
2014-05-06 12:12:18 -04:00
2014-05-06 12:12:18 -04:00
2017-06-21 15:19:25 -04:00
2017-06-21 15:35:54 -04:00
2014-05-06 12:12:18 -04:00
2017-06-21 15:19:25 -04:00
2017-06-21 15:19:25 -04:00
2017-06-21 15:19:25 -04:00