crypto: chelsio - Use library to prepare HMAC keys
Subsystems (2)
PATCH v2 1/1 crypto: chelsio - 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/chelsio/Kconfig | 6 +- drivers/crypto/chelsio/chcr_algo.c | 259 +++++++-------------------- drivers/crypto/chelsio/chcr_crypto.h | 1 - 3 files changed, 63 insertions(+), 203 deletions(-)
drivers/crypto/chelsio/Kconfig +3 -3
@@ -2,13 +2,13 @@ config CRYPTO_DEV_CHELSIO tristate "Chelsio Crypto Co-processor Driver" depends on CHELSIO_T4 select CRYPTO_LIB_AES select CRYPTO_LIB_GF128MUL - select CRYPTO_SHA1 - select CRYPTO_SHA256 - select CRYPTO_SHA512 + select CRYPTO_LIB_SHA1 + select CRYPTO_LIB_SHA256 + select CRYPTO_LIB_SHA512 select CRYPTO_AUTHENC help The Chelsio Crypto Co-processor driver for T6 adapters. For general information about Chelsio and our products, visit
drivers/crypto/chelsio/chcr_algo.c +60 -199
371 lines not on this page · raw message
drivers/crypto/chelsio/chcr_crypto.h +0 -1
@@ -239,11 +239,10 @@ struct chcr_aead_ctx {u16 mayverify;struct __aead_ctx ctx[]; };struct hmac_ctx { -struct crypto_shash *base_hash;u8 ipad[CHCR_HASH_MAX_BLOCK_SIZE_128 ];u8 opad[CHCR_HASH_MAX_BLOCK_SIZE_128 ]; };struct __crypto_ctx {
base-commit: 41eab2a95950682cdc9c5e60cb3457e29f186540
Signature · 1 line
2.50.1
Herbert Xu
maintainerQuoted 16 lines · Eric Biggers
To prepare HMAC keys, just use the library functions instead of
crypto_shash. This is much simpler, avoids depending on the fragileexport_coreandimport_coremethods, and is faster too.Signed-off-by Eric Biggers <[email protected]>---
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 4 lines
drivers/crypto/chelsio/Kconfig | 6 +- drivers/crypto/chelsio/chcr_algo.c | 259 +++++++-------------------- drivers/crypto/chelsio/chcr_crypto.h | 1 - 3 files changed, 63 insertions(+), 203 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