rfc-9684

A YANG Data Model for Challenge-Response-Based Remote Attestation (CHARRA) Procedures Using Trusted Platform Modules (TPMs)

H. Birkholz, M. Eckel, S. Bhandari, E. Voit, B. Sulzen, L. Xia, T. Laffey, G. C. Fedorkow
date2024-12 streamIETF areasec wgrats statusPROPOSED STANDARD pages53 canonicalhttps://www.rfc-editor.org/rfc/rfc9684 doi10.17487/RFC9684
This document defines the YANG Remote Procedure Calls (RPCs) and configuration nodes that are required to retrieve attestation evidence about integrity measurements from a device, following the operational context defined in RFC 9683 "TPM-based Network Device Remote Integrity Verification". Complementary measurement logs originating from one or more Roots of Trust for Measurement (RTMs) are also provided by the YANG RPCs. The defined module requires the inclusion of the following in the device components of the composite device on which the YANG server is running: at least one Trusted Platform Module (TPM) of either version 1.2 or 2.0 as well as a corresponding TPM Software Stack (TSS), or an equivalent hardware implementation that includes the protected capabilities as provided by TPMs as well as a corresponding software stack.

Extracted elements (29)

design-rationale §2.1.2

The ietf-tcg-algs module encodes the full TCG Algorithm Registry Table 3 (rather than just the subset needed for attestation) to allow other YANG modules to leverage the complete algorithm identity hierarchy without depending on a separate specification.

yang, crypto, security

design-rationale §2.1.1.4

The netequip_boot log format is identical to the IMA format but its scope combines BIOS events and IMA events, covering every measurable event from boot (BIOS, Bootloader, etc.) through OS runtime. This unified format simplifies log retrieval for network equipment that needs a single comprehensive integrity log.

yang, security

design-rationale §2.1.1.3.2

The tpm20-attestation grouping includes optional unsigned-pcr-values alongside the mandatory TPMS_QUOTE_INFO digest. This is because the TPM2B_DIGEST is calculated across multiple PCRs, making it expensive for a Verifier to detect which single PCR changed. Providing individual PCR values allows the Verifier to confirm the signature while eliminating significant processing when only one PCR has changed.

yang, security, design-rationale

interoperability-note §2.1.1.5

The YANG module imports ietf-hardware (RFC 8348) and uses entPhysicalIndex via the hw:entity-mib feature to associate TPMs and compute nodes with physical hardware inventory entries, enabling correlation with existing hardware management data models.

yang, netconf, security

interoperability-note §2.1.2.1

TPM 1.2 and TPM 2.0 support are modeled as separate YANG features ('tpm12' and 'tpm20') with distinct RPCs and data nodes. Most commonly only one type will be available on an Attester; composite devices with multiple TPMs of different versions may expose both feature sets simultaneously.

yang, security

interoperability-note §2.1.2.2

TPM 1.2 defaults to TPM_ALG_SHA1 for PCR hashing, while TPM 2.0 defaults to TPM_ALG_SHA256. SHA1 is marked as deprecated due to insufficient cryptographic protection in the ietf-tcg-algs module, though it is retained for legacy TPM 1.2 compatibility.

yang, security, crypto

normative-requirement §2 MUST

A fresh nonce with an appropriate amount of entropy MUST be supplied by the YANG client to enable proof-of-freshness with respect to attestation Evidence. This nonce is also used to prevent replay attacks.

yang, security, crypto

normative-requirement §2.1.1.3 MUST

Any selection of PCRs MUST verify that the set of PCRs requested are a subset of the set of PCRs exposed in the device's rats-support-structures. This applies to both TPM 1.2 and TPM 2.0 PCR selection groupings.

yang, security

normative-requirement §2 MUST

One or more TPMs MUST be embedded in a composite device that provides attestation Evidence via the YANG module defined in this document. The device must include either TPM 1.2 or TPM 2.0 hardware, along with a corresponding TPM Software Stack (TSS).

yang, security

normative-requirement §4 SHOULD

RPCs should be protected by NACM with a default setting of deny-all to limit the extraction of attestation data by only authorized Verifiers. Information collected through RPCs could reveal software versions and configurations that identify vulnerabilities.

yang, security, netconf

normative-requirement §4 REQUIRED

The lowest NETCONF layer is the secure transport layer, and the mandatory-to-implement secure transport is SSH. The lowest RESTCONF layer is HTTPS, and the mandatory-to-implement secure transport is TLS.

yang, netconf, security, tls

normative-requirement §2.1.1.3 MUST

The random nonce MUST be derived from an entropy source external to the Attester. A nonce sent into a TPM will typically be 160 or 256 binary digits long; shorter values are padded with leading zeros and longer values are trimmed to the most significant bits.

yang, security, crypto

normative-requirement §4 MUST

The receiver of the tpm12-challenge-response-attestation RPC response must verify that the certificate is for an active AIK confirmed by a third party as supporting Attestation on the targeted TPM 1.2.

yang, security, crypto, pkix

normative-requirement §4 MUST

