-
Bug
-
Resolution: Unresolved
-
Critical
-
rhel-9.5
-
No
-
Important
-
-
rhel-sst-storage-io
-
ssg_filesystems_storage_and_HA
-
13
-
3
-
Dev ack
-
False
-
-
None
-
None
-
None
-
None
-
All
-
None
For v0 TLS PSKs, the spec states:
The TLS PSK shall be derived as follows from an input PSK (i.e., either a retained PSK or a generated PSK) and a PSK identity using the HKDF-Extract and HKDF-Expand-Label operations (refer to RFC 5869 and RFC 8446) where the hash function is the one specified by the hash specifier of the PSK identity:
PRK = HKDF-Extract(0, Input PSK); and
TLS PSK = HKDF-Expand-Label(PRK, “nvme-tls-psk”, PskIdentity, L),
where PskIdentity is the PSK identity and L is the output size in bytes of
the hash function (i.e., 32 for SHA-256 and 48 for SHA-384).
And for v1 TLS PSKs, the spec states:
The TLS PSK shall be derived as follows from an input PSK (i.e., either a retained PSK or a generated PSK) and a PSK identity using the HKDF-Extract and HKDF-Expand-Label operations (refer to RFC 5869 and RFC 8446) where the hash function is the one specified by the hash specifier of the PSK identity:
PRK = HKDF-Extract(0, Input PSK); and
TLS PSK = HKDF-Expand-Label(PRK, “nvme-tls-psk”, Context, L),
where Context is the hash identifier indicated in the PSK identity concatenated to a space character and to the Base64 PSK digest (i.e., “<hash> <PSK digest>”) and L is the output size in bytes of the hash function (i.e., 32 for SHA-256 and 48 for SHA-384).
i.e. for v0, the 'label' argument for HKDF-Expand-Label is the PSK identity, and for v1, the 'label' argument for HKDF-Expand-Label is "<hash> <PSK digest>".
The current libnvme code always used the PSK identity as the 'label' argument. So fix that for v1 to reflect as "<hash> <PSK digest>".