draft-ietf-rats-yang-tpm-charra-00.txt   draft-ietf-rats-yang-tpm-charra-01.txt 
RATS Working Group H. Birkholz RATS Working Group H. Birkholz
Internet-Draft M. Eckel Internet-Draft M. Eckel
Intended status: Standards Track Fraunhofer SIT Intended status: Standards Track Fraunhofer SIT
Expires: July 10, 2020 S. Bhandari Expires: September 12, 2020 S. Bhandari
B. Sulzen B. Sulzen
E. Voit E. Voit
Cisco Cisco
L. Xia L. Xia
Huawei Huawei
T. Laffey T. Laffey
HPE HPE
G. Fedorkow G. Fedorkow
Juniper Juniper
January 07, 2020 March 11, 2020
A YANG Data Model for Challenge-Response-based Remote Attestation A YANG Data Model for Challenge-Response-based Remote Attestation
Procedures using TPMs Procedures using TPMs
draft-ietf-rats-yang-tpm-charra-00 draft-ietf-rats-yang-tpm-charra-01
Abstract Abstract
This document defines a YANG RPC and a minimal datastore tree This document defines a YANG RPC and a minimal datastore tree
required to retrieve attestation evidence about integrity required to retrieve attestation evidence about integrity
measurements from a composite device with one or more roots of trust measurements from a composite device with one or more roots of trust
for reporting. Complementary measurement logs are also provided by for reporting. Complementary measurement logs are also provided by
the YANG RPC originating from one or more roots of trust of the YANG RPC originating from one or more roots of trust of
measurement. The module defined requires at least one TPM 1.2 or TPM measurement. The module defined requires at least one TPM 1.2 or TPM
2.0 and corresponding Trusted Software Stack included in the device 2.0 and corresponding Trusted Software Stack included in the device
skipping to change at page 1, line 48 skipping to change at page 1, line 48
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 10, 2020. This Internet-Draft will expire on September 12, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 26 skipping to change at page 2, line 26
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements notation . . . . . . . . . . . . . . . . . . 3 1.1. Requirements notation . . . . . . . . . . . . . . . . . . 3
2. The YANG Module for Basic Remote Attestation Procedures . . . 3 2. The YANG Module for Basic Remote Attestation Procedures . . . 3
2.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 3
2.2. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 7 2.2. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 8
3. IANA considerations . . . . . . . . . . . . . . . . . . . . . 30 3. IANA considerations . . . . . . . . . . . . . . . . . . . . . 32
4. Security Considerations . . . . . . . . . . . . . . . . . . . 30 4. Security Considerations . . . . . . . . . . . . . . . . . . . 32
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 30 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 32
6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 30 6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 32
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 30 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.1. Normative References . . . . . . . . . . . . . . . . . . 30 7.1. Normative References . . . . . . . . . . . . . . . . . . 32
7.2. Informative References . . . . . . . . . . . . . . . . . 31 7.2. Informative References . . . . . . . . . . . . . . . . . 33
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33
1. Introduction 1. Introduction
This document is based on the terminology defined in the This document is based on the terminology defined in the
[I-D.ietf-rats-architecture] and uses the interaction model and [I-D.ietf-rats-architecture] and uses the interaction model and
information elements defined in the information elements defined in the
[I-D.birkholz-rats-reference-interaction-model] document. The [I-D.birkholz-rats-reference-interaction-model] document. The
currently supported hardware security modules (HWM) - sometimes also currently supported hardware security modules (HWM) - sometimes also
referred to as an embedded secure element (eSE) - is the Trusted referred to as an embedded secure element (eSE) - is the Trusted
Platform Module (TPM) version 1.2 and 2.0 specified by the Trusted Platform Module (TPM) version 1.2 and 2.0 specified by the Trusted
Computing Group (TCG). One ore more TPMs embedded in the components Computing Group (TCG). One ore more TPMs embedded in the components
of a composite device - sometimes also referred to as an aggregate of a composite device - sometimes also referred to as an aggregate
device - are required in order to use the YANG module defined in this device - are required in order to use the YANG module defined in this
document. A TPM is used as a root of trust for reporting (RTR) in document. A TPM is used as a root of trust for reporting (RTR) in
order to retrieve attestation evidence from a composite device (quote order to retrieve attestation evidence from a composite device (quote
primitive operation). Additionally, it is used as a root of trust primitive operation). Additionally, it is used as a root of trust
for storage (RTS) in order to retain shielded secrets and store for storage (RTS) in order to retain shielded secrets and store
system measurements using a folding hash function (extent primitive system measurements using a folding hash function (extend primitive
operation). operation).
1.1. Requirements notation 1.1. Requirements notation
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
2. The YANG Module for Basic Remote Attestation Procedures 2. The YANG Module for Basic Remote Attestation Procedures
One or more TPM 2.0 MUST be embedded in the composite device that is One or more TPMs MUST be embedded in the composite device that is
providing attestation evidence via the YANG module defined in this providing attestation evidence via the YANG module defined in this
document. The ietf-basic-remote-attestation YANG module enables a document. The ietf-basic-remote-attestation YANG module enables a
composite device to take on the role of Claimant and Attester in composite device to take on the role of Claimant and Attester in
accordance with the Remote Attestation Procedures (RATS) architecture accordance with the Remote Attestation Procedures (RATS) architecture
[I-D.ietf-rats-architecture] and the corresponding challenge-response [I-D.ietf-rats-architecture] and the corresponding challenge-response
interaction model defined in the interaction model defined in the
[I-D.birkholz-rats-reference-interaction-model] document. A fresh [I-D.birkholz-rats-reference-interaction-model] document. A fresh
nonce with an appropriate amount of entropy MUST be supplied by the nonce with an appropriate amount of entropy MUST be supplied by the
YANG client in order to enable a proof-of-freshness with respect to YANG client in order to enable a proof-of-freshness with respect to
the attestation evidence provided by the attester running the YANG the attestation evidence provided by the attester running the YANG
datastore. The functions of this YANG module are restricted to 0-1 datastore. The functions of this YANG module are restricted to 0-1
TPM 2.0 per hardware component. TPMs per hardware component.
2.1. Tree Diagram 2.1. Tree Diagram
module: ietf-tpm-remote-attestation module: ietf-tpm-remote-attestation
+--ro rats-support-structures +--ro rats-support-structures
+--ro supported-algos* uint16 +--ro supported-algos* uint16
+--ro tpms* [tpm_name] +--ro compute-nodes* [node-id]
| +--ro tpm_name string +--ro node-id string
| +--ro tpm-physical-index? int32 {ietfhw:entity-mib}?
| +--ro certificates* []
| +--ro certificate
| +--ro certificate-name? string
| +--ro certificate-type? enumeration
| +--ro certificate-value? ietfct:end-entity-cert-cms
+--ro compute-nodes* [node-name]
+--ro node-name string
+--ro node-physical-index? int32 {ietfhw:entity-mib}? +--ro node-physical-index? int32 {ietfhw:entity-mib}?
+--ro node-name? string
+--ro node-location? string
+--ro tpms* [tpm-name]
+--ro tpm-name string
+--ro tpm-physical-index? int32 {ietfhw:entity-mib}?
+--ro tpm-manufacturer? string
+--ro tpm-firmware-version? string
+--ro tpm-specification-version? string
+--ro tpm-status? string
+--ro certificates* []
+--ro certificate
+--ro certificate-name? string
+--ro certificate-type? enumeration
+--ro certificate-value? ietfct:end-entity-cert-cms
+--ro lak-public-structure? binary
rpcs: rpcs:
+---x tpm12-challenge-response-attestation +---x tpm12-challenge-response-attestation
| +---w input | +---w input
| | +---w tpm1-attestation-challenge | | +---w tpm1-attestation-challenge
| | +---w pcr-indices* uint8 | | +---w pcr-indices* uint8
| | +---w nonce-value binary | | +---w nonce-value binary
| | +---w TPM_SIG_SCHEME-value uint8 | | +---w TPM_SIG_SCHEME-value uint8
| | +---w (key-identifier)? | | +---w (key-identifier)?
| | | +--:(public-key) | | | +--:(public-key)
| | | | +---w pub-key-id? binary | | | | +---w pub-key-id? binary
| | | +--:(TSS_UUID) | | | +--:(TSS_UUID)
| | | +---w TSS_UUID-value | | | +---w TSS_UUID-value
| | | +---w ulTimeLow? uint32 | | | +---w ulTimeLow? uint32
| | | +---w usTimeMid? uint16 | | | +---w usTimeMid? uint16
| | | +---w usTimeHigh? uint16 | | | +---w usTimeHigh? uint16
| | | +---w bClockSeqHigh? uint8 | | | +---w bClockSeqHigh? uint8
| | | +---w bClockSeqLow? uint8 | | | +---w bClockSeqLow? uint8
| | | +---w rgbNode* uint8 | | | +---w rgbNode* uint8
| | +---w add-version? boolean | | +---w add-version? boolean
| | +---w tpm_name? string | | +---w tpm-name? string
| | +---w tpm-physical-index? int32 {ietfhw:entity-mib}? | | +---w tpm-physical-index? int32 {ietfhw:entity-mib}?
| +--ro output | +--ro output
| +--ro tpm12-attestation-response* [tpm_name] | +--ro tpm12-attestation-response* [tpm-name]
| +--ro tpm_name string | +--ro tpm-name string
| +--ro tpm-physical-index? int32 {ietfhw:entity-mib}? | +--ro tpm-physical-index? int32 {ietfhw:entity-mib}?
| +--ro up-time? uint32 | +--ro up-time? uint32
| +--ro node-name? string | +--ro node-id? string
| +--ro node-physical-index? int32 {ietfhw:entity-mib}? | +--ro node-physical-index? int32 {ietfhw:entity-mib}?
| +--ro fixed? binary | +--ro fixed? binary
| +--ro external-data? binary | +--ro external-data? binary
| +--ro signature-size? uint32 | +--ro signature-size? uint32
| +--ro signature? binary | +--ro signature? binary
| +--ro (tpm12-quote) | +--ro (tpm12-quote)
| +--:(tpm12-quote1) | +--:(tpm12-quote1)
| | +--ro version* [] | | +--ro version* []
| | | +--ro major? uint8 | | | +--ro major? uint8
| | | +--ro minor? uint8 | | | +--ro minor? uint8
skipping to change at page 5, line 4 skipping to change at page 5, line 11
| | +--ro value-size? uint32 | | +--ro value-size? uint32
| | +--ro tpm12-pcr-value* binary | | +--ro tpm12-pcr-value* binary
| +--:(tpm12-quote2) | +--:(tpm12-quote2)
| +--ro tag? uint8 | +--ro tag? uint8
| +--ro pcr-indices* uint8 | +--ro pcr-indices* uint8
| +--ro locality-at-release? uint8 | +--ro locality-at-release? uint8
| +--ro digest-at-release? binary | +--ro digest-at-release? binary
+---x tpm20-challenge-response-attestation +---x tpm20-challenge-response-attestation
| +---w input | +---w input
| | +---w tpm20-attestation-challenge | | +---w tpm20-attestation-challenge
| | | +---w pcr-list* [] | | +---w nonce-value binary
| | | | +---w pcr | | +---w challenge-objects* [node-id tpm-name]
| | | | +---w pcr-indices* uint8 | | +---w node-id string
| | | | +---w (algo-registry-type) | | +---w node-physical-index? int32 {ietfhw:entity-mib}?
| | | | +--:(tcg) | | +---w tpm-name string
| | | | | +---w tcg-hash-algo-id? uint16 | | +---w tpm-physical-index? int32 {ietfhw:entity-mib}?
| | | | +--:(ietf) | | +---w pcr-list* []
| | | | +---w ietf-ni-hash-algo-id? uint8 | | | +---w pcr
| | | +---w nonce-value binary | | | +---w pcr-indices* uint8
| | | +---w (signature-identifier-type) | | | +---w (algo-registry-type)
| | | | +--:(TPM_ALG_ID) | | | +--:(tcg)
| | | | | +---w TPM_ALG_ID-value? uint16 | | | | +---w tcg-hash-algo-id? uint16
| | | | +--:(COSE_Algorithm) | | | +--:(ietf)
| | | | +---w COSE_Algorithm-value? int32 | | | +---w ietf-ni-hash-algo-id? uint8
| | | +---w (key-identifier)? | | +---w (signature-identifier-type)
| | | +--:(public-key) | | | +--:(TPM_ALG_ID)
| | | | +---w pub-key-id? binary | | | | +---w TPM_ALG_ID-value? uint16
| | | +--:(uuid) | | | +--:(COSE_Algorithm)
| | | +---w uuid-value? binary | | | +---w COSE_Algorithm-value? int32
| | +---w tpms* [tpm_name] | | +---w (key-identifier)?
| | +---w tpm_name string | | +--:(public-key)
| | +---w tpm-physical-index? int32 {ietfhw:entity-mib}? | | | +---w pub-key-id? binary
| | +--:(uuid)
| | +---w uuid-value? binary
| +--ro output | +--ro output
| +--ro tpm20-attestation-response* [tpm_name] | +--ro tpm20-attestation-response* [node-id tpm-name]
| +--ro tpm_name string | +--ro tpm-name string
| +--ro tpm-physical-index? int32 {ietfhw:entity-mib}? | +--ro tpm-physical-index? int32 {ietfhw:entity-mib}?
| +--ro up-time? uint32 | +--ro up-time? uint32
| +--ro node-name? string | +--ro node-id string
| +--ro node-physical-index? int32 {ietfhw:entity-mib}? | +--ro node-physical-index? int32 {ietfhw:entity-mib}?
| +--ro tpms-attest | +--ro quote? binary
| | +--ro pcrdigest? binary | +--ro quote-signature? binary
| | +--ro tpms-attest-result? binary | +--ro pcr-bank-values* [algo-registry-type]
| | +--ro tpms-attest-result-length? uint32 | | +--ro (algo-registry-type)
| +--ro tpmt-signature? binary | | | +--:(tcg)
| | | | +--ro tcg-hash-algo-id? uint16
| | | +--:(ietf)
| | | +--ro ietf-ni-hash-algo-id? uint8
| | +--ro pcr-values* [pcr-index]
| | +--ro pcr-index uint16
| | +--ro pcr-value? binary
| +--ro pcr-digest-algo-in-quote
| +--ro (algo-registry-type)
| +--:(tcg)
| | +--ro tcg-hash-algo-id? uint16
| +--:(ietf)
| +--ro ietf-ni-hash-algo-id? uint8
+---x basic-trust-establishment +---x basic-trust-establishment
| +---w input | +---w input
| | +---w nonce-value binary | | +---w nonce-value binary
| | +---w (signature-identifier-type) | | +---w (signature-identifier-type)
| | | +--:(TPM_ALG_ID) | | | +--:(TPM_ALG_ID)
| | | | +---w TPM_ALG_ID-value? uint16 | | | | +---w TPM_ALG_ID-value? uint16
| | | +--:(COSE_Algorithm) | | | +--:(COSE_Algorithm)
| | | +---w COSE_Algorithm-value? int32 | | | +---w COSE_Algorithm-value? int32
| | +---w tpm_name? string | | +---w tpm-name? string
| | +---w tpm-physical-index? int32 {ietfhw:entity-mib}? | | +---w tpm-physical-index? int32 {ietfhw:entity-mib}?
| | +---w certificate-name? string | | +---w certificate-name? string
| +--ro output | +--ro output
| +--ro attestation-certificates* [tpm_name] | +--ro attestation-certificates* [tpm-name]
| +--ro tpm_name string | +--ro tpm-name string
| +--ro tpm-physical-index? int32 {ietfhw:entity-mib}? | +--ro tpm-physical-index? int32 {ietfhw:entity-mib}?
| +--ro up-time? uint32 | +--ro up-time? uint32
| +--ro node-name? string | +--ro node-id? string
| +--ro node-physical-index? int32 {ietfhw:entity-mib}? | +--ro node-physical-index? int32 {ietfhw:entity-mib}?
| +--ro certificate-name? string | +--ro certificate-name? string
| +--ro attestation-certificate? ietfct:end-entity-cert-cms | +--ro attestation-certificate? ietfct:end-entity-cert-cms
| +--ro (key-identifier)? | +--ro (key-identifier)?
| +--:(public-key) | +--:(public-key)
| | +--ro pub-key-id? binary | | +--ro pub-key-id? binary
| +--:(uuid) | +--:(uuid)
| +--ro uuid-value? binary | +--ro uuid-value? binary
+---x log-retrieval +---x log-retrieval
+---w input +---w input
| +---w log-selector* [node-name] | +---w log-selector* [node-id tpm-name]
| | +---w node-name string | | +---w node-id string
| | +---w node-physical-index? int32 {ietfhw:entity-mib}? | | +---w node-physical-index? int32 {ietfhw:entity-mib}?
| | +---w tpm-name string
| | +---w tpm-physical-index? int32 {ietfhw:entity-mib}?
| | +---w (index-type)? | | +---w (index-type)?
| | +--:(last-entry) | | | +--:(last-entry)
| | | +---w last-entry-value? binary | | | | +---w last-entry-value? binary
| | +--:(index) | | | +--:(index)
| | | +---w index-number? uint64 | | | | +---w last-index-number? uint64
| | +--:(timestamp) | | | +--:(timestamp)
| | +---w timestamp? yang:date-and-time | | | +---w timestamp? yang:date-and-time
| +---w log-type identityref | | +---w log-entry-quantity? uint16
| +---w pcr-list* [] | | +---w pcr-list* []
| | +---w pcr | | +---w pcr
| | +---w pcr-indices* uint8 | | +---w pcr-indices* uint8
| | +---w (algo-registry-type) | | +---w (algo-registry-type)
| | +--:(tcg) | | +--:(tcg)
| | | +---w tcg-hash-algo-id? uint16 | | | +---w tcg-hash-algo-id? uint16
| | +--:(ietf) | | +--:(ietf)
| | +---w ietf-ni-hash-algo-id? uint8 | | +---w ietf-ni-hash-algo-id? uint8
| +---w log-entry-quantity? uint16 | +---w log-type identityref
+--ro output +--ro output
+--ro system-event-logs +--ro system-event-logs
+--ro node-data* [node-name tpm_name] +--ro node-data* [node-id tpm-name]
+--ro node-name string +--ro node-id string
+--ro node-physical-index? int32 {ietfhw:entity-mib}? +--ro node-physical-index? int32 {ietfhw:entity-mib}?
+--ro up-time? uint32 +--ro up-time? uint32
+--ro tpm_name string +--ro tpm-name string
+--ro tpm-physical-index? int32 {ietfhw:entity-mib}? +--ro tpm-physical-index? int32 {ietfhw:entity-mib}?
+--ro log-result +--ro log-result
+--ro (log-type) +--ro (log-type)
+--:(bios) +--:(bios)
| +--ro bios-event-logs | +--ro bios-event-logs
| +--ro bios-event-entry* [event-number] | +--ro bios-event-entry* [event-number]
| +--ro event-number uint32 | +--ro event-number uint32
| +--ro event-type? uint32 | +--ro event-type? uint32
| +--ro pcr-index? uint16 | +--ro pcr-index? uint16
| +--ro digest-list* [] | +--ro digest-list* []
skipping to change at page 7, line 21 skipping to change at page 7, line 44
| | +--ro digest* binary | | +--ro digest* binary
| +--ro event-size? uint32 | +--ro event-size? uint32
| +--ro event-data* uint8 | +--ro event-data* uint8
+--:(ima) +--:(ima)
+--ro ima-event-logs +--ro ima-event-logs
+--ro ima-event-entry* [event-number] +--ro ima-event-entry* [event-number]
+--ro event-number uint64 +--ro event-number uint64
+--ro ima-template? string +--ro ima-template? string
+--ro filename-hint? string +--ro filename-hint? string
+--ro filedata-hash? binary +--ro filedata-hash? binary
+--ro filedata-hash-algorithm? string
+--ro template-hash-algorithm? string +--ro template-hash-algorithm? string
+--ro template-hash? binary +--ro template-hash? binary
+--ro pcr-index? uint16 +--ro pcr-index? uint16
+--ro signature? binary +--ro signature? binary
2.2. YANG Module 2.2. YANG Module
This YANG module imports modules from [RFC6991], [RFC8348], and This YANG module imports modules from [RFC6991], [RFC8348], and
[I-D.ietf-netconf-crypto-types]. [I-D.ietf-netconf-crypto-types].
<CODE BEGINS> file ietf-tpm-remote-attestation@2019-01-07.yang <CODE BEGINS> file ietf-tpm-remote-attestation@2019-01-07.yang
module ietf-tpm-remote-attestation { module ietf-tpm-remote-attestation {
namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation"; namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation";
prefix "yang-brat"; prefix "yang-rats-charra";
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
} }
import ietf-hardware { import ietf-hardware {
prefix ietfhw; prefix ietfhw;
} }
import ietf-crypto-types { import ietf-crypto-types {
prefix ietfct; prefix ietfct;
} }
skipping to change at page 8, line 14 skipping to change at page 8, line 41
Author : Henk Birkholz <henk.birkholz@sit.fraunhofer.de> Author : Henk Birkholz <henk.birkholz@sit.fraunhofer.de>
Author : Michael Eckel <michael.eckel@sit.fraunhofer.de> Author : Michael Eckel <michael.eckel@sit.fraunhofer.de>
Author : Shwetha Bhandari <shwethab@cisco.com> Author : Shwetha Bhandari <shwethab@cisco.com>
Author : Bill Sulzen <bsulzen@cisco.com> Author : Bill Sulzen <bsulzen@cisco.com>
Author : Eric Voit <evoit@cisco.com> Author : Eric Voit <evoit@cisco.com>
Author : Liang Xia (Frank) <frank.xialiang@huawei.com> Author : Liang Xia (Frank) <frank.xialiang@huawei.com>
Author : Tom Laffey <tom.laffey@hpe.com> Author : Tom Laffey <tom.laffey@hpe.com>
Author : Guy Fedorkow <gfedorkow@juniper.net>"; Author : Guy Fedorkow <gfedorkow@juniper.net>";
description description
"A YANG module to enable a TPM 2.0 based remote attestation "A YANG module to enable a TPM 1.2 and TPM 2.0 based
procedure using a challenge-response interaction model and remote attestation procedure using a challenge-response
the TPM 2.0 Quote primitive operation. interaction model and the TPM 1.2 and TPM 2.0 Quote
primitive operations.
Copyright (c) 2019 IETF Trust and the persons identified Copyright (c) 2020 IETF Trust and the persons identified
as authors of the code. All rights reserved. as authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with Redistribution and use in source and binary forms, with
or without modification, is permitted pursuant to, and or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Simplified subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices. itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119) are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all (RFC 8174) when, and only when, they appear in all
capitals, as shown here."; capitals, as shown here.";
revision "2020-01-08" { revision "2020-03-09" {
description description
"Initial version"; "Initial version";
reference reference
"draft-ietf-rats-tpm2-remote-attestation"; "draft-ietf-rats-yang-tpm-charra";
} }
/*****************/ /*****************/
/* Groupings */ /* Groupings */
/*****************/ /*****************/
grouping hash-algo { grouping hash-algo {
description description
"A selector for the hashing algorithm"; "A selector for the hashing algorithm";
choice algo-registry-type { choice algo-registry-type {
mandatory true; mandatory true;
description description
"Unfortunately, both IETF and TCG have registries here. "Unfortunately, both IETF and TCG have registries here.
Choose your weapon wisely."; Choose your weapon wisely.";
case tcg { case tcg {
description description
"you chose the east door, the tcg space opens up to "You chose the east door, the tcg space opens up to
you."; you.";
leaf tcg-hash-algo-id { leaf tcg-hash-algo-id {
type uint16; type uint16;
description description
"This is an index referencing the TCG Algorithm "This is an index referencing the TCG Algorithm
Registry based on TPM_ALG_ID."; Registry based on TPM_ALG_ID.";
} }
} }
case ietf { case ietf {
description description
"you chose the west door, the ietf space opens up to "You chose the west door, the ietf space opens up to
you."; you.";
leaf ietf-ni-hash-algo-id { leaf ietf-ni-hash-algo-id {
type uint8; type uint8;
description description
"This is an index referencing the Named Information "This is an index referencing the Named Information
Hash Algorithm Registry."; Hash Algorithm Registry.";
} }
} }
} }
} }
grouping hash { grouping hash {
description description
"The hash value including hash-algo identifier"; "The hash value including hash-algo identifier";
list hash-digests { list hash-digests {
description description
"The list of hashes."; "The list of hashes.";
container hash-digest { container hash-digest {
description description
"A hash value based on a hash algorithm registered by an "A hash value based on a hash algorithm registered by an
SDO."; SDO.";
uses hash-algo; uses hash-algo;
leaf hash-value { leaf hash-value {
type binary; type binary;
description description
"The binary representation of the hash value."; "The binary representation of the hash value.";
} }
} }
} }
} }
grouping nonce { grouping nonce {
description description
"A nonce to show freshness and counter replays."; "A nonce to show freshness and counter replays.";
leaf nonce-value { leaf nonce-value {
type binary; type binary;
mandatory true; mandatory true;
description description
skipping to change at page 10, line 16 skipping to change at page 10, line 43
} }
grouping nonce { grouping nonce {
description description
"A nonce to show freshness and counter replays."; "A nonce to show freshness and counter replays.";
leaf nonce-value { leaf nonce-value {
type binary; type binary;
mandatory true; mandatory true;
description description
"This nonce SHOULD be generated via a registered "This nonce SHOULD be generated via a registered
cryptographic-strength algorithm. In consequence, the length cryptographic-strength algorithm. In consequence,
of the nonce depends on the hash algorithm used. The algorithm the length of the nonce depends on the hash algorithm
used in this case is independent from the hash algorithm used to used. The algorithm used in this case is independent
create the hash-value in the response of the attestor."; from the hash algorithm used to create the hash-value
in the response of the attestor.";
} }
} }
grouping tpm12-pcr-selection { grouping tpm12-pcr-selection {
description description
"A Verifier can request one or more PCR values using its "A Verifier can request one or more PCR values using its
individually created Attestation Key Certificate (AC). individually created Attestation Key Certificate (AC).
The corresponding selection filter is represented in this grouping. The corresponding selection filter is represented in this
Requesting a PCR value that is not in scope of the AC used, detailed grouping.
exposure via error msg should be avoided."; Requesting a PCR value that is not in scope of the AC used,
detailed exposure via error msg should be avoided.";
leaf-list pcr-indices { leaf-list pcr-indices {
type uint8; type uint8;
description description
"The numbers/indexes of the PCRs. At the moment this is limited "The numbers/indexes of the PCRs. At the moment this is limited
to 32."; to 32.";
} }
} }
grouping tpm20-pcr-selection { grouping tpm20-pcr-selection {
description description
"A Verifier can request one or more PCR values uses its "A Verifier can request one or more PCR values uses its
individually created AC. The corresponding selection filter is individually created AC. The corresponding selection filter is
represented in this grouping. Requesting a PCR value that is not represented in this grouping. Requesting a PCR value that is not
in scope of the AC used, detailed exposure via error msg should in scope of the AC used, detailed exposure via error msg should
be avoided."; be avoided.";
list pcr-list { list pcr-list {
description description
"For each PCR in this list an individual list of banks "For each PCR in this list an individual list of banks
(hash-algo) can be requested. It depends on the datastore, if (hash-algo) can be requested. It depends on the datastore, if
every bank in this grouping is included per PCR (crude), or if every bank in this grouping is included per PCR (crude), or if
each requested bank set is returned for each PCR individually each requested bank set is returned for each PCR individually
(elegant)."; (elegant).";
container pcr { container pcr {
description description
"The composite of a PCR number and corresponding bank "The composite of a PCR number and corresponding bank
numbers."; numbers.";
leaf-list pcr-indices { leaf-list pcr-indices {
type uint8; type uint8;
description description
"The number of the PCR. At the moment this is limited "The number of the PCR. At the moment this is limited
32"; 32";
} }
uses hash-algo; uses hash-algo;
} }
} }
} }
grouping pcr-selector { grouping pcr-selector {
description description
"A Verifier can request the generation of an attestation "A Verifier can request the generation of an attestation
certificate (a signed public attestation key certificate (a signed public attestation key
(non-migratable, tpm-resident) wrt one or more PCR values. (non-migratable, tpm-resident) wrt one or more PCR values.
The corresponding creation input is represented in this grouping.
Requesting a PCR value that is not supported results in an error, The corresponding creation input is represented in this grouping.
detailed exposure via error msg should be avoided."; Requesting a PCR value that is not supported results in an error,
detailed exposure via error msg should be avoided.";
list pcr-list { list pcr-list {
description description
"For each PCR in this list an individual hash-algo can be "For each PCR in this list an individual hash-algo can be
requested."; requested.";
container pcr { container pcr {
description description
"The composite of a PCR number and corresponding bank "The composite of a PCR number and corresponding bank
numbers."; numbers.";
leaf-list pcr-index { leaf-list pcr-index {
type uint8; type uint8;
description description
"The numbers of the PCRs that are associated with "The numbers of the PCRs that are associated with
the created key. At the moment the highest number is 32"; the created key. At the moment the highest number is 32";
} }
uses hash-algo; uses hash-algo;
} }
} }
} }
grouping tpm12-signature-scheme { grouping tpm12-signature-scheme {
description description
"The signature scheme used to sign the evidence via a TPM 1.2."; "The signature scheme used to sign the evidence via a TPM 1.2.";
leaf TPM_SIG_SCHEME-value { leaf TPM_SIG_SCHEME-value {
type uint8; type uint8;
mandatory true; mandatory true;
description description
"Selects the signature scheme that is used to sign the TPM quote "Selects the signature scheme that is used to sign the TPM
information response. Allowed values can be found in the table at Quote information response. Allowed values can be found in
the bottom of page 32 in the TPM 1.2 Structures specification the table at the bottom of page 32 in the TPM 1.2 Structures
(Level 2 Revision 116, 1 March 2011)."; specification (Level 2 Revision 116, 1 March 2011).";
} }
} }
grouping tpm20-signature-scheme { grouping tpm20-signature-scheme {
description description
"The signature scheme used to sign the evidence."; "The signature scheme used to sign the evidence.";
choice signature-identifier-type { choice signature-identifier-type {
mandatory true; mandatory true;
description description
"There are multiple ways to reference a signature type. "There are multiple ways to reference a signature type.
This used to select the signature algo to sign the quote This used to select the signature algo to sign the quote
information response."; information response.";
case TPM_ALG_ID { case TPM_ALG_ID {
description description
"This references the indices of table 9 in the TPM 2.0 "This references the indices of table 9 in the TPM 2.0
structure specification."; structure specification.";
leaf TPM_ALG_ID-value { leaf TPM_ALG_ID-value {
type uint16; type uint16;
description description
"The TPM Algo ID."; "The TCG Algorithm Registry ID value.";
} }
} }
case COSE_Algorithm { case COSE_Algorithm {
description description
"This references the IANA COSE Algorithms Registry indices. "This references the IANA COSE Algorithms Registry indices.
Every index of this registry to be used must be mapable to a Every index of this registry to be used must be mapable to a
TPM_ALG_ID value."; TPM_ALG_ID value.";
leaf COSE_Algorithm-value { leaf COSE_Algorithm-value {
type int32; type int32;
description description
"The TPM Algo ID."; "The IANA COSE Algorithms ID value.";
} }
} }
} }
} }
grouping tpm12-attestation-key-identifier { grouping tpm12-attestation-key-identifier {
description description
"A selector for a suitable key identifier for a TPM 1.2."; "A selector for a suitable key identifier for a TPM 1.2.";
choice key-identifier { choice key-identifier {
description description
"Identifier for the attestation key to use for signing "Identifier for the attestation key to use for signing
attestation evidence."; attestation evidence.";
case public-key { case public-key {
leaf pub-key-id { leaf pub-key-id {
type binary; type binary;
description description
"The value of the identifier for the public key."; "The value of the identifier for the public key.";
} }
} }
case TSS_UUID { case TSS_UUID {
description description
"Use a YANG agent generated (and maintained) attestation "Use a YANG agent generated (and maintained) attestation
key UUID that complies with the TSS_UUID datatype of the TCG key UUID that complies with the TSS_UUID datatype of the TCG
Software Stack (TSS) Specification, Version 1.10 Golden, Software Stack (TSS) Specification, Version 1.10 Golden,
August 20, 2003."; August 20, 2003.";
container TSS_UUID-value { container TSS_UUID-value {
description description
"A detailed structure that is used to create the "A detailed structure that is used to create the
TPM 1.2 native TSS_UUID as defined in the TCG Software TPM 1.2 native TSS_UUID as defined in the TCG Software
Stack (TSS) Specification, Version 1.10 Golden, Stack (TSS) Specification, Version 1.10 Golden,
August 20, 2003."; August 20, 2003.";
leaf ulTimeLow { leaf ulTimeLow {
type uint32; type uint32;
description description
"The low field of the timestamp."; "The low field of the timestamp.";
} }
leaf usTimeMid { leaf usTimeMid {
type uint16; type uint16;
description description
"The middle field of the timestamp."; "The middle field of the timestamp.";
} }
leaf usTimeHigh { leaf usTimeHigh {
type uint16; type uint16;
description description
"The high field of the timestamp multiplexed with the "The high field of the timestamp multiplexed with the
version number."; version number.";
} }
leaf bClockSeqHigh { leaf bClockSeqHigh {
type uint8; type uint8;
description description
"The high field of the clock sequence multiplexed with "The high field of the clock sequence multiplexed with
the variant."; the variant.";
} }
leaf bClockSeqLow { leaf bClockSeqLow {
type uint8; type uint8;
description description
"The low field of the clock sequence."; "The low field of the clock sequence.";
} }
leaf-list rgbNode { leaf-list rgbNode {
type uint8; type uint8;
description description
"The spatially unique node identifier."; "The spatially unique node identifier.";
skipping to change at page 14, line 17 skipping to change at page 14, line 46
} }
} }
} }
grouping tpm20-attestation-key-identifier { grouping tpm20-attestation-key-identifier {
description description
"A selector for a suitable key identifier."; "A selector for a suitable key identifier.";
choice key-identifier { choice key-identifier {
description description
"Identifier for the attestation key to use for signing "Identifier for the attestation key to use for signing
attestation evidence."; attestation evidence.";
case public-key { case public-key {
leaf pub-key-id { leaf pub-key-id {
type binary; type binary;
description description
"The value of the identifier for the public key."; "The value of the identifier for the public key.";
} }
} }
case uuid { case uuid {
description description
"Use a YANG agent generated (and maintained) attestation "Use a YANG agent generated (and maintained) attestation
key UUID."; key UUID.";
leaf uuid-value { leaf uuid-value {
type binary; type binary;
description description
"The UUID identifying the corresponding public key."; "The UUID identifying the corresponding public key.";
} }
} }
} }
} }
grouping tpm-name { grouping tpm-identifier {
description description
"In a system with multiple-TPMs get the data from a specific TPM "In a system with multiple-TPMs get the data from a specific TPM
identified by the name and physical-index."; identified by the name and physical-index.";
leaf tpm_name { leaf tpm-name {
type string; type string;
description description
"Name of the TPM or All"; "Name value of a single TPM or 'All'";
} }
leaf tpm-physical-index { leaf tpm-physical-index {
if-feature ietfhw:entity-mib; if-feature ietfhw:entity-mib;
type int32 { type int32 {
range "1..2147483647"; range "1..2147483647";
} }
config false; config false;
description description
"The entPhysicalIndex for the TPM."; "The entPhysicalIndex for the TPM.";
reference reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
} }
} }
grouping compute-node { grouping compute-node-identifier {
description description
"In a distributed system with multiple compute nodes "In a distributed system with multiple compute nodes
this is the node identified by name and physical-index."; this is the node identified by name and physical-index.";
leaf node-name { leaf node-id {
type string; type string;
description description
"Name of the compute node or All"; "ID of the compute node, such as Board Serial Number.";
} }
leaf node-physical-index { leaf node-physical-index {
if-feature ietfhw:entity-mib; if-feature ietfhw:entity-mib;
type int32 { type int32 {
range "1..2147483647"; range "1..2147483647";
} }
config false; config false;
description description
"The entPhysicalIndex for the compute node."; "The entPhysicalIndex for the compute node.";
reference reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
} }
} }
grouping tpm12-pcr-info-short { grouping tpm12-pcr-info-short {
description description
"This structure is for defining a digest at release when the only "This structure is for defining a digest at release when the only
information that is necessary is the release configuration."; information that is necessary is the release configuration.";
uses tpm12-pcr-selection; uses tpm12-pcr-selection;
leaf locality-at-release { leaf locality-at-release {
type uint8; type uint8;
description description
".This SHALL be the locality modifier required to release the "This SHALL be the locality modifier required to release the
information (TPM 1.2 type TPM_LOCALITY_SELECTION)"; information (TPM 1.2 type TPM_LOCALITY_SELECTION)";
} }
leaf digest-at-release { leaf digest-at-release {
type binary; type binary;
description description
"This SHALL be the digest of the PCR indices and PCR values "This SHALL be the digest of the PCR indices and PCR values
to verify when revealing auth data (TPM 1.2 type to verify when revealing auth data (TPM 1.2 type
TPM_COMPOSITE_HASH)."; TPM_COMPOSITE_HASH).";
} }
} }
grouping tpm12-version { grouping tpm12-version {
description description
"This structure provides information relative the version of "This structure provides information relative the version of
the TPM."; the TPM.";
list version { list version {
description description
"This indicates the version of the structure "This indicates the version of the structure
(TPM 1.2 type TPM_STRUCT_VER). This MUST be 1.1.0.0."; (TPM 1.2 type TPM_STRUCT_VER). This MUST be 1.1.0.0.";
leaf major { leaf major {
type uint8; type uint8;
description description
"Indicates the major version of the structure. "Indicates the major version of the structure.
MUST be 0x01."; MUST be 0x01.";
} }
leaf minor { leaf minor {
type uint8; type uint8;
description description
"Indicates the minor version of the structure. "Indicates the minor version of the structure.
MUST be 0x01.";
MUST be 0x01.";
} }
leaf revMajor { leaf revMajor {
type uint8; type uint8;
description description
"Indicates the rev major version of the structure. "Indicates the rev major version of the structure.
MUST be 0x00."; MUST be 0x00.";
} }
leaf revMinor { leaf revMinor {
type uint8; type uint8;
description description
"Indicates the rev minor version of the structure. "Indicates the rev minor version of the structure.
MUST be 0x00."; MUST be 0x00.";
} }
} }
} }
grouping tpm12-quote-info-common { grouping tpm12-quote-info-common {
description description
"These statements are used in bot quote variants of the TPM 1.2"; "These statements are used in bot quote variants of the TPM 1.2";
leaf fixed { leaf fixed {
type binary; type binary;
description description
"This SHALL always be the string 'QUOT' or 'QUO2' "This SHALL always be the string 'QUOT' or 'QUO2'
(length is 4 bytes)."; (length is 4 bytes).";
} }
leaf external-data { leaf external-data {
type binary; type binary;
description description
"160 bits of externally supplied data, typically a nonce."; "160 bits of externally supplied data, typically a nonce.";
} }
leaf signature-size { leaf signature-size {
type uint32; type uint32;
description description
"The size of TPM 1.2 'signature' value."; "The size of TPM 1.2 'signature' value.";
} }
leaf signature { leaf signature {
type binary; type binary;
description description
"Signature over SHA-1 hash of tpm12-quote-info2'."; "Signature over SHA-1 hash of tpm12-quote-info2'.";
skipping to change at page 17, line 21 skipping to change at page 17, line 51
leaf signature { leaf signature {
type binary; type binary;
description description
"Signature over SHA-1 hash of tpm12-quote-info2'."; "Signature over SHA-1 hash of tpm12-quote-info2'.";
} }
} }
grouping tpm12-quote-info { grouping tpm12-quote-info {
description description
"This structure provides the mechanism for the TPM to quote the "This structure provides the mechanism for the TPM to quote the
current values of a list of PCRs (as used by the TPM_Quote2 current values of a list of PCRs (as used by the TPM_Quote2
command)."; command).";
uses tpm12-version; uses tpm12-version;
leaf digest-value { leaf digest-value {
type binary; type binary;
description description
"This SHALL be the result of the composite hash algorithm using "This SHALL be the result of the composite hash algorithm using
the current values of the requested PCR indices the current values of the requested PCR indices
(TPM 1.2 type TPM_COMPOSITE_HASH.)"; (TPM 1.2 type TPM_COMPOSITE_HASH.)";
} }
} }
grouping tpm12-quote-info2 { grouping tpm12-quote-info2 {
description description
"This structure provides the mechanism for the TPM to quote the "This structure provides the mechanism for the TPM to quote the
current values of a list of PCRs current values of a list of PCRs
(as used by the TPM_Quote2 command)."; (as used by the TPM_Quote2 command).";
leaf tag { leaf tag {
type uint8; type uint8;
description description
"This SHALL be TPM_TAG_QUOTE_INFO2."; "This SHALL be TPM_TAG_QUOTE_INFO2.";
} }
uses tpm12-pcr-info-short; uses tpm12-pcr-info-short;
} }
grouping tpm12-cap-version-info { grouping tpm12-cap-version-info {
description description
"TPM returns the current version and revision of the TPM 1.2 ."; "TPM returns the current version and revision of the TPM 1.2 .";
list TPM_PCR_COMPOSITE { list TPM_PCR_COMPOSITE {
description description
"The TPM 1.2 TPM_PCRVALUEs for the pcr-indices."; "The TPM 1.2 TPM_PCRVALUEs for the pcr-indices.";
uses tpm12-pcr-selection; uses tpm12-pcr-selection;
leaf value-size { leaf value-size {
type uint32; type uint32;
description description
"This SHALL be the size of the 'tpm12-pcr-value' field "This SHALL be the size of the 'tpm12-pcr-value' field
(not the number of PCRs)."; (not the number of PCRs).";
} }
leaf-list tpm12-pcr-value { leaf-list tpm12-pcr-value {
type binary; type binary;
description description
"The list of TPM_PCRVALUEs from each PCR selected in sequence "The list of TPM_PCRVALUEs from each PCR selected in sequence
of tpm12-pcr-selection."; of tpm12-pcr-selection.";
} }
list version-info { list version-info {
description description
"An optional output parameter from a TPM 1.2 TPM_Quote2."; "An optional output parameter from a TPM 1.2 TPM_Quote2.";
leaf tag { leaf tag {
type uint16; type uint16;
description description
"The TPM 1.2 version and revision "The TPM 1.2 version and revision
(TPM 1.2 type TPM_STRUCTURE_TAG). (TPM 1.2 type TPM_STRUCTURE_TAG).
This MUST be TPM_CAP_VERSION_INFO (0x0030)"; This MUST be TPM_CAP_VERSION_INFO (0x0030)";
} }
uses tpm12-version; uses tpm12-version;
leaf spec-level { leaf spec-level {
type uint16; type uint16;
description description
"A number indicating the level of ordinals supported."; "A number indicating the level of ordinals supported.";
} }
leaf errata-rev { leaf errata-rev {
type uint8; type uint8;
description description
"A number indicating the errata version of the "A number indicating the errata version of the
specification."; specification.";
} }
leaf tpm-vendor-id { leaf tpm-vendor-id {
type binary; type binary;
description description
"The vendor ID unique to each TPM manufacturer."; "The vendor ID unique to each TPM manufacturer.";
} }
leaf vendor-specific-size { leaf vendor-specific-size {
type uint16; type uint16;
description description
"The size of the vendor-specific area."; "The size of the vendor-specific area.";
skipping to change at page 19, line 4 skipping to change at page 19, line 34
} }
leaf vendor-specific-size { leaf vendor-specific-size {
type uint16; type uint16;
description description
"The size of the vendor-specific area."; "The size of the vendor-specific area.";
} }
leaf vendor-specific { leaf vendor-specific {
type binary; type binary;
description description
"Vendor specific information."; "Vendor specific information.";
} }
} }
} }
} }
grouping tpm12-pcr-composite { grouping tpm12-pcr-composite {
description description
"The actual values of the selected PCRs (a list of TPM_PCRVALUEs "The actual values of the selected PCRs (a list of TPM_PCRVALUEs
(binary)and associated metadata for TPM 1.2."; (binary) and associated metadata for TPM 1.2.";
list TPM_PCR_COMPOSITE { list TPM_PCR_COMPOSITE {
description description
"The TPM 1.2 TPM_PCRVALUEs for the pcr-indices."; "The TPM 1.2 TPM_PCRVALUEs for the pcr-indices.";
uses tpm12-pcr-selection; uses tpm12-pcr-selection;
leaf value-size { leaf value-size {
type uint32; type uint32;
description description
"This SHALL be the size of the 'tpm12-pcr-value' field "This SHALL be the size of the 'tpm12-pcr-value' field
(not the number of PCRs)."; (not the number of PCRs).";
} }
leaf-list tpm12-pcr-value { leaf-list tpm12-pcr-value {
type binary; type binary;
description description
"The list of TPM_PCRVALUEs from each PCR selected in sequence "The list of TPM_PCRVALUEs from each PCR selected in sequence
of tpm12-pcr-selection."; of tpm12-pcr-selection.";
} }
} }
} }
grouping node-uptime { grouping node-uptime {
description description
"Uptime in seconds of the node."; "Uptime in seconds of the node.";
leaf up-time { leaf up-time {
type uint32; type uint32;
description description
skipping to change at page 20, line 21 skipping to change at page 21, line 4
description description
"Identifier for type of log to be retrieved."; "Identifier for type of log to be retrieved.";
leaf log-type { leaf log-type {
type identityref { type identityref {
base log-type; base log-type;
} }
mandatory true; mandatory true;
description description
"The corresponding measurement log type identity."; "The corresponding measurement log type identity.";
} }
} }
grouping boot-event-log { grouping boot-event-log {
description description
"Defines an event log corresponding to the event that extended the "Defines an event log corresponding to the event that extended the
PCR"; PCR";
leaf event-number { leaf event-number {
type uint32; type uint32;
description description
"Unique event number of this event"; "Unique event number of this event";
} }
leaf event-type { leaf event-type {
type uint32; type uint32;
description description
"log event type"; "log event type";
} }
skipping to change at page 21, line 11 skipping to change at page 21, line 43
} }
} }
leaf event-size { leaf event-size {
type uint32; type uint32;
description description
"Size of the event data"; "Size of the event data";
} }
leaf-list event-data { leaf-list event-data {
type uint8; type uint8;
description description
"the event data size determined by event-size"; "The event data size determined by event-size";
} }
} }
grouping ima-event { grouping ima-event {
description description
"Defines an hash log extend event for IMA measurements"; "Defines an hash log extend event for IMA measurements";
leaf event-number { leaf event-number {
type uint64; type uint64;
description description
"Unique number for this event for sequencing"; "Unique number for this event for sequencing";
} }
leaf ima-template { leaf ima-template {
type string; type string;
description description
"Name of the template used for event logs "Name of the template used for event logs
for e.g. ima, ima-ng"; for e.g. ima, ima-ng, ima-sig";
} }
leaf filename-hint { leaf filename-hint {
type string; type string;
description description
"File that was measured"; "File that was measured";
} }
leaf filedata-hash { leaf filedata-hash {
type binary; type binary;
description description
"Hash of filedata"; "Hash of filedata";
} }
leaf filedata-hash-algorithm {
type string;
description
"Algorithm used for filedata-hash";
}
leaf template-hash-algorithm { leaf template-hash-algorithm {
type string; type string;
description description
"Algorithm used for template-hash"; "Algorithm used for template-hash";
} }
leaf template-hash { leaf template-hash {
type binary; type binary;
description description
"hash(filedata-hash, filename-hint)"; "hash(filedata-hash, filename-hint)";
} }
skipping to change at page 22, line 15 skipping to change at page 22, line 51
} }
leaf signature { leaf signature {
type binary; type binary;
description description
"The file signature"; "The file signature";
} }
} }
grouping bios-event-log { grouping bios-event-log {
description description
"Measurement log created by the BIOS/UEFI."; "Measurement log created by the BIOS/UEFI.";
list bios-event-entry { list bios-event-entry {
key event-number; key event-number;
description description
"Ordered list of TCG described event log "Ordered list of TCG described event log
that extended the PCRs in the order they that extended the PCRs in the order they
were logged"; were logged";
uses boot-event-log; uses boot-event-log;
} }
} }
grouping ima-event-log { grouping ima-event-log {
list ima-event-entry { list ima-event-entry {
key event-number; key event-number;
description description
"Ordered list of ima event logs by event-number"; "Ordered list of ima event logs by event-number";
uses ima-event; uses ima-event;
} }
description description
skipping to change at page 22, line 50 skipping to change at page 23, line 38
choice log-type { choice log-type {
mandatory true; mandatory true;
description description
"Event log type determines the event logs content."; "Event log type determines the event logs content.";
case bios { case bios {
description description
"BIOS/UEFI event logs"; "BIOS/UEFI event logs";
container bios-event-logs { container bios-event-logs {
description description
"This is an index referencing the TCG Algorithm "This is an index referencing the TCG Algorithm
Registry based on TPM_ALG_ID."; Registry based on TPM_ALG_ID.";
uses bios-event-log; uses bios-event-log;
} }
} }
case ima { case ima {
description description
"IMA event logs"; "IMA event logs";
container ima-event-logs { container ima-event-logs {
description description
"This is an index referencing the TCG Algorithm "This is an index referencing the TCG Algorithm
Registry based on TPM_ALG_ID."; Registry based on TPM_ALG_ID.";
uses ima-event-log; uses ima-event-log;
} }
} }
} }
} }
/**********************/ /**********************/
/* RPC operations */ /* RPC operations */
/**********************/ /**********************/
rpc tpm12-challenge-response-attestation { rpc tpm12-challenge-response-attestation {
description description
"This RPC accepts the input for TSS TPM 1.2 commands of the "This RPC accepts the input for TSS TPM 1.2 commands of the
skipping to change at page 23, line 47 skipping to change at page 24, line 35
uses tpm12-pcr-selection; uses tpm12-pcr-selection;
uses nonce; uses nonce;
uses tpm12-signature-scheme; uses tpm12-signature-scheme;
uses tpm12-attestation-key-identifier; uses tpm12-attestation-key-identifier;
leaf add-version { leaf add-version {
type boolean; type boolean;
description description
"Whether or not to include TPM_CAP_VERSION_INFO; if true, "Whether or not to include TPM_CAP_VERSION_INFO; if true,
then TPM_Quote2 must be used to create the response."; then TPM_Quote2 must be used to create the response.";
} }
uses tpm-name; uses tpm-identifier;
} }
} }
output { output {
list tpm12-attestation-response { list tpm12-attestation-response {
key tpm_name; key tpm-name;
description description
"The binary output of TPM 1.2 TPM_Quote/TPM_Quote2, including "The binary output of TPM 1.2 TPM_Quote/TPM_Quote2, including
the PCR selection and other associated attestation evidence the PCR selection and other associated attestation evidence
metadata"; metadata";
uses tpm-name; uses tpm-identifier;
uses node-uptime; uses node-uptime;
uses compute-node; uses compute-node-identifier;
uses tpm12-quote-info-common; uses tpm12-quote-info-common;
choice tpm12-quote { choice tpm12-quote {
mandatory true; mandatory true;
description description
"Either a tpm12-quote-info or tpm12-quote-info2, depending "Either a tpm12-quote-info or tpm12-quote-info2, depending
on whether TPM_Quote or TPM_Quote2 was used on whether TPM_Quote or TPM_Quote2 was used
(cf. input field add-verson)."; (cf. input field add-verson).";
case tpm12-quote1 { case tpm12-quote1 {
description description
"BIOS/UEFI event logs"; "BIOS/UEFI event logs";
uses tpm12-quote-info; uses tpm12-quote-info;
uses tpm12-pcr-composite; uses tpm12-pcr-composite;
} }
case tpm12-quote2 { case tpm12-quote2 {
description description
"BIOS/UEFI event logs"; "BIOS/UEFI event logs";
uses tpm12-quote-info2; uses tpm12-quote-info2;
skipping to change at page 24, line 48 skipping to change at page 25, line 35
managed device. ComponentIndex from the hardware manager YANG managed device. ComponentIndex from the hardware manager YANG
module to refer to dedicated TPM in composite devices, module to refer to dedicated TPM in composite devices,
e.g. smart NICs, is still a TODO."; e.g. smart NICs, is still a TODO.";
input { input {
container tpm20-attestation-challenge { container tpm20-attestation-challenge {
description description
"This container includes every information element defined "This container includes every information element defined
in the reference challenge-response interaction model for in the reference challenge-response interaction model for
remote attestation. Corresponding values are based on remote attestation. Corresponding values are based on
TPM 2.0 structure definitions"; TPM 2.0 structure definitions";
uses tpm20-pcr-selection;
uses nonce; uses nonce;
uses tpm20-signature-scheme; list challenge-objects {
uses tpm20-attestation-key-identifier; key "node-id tpm-name";
description
} "Nodes to fetch attestation information, PCR selection
list tpms { and AK identifier.";
key tpm_name; uses compute-node-identifier;
description uses tpm-identifier;
"TPMs to fetch the attestation information."; uses tpm20-pcr-selection;
uses tpm-name; uses tpm20-signature-scheme;
uses tpm20-attestation-key-identifier;
}
} }
} }
output { output {
list tpm20-attestation-response { list tpm20-attestation-response {
key tpm_name; key "node-id tpm-name";
description description
"The binary output of TPM2b_Quote. An TPMS_ATTEST structure "The binary output of TPM2b_Quote in one TPM chip of the
node which identified by node-id. An TPMS_ATTEST structure
including a length, encapsulated in a signature"; including a length, encapsulated in a signature";
uses tpm-name; uses tpm-identifier;
uses node-uptime; uses node-uptime;
uses compute-node; uses compute-node-identifier;
container tpms-attest { leaf quote {
leaf pcrdigest { type binary;
type binary;
description
"split out value of TPMS_QUOTE_INFO for convenience";
}
leaf tpms-attest-result {
type binary;
description
"The complete TPM generate structure including
signature.";
}
leaf tpms-attest-result-length {
type uint32;
description
"Length of attest result provided by the TPM structure.";
}
description description
"A composite of value and length and list of selected "Quote data returned by TPM Quote, including PCR selection,
pcrs (original name: [type]attested)"; PCR digest and etc.";
} }
leaf tpmt-signature { leaf quote-signature {
type binary; type binary;
description description
"Split out value of the signature for convenience. "Quote signature returned by TPM Quote.";
TODO: check for length values that complent binary value }
data node leafs."; list pcr-bank-values {
key algo-registry-type;
description
"PCR values in each PCR bank.";
uses hash-algo;
list pcr-values {
key pcr-index;
description
"List of one PCR bank.";
leaf pcr-index {
type uint16;
description
"PCR index number.";
}
leaf pcr-value {
type binary;
description
"PCR value.";
}
}
}
container pcr-digest-algo-in-quote {
uses hash-algo;
description
"The hash algorithm for PCR value digest in
Quote output.";
} }
} }
} }
} }
rpc basic-trust-establishment { rpc basic-trust-establishment {
description description
"This RPC creates a tpm-resident, non-migratable key to be used "This RPC creates a tpm-resident, non-migratable key to be used
in TPM_Quote commands, an attestation certificate."; in TPM_Quote commands, an attestation certificate.";
input { input {
uses nonce; uses nonce;
uses tpm20-signature-scheme; uses tpm20-signature-scheme;
uses tpm-name; uses tpm-identifier;
leaf certificate-name { leaf certificate-name {
type string; type string;
description description
"An arbitrary name for the identity certificate chain "An arbitrary name for the identity certificate chain
requested."; requested.";
} }
} }
output { output {
list attestation-certificates { list attestation-certificates {
key tpm_name; key tpm-name;
description description
"Attestation Certificate data from a TPM identified by the TPM "Attestation Certificate data from a TPM identified by the TPM
name"; name";
uses tpm-name; uses tpm-identifier;
uses node-uptime; uses node-uptime;
uses compute-node; uses compute-node-identifier;
leaf certificate-name { leaf certificate-name {
type string; type string;
description description
"An arbitrary name for this identity certificate or "An arbitrary name for this identity certificate or
certificate chain."; certificate chain.";
} }
leaf attestation-certificate { leaf attestation-certificate {
type ietfct:end-entity-cert-cms; type ietfct:end-entity-cert-cms;
description description
"The binary signed certificate chain data for this identity "The binary signed certificate chain data for this identity
certificate."; certificate.";
} }
uses tpm20-attestation-key-identifier; uses tpm20-attestation-key-identifier;
} }
} }
} }
rpc log-retrieval { rpc log-retrieval {
description description
"Logs Entries are either identified via indices or via providing "Logs Entries are either identified via indices or via providing
the last line received. The number of lines returned can be the last line received. The number of lines returned can be
limited. The type of log is a choice that can be augmented."; limited. The type of log is a choice that can be augmented.";
input { input {
list log-selector { list log-selector {
key node-name; key "node-id tpm-name";
description description
"Selection of log entries to be reported."; "Selection of log entries to be reported.";
uses compute-node; uses compute-node-identifier;
uses tpm-identifier;
choice index-type { choice index-type {
description description
"Last log entry received, log index number, or timestamp."; "Last log entry received, log index number, or timestamp.";
case last-entry { case last-entry {
description description
"The last entry of the log already retrieved."; "The last entry of the log already retrieved.";
leaf last-entry-value { leaf last-entry-value {
type binary; type binary;
description description
"Content of an log event which matches 1:1 with a "Content of an log event which matches 1:1 with a
unique event record contained within the log. Log unique event record contained within the log. Log
entries subsequent to this will be passed to the entries subsequent to this will be passed to the
requester. Note: if log entry values are not unique, requester. Note: if log entry values are not unique,
this MUST return an error."; this MUST return an error.";
} }
} }
case index { case index {
description description
"Numeric index of the last log entry retrieved, or zero."; "Numeric index of the last log entry retrieved, or zero.";
leaf index-number { leaf last-index-number {
type uint64; type uint64;
description description
"The numeric index number of a log entry. Zero means "The last numeric index number of a log entry.
to start at the beginning of the log. Entries Zero means to start at the beginning of the log.
subsequent to this will be passed to the Entries subsequent to this will be passed to the
requester."; requester.";
} }
} }
case timestamp { case timestamp {
leaf timestamp { leaf timestamp {
type yang:date-and-time; type yang:date-and-time;
description description
"Timestamp from which to start the extraction. The next "Timestamp from which to start the extraction. The next
log entry subsequent to this timestamp is to be sent."; log entry subsequent to this timestamp is to be sent.";
} }
description description
"Timestamp from which to start the extraction."; "Timestamp from which to start the extraction.";
} }
} }
leaf log-entry-quantity {
type uint16;
description
"The number of log entries to be returned. If omitted, it
means all of them.";
}
uses tpm20-pcr-selection;
} }
uses log-identifier; uses log-identifier;
uses tpm20-pcr-selection;
leaf log-entry-quantity {
type uint16;
description
"The number of log entries to be returned. If omitted, it
means all of them.";
}
} }
output { output {
container system-event-logs { container system-event-logs {
description description
"The requested data of the measurement event logs"; "The requested data of the measurement event logs";
list node-data { list node-data {
key "node-name tpm_name"; key "node-id tpm-name";
description description
"Event logs of a node in a distributed system "Event logs of a node in a distributed system
identified by the node name"; identified by the node name";
uses compute-node; uses compute-node-identifier;
uses node-uptime; uses node-uptime;
uses tpm-name; uses tpm-identifier;
container log-result { container log-result {
description description
"The requested entries of the corresponding log."; "The requested entries of the corresponding log.";
uses event-logs; uses event-logs;
} }
} }
} }
} }
} }
/*********************************/ /*********************************/
/* Protocol accessible nodes */ /* Protocol accessible nodes */
/*********************************/ /*********************************/
skipping to change at page 28, line 47 skipping to change at page 29, line 49
description description
"The datastore definition enabling verifiers or relying "The datastore definition enabling verifiers or relying
parties to discover the information necessary to use the parties to discover the information necessary to use the
remote attestation RPCs appropriately."; remote attestation RPCs appropriately.";
leaf-list supported-algos { leaf-list supported-algos {
type uint16; type uint16;
description description
"Supported TPM_ALG_ID values for the TPM in question. "Supported TPM_ALG_ID values for the TPM in question.
Will include ComponentIndex soon."; Will include ComponentIndex soon.";
} }
list tpms { list compute-nodes {
key tpm_name; key node-id;
uses tpm-name; uses compute-node-identifier;
description description
"A list of TPMs in this composite "A list names of hardware componnets in this composite
device that rats can be conducted with."; device that RATS can be conducted with.";
list certificates { leaf node-name {
container certificate { type string;
leaf certificate-name { description
type string; "Name of the compute node.";
}
leaf node-location {
type string;
description
"Location of the compute node, such as slot number.";
}
list tpms {
key tpm-name;
uses tpm-identifier;
description
"A list of TPMs in this composite device that RATS
can be conducted with.";
leaf tpm-manufacturer {
type string;
description
"TPM manufacturer name.";
}
leaf tpm-firmware-version {
type string;
description
"TPM firmware version.";
}
leaf tpm-specification-version {
type string;
description
"TPM1.2 or TPM2.0.";
}
leaf tpm-status {
type string;
description
"TPM chip self-test status, normal or abnormal.";
}
list certificates {
description
"The TPM's certificates, including EK certificates
and AK certificates.";
container certificate {
description description
"An arbitrary name for this identity certificate or "Three types of certificates can be accessed via
certificate chain."; this statement, including Initial Attestation
} Key Cert, Local Attestation Key Cert or
leaf certificate-type { Endorsement Key Cert.";
type enumeration { leaf certificate-name {
enum endorsement-cert { type string;
value 0; description
description "An arbitrary name for this identity certificate
"An endorsement key certificate."; or certificate chain.";
} }
enum attestation-cert { leaf certificate-type {
value 1; type enumeration {
description enum endorsement-cert {
"An attestation key certificate."; value 0;
description
"EK Cert type.";
}
enum initial-attestation-cert {
value 1;
description
"IAK Cert type.";
}
enum local-attestation-cert {
value 2;
description
"LAK Cert type.";
}
} }
description
"Type of this certificate";
}
leaf certificate-value {
type ietfct:end-entity-cert-cms;
description
"The binary signed public endorsement key (EK),
attestation key(AK) and corresponding claims
(EK,AK Certificate). In a TPM 2.0 the EK,
AK Certificate resides in a well-defined NVRAM
location by the TPM vendor. Maybe certificate-value
defined as binary type is a simple way.";
}
leaf lak-public-structure {
type binary;
description
"Marshalled LAK public structure, used for LAK
Certificate verification";
} }
description
"Type of this certificate";
}
leaf certificate-value {
type ietfct:end-entity-cert-cms;
description
"The binary signed public endorsement key (EK),
attestation key (AK) and corresponding claims (EK or
AK Certificate). In a TPM 2.0 the EK,AK Certificate
resides in a well-defined NVRAM location by the TPM
vendor.";
} }
description
"The list of certificates each TPM can be distinguished with.";
} }
description
"The TPM's endorsement-certificate.";
} }
} }
list compute-nodes {
key node-name;
uses compute-node;
description
"A list names of hardware components in this composite
device that rats can be conducted with.";
}
} }
} }
<CODE ENDS> <CODE ENDS>
3. IANA considerations 3. IANA considerations
This document will include requests to IANA: This document will include requests to IANA:
To be defined yet. To be defined yet.
skipping to change at page 30, line 47 skipping to change at page 32, line 47
o Relabeled name to tpm_name o Relabeled name to tpm_name
o Removed event-string in last-entry o Removed event-string in last-entry
7. References 7. References
7.1. Normative References 7.1. Normative References
[I-D.birkholz-rats-reference-interaction-model] [I-D.birkholz-rats-reference-interaction-model]
Birkholz, H. and M. Eckel, "Reference Interaction Model Birkholz, H. and M. Eckel, "Reference Interaction Models
for Challenge-Response-based Remote Attestation", draft- for Remote Attestation Procedures", draft-birkholz-rats-
birkholz-rats-reference-interaction-model-01 (work in reference-interaction-model-02 (work in progress), January
progress), July 2019. 2020.
[I-D.ietf-netconf-crypto-types] [I-D.ietf-netconf-crypto-types]
Watsen, K. and H. Wang, "Common YANG Data Types for Watsen, K. and H. Wang, "Common YANG Data Types for
Cryptography", draft-ietf-netconf-crypto-types-13 (work in Cryptography", draft-ietf-netconf-crypto-types-14 (work in
progress), November 2019. progress), March 2020.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
RFC 6991, DOI 10.17487/RFC6991, July 2013, RFC 6991, DOI 10.17487/RFC6991, July 2013,
<https://www.rfc-editor.org/info/rfc6991>. <https://www.rfc-editor.org/info/rfc6991>.
skipping to change at page 31, line 31 skipping to change at page 33, line 31
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8348] Bierman, A., Bjorklund, M., Dong, J., and D. Romascanu, "A [RFC8348] Bierman, A., Bjorklund, M., Dong, J., and D. Romascanu, "A
YANG Data Model for Hardware Management", RFC 8348, YANG Data Model for Hardware Management", RFC 8348,
DOI 10.17487/RFC8348, March 2018, DOI 10.17487/RFC8348, March 2018,
<https://www.rfc-editor.org/info/rfc8348>. <https://www.rfc-editor.org/info/rfc8348>.
7.2. Informative References 7.2. Informative References
[I-D.ietf-rats-architecture] [I-D.ietf-rats-architecture]
Birkholz, H., Thaler, D., Richardson, M., and N. Smith, Birkholz, H., Thaler, D., Richardson, M., Smith, N., and
"Remote Attestation Procedures Architecture", draft-ietf- W. Pan, "Remote Attestation Procedures Architecture",
rats-architecture-00 (work in progress), December 2019. draft-ietf-rats-architecture-02 (work in progress), March
2020.
Authors' Addresses Authors' Addresses
Henk Birkholz Henk Birkholz
Fraunhofer SIT Fraunhofer SIT
Rheinstrasse 75 Rheinstrasse 75
Darmstadt 64295 Darmstadt 64295
Germany Germany
Email: henk.birkholz@sit.fraunhofer.de Email: henk.birkholz@sit.fraunhofer.de
 End of changes. 141 change blocks. 
325 lines changed or deleted 423 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/