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

For the HMAC computation in nvme_auth_transform_key(), use the crypto
library instead of crypto_shash.  This is simpler, faster, and more
reliable.  Notably, this eliminates the transformation object allocation
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