Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-53980

[NetApp RHEL 9.5 Bug]: Fix wrong TLS v1 key generation

    • sst_storage_io
    • ssg_filesystems_storage_and_HA
    • 29
    • 31
    • 3
    • Dev ack
    • False
    • Hide

      None

      Show
      None
    • 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>".

            mlombard@redhat.com Maurizio Lombardi
            marting_netapp Martin George
            NetApp Confidential Group
            Maurizio Lombardi Maurizio Lombardi
            Marco Patalano Marco Patalano
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: