[v4,01/12] cryptodev: redefine ec group enum
Checks
Commit Message
- 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 <arkadiuszx.kusztal@intel.com>
---
lib/cryptodev/rte_crypto_asym.h | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
Comments
> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Tuesday, May 31, 2022 5:04 AM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v4 01/12] cryptodev: redefine ec group enum
>
> - 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 <arkadiuszx.kusztal@intel.com>
> ---
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> - 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 <arkadiuszx.kusztal@intel.com>
> ---
The Patch do not apply cleanly. Please fix.
@@ -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 */
};