From patchwork Thu Apr 7 13:43:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Kusztal X-Patchwork-Id: 109424 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 BB7E9A0032; Thu, 7 Apr 2022 15:43:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE1A7410EF; Thu, 7 Apr 2022 15:43:41 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id AF2FE40689 for ; Thu, 7 Apr 2022 15:43:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649339019; x=1680875019; h=from:to:cc:subject:date:message-id; bh=mQ7V1bHu5G1F+xIEjJTQ3fBrdykBQ9khWy+wV00Jw08=; b=oHBfXrL3ZtoKJoCpZ76qHQ/a7TZ0nFRrtlcZ4pZ/2zSY7PHvubYAbKI4 7cB03GiaLoTWf3rxDJxx6p6csgtTLkI23TeCiN0nIo7eW18n093riqDCm hhVAYxMdAns+2Ix6M6AWQ4p21mtrnM1IXsX2LqoHXcRhYksufb3r7oXJP 7y9Lf8OnlJAzX12nJ3oPp568XilpnS+KPpbkffQI+niAoxr7Jz9/EAclB qQFmcsMNMndbo00XmERF/hUCSEmFm/Ve/hXORVysRTdWnD8baA07cXTiw 9mb4SBJcnZJ1ZbonFWVSLbNvdu55CiBzfQKoTriU8poV4WHn9NrunZnnN Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10309"; a="248851876" X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="248851876" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 06:43:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="697795989" Received: from silpixa00400308.ir.intel.com ([10.237.214.95]) by fmsmga001.fm.intel.com with ESMTP; 07 Apr 2022 06:43:36 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH] cryptodev: add support for 25519 and 448 curves Date: Thu, 7 Apr 2022 14:43:34 +0100 Message-Id: <20220407134334.20226-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 This commit adds support for following elliptic curves: 1) Curve25519 2) Curve448 Signed-off-by: Arek Kusztal Acked-by: Akhil Goyal --- lib/cryptodev/rte_crypto_asym.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index cd24d4b07b..775b2f6277 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -48,6 +48,8 @@ enum rte_crypto_ec_group { RTE_CRYPTO_EC_GROUP_SECP256R1 = 23, RTE_CRYPTO_EC_GROUP_SECP384R1 = 24, RTE_CRYPTO_EC_GROUP_SECP521R1 = 25, + RTE_CRYPTO_EC_GROUP_CURVE25519 = 29, + RTE_CRYPTO_EC_GROUP_CURVE448 = 30, }; /** @@ -180,9 +182,17 @@ typedef rte_crypto_param rte_crypto_uint; */ struct rte_crypto_ec_point { rte_crypto_param x; - /**< X coordinate */ + /**< + * X coordinate + * For curve25519 and curve448 - little-endian integer + * otherwise, big-endian integer + */ rte_crypto_param y; - /**< Y coordinate */ + /**< + * Y coordinate + * For curve25519 and curve448 - little-endian integer + * otherwise, big-endian integer + */ }; /**