From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C0C79A0503; Fri, 20 May 2022 09:06:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 206D042BE9; Fri, 20 May 2022 09:04:08 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 8491A42BAD for ; Fri, 20 May 2022 09:04:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653030246; x=1684566246; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=PFwiC/eIzBc2kUM4jig4yrBUiFfQ9crsUOb7wYgmX9Y=; b=bU01mARjOEptYlbxUlzC/gYKeHqwQOku7dsueAUmIEXlElZQcxDDBUwR zpki01lAJv6Wr8AH+v02UQgzUl+mRXuspm8Zz+RPcTsdjpq++IhRaXJtN cPTDey3kGLib/ifWrJkN8jz80LNL8/423j9ReLvVrGA+k/s7j9a3IIh9d RwNLihKi23v1eaO+ifqAHTGxccM/4KaFSjkn0qqSgVO8KTr5roxfVCmgd CE3DS+QoN3aKLSlTYWLtk/N8mDJ5oxzgaQxHZHLB6OPuqUse8tKtQkPfJ 9ssKK3HBFEMwTJZl1NhMt3AECIDCnJR45kyehFIiYQYhPejM6o+igpXKU Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10352"; a="333140524" X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="333140524" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 00:04:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="599058676" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by orsmga008.jf.intel.com with ESMTP; 20 May 2022 00:04:04 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, anoobj@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH 38/40] cryptodev: clarify usage of private key in dh Date: Fri, 20 May 2022 06:54:43 +0100 Message-Id: <20220520055445.40063-39-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20220520055445.40063-1-arkadiuszx.kusztal@intel.com> References: <20220520055445.40063-1-arkadiuszx.kusztal@intel.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org - clarified usage of private key in Diffie-Hellman. CSRNG capable device should generate private key and then use it for public key generation. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index 01b1fdd074..a6bb70ca3f 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -459,6 +459,10 @@ struct rte_crypto_dh_op_param { * Output generated private key when op_type is * DH PRIVATE_KEY_GENERATION * Input for RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE + * In case priv_key.length is 0 and op_type is set with + * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, CSRNG capable + * device will generate private key and use it for public + * key generation. */ union { rte_crypto_uint pub_key; -- 2.13.6