[v2,12/14] cryptodev: clarify rsa verify with none padding
Checks
Commit Message
- Clarified where should output be stored of signature
decryption with padding none.
PMD is not able to know what padding algorithm was used,
therefore decrypted signature should be returned to the user.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
lib/cryptodev/rte_crypto_asym.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Comments
> - Clarified where should output be stored of signature
> decryption with padding none.
> PMD is not able to know what padding algorithm was used,
> therefore decrypted signature should be returned to the user.
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> lib/cryptodev/rte_crypto_asym.h | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
> index ee0988d3cf..9f7fba3758 100644
> --- a/lib/cryptodev/rte_crypto_asym.h
> +++ b/lib/cryptodev/rte_crypto_asym.h
> @@ -372,8 +372,6 @@ struct rte_crypto_rsa_op_param {
> * (i.e. must be at least RSA key size). The message.length
> * field should be 0 and will be overwritten by the PMD
> * with the decrypted length.
> - *
> - * All data is in Octet-string network byte order format.
> */
Patch description and title does not match with this change.
>
> rte_crypto_param cipher;
> @@ -388,7 +386,8 @@ struct rte_crypto_rsa_op_param {
> * at least RSA key size). The cipher.length field should
> * be 0 and will be overwritten by the PMD with the encrypted length.
> *
> - * All data is in Octet-string network byte order format.
> + * When RTE_CRYPTO_RSA_PADDING_NONE and
> RTE_CRYPTO_ASYM_OP_VERIFY
> + * selected, this is an output of decrypted signature.
> */
>
> rte_crypto_param sign;
> @@ -402,8 +401,6 @@ struct rte_crypto_rsa_op_param {
> * with enough memory to hold signature output (i.e. must be
> * at least RSA key size). The sign.length field should
> * be 0 and will be overwritten by the PMD with the signature length.
> - *
> - * All data is in Octet-string network byte order format.
> */
>
> struct rte_crypto_rsa_padding padding;
> --
> 2.13.6
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, May 26, 2022 2:07 PM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Subject: RE: [EXT] [PATCH v2 12/14] cryptodev: clarify rsa verify with none
> padding
>
> > - Clarified where should output be stored of signature decryption with
> > padding none.
> > PMD is not able to know what padding algorithm was used, therefore
> > decrypted signature should be returned to the user.
> >
> > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > ---
> > lib/cryptodev/rte_crypto_asym.h | 7 ++-----
> > 1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/lib/cryptodev/rte_crypto_asym.h
> > b/lib/cryptodev/rte_crypto_asym.h index ee0988d3cf..9f7fba3758 100644
> > --- a/lib/cryptodev/rte_crypto_asym.h
> > +++ b/lib/cryptodev/rte_crypto_asym.h
> > @@ -372,8 +372,6 @@ struct rte_crypto_rsa_op_param {
> > * (i.e. must be at least RSA key size). The message.length
> > * field should be 0 and will be overwritten by the PMD
> > * with the decrypted length.
> > - *
> > - * All data is in Octet-string network byte order format.
> > */
> Patch description and title does not match with this change.
I will add a comment to commit message then.
>
> >
> > rte_crypto_param cipher;
> > @@ -388,7 +386,8 @@ struct rte_crypto_rsa_op_param {
> > * at least RSA key size). The cipher.length field should
> > * be 0 and will be overwritten by the PMD with the encrypted length.
> > *
> > - * All data is in Octet-string network byte order format.
> > + * When RTE_CRYPTO_RSA_PADDING_NONE and
> > RTE_CRYPTO_ASYM_OP_VERIFY
> > + * selected, this is an output of decrypted signature.
> > */
> >
> > rte_crypto_param sign;
> > @@ -402,8 +401,6 @@ struct rte_crypto_rsa_op_param {
> > * with enough memory to hold signature output (i.e. must be
> > * at least RSA key size). The sign.length field should
> > * be 0 and will be overwritten by the PMD with the signature length.
> > - *
> > - * All data is in Octet-string network byte order format.
> > */
> >
> > struct rte_crypto_rsa_padding padding;
> > --
> > 2.13.6
@@ -372,8 +372,6 @@ struct rte_crypto_rsa_op_param {
* (i.e. must be at least RSA key size). The message.length
* field should be 0 and will be overwritten by the PMD
* with the decrypted length.
- *
- * All data is in Octet-string network byte order format.
*/
rte_crypto_param cipher;
@@ -388,7 +386,8 @@ struct rte_crypto_rsa_op_param {
* at least RSA key size). The cipher.length field should
* be 0 and will be overwritten by the PMD with the encrypted length.
*
- * All data is in Octet-string network byte order format.
+ * When RTE_CRYPTO_RSA_PADDING_NONE and RTE_CRYPTO_ASYM_OP_VERIFY
+ * selected, this is an output of decrypted signature.
*/
rte_crypto_param sign;
@@ -402,8 +401,6 @@ struct rte_crypto_rsa_op_param {
* with enough memory to hold signature output (i.e. must be
* at least RSA key size). The sign.length field should
* be 0 and will be overwritten by the PMD with the signature length.
- *
- * All data is in Octet-string network byte order format.
*/
struct rte_crypto_rsa_padding padding;