From: Balakrishna Bhamidipati Date: Wed, 15 Jan 2020 12:56:31 +0000 (+0530) Subject: cryptodev: support ECPM X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e98dc331e999ec84fda34613e8bd395932ce915f;p=dpdk.git cryptodev: support ECPM Asymmetric crypto library is extended to add ECPM (Elliptic Curve Point Multiplication). The required xform type and op parameters are introduced. Signed-off-by: Anoob Joseph Signed-off-by: Balakrishna Bhamidipati Signed-off-by: Sunila Sahu Acked-by: Akhil Goyal --- diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 440233d7ea..304a6a94f2 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -110,3 +110,4 @@ Modular Exponentiation = Modular Inversion = Diffie-hellman = ECDSA = +ECPM = diff --git a/doc/guides/rel_notes/release_20_02.rst b/doc/guides/rel_notes/release_20_02.rst index af8384214c..01bde80c27 100644 --- a/doc/guides/rel_notes/release_20_02.rst +++ b/doc/guides/rel_notes/release_20_02.rst @@ -66,6 +66,8 @@ New Features * Chacha20-Poly1305 AEAD algorithm can now be supported in cryptodev. * ECDSA (Elliptic Curve Digital Signature Algorithm) is added to asymmetric crypto library specifications. + * ECPM (Elliptic Curve Point Multiplication) is added to + asymmetric crypto library specifications. Removed Items diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h index e17614e972..9c866f553f 100644 --- a/lib/librte_cryptodev/rte_crypto_asym.h +++ b/lib/librte_cryptodev/rte_crypto_asym.h @@ -92,6 +92,8 @@ enum rte_crypto_asym_xform_type { /**< Elliptic Curve Digital Signature Algorithm * Perform Signature Generation and Verification. */ + RTE_CRYPTO_ASYM_XFORM_ECPM, + /**< Elliptic Curve Point Multiplication */ RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END /**< End of list */ }; @@ -598,6 +600,20 @@ struct rte_crypto_ecdsa_op_param { */ }; +/** + * Structure for EC point multiplication operation param + */ +struct rte_crypto_ecpm_op_param { + struct rte_crypto_ec_point p; + /**< x and y coordinates of input point */ + + struct rte_crypto_ec_point r; + /**< x and y coordinates of resultant point */ + + rte_crypto_param scalar; + /**< Scalar to multiply the input point */ +}; + /** * Asymmetric Cryptographic Operation. * @@ -621,6 +637,7 @@ struct rte_crypto_asym_op { struct rte_crypto_dh_op_param dh; struct rte_crypto_dsa_op_param dsa; struct rte_crypto_ecdsa_op_param ecdsa; + struct rte_crypto_ecpm_op_param ecpm; }; }; diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 2ab2c3aba2..5c6359b5cc 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -175,6 +175,7 @@ const char *rte_crypto_asym_xform_strings[] = { [RTE_CRYPTO_ASYM_XFORM_DH] = "dh", [RTE_CRYPTO_ASYM_XFORM_DSA] = "dsa", [RTE_CRYPTO_ASYM_XFORM_ECDSA] = "ecdsa", + [RTE_CRYPTO_ASYM_XFORM_ECPM] = "ecpm", }; /**