Content-Length: 258661 | pFad | http://github.com/postgrespro/postgres_cluster/commit/2882bab920a41186ed9ec719947b1e730fd335a8

79 Fix generation of padding message before encrypting Elgamal in pgcrypto · postgrespro/postgres_cluster@2882bab · GitHub
Skip to content

Commit 2882bab

Browse files
committed
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
1 parent 6dd690b commit 2882bab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pgcrypto/pgp-pubenc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pad_eme_pkcs1_v15(uint8 *data, int data_len, int res_len, uint8 **res_p)
6666
{
6767
px_memset(buf, 0, res_len);
6868
px_free(buf);
69-
break;
69+
return PXE_NO_RANDOM;
7070
}
7171
}
7272
if (*p != 0)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/2882bab920a41186ed9ec719947b1e730fd335a8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy