Skip to content

crypto,nvme: fixup HKDF-Expand-Label implementation

[email protected] linux-crypto linux-nvme oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2crypto: hkdf: add hkdf_expand_label()crypto/hkdf.c include/crypto/hkdf.h+59 -03 replies
2/2nvme-auth: use hkdf_expand_label()drivers/nvme/common/auth.c+13 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] crypto,nvme: fixup HKDF-Expand-Label implementation

From: Hannes Reinecke <[email protected]>

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(-)
Signature · 1 line
2.43.0