[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/17] crypto/nettle: Fix xts_encrypt arguments
From: |
Richard Henderson |
Subject: |
[PATCH 06/17] crypto/nettle: Fix xts_encrypt arguments |
Date: |
Wed, 12 Aug 2020 20:25:26 -0700 |
The fourth argument to xts_encrypt should be the decrypt
callback; we were accidentally passing encrypt twice.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
crypto/cipher-nettle.inc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/cipher-nettle.inc.c b/crypto/cipher-nettle.inc.c
index 256931a823..0404cfc6da 100644
--- a/crypto/cipher-nettle.inc.c
+++ b/crypto/cipher-nettle.inc.c
@@ -632,7 +632,7 @@ qcrypto_nettle_cipher_encrypt(QCryptoCipher *cipher,
case QCRYPTO_CIPHER_MODE_XTS:
#ifdef CONFIG_QEMU_PRIVATE_XTS
xts_encrypt(ctx->ctx, ctx->ctx_tweak,
- ctx->alg_encrypt_wrapper, ctx->alg_encrypt_wrapper,
+ ctx->alg_encrypt_wrapper, ctx->alg_decrypt_wrapper,
ctx->iv, len, out, in);
#else
xts_encrypt_message(ctx->ctx, ctx->ctx_tweak,
--
2.25.1
- [PATCH 02/17] crypto: Move QCryptoCipherDriver typedef to qemu/typedefs.h, (continued)
- [PATCH 02/17] crypto: Move QCryptoCipherDriver typedef to qemu/typedefs.h, Richard Henderson, 2020/08/12
- [PATCH 03/17] crypto: Assume blocksize is a power of 2, Richard Henderson, 2020/08/12
- [PATCH 04/17] crypto: Rename cipher include files to .inc.c, Richard Henderson, 2020/08/12
- [PATCH 05/17] crypto: Remove redundant includes, Richard Henderson, 2020/08/12
- [PATCH 06/17] crypto/nettle: Fix xts_encrypt arguments,
Richard Henderson <=
- [PATCH 07/17] crypto: Use the correct const type for driver, Richard Henderson, 2020/08/12
- [PATCH 08/17] crypto: Allocate QCryptoCipher with the subclass, Richard Henderson, 2020/08/12
- [PATCH 09/17] crypto: Move cipher->driver init to qcrypto_*_cipher_ctx_new, Richard Henderson, 2020/08/12
- [PATCH 10/17] crypto: Constify cipher data tables, Richard Henderson, 2020/08/12