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)

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

Details

Provenance
smueller_chronox.deAuthored on Mar 12 2018, 10:24 PM
wernerCommitted on Apr 17 2018, 5:49 PM
Parents
rCa0e016e29409: mpi: Fix for buidling for MIPS64 with Clang
Branches
Unknown
Tags
Unknown