Skip to content

Commit

Permalink
crypto/qat: fix an unset length of modexp/inv
Browse files Browse the repository at this point in the history
This commit fixes an unset length in modular algorithms
in QAT asymmetric crypto PMD.

Fixes: 3b78aa7 ("crypto/qat: refactor asymmetric crypto functions")
Cc: [email protected]

Signed-off-by: Arkadiusz Kusztal <[email protected]>
  • Loading branch information
arekk67 authored and Akhil Goyal committed Nov 6, 2024
1 parent 20687f4 commit 5855c00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/crypto/qat/qat_asym.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ modexp_collect(struct rte_crypto_asym_op *asym_op,
rte_memcpy(modexp_result,
cookie->output_array[0] + alg_bytesize
- n.length, n.length);
asym_op->modex.result.length = alg_bytesize;
HEXDUMP("ModExp result", cookie->output_array[0],
alg_bytesize);
return RTE_CRYPTO_OP_STATUS_SUCCESS;
Expand Down Expand Up @@ -338,6 +339,7 @@ modinv_collect(struct rte_crypto_asym_op *asym_op,
- n.length),
cookie->output_array[0] + alg_bytesize
- n.length, n.length);
asym_op->modinv.result.length = alg_bytesize;
HEXDUMP("ModInv result", cookie->output_array[0],
alg_bytesize);
return RTE_CRYPTO_OP_STATUS_SUCCESS;
Expand Down

0 comments on commit 5855c00

Please sign in to comment.