[v3,01/11] cryptodev: change RSA API comments about primes

Message ID 20190716185304.12592-2-arkadiuszx.kusztal@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series Rework API for RSA algorithm in asymmetric crypto |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Arkadiusz Kusztal July 16, 2019, 6:52 p.m. UTC
  RSA modulus cannot be prime as its security basing on integer
factorization.

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

Comments

Shally Verma July 17, 2019, 7:32 a.m. UTC | #1
> -----Original Message-----
> From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> Sent: Wednesday, July 17, 2019 12:23 AM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Shally Verma
> <shallyv@marvell.com>; Arek Kusztal <arkadiuszx.kusztal@intel.com>
> Subject: [EXT] [PATCH v3 01/11] cryptodev: change RSA API comments about
> primes
> 
> External Email
> 
> ----------------------------------------------------------------------
> RSA modulus cannot be prime as its security basing on integer factorization.
> 
[Shally] I think you mean here that "RSA modulus input cannot be prime as it is multiple of 2 primes"

> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
Other than minor rephrasing requirement on commit log, change is 
Acked-by: Shally Verma <shallyv@marvell.com>

>  lib/librte_cryptodev/rte_crypto_asym.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/librte_cryptodev/rte_crypto_asym.h
> b/lib/librte_cryptodev/rte_crypto_asym.h
> index 8672f21..02ec304 100644
> --- a/lib/librte_cryptodev/rte_crypto_asym.h
> +++ b/lib/librte_cryptodev/rte_crypto_asym.h
> @@ -199,8 +199,8 @@ struct rte_crypto_rsa_priv_key_qt {
>   */
>  struct rte_crypto_rsa_xform {
>  	rte_crypto_param n;
> -	/**< n - Prime modulus
> -	 * Prime modulus data of RSA operation in Octet-string network
> +	/**< n - Modulus
> +	 * Modulus data of RSA operation in Octet-string network
>  	 * byte order format.
>  	 */
> 
> @@ -409,7 +409,7 @@ struct rte_crypto_rsa_op_param {
>  	 * over-written with generated signature.
>  	 *
>  	 * Length of the signature data will be equal to the
> -	 * RSA prime modulus length.
> +	 * RSA modulus length.
>  	 */
> 
>  	enum rte_crypto_rsa_padding_type pad;
> --
> 2.1.0
  
Arkadiusz Kusztal July 17, 2019, 8:39 a.m. UTC | #2
> -----Original Message-----
> From: Shally Verma [mailto:shallyv@marvell.com]
> Sent: Wednesday, July 17, 2019 9:32 AM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>
> Subject: RE: [EXT] [PATCH v3 01/11] cryptodev: change RSA API comments
> about primes
> 
> 
> 
> > -----Original Message-----
> > From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > Sent: Wednesday, July 17, 2019 12:23 AM
> > To: dev@dpdk.org
> > Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Shally Verma
> > <shallyv@marvell.com>; Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > Subject: [EXT] [PATCH v3 01/11] cryptodev: change RSA API comments
> > about primes
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > RSA modulus cannot be prime as its security basing on integer
> factorization.
> >
> [Shally] I think you mean here that "RSA modulus input cannot be prime as it
> is multiple of 2 primes"

[AK] From Menezes, van Oorsc, Vanstone - Handbook of applied cryptography -
8.6 - Fact The problem of computing the RSA decryption exponent d from the public key (n, e),
and the problem of factoring n, are computationally equivalent.
Besides RSA supports multi-primes (product of more primes than two) which we currently don't.
Although yeah I could describe it bit clearer.
> 
> > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > ---
> Other than minor rephrasing requirement on commit log, change is
> Acked-by: Shally Verma <shallyv@marvell.com>
> 
> >  lib/librte_cryptodev/rte_crypto_asym.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/lib/librte_cryptodev/rte_crypto_asym.h
> > b/lib/librte_cryptodev/rte_crypto_asym.h
> > index 8672f21..02ec304 100644
> > --- a/lib/librte_cryptodev/rte_crypto_asym.h
> > +++ b/lib/librte_cryptodev/rte_crypto_asym.h
> > @@ -199,8 +199,8 @@ struct rte_crypto_rsa_priv_key_qt {
> >   */
> >  struct rte_crypto_rsa_xform {
> >  	rte_crypto_param n;
> > -	/**< n - Prime modulus
> > -	 * Prime modulus data of RSA operation in Octet-string network
> > +	/**< n - Modulus
> > +	 * Modulus data of RSA operation in Octet-string network
> >  	 * byte order format.
> >  	 */
> >
> > @@ -409,7 +409,7 @@ struct rte_crypto_rsa_op_param {
> >  	 * over-written with generated signature.
> >  	 *
> >  	 * Length of the signature data will be equal to the
> > -	 * RSA prime modulus length.
> > +	 * RSA modulus length.
> >  	 */
> >
> >  	enum rte_crypto_rsa_padding_type pad;
> > --
> > 2.1.0
  

Patch

diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h
index 8672f21..02ec304 100644
--- a/lib/librte_cryptodev/rte_crypto_asym.h
+++ b/lib/librte_cryptodev/rte_crypto_asym.h
@@ -199,8 +199,8 @@  struct rte_crypto_rsa_priv_key_qt {
  */
 struct rte_crypto_rsa_xform {
 	rte_crypto_param n;
-	/**< n - Prime modulus
-	 * Prime modulus data of RSA operation in Octet-string network
+	/**< n - Modulus
+	 * Modulus data of RSA operation in Octet-string network
 	 * byte order format.
 	 */
 
@@ -409,7 +409,7 @@  struct rte_crypto_rsa_op_param {
 	 * over-written with generated signature.
 	 *
 	 * Length of the signature data will be equal to the
-	 * RSA prime modulus length.
+	 * RSA modulus length.
 	 */
 
 	enum rte_crypto_rsa_padding_type pad;