From patchwork Thu Aug 18 07:41:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Kusztal X-Patchwork-Id: 115232 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B1A8A034C; Thu, 18 Aug 2022 10:50:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22D7841611; Thu, 18 Aug 2022 10:50:22 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 35C0C41109 for ; Thu, 18 Aug 2022 10:50:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660812620; x=1692348620; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=9KFVCzLDeQUwvLaeM2jjLjOL8F3bzdizSVXjse0PwGY=; b=Nwub89y8prC9/cI8OHpjsB3/7oFgpQyYYVW9uJ8aPbzctC86LzhcWV4M hfF0ahRKEi8iq6qsnnI3KxHAhrQNvK6w9sZNpNEiGnYQ4CnE9bOKQGDNA Oh6BOmZybY1qrgCUeKWfjr6c17qaMG4unc0mfsbrxQUKGTMHK0iqsfCVR ER1ZBTZch03xA3kxe2j4Ex3Sz/libVOP+PSZ1tG7eGdJarihRzQd3o0+9 lLHVvnyLZPdgJhvc7czuGPVkOwz6wgqiSM2C7Yj6pd3iaK5akh0rRfVYN APjoMY6btciDY4H3RHsh2Nv15URdSTId4HrBySwyTmpe5uZ7fbvkYTtKL w==; X-IronPort-AV: E=McAfee;i="6500,9779,10442"; a="378999133" X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="378999133" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2022 01:50:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="750029648" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by fmsmga001.fm.intel.com with ESMTP; 18 Aug 2022 01:50:19 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, Arek Kusztal Subject: [PATCH 2/2] cryptodev: add ec point verification Date: Thu, 18 Aug 2022 08:41:30 +0100 Message-Id: <20220818074130.37894-3-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20220818074130.37894-1-arkadiuszx.kusztal@intel.com> References: <20220818074130.37894-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 This addition complements point verification in ECDH operation. This will allow to use point verification in other situations than pure ECDH. Signed-off-by: Arek Kusztal Acked-by: Kai Ji --- doc/guides/cryptodevs/features/default.ini | 1 + lib/cryptodev/rte_crypto_asym.h | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 7371ca6644..7922160532 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -119,6 +119,7 @@ Diffie-hellman = ECDSA = ECPM = ECDH = +EC Point Verify = ; ; Supported Operating systems of a default crypto driver. diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index 62987f860e..7d94ba705e 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -116,6 +116,8 @@ enum rte_crypto_asym_xform_type { /**< Elliptic Curve Diffie Hellman */ RTE_CRYPTO_ASYM_XFORM_ECPM, /**< Elliptic Curve Point Multiplication */ + RTE_CRYPTO_ASYM_XFORM_EC_POINT_VERIFY, + /**< Elliptic Curve Point Verification */ RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END /**< End of list */ }; @@ -607,6 +609,14 @@ struct rte_crypto_ecpm_op_param { }; /** + * Structure for EC point verification operation + */ +struct rte_crypto_ec_point_verify_op { + struct rte_crypto_ec_point p; + /**< x and y coordinates of point to be verified */ +}; + +/** * Asymmetric crypto transform data * * Structure describing asym xforms. @@ -666,6 +676,7 @@ struct rte_crypto_asym_op { struct rte_crypto_dsa_op_param dsa; struct rte_crypto_ecdsa_op_param ecdsa; struct rte_crypto_ecpm_op_param ecpm; + struct rte_crypto_ec_point_verify_op ecp_verify; }; uint16_t flags; /**<