summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ionic/ionic_datapath.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-10-11 18:57:33 -0700
committerSteve French <stfrench@microsoft.com>2025-10-15 22:10:28 -0500
commite05b3115e75381369be84abe5d46565ce0fcedc8 (patch)
treeec3b37dd9f07206c60e21f6bea29ce69c62d1894 /drivers/infiniband/hw/ionic/ionic_datapath.c
parent4b4c6fdb25de4edc0a34b1b93cccb439e00e1f35 (diff)
smb: client: Use HMAC-SHA256 library for SMB2 signature calculation
Convert smb2_calc_signature() to use the HMAC-SHA256 library instead of a "hmac(sha256)" crypto_shash. This is simpler and faster. With the library there's no need to allocate memory, no need to handle errors, and the HMAC-SHA256 code is accessed directly without inefficient indirect calls and other unnecessary API overhead. To make this possible, make __cifs_calc_signature() support both the HMAC-SHA256 library and crypto_shash. (crypto_shash is still needed for HMAC-MD5 and AES-CMAC. A later commit will switch HMAC-MD5 from shash to the library. I'd like to eventually do the same for AES-CMAC, but it doesn't have a library API yet. So for now, shash is still needed.) Also remove the unnecessary 'sigptr' variable. For now smb3_crypto_shash_allocate() still allocates a "hmac(sha256)" crypto_shash. It will be removed in a later commit. Reviewed-by: Stefan Metzmacher <metze@samba.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'drivers/infiniband/hw/ionic/ionic_datapath.c')
0 files changed, 0 insertions, 0 deletions