diff options
author | Werner Koch <wk@gnupg.org> | 2018-01-22 16:23:02 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-01-22 16:50:21 +0100 |
commit | da3015e3c05030fe709c8f922486e73d06d1d16a (patch) | |
tree | da4271c073ce4051ee7ae7a1b07af89d0d354425 /g10/main.h | |
parent | gpg: Refactor function encrypt_seskey. (diff) | |
download | gnupg2-da3015e3c05030fe709c8f922486e73d06d1d16a.tar.xz gnupg2-da3015e3c05030fe709c8f922486e73d06d1d16a.zip |
gpg: Unify AEAD parameter retrieval.
* g10/pkclist.c (select_aead_from_pklist): Return the AEAD_algo.
* g10/encrypt.c (use_aead): Return the AEAD algo.
(encrypt_simple): Adjust for this change.
(encrypt_crypt): Ditto.
(encrypt_filter): Ditto.
* g10/sign.c (sign_symencrypt_file): Ditto.
* g10/misc.c (MY_GCRY_CIPHER_MODE_EAX): New.
(openpgp_aead_algo_info): New.
* g10/cipher-aead.c (MY_GCRY_CIPHER_MODE_EAX): Remove.
(write_header): Use new fucntion.
* g10/decrypt-data.c (MY_GCRY_CIPHER_MODE_EAX): Remove.
(decrypt_data): Use new function. Also allow for chunkbytes other
than 10.
--
Note that other chunk bytes than 10 and in particular 0 (64 byte
chunks) have not yet been tested.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/main.h')
-rw-r--r-- | g10/main.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/main.h b/g10/main.h index 509126c65..96899acf5 100644 --- a/g10/main.h +++ b/g10/main.h @@ -127,6 +127,9 @@ const char *openpgp_cipher_algo_name (cipher_algo_t algo); gpg_error_t openpgp_aead_test_algo (aead_algo_t algo); const char *openpgp_aead_algo_name (aead_algo_t algo); +gpg_error_t openpgp_aead_algo_info (aead_algo_t algo, + enum gcry_cipher_modes *r_mode, + unsigned int *r_noncelen); pubkey_algo_t map_pk_gcry_to_openpgp (enum gcry_pk_algos algo); int openpgp_pk_test_algo (pubkey_algo_t algo); @@ -234,7 +237,7 @@ void display_online_help( const char *keyword ); int setup_symkey (STRING2KEY **symkey_s2k,DEK **symkey_dek); gpg_error_t encrypt_seskey (DEK *dek, DEK **r_seskey, void **r_enckey, size_t *r_enckeylen); -int use_aead (pk_list_t pk_list, int algo); +aead_algo_t use_aead (pk_list_t pk_list, int algo); int use_mdc (pk_list_t pk_list,int algo); int encrypt_symmetric (const char *filename ); int encrypt_store (const char *filename ); |