diff mbox series

[v2,05/14] cryptodev: clarify usage of private key in dh

Message ID 20220525155324.9288-6-arkadiuszx.kusztal@intel.com (mailing list archive)
State Superseded
Delegated to: akhil goyal
Headers show
Series cryptodev: rsa, dh, ecdh changes | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Kusztal, ArkadiuszX May 25, 2022, 3:53 p.m. UTC
- Clarified usage of private key in Diffie-Hellman.
CSRNG capable device should generate private key and then
use it for public key generation.

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

Comments

Akhil Goyal May 26, 2022, 11:04 a.m. UTC | #1
> - Clarified usage of private key in Diffie-Hellman.
> CSRNG capable device should generate private key and then
> use it for public key generation.
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  lib/cryptodev/rte_crypto_asym.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
> index ef8686fda8..1a77a74478 100644
> --- a/lib/cryptodev/rte_crypto_asym.h
> +++ b/lib/cryptodev/rte_crypto_asym.h
> @@ -394,6 +394,11 @@ struct rte_crypto_dh_op_param {
>  	 * Input - private key, when xform type is one of:
>  	 * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE,
>  	 * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
> +	 *
> +	 * In case priv_key.length is 0 and xform type is set with
> +	 * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, CSRNG capable
> +	 * device will generate private key and use it for public
> +	 * key generation.
>  	 */
Capability for CSRNG?

Acked-by: Akhil Goyal <gakhil@marvell.com>
diff mbox series

Patch

diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index ef8686fda8..1a77a74478 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -394,6 +394,11 @@  struct rte_crypto_dh_op_param {
 	 * Input - private key, when xform type is one of:
 	 * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE,
 	 * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
+	 *
+	 * In case priv_key.length is 0 and xform type is set with
+	 * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, CSRNG capable
+	 * device will generate private key and use it for public
+	 * key generation.
 	 */
 
 	rte_crypto_uint shared_secret;