patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 3/3] crypto/qat: fix ECDH implementation
       [not found] <20250827092358.765222-1-radu.nicolau@intel.com>
@ 2025-08-27  9:23 ` Radu Nicolau
  0 siblings, 0 replies; only message in thread
From: Radu Nicolau @ 2025-08-27  9:23 UTC (permalink / raw)
  To: dev; +Cc: Radu Nicolau, stable, Kai Ji, Arkadiusz Kusztal

Read EC parameters from the xform, not from the asym_op,
where they may not be set.

Fixes: 305e1f856f0c ("crypto/qat: add ECDH key exchange algorithm")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/crypto/qat/qat_asym.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index bd22fc0a6f..e7042f702f 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -798,13 +798,13 @@ ecdh_set_input(struct icp_qat_fw_pke_request *qat_req,
 	qat_func_alignsize = RTE_ALIGN_CEIL(qat_function.bytesize, 8);
 
 	if (asym_op->ecdh.ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE) {
-		SET_PKE_LN(asym_op->ecdh.priv_key, qat_func_alignsize, 0);
+		SET_PKE_LN(xform->ec.pkey, qat_func_alignsize, 0);
 		SET_PKE_LN_EC(curve[curve_id], x, 1);
 		SET_PKE_LN_EC(curve[curve_id], y, 2);
 	} else if (asym_op->ecdh.ke_type == RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE) {
-		SET_PKE_LN(asym_op->ecdh.priv_key, qat_func_alignsize, 0);
-		SET_PKE_LN(asym_op->ecdh.pub_key.x, qat_func_alignsize, 1);
-		SET_PKE_LN(asym_op->ecdh.pub_key.y, qat_func_alignsize, 2);
+		SET_PKE_LN(xform->ec.pkey, qat_func_alignsize, 0);
+		SET_PKE_LN(xform->ec.q.x, qat_func_alignsize, 1);
+		SET_PKE_LN(xform->ec.q.y, qat_func_alignsize, 2);
 	} else {
 		return -EINVAL;
 	}
-- 
2.50.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-27  9:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20250827092358.765222-1-radu.nicolau@intel.com>
2025-08-27  9:23 ` [PATCH 3/3] crypto/qat: fix ECDH implementation Radu Nicolau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).