Re: [PATCH 09/21] nvme-auth: common: use crypto library in nvme_auth_augmented_challenge()

From: Hannes Reinecke

Date: Mon Mar 02 2026 - 05:16:46 EST


On 3/2/26 08:59, Eric Biggers wrote:
For the hash and HMAC computations in nvme_auth_augmented_challenge(),
use the crypto library instead of crypto_shash. This is simpler,
faster, and more reliable. Notably, this eliminates two crypto
transformation object allocations for every call, which was very slow.

Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
---
drivers/nvme/common/auth.c | 96 ++++++++++++++------------------------
1 file changed, 36 insertions(+), 60 deletions(-)

Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich