Skip to contentSkip to conversation

crypto: qat - Use library to prepare HMAC keys

PATCH Superseded Eric Biggers 2 participants 2 messages Sep 5, 2025 – Sep 13, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 crypto: qat - Use library to prepare HMAC keys

To prepare HMAC keys, just use the library functions instead of crypto_shash. This is much simpler, avoids depending on the fragile export_core and import_core methods, and is faster too.

---

This is the same diff as v1, but with an updated commit message and now targeting cryptodev/master instead of libcrypto-fixes. Since I'm going with
https://lore.kernel.org/r/[email protected]/ to fix the reported regression instead, this patch is now "just" a library conversion and not a fix per se. If needed I'd be glad to take this through libcrypto-next instead, but usually these conversions have been going through subsystem trees (which is Herbert's in this case).

 drivers/crypto/intel/qat/Kconfig              |   7 +-
 .../crypto/intel/qat/qat_common/qat_algs.c    | 191 ++++++------------
 2 files changed, 61 insertions(+), 137 deletions(-)
drivers/crypto/intel/qat/Kconfig +3 -4
index 359c61f0c8a13..4b4861460dd4e 100644
@@ -4,16 +4,15 @@ config CRYPTO_DEV_QAT
 	select CRYPTO_AEAD
 	select CRYPTO_AUTHENC
 	select CRYPTO_SKCIPHER
 	select CRYPTO_AKCIPHER
 	select CRYPTO_DH
-	select CRYPTO_HMAC
 	select CRYPTO_RSA
-	select CRYPTO_SHA1
-	select CRYPTO_SHA256
-	select CRYPTO_SHA512
 	select CRYPTO_LIB_AES
+	select CRYPTO_LIB_SHA1
+	select CRYPTO_LIB_SHA256
+	select CRYPTO_LIB_SHA512
 	select FW_LOADER
 	select CRC8
 
 config CRYPTO_DEV_QAT_DH895xCC
 	tristate "Support for Intel(R) DH895xCC"
drivers/crypto/intel/qat/qat_common/qat_algs.c +58 -133

313 lines not on this page · raw message

base-commit: 41eab2a95950682cdc9c5e60cb3457e29f186540

Signature · 1 line
2.50.1
maintainer
#1 lore raw
Quoted 17 lines · Eric Biggers

To prepare HMAC keys, just use the library functions instead of crypto_shash. This is much simpler, avoids depending on the fragile export_core and import_core methods, and is faster too.

---

This is the same diff as v1, but with an updated commit message and now targeting cryptodev/master instead of libcrypto-fixes. Since I'm going with
https://lore.kernel.org/r/[email protected]/ to fix the reported regression instead, this patch is now "just" a library conversion and not a fix per se. If needed I'd be glad to take this through libcrypto-next instead, but usually these conversions have been going through subsystem trees (which is Herbert's in this case).

Quoted 3 lines

drivers/crypto/intel/qat/Kconfig | 7 +-
.../crypto/intel/qat/qat_common/qat_algs.c | 191 ++++++------------

2 files changed, 61 insertions(+), 137 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt