From d0fff9500afbd5ad34b6624e96107ec3b313de6f Mon Sep 17 00:00:00 2001 From: Ciara Power Date: Tue, 21 Jun 2022 11:41:32 +0000 Subject: [PATCH] test/crypto: fix cipher offset for ZUC [ upstream commit 7a0f8fe76bd03dc8b61965040a66409996afa717 ] The cipher offset in bits was not being used in ZUC encryption test functions when creating the operation, it was hardcoded to 0. This is fixed to use the offset from the test vector as intended. Fixes: fd01a9be38d5 ("test/crypto: move IV to crypto op private data") Signed-off-by: Ciara Power Acked-by: Kai Ji --- app/test/test_cryptodev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 7ecfe8fac0..580702d6e3 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -5455,7 +5455,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata) retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, tdata->cipher_iv.len, tdata->plaintext.len, - 0); + tdata->validCipherOffsetInBits.len); if (retval < 0) return retval; @@ -5542,7 +5542,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata) /* Create ZUC operation */ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, tdata->cipher_iv.len, tdata->plaintext.len, - 0); + tdata->validCipherOffsetInBits.len); if (retval < 0) return retval;