[v3,1/1] cryptodev: fix SHA-1 digest enum comment

Message ID 20200521113817.3148-2-adamx.dybkowski@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series cryptodev: fix SHA-1 digest enum comment |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-testing fail Testing issues

Commit Message

Dybkowski, AdamX May 21, 2020, 11:38 a.m. UTC
  This patch fixes improper SHA-1 digest size in the enum comment
and also adds the note about HMAC-SHA-1-96.

Fixes: 1bd407fac80b ("cryptodev: extract symmetric operations")
Cc: stable@dpdk.org

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 lib/librte_cryptodev/rte_crypto_sym.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Fiona Trahe May 21, 2020, 11:44 a.m. UTC | #1
> -----Original Message-----
> From: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> Sent: Thursday, May 21, 2020 12:38 PM
> To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; akhil.goyal@nxp.com
> Cc: Dybkowski, AdamX <adamx.dybkowski@intel.com>; stable@dpdk.org
> Subject: [PATCH v3 1/1] cryptodev: fix SHA-1 digest enum comment
> 
> This patch fixes improper SHA-1 digest size in the enum comment
> and also adds the note about HMAC-SHA-1-96.
> 
> Fixes: 1bd407fac80b ("cryptodev: extract symmetric operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
  
Anoob Joseph May 21, 2020, 12:02 p.m. UTC | #2
> > -----Original Message-----
> > From: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> > Sent: Thursday, May 21, 2020 12:38 PM
> > To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>;
> > akhil.goyal@nxp.com
> > Cc: Dybkowski, AdamX <adamx.dybkowski@intel.com>; stable@dpdk.org
> > Subject: [PATCH v3 1/1] cryptodev: fix SHA-1 digest enum comment
> >
> > This patch fixes improper SHA-1 digest size in the enum comment and
> > also adds the note about HMAC-SHA-1-96.
> >
> > Fixes: 1bd407fac80b ("cryptodev: extract symmetric operations")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>

Acked-by: Anoob Joseph <anoobj@marvell.com>
  
Akhil Goyal May 21, 2020, 12:46 p.m. UTC | #3
> -----Original Message-----
> From: Adam Dybkowski <adamx.dybkowski@intel.com>
> Sent: Thursday, May 21, 2020 5:08 PM
> To: dev@dpdk.org; fiona.trahe@intel.com; Akhil Goyal <akhil.goyal@nxp.com>
> Cc: Adam Dybkowski <adamx.dybkowski@intel.com>; stable@dpdk.org
> Subject: [PATCH v3 1/1] cryptodev: fix SHA-1 digest enum comment
> 
> This patch fixes improper SHA-1 digest size in the enum comment
> and also adds the note about HMAC-SHA-1-96.
> 
> Fixes: 1bd407fac80b ("cryptodev: extract symmetric operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> ---
>  lib/librte_cryptodev/rte_crypto_sym.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_cryptodev/rte_crypto_sym.h
> b/lib/librte_cryptodev/rte_crypto_sym.h
> index d9585ecd6..6fc3b8f59 100644
> --- a/lib/librte_cryptodev/rte_crypto_sym.h
> +++ b/lib/librte_cryptodev/rte_crypto_sym.h
> @@ -269,9 +269,11 @@ enum rte_crypto_auth_algorithm {
>  	/**< HMAC using MD5 algorithm */
> 
>  	RTE_CRYPTO_AUTH_SHA1,
> -	/**< 128 bit SHA algorithm. */
> +	/**< 160 bit SHA algorithm. */
>  	RTE_CRYPTO_AUTH_SHA1_HMAC,
> -	/**< HMAC using 128 bit SHA algorithm. */
> +	/**< HMAC using 160 bit SHA algorithm.
> +	 * HMAC-SHA-1-96 can be generated by setting digest_size to 12.

It should be 12 Bytes.
And should specify where to set the digest size
The name of the field in xform is digest_length and not digest_size.
+	/**< HMAC using 160 bit SHA algorithm.
+	 * HMAC-SHA-1-96 can be generated by setting
+	 * digest_length to 12 Bytes in auth/aead xforms.
+	 */


>  	RTE_CRYPTO_AUTH_SHA224,
>  	/**< 224 bit SHA algorithm. */
>  	RTE_CRYPTO_AUTH_SHA224_HMAC,
> --
> 2.17.1
  

Patch

diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index d9585ecd6..6fc3b8f59 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -269,9 +269,11 @@  enum rte_crypto_auth_algorithm {
 	/**< HMAC using MD5 algorithm */
 
 	RTE_CRYPTO_AUTH_SHA1,
-	/**< 128 bit SHA algorithm. */
+	/**< 160 bit SHA algorithm. */
 	RTE_CRYPTO_AUTH_SHA1_HMAC,
-	/**< HMAC using 128 bit SHA algorithm. */
+	/**< HMAC using 160 bit SHA algorithm.
+	 * HMAC-SHA-1-96 can be generated by setting digest_size to 12.
+	 */
 	RTE_CRYPTO_AUTH_SHA224,
 	/**< 224 bit SHA algorithm. */
 	RTE_CRYPTO_AUTH_SHA224_HMAC,