Home GnuPG
Diffusion GnuPG 618b86325f77

gpg: Simplify the AEAD decryption function.

Description

gpg: Simplify the AEAD decryption function.

* g10/decrypt-data.c (aead_set_nonce, aead_set_ad): Merge into ...
(aead_set_nonce_and_ad): new single function.  Change callers.
(decrypt_data): Do not set the nonce and ad here.
(aead_underflow): Get rid of the LAST_CHUNK_DONE hack.

The main change here is that we now re-init the context only right
before we decrypt and not after a checktag.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Feb 27 2018, 9:11 PM
Parents
rGad989373f1a4: gpg: Factor common code out of the AEAD decryption function.
Branches
Unknown
Tags
Unknown