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

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