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 6C2AFA0555; Wed, 25 May 2022 19:03:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DA9540E2D; Wed, 25 May 2022 19:03:52 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id AC2F140143 for ; Wed, 25 May 2022 19:03:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653498229; x=1685034229; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=lR018pcU6YfRK134xsagEBS8cuw1POLxWISxL8RXk1c=; b=PTqUtns/nBlv9QdmIXdSkU2/Xg1pG/rIjFr2PylXXYQB8KmI1Wj3pxyZ qja7XwJ38+2klXILM7waOjD0EYmGQUfxTwl76aETLvXmlI1F5OUjCKEOz Q6EpBSjYebk4QWadEsHCBKJzlMLf3Jqr/++0t2MebWWk7X3fySIxQLGIe PSo72H1/YS4yAlijtSkjIXIBeGO7W7oy3mJFumF0d+9shKtfmlD4fYSgx 0LLPD7TJGg4n6vpqmg9+j/VwNnp0DOsJhEHqdJiXdwtD+KFSsEBgDOUUV xzkxIWsTDZEsSOuypIshzf0hYtVfS3MpPMfwB3poEn5Wssh3jo8YGnhw9 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10358"; a="273596250" X-IronPort-AV: E=Sophos;i="5.91,250,1647327600"; d="scan'208";a="273596250" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2022 10:01:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,250,1647327600"; d="scan'208";a="664502333" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by FMSMGA003.fm.intel.com with ESMTP; 25 May 2022 10:01:15 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH v2 05/14] cryptodev: clarify usage of private key in dh Date: Wed, 25 May 2022 16:53:15 +0100 Message-Id: <20220525155324.9288-6-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20220525155324.9288-1-arkadiuszx.kusztal@intel.com> References: <20220525155324.9288-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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index ef8686fda8..1a77a74478 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -394,6 +394,11 @@ struct rte_crypto_dh_op_param { * Input - private key, when xform type is one of: * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE. + * + * In case priv_key.length is 0 and xform 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. */ rte_crypto_uint shared_secret; -- 2.13.6