]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
nvme-auth: target: use crypto library in nvmet_auth_host_hash()
authorEric Biggers <ebiggers@kernel.org>
Mon, 2 Mar 2026 07:59:55 +0000 (23:59 -0800)
committerKeith Busch <kbusch@kernel.org>
Fri, 27 Mar 2026 14:35:02 +0000 (07:35 -0700)
commite501533f671f6576c032fa40376e413cba4bfb25
tree71c680bf836179c3d966cc6ac823435d96e484e4
parentefe8df9f9ce12903244e42038346de6afec473de
nvme-auth: target: use crypto library in nvmet_auth_host_hash()

For the HMAC computation in nvmet_auth_host_hash(), 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/target/auth.c