CMW Collection (V2 Input)#

In-memory builder/serializer for the RATS Conceptual Message Wrapper input collection consumed by the V2 verifier.

Profile URI: tag:nvidia.com,2026:verifier-input/profiles/base/pre-1.0.0.

Enumerations#

nvat_cmw_format_t

Serialization format of a CMW collection.

Functions#

nvat_rc_t nvat_cmw_collection_create_from_eat(nvat_cmw_collection_t *out, const char *label, const uint8_t *signed_cwt, size_t signed_cwt_len, const nvat_nonce_t nonce)

Build a CMW input collection from a signed EAT/CWT token.

nvat_rc_t nvat_cmw_collection_create_from_gpu_evidence(nvat_cmw_collection_t *out, const nvat_gpu_evidence_t *gpu_evidence_array, size_t num_evidences, const nvat_nonce_t nonce)

Build a CMW input collection from an array of GPU evidence.

nvat_rc_t nvat_cmw_collection_create_from_spdm_transcript(nvat_cmw_collection_t *out, const char *label, const uint8_t *transcript, size_t transcript_len, const uint8_t *cert_pem, size_t cert_pem_len, const nvat_nonce_t nonce)

Build a CMW input collection from a raw SPDM transcript and PEM certificate chain.

void nvat_cmw_collection_free(nvat_cmw_collection_t *cmw)

nvat_rc_t nvat_cmw_collection_serialize(const nvat_cmw_collection_t cmw, nvat_cmw_format_t format, nvat_str_t *out_serialized)

Serialize a CMW input collection.

Typedefs#

nvat_cmw_collection_t

Opaque handle to a CMW input collection.

Enumerations#

enum nvat_cmw_format_t#

Serialization format of a CMW collection.

Use NVAT_CMW_FORMAT_JSON. CBOR is reserved and currently returns NVAT_RC_FEATURE_NOT_ENABLED.

Values:

enumerator NVAT_CMW_FORMAT_JSON#
enumerator NVAT_CMW_FORMAT_CBOR#

Functions#

nvat_rc_t nvat_cmw_collection_create_from_eat(
nvat_cmw_collection_t *out,
const char *label,
const uint8_t *signed_cwt,
size_t signed_cwt_len,
const nvat_nonce_t nonce,
)#

Build a CMW input collection from a signed EAT/CWT token.

The token embeds its own device-identity chain, so no separate certificate chain is needed. A non-NULL nonce is checked against the token’s nonce claim; NULL skips the freshness check.

Parameters:
  • out – On success, set to the newly allocated collection. Free with nvat_cmw_collection_free.

nvat_rc_t nvat_cmw_collection_create_from_gpu_evidence(
nvat_cmw_collection_t *out,
const nvat_gpu_evidence_t *gpu_evidence_array,
size_t num_evidences,
const nvat_nonce_t nonce,
)#

Build a CMW input collection from an array of GPU evidence.

Each input evidence becomes one CMW evidence-item child labelled gpu_<i> (zero-based). The outer collection carries the provided nonce as application/octet-stream.

TODO(v2): generalize for NVSwitch / EAT / non-GPU evidence.

Parameters:
  • out – On success, set to the newly allocated collection. Free with nvat_cmw_collection_free.

  • gpu_evidence_array – Array of GPU evidence handles. Must not be NULL and must contain at least one entry.

  • num_evidences – Number of entries in gpu_evidence_array.

  • nonce – Attestation nonce. Must not be NULL.

nvat_rc_t nvat_cmw_collection_create_from_spdm_transcript(
nvat_cmw_collection_t *out,
const char *label,
const uint8_t *transcript,
size_t transcript_len,
const uint8_t *cert_pem,
size_t cert_pem_len,
const nvat_nonce_t nonce,
)#

Build a CMW input collection from a raw SPDM transcript and PEM certificate chain.

The evidence item is labelled label (e.g. "device_0"). When nonce is non-NULL it is set as the per-evidence nonce; the verifier will check it against the nonce signed into the SPDM transcript to confirm freshness. When NULL, no per-evidence freshness check is performed.

Parameters:
  • out – On success, set to the newly allocated collection. Free with nvat_cmw_collection_free.

  • label – Label for the evidence item. Must not be NULL.

  • transcript – Raw SPDM measurement transcript bytes. Must not be NULL.

  • transcript_len – Length of transcript in bytes.

  • cert_pem – PEM-encoded certificate chain bytes. Must not be NULL.

  • cert_pem_len – Length of cert_pem in bytes.

  • nonce – Expected per-evidence nonce (checked against the SPDM transcript), or NULL to skip the freshness check.

void nvat_cmw_collection_free(nvat_cmw_collection_t *cmw)#
nvat_rc_t nvat_cmw_collection_serialize(
const nvat_cmw_collection_t cmw,
nvat_cmw_format_t format,
nvat_str_t *out_serialized,
)#

Serialize a CMW input collection.

Parameters:

Typedefs#

typedef struct nvat_cmw_collection_st *nvat_cmw_collection_t#

Opaque handle to a CMW input collection.