Skip to content

Commit

Permalink
test/crypto: fix cipher offset for ZUC
Browse files Browse the repository at this point in the history
[ 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: fd01a9b ("test/crypto: move IV to crypto op private data")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
  • Loading branch information
ciarapow authored and cpaelzer committed Jul 7, 2022
1 parent ae21e9d commit d0fff95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/test/test_cryptodev.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit d0fff95

Please sign in to comment.