From a446c4db957492b759c1b8e9ffa384efa3fdf7ee Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Thu, 7 Sep 2017 18:49:35 -0400 Subject: gpg: Default to SHA-512 for all signature types on RSA keys. * g10/main.h (DEFAULT_DIGEST_ALGO): Use SHA512 instead of SHA256 in --gnupg mode (leave strict RFC and PGP modes alone). * configure.ac: Do not allow disabling sha512. * g10/misc.c (map_md_openpgp_to_gcry): Always support SHA512. -- SHA512 is more performant on most 64-bit platforms than SHA256, and offers a better security margin. It is also widely implemented. Signed-off-by: Daniel Kahn Gillmor Gbp-Pq: Topic update-defaults Gbp-Pq: Name gpg-Default-to-SHA-512-for-all-signature-types-on-RS.patch --- g10/misc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'g10/misc.c') diff --git a/g10/misc.c b/g10/misc.c index 6d525a817..814447132 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -751,11 +751,8 @@ map_md_openpgp_to_gcry (digest_algo_t algo) case DIGEST_ALGO_SHA384: return 0; #endif -#ifdef GPG_USE_SHA512 case DIGEST_ALGO_SHA512: return GCRY_MD_SHA512; -#else - case DIGEST_ALGO_SHA512: return 0; -#endif + default: return 0; } } -- cgit v1.2.3