From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZG9mT-00057W-FV for qemu-devel@nongnu.org; Fri, 17 Jul 2015 13:50:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZG9mS-0003iL-Eg for qemu-devel@nongnu.org; Fri, 17 Jul 2015 13:50:41 -0400 Date: Fri, 17 Jul 2015 18:50:31 +0100 From: "Daniel P. Berrange" Message-ID: <20150717175031.GR4835@redhat.com> References: <1437155300-25076-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1437155300-25076-1-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.4] crypto: Fix aes_decrypt_wrapper() Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: peter.maydell@linaro.org, pbonzini@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org, rkrcmar@redhat.com On Fri, Jul 17, 2015 at 07:48:20PM +0200, Kevin Wolf wrote: > Commit d3462e3 broke qcow2's encryption functionality by using encrypt > instead of decrypt in the wrapper function it introduces. This was found > by qemu-iotests case 134. > > Signed-off-by: Kevin Wolf > --- > crypto/cipher-nettle.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/crypto/cipher-nettle.c b/crypto/cipher-nettle.c > index a55a8e8..b01cb1c 100644 > --- a/crypto/cipher-nettle.c > +++ b/crypto/cipher-nettle.c > @@ -47,7 +47,7 @@ static void aes_encrypt_wrapper(cipher_ctx_t ctx, cipher_length_t length, > static void aes_decrypt_wrapper(cipher_ctx_t ctx, cipher_length_t length, > uint8_t *dst, const uint8_t *src) > { > - aes_encrypt(ctx, length, dst, src); > + aes_decrypt(ctx, length, dst, src); > } > > static void des_encrypt_wrapper(cipher_ctx_t ctx, cipher_length_t length, Reviewed-by: Daniel P. Berrange Glad I added the iotest 134 for encrypted qcow :-) Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|