From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3EC1C433F5 for ; Mon, 30 May 2022 15:39:45 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4688D410E3; Mon, 30 May 2022 17:39:42 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id C96B1400D6 for ; Mon, 30 May 2022 17:39:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653925178; x=1685461178; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=4JyrQy28oEJcX5Y7lLoWAtLv3swn0ab124++KqaTOkE=; b=m2aOkJAPWMCWtG355i0XHH4wG9rSlfYvn+6AJT5R1zIoNXa8kjgzyl0X eh62iqoClPeofbKZhdhe+MGNLWAkKouhwZUFROvzpgEJkrHQcCpLrdxDv iv/Q7NOz836wuyB2DhGTS3RZntcCnXlHRc7dO6SS2QeBNLnOQtD+euf/5 uXPcrbQDQHnjCNTIu0EEggHGALSEtBhWeRa8rc7RhSe9GcM2GtNtJZ1GO e9T6URbYAWPGAlcKvRH1pGMWZ8+YZsEGr2FjHn6FWw8zMypVVQrSU6yg7 ye70qHpPnrSM4LTPjW3wrRMQWnoo6lWpORYxt0IcecGd5Fjk5nN5C5eMD Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10363"; a="338069407" X-IronPort-AV: E=Sophos;i="5.91,263,1647327600"; d="scan'208";a="338069407" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 08:39:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,263,1647327600"; d="scan'208";a="751677887" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by orsmga005.jf.intel.com with ESMTP; 30 May 2022 08:39:37 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH v3 01/12] cryptodev: redefine ec group enum Date: Mon, 30 May 2022 15:31:48 +0100 Message-Id: <20220530143159.13672-2-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20220530143159.13672-1-arkadiuszx.kusztal@intel.com> References: <20220530143159.13672-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 a group (it comes from the 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..87df9b2ce3 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 a 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