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

For the HMAC computation in nvme_auth_generate_digest(), 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