mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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.
This commit is contained in:
parent
03f04dfb9a
commit
5a2cef801d
8 changed files with 20 additions and 140 deletions
23
g10/keygen.c
23
g10/keygen.c
|
@ -564,29 +564,6 @@ keygen_set_std_prefs (const char *string,int personal)
|
|||
opt.personal_cipher_prefs[i].value = 0;
|
||||
}
|
||||
}
|
||||
else if (personal == PREFTYPE_AEAD)
|
||||
{
|
||||
xfree(opt.personal_aead_prefs);
|
||||
|
||||
if (!naead)
|
||||
opt.personal_aead_prefs = NULL;
|
||||
else
|
||||
{
|
||||
int i;
|
||||
|
||||
opt.personal_aead_prefs=
|
||||
xmalloc(sizeof(prefitem_t *)*(naead+1));
|
||||
|
||||
for (i=0; i<naead; i++)
|
||||
{
|
||||
opt.personal_aead_prefs[i].type = PREFTYPE_AEAD;
|
||||
opt.personal_aead_prefs[i].value = aead[i];
|
||||
}
|
||||
|
||||
opt.personal_aead_prefs[i].type = PREFTYPE_NONE;
|
||||
opt.personal_aead_prefs[i].value = 0;
|
||||
}
|
||||
}
|
||||
else if(personal==PREFTYPE_HASH)
|
||||
{
|
||||
xfree(opt.personal_digest_prefs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue