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

For the HMAC computation in nvmet_auth_ctrl_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