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 45244A0507; Wed, 6 Apr 2022 16:27:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0C9540689; Wed, 6 Apr 2022 16:27:11 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 150744014F for ; Wed, 6 Apr 2022 16:27:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649255230; x=1680791230; h=from:to:cc:subject:date:message-id; bh=o64CvzztA2BldIIyfHzUUOXDhpjCdL7t5nVB9eFXY8U=; b=F/lf+Aep7WHCS+1d4hi/IUO5gPFvFQ4FDkO/V3Yt+I1WZKHzmTGQXqZD aS/t8WFP2HTzYDDkYjQfjGkRU1RAEsBFa9nxgXC3a4IrqtRyNXwJSqa09 2wSJSlV4FVjSYvrQZZGhOKEyTgGtzAlqr6VXtpqmXJCFQ0UxaSFbI5zP7 MRUXYhI9NQPXS18R9uFvMcY2ypLiiRkkIGY3cJvo9oluFxe1mXVnYnoJb MKnAERdjPmWaFAHr6RWYO82VGrf6ogEO1HgQaEI2CsqAR6cRH7eqj3Lwp wboyR5TT3KfvR3+cBmlHuPZrPvbeHAk305AWLf2fQSkQLG+zdaW+qU16M g==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="347505800" X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="347505800" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 07:12:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="588386010" Received: from silpixa00400308.ir.intel.com ([10.237.214.95]) by orsmga001.jf.intel.com with ESMTP; 06 Apr 2022 07:12:02 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, kai.ji@intel.com, Arek Kusztal Subject: [PATCH 1/2] cryptodev: move dh type from xform to dh op Date: Wed, 6 Apr 2022 15:11:57 +0100 Message-Id: <20220406141158.15703-1-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.17.1 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 Operation type (PUBLIC_KEY_GENERATION, SHARED_SECRET) should be free to choose for any operation. One xform/session should be enough to perform both DH operations, if this is xform member, session needs to be created twice for the same group, similar problem would be observed in sessionless case. Additionally it will help extending DH to support Elliptic Curves. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index cd24d4b07b..f0b5787f33 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -256,8 +256,6 @@ struct rte_crypto_modinv_xform { * */ struct rte_crypto_dh_xform { - enum rte_crypto_asym_op_type type; - /**< Setup xform for key generate or shared secret compute */ rte_crypto_uint p; /**< Prime modulus data */ rte_crypto_uint g; @@ -391,6 +389,8 @@ struct rte_crypto_rsa_op_param { * @note: */ struct rte_crypto_dh_op_param { + enum rte_crypto_asym_op_type op_type; + /**< Diffie-Hellman phase */ rte_crypto_uint pub_key; /**< * Output generated public key when xform type is -- 2.13.6