[v2,5/7] cryptodev: use generic EC xform params for SM2
Checks
Commit Message
SM2 curve could use generic EC xform as it is yet another EC.
This would also require SM2 curve ID enumerated
along with other curves, as listed in:
https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
app/test/test_cryptodev_sm2_test_vectors.h | 4 +++-
doc/guides/rel_notes/release_23_11.rst | 2 ++
lib/cryptodev/rte_crypto_asym.h | 6 ++----
3 files changed, 7 insertions(+), 5 deletions(-)
@@ -17,6 +17,7 @@ struct crypto_testsuite_sm2_params {
rte_crypto_param id;
rte_crypto_param cipher;
rte_crypto_param message;
+ int curve;
};
static uint8_t fp256_pkey[] = {
@@ -123,7 +124,8 @@ struct crypto_testsuite_sm2_params sm2_param_fp256 = {
.cipher = {
.data = fp256_cipher,
.length = sizeof(fp256_cipher),
- }
+ },
+ .curve = RTE_CRYPTO_EC_GROUP_SM2
};
#endif /* __TEST_CRYPTODEV_SM2_TEST_VECTORS_H__ */
@@ -97,6 +97,8 @@ Removed Items
* kni: Removed the Kernel Network Interface (KNI) library and driver.
+* crypto: Removed SM2 xform parameter in asymmetric xform.
+
API Changes
-----------
@@ -69,7 +69,8 @@ enum rte_crypto_curve_id {
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,
+ RTE_CRYPTO_EC_GROUP_SM2 = 41,
};
/**
@@ -637,9 +638,6 @@ struct rte_crypto_asym_xform {
/**< EC xform parameters, used by elliptic curve based
* operations.
*/
-
- struct rte_crypto_sm2_xform sm2;
- /**< SM2 xform parameters */
};
};