All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] cryptodev: extend elliptic curves operations
@ 2022-08-18  7:41 Arek Kusztal
  2022-08-18  7:41 ` [PATCH 1/2] cryptodev: add option to use ec base point in ecpm Arek Kusztal
  2022-08-18  7:41 ` [PATCH 2/2] cryptodev: add ec point verification Arek Kusztal
  0 siblings, 2 replies; 6+ messages in thread
From: Arek Kusztal @ 2022-08-18  7:41 UTC (permalink / raw)
  To: dev; +Cc: gakhil, Arek Kusztal

This pathset adds two new capabilities in asym cryptodev:
1) Base point instead of manual point can be used with point multiplication too.
2) Point verify can be used without ECDH, now it will be possible
to use point verification for other ec operations.

Arek Kusztal (2):
  cryptodev: add option to use ec base point in ecpm
  cryptodev: add ec point verification

 doc/guides/cryptodevs/features/default.ini |  1 +
 lib/cryptodev/rte_crypto_asym.h            | 17 ++++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

-- 
2.13.6


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] cryptodev: add option to use ec base point in ecpm
  2022-08-18  7:41 [PATCH 0/2] cryptodev: extend elliptic curves operations Arek Kusztal
@ 2022-08-18  7:41 ` Arek Kusztal
  2022-09-28 17:56   ` Ji, Kai
  2022-09-30 17:52   ` [EXT] " Akhil Goyal
  2022-08-18  7:41 ` [PATCH 2/2] cryptodev: add ec point verification Arek Kusztal
  1 sibling, 2 replies; 6+ messages in thread
From: Arek Kusztal @ 2022-08-18  7:41 UTC (permalink / raw)
  To: dev; +Cc: gakhil, Arek Kusztal

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] cryptodev: add ec point verification
  2022-08-18  7:41 [PATCH 0/2] cryptodev: extend elliptic curves operations Arek Kusztal
  2022-08-18  7:41 ` [PATCH 1/2] cryptodev: add option to use ec base point in ecpm Arek Kusztal
@ 2022-08-18  7:41 ` Arek Kusztal
  2022-09-28 17:58   ` Ji, Kai
  1 sibling, 1 reply; 6+ messages in thread
From: Arek Kusztal @ 2022-08-18  7:41 UTC (permalink / raw)
  To: dev; +Cc: gakhil, Arek Kusztal

This addition complements point verification in ECDH
operation. This will allow to use point verification in other
situations than pure ECDH.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 doc/guides/cryptodevs/features/default.ini |  1 +
 lib/cryptodev/rte_crypto_asym.h            | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 7371ca6644..7922160532 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -119,6 +119,7 @@ Diffie-hellman          =
 ECDSA                   =
 ECPM                    =
 ECDH                    =
+EC Point Verify         =
 
 ;
 ; Supported Operating systems of a default crypto driver.
diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index 62987f860e..7d94ba705e 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -116,6 +116,8 @@ enum rte_crypto_asym_xform_type {
 	/**< Elliptic Curve Diffie Hellman */
 	RTE_CRYPTO_ASYM_XFORM_ECPM,
 	/**< Elliptic Curve Point Multiplication */
+	RTE_CRYPTO_ASYM_XFORM_EC_POINT_VERIFY,
+	/**< Elliptic Curve Point Verification */
 	RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
 	/**< End of list */
 };
@@ -607,6 +609,14 @@ struct rte_crypto_ecpm_op_param {
 };
 
 /**
+ * Structure for EC point verification operation
+ */
+struct rte_crypto_ec_point_verify_op {
+	struct rte_crypto_ec_point p;
+	/**< x and y coordinates of point to be verified */
+};
+
+/**
  * Asymmetric crypto transform data
  *
  * Structure describing asym xforms.
@@ -666,6 +676,7 @@ struct rte_crypto_asym_op {
 		struct rte_crypto_dsa_op_param dsa;
 		struct rte_crypto_ecdsa_op_param ecdsa;
 		struct rte_crypto_ecpm_op_param ecpm;
+		struct rte_crypto_ec_point_verify_op ecp_verify;
 	};
 	uint16_t flags;
 	/**<
-- 
2.13.6


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] cryptodev: add option to use ec base point in ecpm
  2022-08-18  7:41 ` [PATCH 1/2] cryptodev: add option to use ec base point in ecpm Arek Kusztal
@ 2022-09-28 17:56   ` Ji, Kai
  2022-09-30 17:52   ` [EXT] " Akhil Goyal
  1 sibling, 0 replies; 6+ messages in thread
From: Ji, Kai @ 2022-09-28 17:56 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev; +Cc: gakhil, Kusztal, ArkadiuszX

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 2/2] cryptodev: add ec point verification
  2022-08-18  7:41 ` [PATCH 2/2] cryptodev: add ec point verification Arek Kusztal
@ 2022-09-28 17:58   ` Ji, Kai
  0 siblings, 0 replies; 6+ messages in thread
From: Ji, Kai @ 2022-09-28 17:58 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev; +Cc: gakhil, Kusztal, ArkadiuszX

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

> -----Original Message-----
> From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> Sent: Thursday, August 18, 2022 8:42 AM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH 2/2] cryptodev: add ec point verification
> 
> This addition complements point verification in ECDH operation. This will
> allow to use point verification in other situations than pure ECDH.
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [EXT] [PATCH 1/2] cryptodev: add option to use ec base point in ecpm
  2022-08-18  7:41 ` [PATCH 1/2] cryptodev: add option to use ec base point in ecpm Arek Kusztal
  2022-09-28 17:56   ` Ji, Kai
@ 2022-09-30 17:52   ` Akhil Goyal
  1 sibling, 0 replies; 6+ messages in thread
From: Akhil Goyal @ 2022-09-30 17:52 UTC (permalink / raw)
  To: Arek Kusztal, dev, Kai Ji


> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-30 17:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18  7:41 [PATCH 0/2] cryptodev: extend elliptic curves operations Arek Kusztal
2022-08-18  7:41 ` [PATCH 1/2] cryptodev: add option to use ec base point in ecpm Arek Kusztal
2022-09-28 17:56   ` Ji, Kai
2022-09-30 17:52   ` [EXT] " Akhil Goyal
2022-08-18  7:41 ` [PATCH 2/2] cryptodev: add ec point verification Arek Kusztal
2022-09-28 17:58   ` Ji, Kai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.