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 19013A0555; Wed, 25 May 2022 19:03:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 087D040C35; Wed, 25 May 2022 19:03:13 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id CA6A64067B for ; Wed, 25 May 2022 19:03:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653498192; x=1685034192; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=fOFPYWUQAp8oRmzJKvjqAEOhn0i6PCNKINyWaBYnjhg=; b=MJ9gx78/U6kSbazl+3o2QHQMFP4IzAAcvEi/PXLHHZ/bFGjKnQO8Bdob 7r280Y9eBBl8FzG/fS9UlBoUiTFY+EV8LH9LBC0NPCeDG7mJTwHRmlry5 tWep+PXYEJzyDnQFmVdvMkLSLz8GPL50OGF+3eX6dOGlHgrIp8aGySE4c iTiG5/5F9xchrdvmzLo2ZeARSHu0/ZLqXOsSAgT0DNhTwYVbsrF7/M2Ga P72HKhd1fIHzP+5DDG1T0axC+xWKy3Cyv1gnusFqesf8AXUXhWraTno64 r6iULaFB/aDf5vOlG2qJKxuusjtzN3LTq8n4/a62LKEbhKA7kBau0jfEW w==; X-IronPort-AV: E=McAfee;i="6400,9594,10358"; a="273596028" X-IronPort-AV: E=Sophos;i="5.91,250,1647327600"; d="scan'208";a="273596028" 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:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,250,1647327600"; d="scan'208";a="664502271" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by FMSMGA003.fm.intel.com with ESMTP; 25 May 2022 10:01:08 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH v2 01/14] cryptodev: redefine ec group enum Date: Wed, 25 May 2022 16:53:11 +0100 Message-Id: <20220525155324.9288-2-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 - EC enum was renamed to rte_crypto_curve_id. Elliptic curve enum name was incorrectly associated with group (it comes from current tls registry name). - Clarified comments about TLS deprecation. Some curves included are deprecated with TLS 1.3. Comments to address it were added. - Clarified FFDH groups usage. Elliptic curves IDs in TLS are placed in the same registry as FFDH. Cryptodev does not assign specific groups, and if specific groups would be assigned by DPDK, it cannot be TLS SupportedGroups registry, as it would conflict with other protocols like IPSec. - Added IANA reference. Only few selected curves are included in previously referenced rfc8422. IANA reference is added instead. - Removed UNKNOWN ec group. There is no default value, and there is no UNKNOWN elliptic curve. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index cd24d4b07b..7206652458 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -38,16 +38,20 @@ extern const char * rte_crypto_asym_op_strings[]; /** - * TLS named curves - * https://tools.ietf.org/html/rfc8422 + * List of elliptic curves. This enum aligns with + * TLS "Supported Groups" registry (previously known as + * NamedCurve registry). FFDH groups are not, and will not + * be included in this list. + * Deprecation for selected curve in tls does not deprecate + * the selected curve in Cryptodev. + * https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml */ -enum rte_crypto_ec_group { - RTE_CRYPTO_EC_GROUP_UNKNOWN = 0, +enum rte_crypto_curve_id { RTE_CRYPTO_EC_GROUP_SECP192R1 = 19, RTE_CRYPTO_EC_GROUP_SECP224R1 = 21, RTE_CRYPTO_EC_GROUP_SECP256R1 = 23, RTE_CRYPTO_EC_GROUP_SECP384R1 = 24, - RTE_CRYPTO_EC_GROUP_SECP521R1 = 25, + RTE_CRYPTO_EC_GROUP_SECP521R1 = 25 }; /** @@ -294,7 +298,7 @@ struct rte_crypto_dsa_xform { * */ struct rte_crypto_ec_xform { - enum rte_crypto_ec_group curve_id; + enum rte_crypto_curve_id curve_id; /**< Pre-defined ec groups */ }; -- 2.13.6