Skip to contentSkip to conversation

cryptodev: fix SHA-1 digest enum comment

PATCH Superseded Adam Dybkowski 5 participants 9 messages May 21, 2020 – May 24, 2020

lore
Share & tools
lore
#0 lore raw

v3 cover 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.

v2:
* add info about HMAC-SHA-1-96
v3:
* fix multi-line comment formatting

Adam Dybkowski (1):
cryptodev: fix SHA-1 digest enum comment

 lib/librte_cryptodev/rte_crypto_sym.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

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")
---
 lib/librte_cryptodev/rte_crypto_sym.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
lib/librte_cryptodev/rte_crypto_sym.h +4 -2
index d9585ecd6..6fc3b8f59 100644
@@ -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,
Signature · 1 line
2.17.1
Acked-by on v3 1/1
#2 lore raw
Quoted 9 lines

-----Original Message-----
From: Dybkowski, AdamX <[email protected]>
Sent: Thursday, May 21, 2020 12:38 PM
To: [email protected]; Trahe, Fiona <[email protected]>; [email protected]
Cc: Dybkowski, AdamX <[email protected]>; [email protected]
Subject: [PATCH v3 1/1] cryptodev: fix SHA-1 digest enum comment

Quoted 7 lines

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")
Acked-by
#3 lore raw
Quoted 8 lines
Quoted 8 lines

-----Original Message-----
From: Dybkowski, AdamX <[email protected]>
Sent: Thursday, May 21, 2020 12:38 PM
To: [email protected]; Trahe, Fiona <[email protected]>; [email protected]
Cc: Dybkowski, AdamX <[email protected]>; [email protected]
Subject: [PATCH v3 1/1] cryptodev: fix SHA-1 digest enum comment

Quoted 8 lines
Quoted 7 lines

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")
#4 lore raw
In reply to Adam Dybkowski
Quoted 26 lines

-----Original Message-----
From: Adam Dybkowski <[email protected]>
Sent: Thursday, May 21, 2020 5:08 PM
To: [email protected]; [email protected]; Akhil Goyal <[email protected]>
Cc: Adam Dybkowski <[email protected]>; [email protected]
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")
---
 lib/librte_cryptodev/rte_crypto_sym.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
lib/librte_cryptodev/rte_crypto_sym.h +0 -0
index d9585ecd6..6fc3b8f59 100644

lib/librte_cryptodev/rte_crypto_sym.h enum rte_crypto_auth_algorithm { · line 275

Quoted 9 lines
lib/librte_cryptodev/rte_crypto_sym.h +3 -2
@@ -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.
+ */

Quoted 5 lines
lib/librte_cryptodev/rte_crypto_sym.h +0 -1
 	RTE_CRYPTO_AUTH_SHA224,
 	/**< 224 bit SHA algorithm. */
 	RTE_CRYPTO_AUTH_SHA224_HMAC,
--

2.17.1

#5 lore raw

v4 cover cryptodev: fix SHA-1 digest enum comment

In reply to Adam Dybkowski

This patch fixes improper SHA-1 digest size in the enum comment and also adds the note about HMAC-SHA-1-96.

v2:
* add info about HMAC-SHA-1-96
v3:
* fix multi-line comment formatting
v4:
* fix wording

Adam Dybkowski (1):
cryptodev: fix SHA-1 digest enum comment

 lib/librte_cryptodev/rte_crypto_sym.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
#6 lore raw

PATCH v4 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")
---
 lib/librte_cryptodev/rte_crypto_sym.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
lib/librte_cryptodev/rte_crypto_sym.h +5 -2
index d9585ecd6..da961a19d 100644
@@ -269,9 +269,12 @@ 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_length to 12 bytes in auth/aead xforms.
+	 */
 	RTE_CRYPTO_AUTH_SHA224,
 	/**< 224 bit SHA algorithm. */
 	RTE_CRYPTO_AUTH_SHA224_HMAC,
Signature · 1 line
2.17.1
Acked-by on v4 1/1
#7 lore raw
Quoted 11 lines

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")

---

Thomas,
Can you pick this patch directly on master for this release? The patch is only fixing the comments.

Regards,
Akhil

#8 lore raw

21/05/2020 17:32, Akhil Goyal:

Quoted 12 lines
Quoted 11 lines

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")

---

Quoted 4 lines

Thomas,
Can you pick this patch directly on master for this release? The patch is only fixing the comments.

Applied, thanks