[v2,1/4] crypto: add dsa random number k

Message ID 20220207113555.8431-2-arkadiuszx.kusztal@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series Clarify asymmetric random, add 'k' and crypto uint |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Arkadiusz Kusztal Feb. 7, 2022, 11:35 a.m. UTC
  This commit adds random number 'k' to dsa
op param struct.

This parameter is crucial in stituation where:
- PMD cannot generate random number
- user would like to provide random source

Addtionally it makes DSA consistent with ECDSA
in terms of 'k' which includes this parameter.

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

Comments

Ray Kinsella Feb. 11, 2022, 10:55 a.m. UTC | #1
Arek Kusztal <arkadiuszx.kusztal@intel.com> writes:

> This commit adds random number 'k' to dsa
> op param struct.
>
> This parameter is crucial in stituation where:

situation

> - PMD cannot generate random number
> - user would like to provide random source
>
> Addtionally it makes DSA consistent with ECDSA

additionally 

> in terms of 'k' which includes this parameter.
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  lib/cryptodev/rte_crypto_asym.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
> index 9c866f553f..e0def3d9ab 100644
> --- a/lib/cryptodev/rte_crypto_asym.h
> +++ b/lib/cryptodev/rte_crypto_asym.h
> @@ -547,6 +547,10 @@ struct rte_crypto_dsa_op_param {
>  	/**< Signature Generation or Verification */
>  	rte_crypto_param message;
>  	/**< input message to be signed or verified */
> +	rte_crypto_param k;
> +	/**< Per-message secret number, which is an integer
> +	 * in the interval (1, q-1)
> +	 */
>  	rte_crypto_param r;
>  	/**< dsa sign component 'r' value
>  	 *

Please run a spell check on your commit messages.
  

Patch

diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index 9c866f553f..e0def3d9ab 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -547,6 +547,10 @@  struct rte_crypto_dsa_op_param {
 	/**< Signature Generation or Verification */
 	rte_crypto_param message;
 	/**< input message to be signed or verified */
+	rte_crypto_param k;
+	/**< Per-message secret number, which is an integer
+	 * in the interval (1, q-1)
+	 */
 	rte_crypto_param r;
 	/**< dsa sign component 'r' value
 	 *