diff options
author | Werner Koch <[email protected]> | 2022-10-31 14:51:21 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2022-10-31 14:51:21 +0000 |
commit | 5a2cef801d3506bedd700db1a5d88b7a75c4083b (patch) | |
tree | 594b305eb753bbcb2bf1e5a6ea7d2cde190ebbd3 /g10/pkclist.c | |
parent | gpg: New option --compatibility-flags (diff) | |
download | gnupg-5a2cef801d3506bedd700db1a5d88b7a75c4083b.tar.gz gnupg-5a2cef801d3506bedd700db1a5d88b7a75c4083b.zip |
gpg: Allow only OCB for AEAD encryption.
* g10/gpg.c (opts): New option--force-ocb as alias for force-aead.
Turn --aead-algo and --personal-aead-preferences into dummy options.
(build_list_md_test_algo, build_list_aead_algo_name): Remove.
(my_strusage): Remove output of AEAD algos.
(main): Remove code from the --aead options.
* g10/encrypt.c (encrypt_seskey): Make file local.
(use_aead): Remove requirement for rfc4880bis. Always return
AEAD_ALGO_OCB.
* g10/main.h (DEFAULT_AEAD_ALGO): Removed unused macro.
* g10/misc.c (default_aead_algo): Remove.
* g10/pkclist.c (select_aead_from_pklist): Return AEAD_ALGO_OCB or 0.
(select_algo_from_prefs): Remove personal AEAD algo setting.
* g10/keygen.c (keygen_set_std_prefs): Remove AEAD preference option
parsing.
* g10/options.h (opt): Remove def_aead_algo and personal_aead_prefs.
--
Due to the meanwhile expired patent on OCB there is no more reason for
using EAX. Thus we forcefully use OCB if the AEAD feature flag is set
on a key.
Diffstat (limited to 'g10/pkclist.c')
-rw-r--r-- | g10/pkclist.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/g10/pkclist.c b/g10/pkclist.c index 9b08cc4d1..459e7595a 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -1603,8 +1603,6 @@ select_algo_from_prefs(PK_LIST pk_list, int preftype, prefs=NULL; if(preftype==PREFTYPE_SYM && opt.personal_cipher_prefs) prefs=opt.personal_cipher_prefs; - else if(preftype==PREFTYPE_AEAD && opt.personal_aead_prefs) - prefs=opt.personal_aead_prefs; else if(preftype==PREFTYPE_HASH && opt.personal_digest_prefs) prefs=opt.personal_digest_prefs; else if(preftype==PREFTYPE_ZIP && opt.personal_compress_prefs) @@ -1720,7 +1718,7 @@ select_aead_from_pklist (PK_LIST pk_list) return 0; /* At least one recipient does not support it. */ } - return default_aead_algo (); /* Yes, AEAD can be used. */ + return AEAD_ALGO_OCB; /* Yes, AEAD can be used. */ } |