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 B8DB9A0503; Fri, 20 May 2022 09:02:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E0B842B71; Fri, 20 May 2022 09:02:33 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id BC0E642B71 for ; Fri, 20 May 2022 09:02:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653030152; x=1684566152; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=oP6ul0nxZ5yv15GdzxGayl9eHaDt/4tbIFdjoRdotnc=; b=JYaXSX52J5BNN9d4QxhuEc9f5r6LhC6o6Cy8E9Yf9nSq1p11MZT7aDD5 +oGJOQu9+rMqPFqMgJ9NzEqwWRm9l2FiGZSHpPFM1uaf9RJbrOBaeeb/t +pUPxh4BYcu/CexUX4HKGux0qHjKmMNa7GXtGeQIDcvQudOFETjEIKE1f Mu7uydADvIiPHX5IeKCgOs5yEWvTzEbMW/a68h7aa5OAZbkHaleKAm/JE dgfkhVFDc7YTGb/IEjSZDhXTCYp0gP9wUjFs/hT7MZ/dyQ1/dRNVigCml 2M2evIwm0iOPLgToJzk/MDEFSteXkcn9H+1MKbuTFO/OWrhO84NCh+wyk w==; X-IronPort-AV: E=McAfee;i="6400,9594,10352"; a="272219637" X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="272219637" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 00:02:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="599058030" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by orsmga008.jf.intel.com with ESMTP; 20 May 2022 00:02:30 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, anoobj@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH 01/40] cryptodev: redefine ec group enum Date: Fri, 20 May 2022 06:54:06 +0100 Message-Id: <20220520055445.40063-2-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20220520055445.40063-1-arkadiuszx.kusztal@intel.com> References: <20220520055445.40063-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 is 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 in the same registry as FFDH. Cryptodev does not assign specific groups, and if specific groups would be assigned to enum 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