The receiver of the tpm20-challenge-response-attestation RPC response must verify that the certificate is for an active AK, confirmed by a third party to belong to an entity legitimately able to perform Attestation on the targeted TPM 2.0.

yang, security, crypto, pkix

protocol-element §2.1.1.5

The attester-supported-algos container identifies which TCG hash and asymmetric-signing algorithms are available for use on the attesting platform, separately for TPM 1.2 and TPM 2.0. Operators use this to restrict the algorithm set available to RPCs.

yang, netconf, security, crypto

protocol-element §2.1.2

The ietf-tcg-algs YANG module defines algorithm identities corresponding to TCG Algorithm Registry Table 3 (rev 1.32), organized into cryptographic function categories: asymmetric, symmetric, hash, signing, anonymous_signing, encryption_mode, method, and object_type. It also defines tpm12 and tpm20 API specification identities.

yang, crypto, security

protocol-element §2.1.1.4

The log-retrieval RPC allows a Verifier to acquire measurement log Evidence that was extended into specific TPM PCRs. Log selection supports three index types: last-entry (binary content match), numeric index, or timestamp. Supported log types include bios, ima, and netequip_boot.

yang, netconf, security

protocol-element §2.1.1.1

The mtpm feature indicates that multiple TPMs on the device can support remote attestation, enabling scenarios such as multiple line cards each with their own TPM. When mtpm is active and no certificate-name is provided in an RPC, all compliant TPMs respond.

yang, security

protocol-element §2.1.1.5

The rats-support-structures container is the top-level datastore definition enabling Verifiers or Relying Parties to discover information necessary to use the remote attestation RPCs. It houses tpms, compute-nodes, and attester-supported-algos sub-containers.

yang, netconf, security

protocol-element §2.1.1.3.1

The tpm12-challenge-response-attestation RPC allows a Verifier to request signed TPM PCRs (TPM Quote operation) from a TPM 1.2 cryptoprocessor. Input includes PCR index selection, nonce, and optional certificate name(s); output includes a TPM_QUOTE2 binary response per TPM.

yang, netconf, security

protocol-element §2.1.1.3.2

The tpm20-challenge-response-attestation RPC allows a Verifier to request signed TPM PCRs from a TPM 2.0 cryptoprocessor. Input includes a nonce, PCR bank selection with hash algorithm, and optional certificate name(s); output includes TPMS_QUOTE_INFO, quote-signature, optional unsigned PCR values, and uptime.

yang, netconf, security

protocol-element §2.1.1.5

The tpms container provides configuration and operational details for each supported TPM, including tpm-firmware-version, quotable PCRs, associated certificates (EK, IAK, LAK types), hardware-based indicator, manufacturer, path, and operational status (operational or non-operational).

yang, netconf, security

registry §3

This document registers two YANG modules in the IANA YANG Parameters registry: ietf-tpm-remote-attestation (prefix 'tpm', namespace urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation) and ietf-tcg-algs (prefix 'taa', namespace urn:ietf:params:xml:ns:yang:ietf-tcg-algs). Both namespaces are also registered in the IETF XML Registry.

yang, registry, netconf

security-consideration §4

Requesting a large volume of logs via the log-retrieval RPC could require significant system resources and create a denial of service. Event logs containing hash values (digests) of boot and OS software are sensitive, as passive attackers can use them to identify software versions and launch targeted attacks.

yang, security, measurement

security-consideration §4

The attester-supported-algos container could be populated with algorithms not supported by the underlying physical TPM. Vendors should restrict the ability to configure unsupported algorithms. The ietf-tcg-algs module notes that some algorithms (e.g., SHA1) are considered legacy and should be evaluated carefully before use.

yang, security, crypto

security-consideration §4

The 'certificates' sub-container within 'tpms' exposes certificates used for attestation, potentially allowing selection of a compromised certificate. The 'type' field could be misconfigured to represent a different key type, altering how a Verifier evaluates attestation results.

yang, security, pkix

wire-format §2.1.1.4

BIOS event log entries include event-number (uint32, monotonically increasing), event-type (uint32), pcr-index (0-31), a digest-list with hash-algo and digest pairs, event-size (uint32), and event-data (binary). IMA and netequip_boot log entries use a 64-bit event-number and include ima-template, filename-hint, filedata-hash, hash algorithm fields, template-hash, pcr-index, and optional digital signature.

yang, security

wire-format §2.1.1.3.1

The TPM 1.2 attestation response carries three binary fields from a TPM1.2 Quote2 operation: pcr-data (type TPM_PCR_INFO_SHORT, the signed PCR data), version-info (type TPM_CAP_VERSION_INFO), and sig (the signature over the signed data).

yang, security, crypto

wire-format §2.1.1.3.2

The TPM 2.0 attestation response carries quote-data (mandatory binary field, a hash of selected PCR values including the hash algorithm, as TPMS_ATTEST structure), quote-signature (TPMT_SIGNATURE over quote-data), and optionally unsigned-pcr-values listing individual PCR bank values per hash algorithm.

yang, security, crypto