[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/17] crypto/nettle: Fix xts_encrypt arguments
From: |
Daniel P . Berrangé |
Subject: |
[PULL 05/17] crypto/nettle: Fix xts_encrypt arguments |
Date: |
Thu, 10 Sep 2020 11:06:11 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
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>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
crypto/cipher-nettle.c.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/cipher-nettle.c.inc b/crypto/cipher-nettle.c.inc
index 256931a823..0404cfc6da 100644
--- a/crypto/cipher-nettle.c.inc
+++ b/crypto/cipher-nettle.c.inc
@@ -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.26.2
- [PULL 00/17] Crypto next patches, Daniel P . Berrangé, 2020/09/10
- [PULL 01/17] tests: fix output message formatting for crypto benchmarks, Daniel P . Berrangé, 2020/09/10
- [PULL 02/17] crypto: Assume blocksize is a power of 2, Daniel P . Berrangé, 2020/09/10
- [PULL 03/17] crypto: Rename cipher include files to .c.inc, Daniel P . Berrangé, 2020/09/10
- [PULL 04/17] crypto: Remove redundant includes, Daniel P . Berrangé, 2020/09/10
- [PULL 05/17] crypto/nettle: Fix xts_encrypt arguments,
Daniel P . Berrangé <=
- [PULL 06/17] crypto: Move QCryptoCipherDriver typedef to crypto/cipher.h, Daniel P . Berrangé, 2020/09/10
- [PULL 07/17] crypto: Use the correct const type for driver, Daniel P . Berrangé, 2020/09/10
- [PULL 08/17] crypto: Allocate QCryptoCipher with the subclass, Daniel P . Berrangé, 2020/09/10
- [PULL 09/17] crypto: Move cipher->driver init to qcrypto_*_cipher_ctx_new, Daniel P . Berrangé, 2020/09/10
- [PULL 11/17] crypto/builtin: Remove odd-sized AES block handling, Daniel P . Berrangé, 2020/09/10
- [PULL 12/17] crypto/builtin: Merge qcrypto_cipher_aes_{ecb, xts}_{en, de}crypt, Daniel P . Berrangé, 2020/09/10
- [PULL 10/17] crypto: Constify cipher data tables, Daniel P . Berrangé, 2020/09/10
- [PULL 13/17] crypto/builtin: Move AES_cbc_encrypt into cipher-builtin.inc.c, Daniel P . Berrangé, 2020/09/10
- [PULL 14/17] crypto/builtin: Split and simplify AES_encrypt_cbc, Daniel P . Berrangé, 2020/09/10
- [PULL 15/17] crypto/builtin: Split QCryptoCipherBuiltin into subclasses, Daniel P . Berrangé, 2020/09/10