[EXT] [PATCH v2 01/14] cryptodev: redefine ec group enum
Akhil Goyal
gakhil at marvell.com
Thu May 26 11:40:39 CEST 2022
> - 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 <arkadiuszx.kusztal at intel.com>
> ---
> 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://datatracker.ietf.org/doc/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
Minor nit.
tls->TLS
With this fixed,
Acked-by: Akhil Goyal <gakhil at marvell.com>
> + * 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
More information about the dev
mailing list