postgresql/contrib/pgcrypto/expected
Heikki Linnakangas fe0a0b5993 Replace PostmasterRandom() with a stronger source, second attempt.
This adds a new routine, pg_strong_random() for generating random bytes,
for use in both frontend and backend. At the moment, it's only used in
the backend, but the upcoming SCRAM authentication patches need strong
random numbers in libpq as well.

pg_strong_random() is based on, and replaces, the existing implementation
in pgcrypto. It can acquire strong random numbers from a number of sources,
depending on what's available:

- OpenSSL RAND_bytes(), if built with OpenSSL
- On Windows, the native cryptographic functions are used
- /dev/urandom

Unlike the current pgcrypto function, the source is chosen by configure.
That makes it easier to test different implementations, and ensures that
we don't accidentally fall back to a less secure implementation, if the
primary source fails. All of those methods are quite reliable, it would be
pretty surprising for them to fail, so we'd rather find out by failing
hard.

If no strong random source is available, we fall back to using erand48(),
seeded from current timestamp, like PostmasterRandom() was. That isn't
cryptographically secure, but allows us to still work on platforms that
don't have any of the above stronger sources. Because it's not very secure,
the built-in implementation is only used if explicitly requested with
--disable-strong-random.

This replaces the more complicated Fortuna algorithm we used to have in
pgcrypto, which is unfortunate, but all modern platforms have /dev/urandom,
so it doesn't seem worth the maintenance effort to keep that. pgcrypto
functions that require strong random numbers will be disabled with
--disable-strong-random.

Original patch by Magnus Hagander, tons of further work by Michael Paquier
and me.

Discussion: https://www.postgresql.org/message-id/CAB7nPqRy3krN8quR9XujMVVHYtXJ0_60nqgVc6oUk8ygyVkZsA@mail.gmail.com
Discussion: https://www.postgresql.org/message-id/CAB7nPqRWkNYRRPJA7-cF+LfroYV10pvjdz6GNvxk-Eee9FypKA@mail.gmail.com
2016-12-05 13:42:59 +02:00
..
3des.out Fix some more regression tests (missed these because they're only 2009-08-04 20:10:00 +00:00
blowfish.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
cast5.out Fix some more regression tests (missed these because they're only 2009-08-04 20:10:00 +00:00
crypt-blowfish.out pgcrypto: Detect and report too-short crypt() salts. 2015-10-05 10:06:29 -04:00
crypt-des.out pgcrypto: Detect and report too-short crypt() salts. 2015-10-05 10:06:29 -04:00
crypt-md5.out SET autocommit no longer needed in /contrib because pg_regress.sh does 2002-10-21 01:42:14 +00:00
crypt-xdes.out pgcrypto: Detect and report too-short crypt() salts. 2015-10-05 10:06:29 -04:00
des.out Fix some more regression tests (missed these because they're only 2009-08-04 20:10:00 +00:00
hmac-md5.out SET autocommit no longer needed in /contrib because pg_regress.sh does 2002-10-21 01:42:14 +00:00
hmac-sha1.out SET autocommit no longer needed in /contrib because pg_regress.sh does 2002-10-21 01:42:14 +00:00
init.out Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
md5.out SET autocommit no longer needed in /contrib because pg_regress.sh does 2002-10-21 01:42:14 +00:00
pgp-armor.out Add functions for dealing with PGP armor header lines to pgcrypto. 2014-10-01 16:03:39 +03:00
pgp-compression.out Add missing pgcrypto files from previous commit. 2005-07-10 13:46:29 +00:00
pgp-compression_1.out Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
pgp-decrypt.out pgcrypto: Report errant decryption as "Wrong key or corrupt data". 2015-05-18 10:02:31 -04:00
pgp-decrypt_1.out Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
pgp-encrypt.out pgcrypto: support changing S2K iteration count 2016-03-09 14:31:07 -03:00
pgp-encrypt_1.out Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
pgp-info.out Fix buffer overrun after incomplete read in pullf_read_max(). 2015-02-02 10:00:45 -05:00
pgp-pubkey-decrypt.out pgcrypto: Report errant decryption as "Wrong key or corrupt data". 2015-05-18 10:02:31 -04:00
pgp-pubkey-encrypt.out Ooops, missed that a couple of contrib modules have calls to byteacmp. 2009-08-04 18:49:50 +00:00
pgp-pubkey-encrypt_1.out Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
pgp-zlib-DISABLED.out Add missing pgcrypto files from previous commit. 2005-07-10 13:46:29 +00:00
rijndael.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
sha1.out SET autocommit no longer needed in /contrib because pg_regress.sh does 2002-10-21 01:42:14 +00:00
sha2.out "Annual" pgcrypto update from Marko Kreen: 2006-07-13 04:15:25 +00:00