Home GnuPG

AES-KW: fix in-place encryption

Description

AES-KW: fix in-place encryption

* cipher/cipher-aeswrap.c: move memmove call before KW IV setting

In case AES-KW in-place encryption is performed, the plaintext must be
moved to the correct destination location before the first semiblock of
the destination buffer is modified. Without the patch, the first
semiblock of the plaintext is overwritten with a6a6a6a6a6a6a6a6.

(cherry picked from commit 330ec66e0babdabb658dc7d6db78f37b2a1b996e)
(cherry picked from commit bbf88f0e9d481486ceca079e2611e84db8d039c7)

  • Signed-off-by: Stephan Mueller <smueller@chronox.de>

Details

Provenance
smueller_chronox.deAuthored on Mar 12 2018, 10:24 PM
wernerCommitted on Jun 13 2018, 9:47 AM
Parents
rC325ab0b312e6: ecc: Add blinding for ECDSA.
Branches
Unknown
Tags
Unknown