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 C9D2FA0548; Wed, 1 Jun 2022 12:11:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC16442B85; Wed, 1 Jun 2022 12:10:53 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 9CDB442B6E for ; Wed, 1 Jun 2022 12:10:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654078251; x=1685614251; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=NzBDSr+/emIoxe7kzNHipunAk6OPlawnam5sHU5OkI4=; b=hcSlf9tZ1S14bONUVOrhU894/X6Bmrizq2NdonqgmgCYl5sAXpFlr9eb 06pSvNcibvGRDlDxj3eZjXf4IopDUEHyK0Qt0AzNlKBnjO3tKZZlAiOsS I2CjDd6zauqshPJmB83niDVO66msVnUdspM+i1IIApkyhm9UWvUE+KqKJ Y5z6Bw9kvXfKDnJcAJ3g20K3sY/gftT1aWCE7ANNeljbV0S4Wov6y1baB hzKL4Y1TIObR75VLzbm32LDU3UuulHtt6G2G9hBzle+8MmnLtBFd2D7Wm DKHdDmi/go3aVCDMPEEZffD5wU0BmcQO/Tb+02q99BIMuejArtHQ+BE7u w==; X-IronPort-AV: E=McAfee;i="6400,9594,10364"; a="275616411" X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="275616411" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2022 03:10:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="606185889" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by orsmga008.jf.intel.com with ESMTP; 01 Jun 2022 03:10:34 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH v5 04/12] cryptodev: clarify usage of private key in dh Date: Wed, 1 Jun 2022 10:02:41 +0100 Message-Id: <20220601090249.86865-5-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20220601090249.86865-1-arkadiuszx.kusztal@intel.com> References: <20220601090249.86865-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 eb753b4016..619c0614bf 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -416,6 +416,11 @@ struct rte_crypto_dh_op_param { * Input - private key, when dh xform ke_type is one of: * RTE_CRYPTO_ASYM_KE_PUB_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_PUB_KEY_GENERATE, CSRNG capable + * device will generate a private key and use it for public + * key generation. */ rte_crypto_uint shared_secret; -- 2.13.6