linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] crypto,nvme: fixup HKDF-Expand-Label implementation
@ 2025-08-20  9:12 hare
  2025-08-20  9:12 ` [PATCH 1/2] crypto: hkdf: add hkdf_expand_label() hare
  2025-08-20  9:12 ` [PATCH 2/2] nvme-auth: use hkdf_expand_label() hare
  0 siblings, 2 replies; 7+ messages in thread
From: hare @ 2025-08-20  9:12 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Keith Busch, Sagi Grimberg, Chris Leech, linux-nvme, Herbert Xu,
	David S . Miller, linux-crypto, Hannes Reinecke

From: Hannes Reinecke <hare@kernel.org>

As per RFC 8446 (TLS 1.3) the HKDF-Expand-Label function is using vectors
for the 'label' and 'context' field, but defines these vectors as a string
prefixed with the string length (in binary). The implementation in nvme
is missing the length prefix which was causing interoperability issues
with spec-conformant implementations.

This patchset adds a function 'hkdf_expand_label()' to correctly implement
the HKDF-Expand-Label functionality and modifies the nvme driver to utilize
this function instead of the open-coded implementation.

As usual, comments and reviews are welcome.

Chris Leech (1):
  crypto: hkdf: add hkdf_expand_label()

Hannes Reinecke (1):
  nvme-auth: use hkdf_expand_label()

 crypto/hkdf.c              | 55 ++++++++++++++++++++++++++++++++++++++
 drivers/nvme/common/auth.c | 33 +++++++++--------------
 include/crypto/hkdf.h      |  4 +++
 3 files changed, 72 insertions(+), 20 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-08-21  9:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20  9:12 [PATCH 0/2] crypto,nvme: fixup HKDF-Expand-Label implementation hare
2025-08-20  9:12 ` [PATCH 1/2] crypto: hkdf: add hkdf_expand_label() hare
2025-08-20 18:46   ` Eric Biggers
2025-08-20 19:48     ` Chris Leech
2025-08-21  6:44       ` Hannes Reinecke
2025-08-20 21:50   ` kernel test robot
2025-08-20  9:12 ` [PATCH 2/2] nvme-auth: use hkdf_expand_label() hare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).