cryptodev: support ECPM
authorBalakrishna Bhamidipati <bbhamidipati@marvell.com>
Wed, 15 Jan 2020 12:56:31 +0000 (18:26 +0530)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 15 Jan 2020 14:01:55 +0000 (15:01 +0100)
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 <anoobj@marvell.com>
Signed-off-by: Balakrishna Bhamidipati <bbhamidipati@marvell.com>
Signed-off-by: Sunila Sahu <ssahu@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
doc/guides/cryptodevs/features/default.ini
doc/guides/rel_notes/release_20_02.rst
lib/librte_cryptodev/rte_crypto_asym.h
lib/librte_cryptodev/rte_cryptodev.c

index 440233d..304a6a9 100644 (file)
@@ -110,3 +110,4 @@ Modular Exponentiation  =
 Modular Inversion       =
 Diffie-hellman          =
 ECDSA                   =
+ECPM                    =
index af83842..01bde80 100644 (file)
@@ -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
index e17614e..9c866f5 100644 (file)
@@ -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;
        };
 };
 
index 2ab2c3a..5c6359b 100644 (file)
@@ -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",
 };
 
 /**