]> git.droids-corp.org - dpdk.git/commitdiff
cryptodev: clarify usage of private key in DH
authorArek Kusztal <arkadiuszx.kusztal@intel.com>
Wed, 1 Jun 2022 09:02:41 +0000 (10:02 +0100)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 1 Jun 2022 17:10:54 +0000 (19:10 +0200)
- 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>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
lib/cryptodev/rte_crypto_asym.h

index 88ebec9a513b31a540fe49dc90f9f0c7a7da40f2..ecf4e376b5e4dbd318d03d9638a4b457691884d7 100644 (file)
@@ -416,6 +416,11 @@ struct rte_crypto_dh_op_param {
         * Input - private key, when dh xform ke_type is one of:
         * RTE_CRYPTO_ASYM_KE_PUB_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_PUB_KEY_GENERATE, CSRNG capable
+        * device will generate a private key and use it for public
+        * key generation.
         */
 
        rte_crypto_uint shared_secret;