mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Support EAX if for latest Libgcrypt.
* g10/cipher-aead.c (MY_GCRY_CIPHER_MODE_EAX): New. (write_header): Use it. * g10/decrypt-data.c (MY_GCRY_CIPHER_MODE_EAX): New. (decrypt_data): Use it. * g10/misc.c (openpgp_aead_test_algo): Allow EAX. -- This allows the use of EAX when the latest Libgcrypt master is used. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
3f4ca85cb0
commit
7356d6ec50
3 changed files with 16 additions and 4 deletions
|
@ -33,6 +33,11 @@
|
|||
#include "options.h"
|
||||
#include "main.h"
|
||||
|
||||
/* FIXME: Libgcrypt 1.9 will support EAX. Until we kame this a
|
||||
* requirement we hardwire the enum used for EAX. */
|
||||
#define MY_GCRY_CIPHER_MODE_EAX 14
|
||||
|
||||
|
||||
/* The size of the buffer we allocate to encrypt the data. This must
|
||||
* be a multiple of the OCB blocksize (16 byte). */
|
||||
#define AEAD_ENC_BUFFER_SIZE (64*1024)
|
||||
|
@ -151,6 +156,11 @@ write_header (cipher_filter_context_t *cfx, iobuf_t a)
|
|||
startivlen = 15;
|
||||
break;
|
||||
|
||||
case AEAD_ALGO_EAX:
|
||||
ciphermode = MY_GCRY_CIPHER_MODE_EAX;
|
||||
startivlen = 16;
|
||||
break;
|
||||
|
||||
default:
|
||||
log_error ("unsupported AEAD algo %d\n", cfx->dek->use_aead);
|
||||
err = gpg_error (GPG_ERR_NOT_IMPLEMENTED);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue