[1/2] cryptodev: add option to use ec base point in ecpm

Message ID 20220818074130.37894-2-arkadiuszx.kusztal@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series cryptodev: extend elliptic curves operations |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Arkadiusz Kusztal Aug. 18, 2022, 7:41 a.m. UTC
  Add option to use elliptic curve generator point instead
of setting it manually. It corresponds to the public point
generation in EC Diffie-Hellman key exchange.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 lib/cryptodev/rte_crypto_asym.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
  

Comments

Ji, Kai Sept. 28, 2022, 5:56 p.m. UTC | #1
The code changes only update the comment description of rte_crypto_ec_point.
Can you update commit message to indicate the comments update on expected behaviour when x.data and y.data equal to NULL. 

Acked-by: Kai Ji <kai.ji@intel.com>

> -----Original Message-----
> From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> Sent: Thursday, August 18, 2022 8:41 AM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH 1/2] cryptodev: add option to use ec base point in ecpm
> 
> Add option to use elliptic curve generator point instead of setting it manually.
> It corresponds to the public point generation in EC Diffie-Hellman key
> exchange.
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  lib/cryptodev/rte_crypto_asym.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/cryptodev/rte_crypto_asym.h
> b/lib/cryptodev/rte_crypto_asym.h index 8ae43d5f3d..62987f860e 100644
> --- a/lib/cryptodev/rte_crypto_asym.h
> +++ b/lib/cryptodev/rte_crypto_asym.h
> @@ -593,7 +593,11 @@ struct rte_crypto_ecdsa_op_param {
>   */
>  struct rte_crypto_ecpm_op_param {
>  	struct rte_crypto_ec_point p;
> -	/**< x and y coordinates of input point */
> +	/**<
> +	 * x and y coordinates of input point,
> +	 * in case both x.data and y.data are set to NULL
> +	 * selected ellitpic curve generator point is used
> +	 */
> 
>  	struct rte_crypto_ec_point r;
>  	/**< x and y coordinates of resultant point */
> --
> 2.13.6
  
Akhil Goyal Sept. 30, 2022, 5:52 p.m. UTC | #2
> Add option to use elliptic curve generator point instead
> of setting it manually. It corresponds to the public point
> generation in EC Diffie-Hellman key exchange.
> 

The title talks about adding an option to use EC base point in ECPM
But the description and code changes does not match.

Can you please update this patch with appropriate title and description?

> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  lib/cryptodev/rte_crypto_asym.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
> index 8ae43d5f3d..62987f860e 100644
> --- a/lib/cryptodev/rte_crypto_asym.h
> +++ b/lib/cryptodev/rte_crypto_asym.h
> @@ -593,7 +593,11 @@ struct rte_crypto_ecdsa_op_param {
>   */
>  struct rte_crypto_ecpm_op_param {
>  	struct rte_crypto_ec_point p;
> -	/**< x and y coordinates of input point */
> +	/**<
> +	 * x and y coordinates of input point,
> +	 * in case both x.data and y.data are set to NULL
> +	 * selected ellitpic curve generator point is used
> +	 */
> 
>  	struct rte_crypto_ec_point r;
>  	/**< x and y coordinates of resultant point */
> --
> 2.13.6
  

Patch

diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index 8ae43d5f3d..62987f860e 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -593,7 +593,11 @@  struct rte_crypto_ecdsa_op_param {
  */
 struct rte_crypto_ecpm_op_param {
 	struct rte_crypto_ec_point p;
-	/**< x and y coordinates of input point */
+	/**<
+	 * x and y coordinates of input point,
+	 * in case both x.data and y.data are set to NULL
+	 * selected ellitpic curve generator point is used
+	 */
 
 	struct rte_crypto_ec_point r;
 	/**< x and y coordinates of resultant point */