From: hare@kernel.org
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>,
Chris Leech <cleech@redhat.com>,
linux-nvme@lists.infradead.org,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, Hannes Reinecke <hare@kernel.org>
Subject: [PATCH 0/2] crypto,nvme: fixup HKDF-Expand-Label implementation
Date: Wed, 20 Aug 2025 11:12:09 +0200 [thread overview]
Message-ID: <20250820091211.25368-1-hare@kernel.org> (raw)
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
next reply other threads:[~2025-08-20 9:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 9:12 hare [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250820091211.25368-1-hare@kernel.org \
--to=hare@kernel.org \
--cc=cleech@redhat.com \
--cc=davem@davemloft.net \
--cc=hch@lst.de \
--cc=herbert@gondor.apana.org.au \
--cc=kbusch@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.