]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
nvme-auth: common: use crypto library in nvme_auth_augmented_challenge()
authorEric Biggers <ebiggers@kernel.org>
Mon, 2 Mar 2026 07:59:47 +0000 (23:59 -0800)
committerKeith Busch <kbusch@kernel.org>
Fri, 27 Mar 2026 14:35:01 +0000 (07:35 -0700)
commita67d096fe9761e3e503f40643228bca6d69c7c4e
tree4905d0de908391803c1c565149f0257c8f1861a2
parent092c05f8de3d2f83242d70f6f044f339b8ba5df1
nvme-auth: common: use crypto library in nvme_auth_augmented_challenge()

For the hash and HMAC computations in nvme_auth_augmented_challenge(),
use the crypto library instead of crypto_shash.  This is simpler,
faster, and more reliable.  Notably, this eliminates two crypto
transformation object allocations for every call, which was very slow.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/common/auth.c