Skip to content

Clarification on duplicate SMDataID elements and secured message version negotiation #3934

Open

Description

@JeonJinil

Hello,

We are testing KEY_EXCHANGE requests containing multiple opaque data elements and would like to clarify how duplicate SMDataID values should be handled.

In our test, multiple DMTF opaque elements have the same ID (0x00), VendorIDLen (0), SMDataVersion (0x01), and SMDataID (0x01, supported secured message versions). Each element contains a SecuredMsgVers structure with one version in its VersionsList.

In an earlier libspdm-based integration, the request was accepted and the last matching element was used. After an update, the first matching element was used instead. The current main implementation of libspdm_get_sm_data_element_from_opaque_data() also appears to return the first matching element.

We have two questions:

1. Should duplicate SMDataID elements be rejected?

Within the same DMTF opaque data namespace and SMDataVersion, is it valid for a single KEY_EXCHANGE request to contain multiple elements with SMDataID = 0x01?

If this is not allowed, should the responder reject the request, for example with InvalidRequest, rather than use the first or last matching element?

2. If duplicates are allowed, are these two representations equivalent?

The following examples are schematic; lengths and padding are omitted. All elements use the common header values described above.

Case A — One element containing multiple versions:

TotalElements = 1
OpaqueList:
  - SMDataID = 0x01
    SecuredMsgVers:
      VersionCount = 2
      VersionsList = [1.2.0, 1.1.0]

Case B — Multiple elements with the same SMDataID, each containing one version:

TotalElements = 2
OpaqueList:
  - SMDataID = 0x01
    SecuredMsgVers:
      VersionCount = 1
      VersionsList = [1.2.0]
  - SMDataID = 0x01
    SecuredMsgVers:
      VersionCount = 1
      VersionsList = [1.1.0]

Thank you.

Activity

  1. jyao1 commented on Sep 24, 2026

    @jyao1
    Member

    Good question. I think we need to file a spec issue to clarify (see https://github.com/DMTF/SPDM-WG/issues/4818)

  2. jyao1 commented on Oct 15, 2026

    @jyao1
    Member

    The conclusion is to reject the message if there is duplication.
    We should add such check in libspdm.

  3. jyao1 commented on Oct 15, 2026

    @jyao1
    Member

    @JeonJinil, Do you want to propose a patch?

  4. added
    enhancementNew feature or request
    and removed
    questionFurther information is requested
    on Oct 15, 2026
  5. self-assigned this
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions