draft-ietf-rats-yang-tpm-charra-02.txt   draft-ietf-rats-yang-tpm-charra-03.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: December 26, 2020 S. Bhandari Expires: April 3, 2021 E. Voit
S. Bhandari
B. Sulzen B. Sulzen
E. Voit
Cisco Cisco
L. Xia L. Xia
Huawei Huawei
T. Laffey T. Laffey
HPE HPE
G. Fedorkow G. Fedorkow
Juniper Juniper
June 24, 2020 September 30, 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-02 draft-ietf-rats-yang-tpm-charra-03
Abstract Abstract
This document defines a YANG RPC and a minimal datastore tree This document defines a YANG RPC and a minimal datastore required to
required to retrieve attestation evidence about integrity retrieve attestation evidence about integrity measurements from a
measurements from a composite device with one or more roots of trust device following the operational context defined in
for reporting. Complementary measurement logs are also provided by [I-D.ietf-rats-tpm-based-network-device-attest]. Complementary
the YANG RPC originating from one or more roots of trust of measurement logs are also provided by the YANG RPC originating from
measurement. The module defined requires at least one TPM 1.2 or TPM one or more roots of trust of measurement. The module defined
2.0 and corresponding Trusted Software Stack included in the device requires at least one TPM 1.2 or TPM 2.0 and corresponding Trusted
components of the composite device the YANG server is running on. Software Stack included in the device components of the composite
device the YANG server is running on.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 December 26, 2020. This Internet-Draft will expire on April 3, 2021.
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 Modules . . . . . . . . . . . . . . . . . . . . . . 7 2.2. YANG Modules . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1. ietf-tpm-remote-attestation . . . . . . . . . . . . . 7 2.2.1. ietf-tpm-remote-attestation . . . . . . . . . . . . . 6
2.3. ietf-asymmetric-algs . . . . . . . . . . . . . . . . . . 32 2.2.2. ietf-tcg-algs . . . . . . . . . . . . . . . . . . . . 35
3. IANA considerations . . . . . . . . . . . . . . . . . . . . . 42 3. IANA considerations . . . . . . . . . . . . . . . . . . . . . 51
4. Security Considerations . . . . . . . . . . . . . . . . . . . 42 4. Security Considerations . . . . . . . . . . . . . . . . . . . 51
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 42 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 52
6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 43 6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 52
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 43 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.1. Normative References . . . . . . . . . . . . . . . . . . 43 7.1. Normative References . . . . . . . . . . . . . . . . . . 53
7.2. Informative References . . . . . . . . . . . . . . . . . 44 7.2. Informative References . . . . . . . . . . . . . . . . . 54
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 44 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 55
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 operational context defined
information elements defined in the in [I-D.ietf-rats-tpm-based-network-device-attest] as well as the
[I-D.birkholz-rats-reference-interaction-model] document. The interaction model and information elements defined in
currently supported hardware security modules (HWM) - sometimes also [I-D.birkholz-rats-reference-interaction-model]. The currently
referred to as an embedded secure element (eSE) - is the Trusted supported hardware security modules (HWM) are the Trusted Platform
Platform Module (TPM) version 1.2 and 2.0 specified by the Trusted Module (TPM) [TPM1.2] and [TPM2.0] specified by the Trusted Computing
Computing Group (TCG). One ore more TPMs embedded in the components Group (TCG). One ore more TPMs embedded in the components of a
of a composite device - sometimes also referred to as an aggregate composite device - sometimes also referred to as an aggregate device
device - are required in order to use the YANG module defined in this - 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 (extend 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",
skipping to change at page 3, line 36 skipping to change at page 3, line 36
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
TPMs 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
+--rw rats-support-structures +--rw rats-support-structures
+--rw supported-algos* identityref +--rw compute-nodes!
+--ro compute-nodes* [node-id] | +--ro compute-node* [node-id]
| +--ro node-id string | +--ro node-id string
| +--ro node-physical-index? int32 {ietfhw:entity-mib}? | +--ro node-physical-index? int32 {ietfhw:entity-mib}?
| +--ro node-name? string | +--ro node-name? string
| +--ro node-location? string | +--ro node-location? string
+--rw tpms* [tpm-name] +--rw tpms
+--rw tpm-name string | +--rw tpm* [tpm-name]
+--ro hardware-based? boolean | +--rw tpm-name string
+--ro tpm-physical-index? int32 {ietfhw:entity-mib}? | +--ro hardware-based? boolean
+--ro tpm-path? string | +--ro tpm-physical-index? int32 {ietfhw:entity-mib}?
+--ro compute-node compute-node-ref | +--ro tpm-path? string
+--ro tpm-manufacturer? string | +--ro compute-node compute-node-ref
+--ro tpm-firmware-version? string | +--ro tpm-manufacturer? string
+--ro tpm-specification-version identityref | +--rw tpm-firmware-version identityref
+--ro tpm-status? string | +--rw TPM12-hash-algo? identityref
+--rw certificates | +--rw TPM12-pcrs* pcr
+--rw certificate* [certificate-name] | +--rw tpm20-pcr-bank* [TPM20-hash-algo]
+--rw certificate-name string | | +--rw TPM20-hash-algo identityref
+--rw certificate-ref? leafref | | +--rw pcr-index* tpm:pcr
+--rw certificate-type? enumeration | +--ro tpm-status enumeration
| +--rw certificates
| +--rw certificate* [certificate-name]
| +--rw certificate-name string
| +--rw certificate-keystore-ref? leafref
| +--rw certificate-type? enumeration
+--rw attester-supported-algos
+--rw tpm12-asymmetric-signing* identityref {taa:TPM12}?
+--rw tpm12-hash* identityref {taa:TPM12}?
+--rw tpm20-asymmetric-signing* identityref {taa:TPM20}?
+--rw tpm20-hash* identityref {taa:TPM20}?
rpcs: rpcs:
+---x tpm12-challenge-response-attestation {TPM12}? +---x tpm12-challenge-response-attestation {taa:TPM12}?
| +---w input | +---w input
| | +---w tpm1-attestation-challenge | | +---w tpm12-attestation-challenge
| | +---w pcr-index* pcr | | +---w pcr-index* pcr
| | +---w nonce-value binary | | +---w nonce-value binary
| | +---w TPM12_Algo? identityref | | +---w add-version? boolean
| | +---w (key-identifier)? | | +---w certificate-name* certificate-name-ref
| | | +--:(public-key)
| | | | +---w pub-key-id? binary
| | | +--:(TSS_UUID)
| | | +---w TSS_UUID-value
| | | +---w ulTimeLow? uint32
| | | +---w usTimeMid? uint16
| | | +---w usTimeHigh? uint16
| | | +---w bClockSeqHigh? uint8
| | | +---w bClockSeqLow? uint8
| | | +---w rgbNode* uint8
| | +---w add-version? boolean
| | +---w tpm-name* string
| +--ro output | +--ro output
| +--ro tpm12-attestation-response* [] | +--ro tpm12-attestation-response* []
| +--ro certificate-name? string | +--ro certificate-name? certificate-name-ref
| +--ro up-time? uint32 | +--ro up-time? uint32
| +--ro node-id? string | +--ro node-id? string
| +--ro node-physical-index? int32 | +--ro node-physical-index? int32
| | {ietfhw:entity-mib}? | | {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
| | | +--ro revMajor? uint8 | | | +--ro rev-Major? uint8
| | | +--ro revMinor? uint8 | | | +--ro rev-Minor? uint8
| | +--ro digest-value? binary | | +--ro digest-value? binary
| | +--ro TPM_PCR_COMPOSITE* [] | | +--ro TPM_PCR_COMPOSITE* []
| | +--ro pcr-index* pcr | | +--ro pcr-index* pcr
| | +--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-index* pcr | +--ro pcr-index* pcr
| +--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 {TPM20}? +---x tpm20-challenge-response-attestation {taa:TPM20}?
| +---w input | +---w input
| | +---w tpm20-attestation-challenge | | +---w tpm20-attestation-challenge
| | +---w nonce-value binary | | +---w nonce-value binary
| | +---w challenge-objects* [] | | +---w tpm20-pcr-selection* []
| | +---w pcr-list* [TPM2_Algo] | | | +---w TPM20-hash-algo? identityref
| | | +---w TPM2_Algo identityref | | | +---w pcr-index* tpm:pcr
| | | +---w pcr-index* tpm:pcr | | +---w certificate-name* certificate-name-ref
| | +---w TPM2_Algo? identityref
| | +---w (key-identifier)?
| | | +--:(public-key)
| | | | +---w pub-key-id? binary
| | | +--:(uuid)
| | | +---w uuid-value? binary
| | +---w tpm-name* string
| +--ro output | +--ro output
| +--ro tpm20-attestation-response* [] | +--ro tpm20-attestation-response* []
| +--ro certificate-name? string | +--ro certificate-name? certificate-name-ref
| +--ro up-time? uint32 | +--ro TPMS_QUOTE_INFO binary
| +--ro node-id? string | +--ro quote-signature? binary
| +--ro node-physical-index? int32 | +--ro up-time? uint32
| | {ietfhw:entity-mib}? | +--ro node-id? string
| +--ro quote? binary | +--ro node-physical-index? int32 {ietfhw:entity-mib}?
| +--ro quote-signature? binary | +--ro unsigned-pcr-values* []
| +--ro pcr-bank-values* [] | +--ro TPM20-hash-algo? identityref
| | +--ro TPM2_Algo? identityref | +--ro pcr-values* [pcr-index]
| | +--ro pcr-values* [pcr-index] | +--ro pcr-index pcr
| | +--ro pcr-index pcr | +--ro pcr-value? binary
| | +--ro pcr-value? binary
| +--ro pcr-digest-algo-in-quote
| +--ro TPM2_Algo? identityref
+---x basic-trust-establishment
| +---w input
| | +---w nonce-value binary
| | +---w TPM2_Algo? identityref
| | +---w tpm-name* string
| | +---w certificate-name? string
| +--ro output
| +--ro attestation-certificates* []
| +--ro attestation-certificate? ct:end-entity-cert-cms
| +--ro (key-identifier)?
| +--:(public-key)
| | +--ro pub-key-id? binary
| +--:(uuid)
| +--ro uuid-value? binary
+---x log-retrieval +---x log-retrieval
+---w input +---w input
| +---w log-selector* [] | +---w log-selector* []
| | +---w tpm-name* string | | +---w tpm-name* string
| | +---w (index-type)? | | +---w (index-type)?
| | | +--:(last-entry) | | | +--:(last-entry)
| | | | +---w last-entry-value? binary | | | | +---w last-entry-value? binary
| | | +--:(index) | | | +--:(index)
| | | | +---w last-index-number? uint64 | | | | +---w last-index-number? uint64
| | | +--:(timestamp) | | | +--:(timestamp)
| | | +---w timestamp? yang:date-and-time | | | +---w timestamp? yang:date-and-time
| | +---w log-entry-quantity? uint16 | | +---w log-entry-quantity? uint16
| +---w log-type identityref | +---w log-type identityref
+--ro output +--ro output
+--ro system-event-logs +--ro system-event-logs
+--ro node-data* [] +--ro node-data* []
+--ro up-time? uint32 +--ro tpm-name? string
+--ro certificate-name? string +--ro up-time? uint32
+--ro log-result +--ro log-result
+--ro (attested-event-log-type) +--ro (attested_event_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? pcr | +--ro pcr-index? pcr
| +--ro digest-list* [] | +--ro digest-list* []
| | +--ro hash-algo? identityref | | +--ro hash-algo? identityref
| | +--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 ima-template? string
| +--ro filename-hint? string
| +--ro filedata-hash? binary
| +--ro filedata-hash-algorithm? string
| +--ro template-hash-algorithm? string
| +--ro template-hash? binary
| +--ro pcr-index? pcr
| +--ro signature? binary
+--:(netequip_boot)
+--ro boot-event-logs
+--ro boot-event-entry* [event-number]
+--ro event-number uint64 +--ro event-number uint64
+--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 filedata-hash-algorithm? string
+--ro template-hash-algorithm? string +--ro file-version? string
+--ro template-hash? binary +--ro file-type? string
+--ro pcr-index? pcr +--ro pcr-index? pcr
+--ro signature? binary
2.2. YANG Modules 2.2. YANG Modules
2.2.1. ietf-tpm-remote-attestation 2.2.1. ietf-tpm-remote-attestation
This YANG module imports modules from [RFC6991], [RFC8348], This YANG module imports modules from [RFC6991], [RFC8348],
[I-D.ietf-netconf-crypto-types], ietf-asymmetric-algs.yang. [I-D.ietf-netconf-keystore], ietf-tcg-algs.yang.
<CODE BEGINS> file ietf-tpm-remote-attestation@2020-06-23.yang 2.2.1.1. Identities
This module supports the following types of attestation event logs:
<ima>, <bios>, and <netequip_boot>.
2.2.1.2. RPCs
<tpm12-challenge-response-attestation> - Allows a Verifier to request
a quote of PCRs from a TPM1.2 compliant cryptoprocessor. When one or
more <certificate-name> is not provided, all TPM1.2 compliant
cryptoprocessors will respond.
<tpm20-challenge-response-attestation> - Allows a Verifier to request
a quote of PCRs from a TPM2.0 compliant cryptoprocessor. When one or
more <certificate-name> is not provided, all TPM2.0 compliant
cryptoprocessors will respond.
<log-retrieval> - Allows a Verifier to acquire the evidence which was
extended into specific PCRs.
2.2.1.3. Data Nodes
container <rats-support-structures> - This exists when there are more
than one TPM for a particular Attester. This allows each specific
TPM to identify on which <compute-node> it belongs.
container <tpms> - Provides configuration and operational details for
each supported TPM, including the tpm-firmware-version, PCRs which
may be quoted, certificates which are associated with that TPM, and
the current operational status. Of note is the certificates which
are associated with that TPM. As a certificate is associated with a
single Attestation key, knowledge of the certificate allows a
specific TPM to be identified.
container <attester-supported-algos> - Identifies which TCG
algorithms are available for use the Attesting platform. This allows
an operator to limit algorithms available for use by RPCs to just a
desired set from the universe of all allowed by TCG.
2.2.1.4. YANG Module
<CODE BEGINS> file ietf-tpm-remote-attestation@2020-09-18.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 "tpm"; prefix "tpm";
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 {
prefix ct;
}
import ietf-keystore { import ietf-keystore {
prefix ks; prefix ks;
} }
import ietf-asymmetric-algs { import ietf-tcg-algs {
prefix aa; prefix taa;
} }
organization organization
"IETF RATS (Remote ATtestation procedureS) Working Group"; "IETF RATS (Remote ATtestation procedureS) Working Group";
contact contact
"WG Web : <http://datatracker.ietf.org/wg/rats/> "WG Web : <http://datatracker.ietf.org/wg/rats/>
WG List : <mailto:rats@ietf.org> WG List : <mailto:rats@ietf.org>
Author : Eric Voit <evoit@cisco.com>
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 : 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 1.2 and TPM 2.0 based "A YANG module to enable a TPM 1.2 and TPM 2.0 based
remote attestation procedure using a challenge-response remote attestation procedure using a challenge-response
interaction model and the TPM 1.2 and TPM 2.0 Quote interaction model and the TPM 1.2 and TPM 2.0 Quote
primitive operations. primitive operations.
Copyright (c) 2020 IETF Trust and the persons identified as Copyright (c) 2020 IETF Trust and the persons identified
authors of the code. All rights reserved. as authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with
without modification, is permitted pursuant to, and subject to or without modification, is permitted pursuant to, and
the license terms contained in, the Simplified BSD License set subject to the license terms contained in, the Simplified
forth in Section 4.c of the IETF Trust's Legal Provisions BSD License set forth in Section 4.c of the IETF Trust's
Relating to IETF Documents Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents 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 itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
for full legal notices. itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, are to be interpreted as described in BCP 14 (RFC 2119)
they appear in all capitals, as shown here."; (RFC 8174) when, and only when, they appear in all
capitals, as shown here.";
revision "2020-06-23" { revision "2020-09-18" {
description description
"Initial version"; "Initial version";
reference reference
"draft-ietf-rats-yang-tpm-charra"; "draft-ietf-rats-yang-tpm-charra";
} }
/*****************/ /*****************/
/* Features */
/*****************/
feature TPM12 {
description
"This feature indicates that an Attester includes cryptoprocessors
capable of supporting the TPM 1.2 API.";
}
feature TPM20 {
description
"This feature indicates that an Attester includes cryptoprocessors
capable of supporting the TPM 2 API.";
}
/*****************/
/* Typedefs */ /* Typedefs */
/*****************/ /*****************/
typedef pcr { typedef pcr {
type uint8 { type uint8 {
range "0..31"; range "0..31";
} }
description description
"Valid index number for a PCR. At this point 0-31 is viable."; "Valid index number for a PCR. At this point 0-31 is viable.";
} }
typedef compute-node-ref { typedef compute-node-ref {
type leafref { type leafref {
path "/tpm:rats-support-structures/tpm:compute-nodes/tpm:node-name"; path "/tpm:rats-support-structures/tpm:compute-nodes" +
"/tpm:compute-node/tpm:node-name";
} }
description description
"This type is used to reference a hardware node. It is quite possible "This type is used to reference a hardware node. It is quite
this leafref will eventually point to another YANG module's node."; possible this leafref will eventually point to another YANG
module's node.";
}
typedef certificate-name-ref {
type leafref {
path "/tpm:rats-support-structures/tpm:tpms/tpm:tpm" +
"/tpm:certificates/tpm:certificate/tpm:certificate-name";
}
description
"A type which allows identification of a TPM based certificate.";
} }
/******************/ /******************/
/* Identities */ /* Identities */
/******************/ /******************/
identity attested_event_log_type {
identity attested-event-log-type {
description description
"Base identity allowing categorization of the reasons why and "Base identity allowing categorization of the reasons why and
attested measurement has been taken on an Attester."; attested measurement has been taken on an Attester.";
} }
identity ima { identity ima {
base attested-event-log-type; base attested_event_log_type;
description description
"An event type recorded in IMA."; "An event type recorded in IMA.";
} }
identity bios { identity bios {
base attested-event-log-type; base attested_event_log_type;
description description
"An event type associated with BIOS/UEFI."; "An event type associated with BIOS/UEFI.";
} }
identity cryptoprocessor { identity netequip_boot {
description base attested_event_log_type;
"Base identity identifying a crytoprocessor.";
}
identity tpm12 {
base cryptoprocessor;
description
"A cryptoprocessor capable of supporting the TPM 1.2 API.";
}
identity tpm20 {
base cryptoprocessor;
description description
"A cryptoprocessor capable of supporting the TPM 2.0 API."; "An event type associated with Network Equipment Boot.";
} }
/*****************/ /*****************/
/* Groupings */ /* Groupings */
/*****************/ /*****************/
grouping TPM2_Algo { grouping TPM20-asymmetric-signing-algo {
description description
"The signature scheme that is used to sign the TPM2 Quote "The signature scheme that is used to sign the TPM2 Quote
information response."; information response.";
leaf TPM2_Algo { leaf TPM20-asymmetric-signing-algo {
must "/tpm:rats-support-structures/tpm:attester-supported-algos"
+ "/tpm:tpm20-asymmetric-signing" {
error-message "Not a platform supported " +
"TPM20-asymmetric-signing-algo";
}
type identityref { type identityref {
base aa:tpm2-asymmetric-algorithm; base taa:asymmetric;
} }
description description
"The signature scheme that is used to sign the TPM "The signature scheme that is used to sign the TPM2.0
Quote information response."; Quote information response. This must be one of those
supported by a platform.";
default taa:TPM_ALG_RSA;
} }
} }
grouping TPM12-asymmetric-signing-algo {
grouping TPM12_Algo {
description description
"The signature scheme that is used to sign the TPM2 Quote "The signature scheme that is used to sign the TPM12 Quote
information response."; information response.";
leaf TPM12_Algo { leaf TPM12-asymmetric-signing-algo {
must "/tpm:rats-support-structures/tpm:attester-supported-algos"
+ "/tpm:tpm12-asymmetric-signing" {
error-message "Not a platform supported " +
"TPM12-asymmetric-signing-algo";
}
type identityref { type identityref {
base aa:tpm12-asymmetric-algorithm; base taa:asymmetric;
} }
description description
"The signature scheme that is used to sign the TPM1.2 "The signature scheme that is used to sign the TPM1.2
Quote information response."; Quote information response. This must be one of those
supported by a platform.";
default taa:TPM_ALG_RSA;
} }
} }
grouping TPM20-hash-algo {
description
"The cryptographic algorithm used to hash the TPM2 PCRs. This
must be from the list of platform supported options.";
leaf TPM20-hash-algo {
must "/tpm:rats-support-structures/tpm:attester-supported-algos"
+ "/tpm:tpm20-hash" {
error-message "Not a platform supported TPM20-hash-algo";
}
type identityref {
base taa:hash;
}
description
"The hash scheme that is used to hash a TPM1.2 PCR. This
must be one of those supported by a platform.";
default taa:TPM_ALG_SHA256;
}
}
grouping TPM12-hash-algo {
description
"The cryptographic algorithm used to hash the TPM1.2 PCRs.";
leaf TPM12-hash-algo {
must "/tpm:rats-support-structures/tpm:attester-supported-algos"
+ "/tpm:tpm12-hash" {
error-message "Not a platform supported TPM12-hash-algo";
}
type identityref {
base taa:hash;
}
description
"The hash scheme that is used to hash a TPM1.2 PCR. This
must be one of those supported by a platform. This assumes
that an algorithm other than SHA1 can be supported on some
TPM1.2 cryptoprocessor variant.";
default taa:TPM_ALG_SHA1;
}
}
grouping nonce { grouping nonce {
description description
"A nonce to show freshness and counter replays."; "A nonce to show freshness and to allow the detection
of replay attacks.";
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, cryptographic-strength algorithm. In consequence,
the length of the nonce depends on the hash algorithm the length of the nonce depends on the hash algorithm
used. The algorithm used in this case is independent used. The algorithm used in this case is independent
from the hash algorithm used to create the hash-value from the hash algorithm used to create the hash-value
in the response of the attestor."; in the response of the attestor.";
skipping to change at page 11, line 29 skipping to change at page 12, line 42
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 The corresponding selection filter is represented in this
grouping. grouping.
Requesting a PCR value that is not in scope of the AC used, Requesting a PCR value that is not in scope of the AC used,
detailed exposure via error msg should be avoided."; detailed exposure via error msg should be avoided.";
leaf-list pcr-index { leaf-list pcr-index {
/* the following XPATH must be updated to ensure that only
selectable PCRs are allowed in the RPC
must "/tpm:rats-support-structures/tpm:tpms" +
"/tpm:tpm[tpm-name = current()]" +
"/tpm:tpm[TPM12-pcrs = current()]" {
error-message "Acquiring this PCR index is not supported";
}
*/
type pcr; type pcr;
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 acquire one or more PCR values, which are hashed "A Verifier can acquire one or more PCR values, which are hashed
together in a TPM2B_DIGEST coming from the TPM2. The selection together in a TPM2B_DIGEST coming from the TPM2. The selection
list of desired PCRs and the Hash Algorithm is represented in this list of desired PCRs and the Hash Algorithm is represented in
grouping."; this grouping.";
list pcr-list { list tpm20-pcr-selection {
key "TPM2_Algo"; unique "TPM20-hash-algo";
description description
"Specifies the list of PCRs and Hash Algorithms used for the "Specifies the list of PCRs and Hash Algorithms that can be
latest returned TPM2B_DIGEST."; returned within a TPM2B_DIGEST.";
reference reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/ "https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7";
uses tpm:TPM2_Algo; uses TPM20-hash-algo;
leaf-list pcr-index { leaf-list pcr-index {
type tpm:pcr; /* the following XPATH must be updated to ensure that only
description selectable PCRs are allowed in the RPC
"The numbers of the PCRs that are associated with must "/tpm:rats-support-structures/tpm:tpms" +
the created key."; "/tpm:tpm[tpm-name = current()]" +
} "/tpm:tpm20-pcr-bank[pcr-index = current()]" {
} error-message "Acquiring this PCR index is not supported";
}
grouping tpm12-attestation-key-identifier {
description
"A selector for a suitable key identifier for a TPM 1.2.";
choice key-identifier {
description
"Identifier for the attestation key to use for signing
attestation evidence.";
case public-key {
leaf pub-key-id {
type binary;
description
"The value of the identifier for the public key.";
}
}
case TSS_UUID {
description
"Use a YANG agent generated (and maintained) attestation
key UUID that complies with the TSS_UUID datatype of the TCG
Software Stack (TSS) Specification, Version 1.10 Golden,
August 20, 2003.";
container TSS_UUID-value {
description
"A detailed structure that is used to create the
TPM 1.2 native TSS_UUID as defined in the TCG Software
Stack (TSS) Specification, Version 1.10 Golden,
August 20, 2003.";
leaf ulTimeLow {
type uint32;
description
"The low field of the timestamp.";
}
leaf usTimeMid {
type uint16;
description
"The middle field of the timestamp.";
}
leaf usTimeHigh {
type uint16;
description
"The high field of the timestamp multiplexed with the
version number.";
}
leaf bClockSeqHigh {
type uint8;
description
"The high field of the clock sequence multiplexed with
the variant.";
}
leaf bClockSeqLow {
type uint8;
description
"The low field of the clock sequence.";
}
leaf-list rgbNode {
type uint8;
description
"The spatially unique node identifier.";
}
}
}
}
}
grouping tpm20-attestation-key-identifier {
description
"A selector for a suitable key identifier.";
choice key-identifier {
description
"Identifier for the attestation key to use for signing
attestation evidence.";
case public-key {
leaf pub-key-id {
type binary;
description
"The value of the identifier for the public key.";
} }
} */
case uuid { type tpm:pcr;
description description
"Use a YANG agent generated (and maintained) attestation "The numbers of the PCRs that which are being tracked
key UUID."; with a hash based on the TPM20-hash-algo.";
leaf uuid-value {
type binary;
description
"The UUID identifying the corresponding public key.";
}
} }
} }
} }
grouping certificate-name { grouping certificate-name-ref {
description description
"An arbitrary name for the identity certificate chain requested."; "Identifies a certificate in a keystore.";
leaf certificate-name { leaf certificate-name {
type string; type certificate-name-ref;
description description
"An arbitrary name for the identity certificate chain requested."; "Identifies a certificate in a keystore.";
} }
} }
grouping tpm-name { grouping tpm-name {
description description
"Path to a unique TPM on a device."; "A unique TPM on a device.";
leaf tpm-name { leaf tpm-name {
type string; type string;
description description
"Unique system generated name for a TPM on a device."; "Unique system generated name for a TPM on a device.";
} }
} }
grouping tpm-name-selector { grouping tpm-name-selector {
description description
"One or more TPM on a device."; "One or more TPM on a device.";
leaf-list tpm-name { leaf-list tpm-name {
type string; type string;
config false; config false;
description description
"Name of one or more unique TPMs on a device. If this object exists, "Name of one or more unique TPMs on a device. If this object
a selection should pull only the objects related to these TPM(s). If exists, a selection should pull only the objects related to
it does not exist, all qualifying TPMs that are 'hardware-based' these TPM(s). If it does not exist, all qualifying TPMs that
equals true on the device are selected."; are 'hardware-based' equals true on the device are selected.";
} }
} }
grouping compute-node-identifier { 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-id { leaf node-id {
type string; type string;
description description
skipping to change at page 15, line 24 skipping to change at page 15, line 11
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)";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007
Section 8.6";
} }
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).";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007
Section 5.4.1.";
} }
} }
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.";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007
Section 5.1.";
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.
skipping to change at page 16, line 4 skipping to change at page 15, line 48
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 rev-Major {
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 rev-Minor {
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 within both quote variants of the TPM 1.2";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007,
Section 11.3 & 11.4.";
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 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.)";
} }
} }
skipping to change at page 17, line 34 skipping to change at page 17, line 32
} }
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.";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007, Section 8.2";
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
skipping to change at page 18, line 46 skipping to change at page 18, line 47
} }
} }
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.";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007, Section 8.2";
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.";
} }
} }
} }
skipping to change at page 19, line 28 skipping to change at page 19, line 30
leaf up-time { leaf up-time {
type uint32; type uint32;
description description
"Uptime in seconds of this node reporting its data"; "Uptime in seconds of this node reporting its data";
} }
} }
grouping tpm12-attestation { grouping tpm12-attestation {
description description
"Contains an instance of TPM1.2 style signed cryptoprocessor "Contains an instance of TPM1.2 style signed cryptoprocessor
measurements. It is supplemented by unsigned Attester information."; measurements. It is supplemented by unsigned Attester
uses certificate-name; information.";
uses node-uptime; uses node-uptime;
uses compute-node-identifier; 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 {
skipping to change at page 19, line 50 skipping to change at page 20, line 4
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;
} }
} }
} }
grouping tpm20-attestation { grouping tpm20-attestation {
description description
"Contains an instance of TPM2 style signed cryptoprocessor "Contains an instance of TPM2 style signed cryptoprocessor
measurements. It is supplemented by unsigned Attester information."; measurements. It is supplemented by unsigned Attester
uses certificate-name; information.";
uses node-uptime; leaf TPMS_QUOTE_INFO {
uses compute-node-identifier; mandatory true;
leaf quote {
type binary; type binary;
description description
"Quote data returned by TPM Quote, including PCR selection, "A hash of the latest PCR values (and the hash algorithm used)
PCR digest and etc."; which have been returned from a Verifier for the selected PCRs
and Hash Algorithms.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.12.1";
} }
leaf quote-signature { leaf quote-signature {
type binary; type binary;
description description
"Quote signature returned by TPM Quote."; "Quote signature returned by TPM Quote. The signature was
generated using the key associated with the
certificate-name.";
} }
list pcr-bank-values { uses node-uptime;
/* This often should not be necessary for TPM2, as the information uses compute-node-identifier;
if validated will need to be coming from the 'quote' leaf */ list unsigned-pcr-values {
description description
"PCR values in each PCR bank."; "PCR values in each PCR bank. This often should not be
uses TPM2_Algo; necessary for TPM2, as the raw information needing
signature and hash validation will be coming from
the 'quote' leaf";
uses TPM20-hash-algo;
list pcr-values { list pcr-values {
key pcr-index; key pcr-index;
description description
"List of one PCR bank."; "List of one PCR bank.";
leaf pcr-index { leaf pcr-index {
type pcr; type pcr;
description description
"PCR index number."; "PCR index number.";
} }
leaf pcr-value { leaf pcr-value {
skipping to change at page 20, line 41 skipping to change at page 21, line 4
"List of one PCR bank."; "List of one PCR bank.";
leaf pcr-index { leaf pcr-index {
type pcr; type pcr;
description description
"PCR index number."; "PCR index number.";
} }
leaf pcr-value { leaf pcr-value {
type binary; type binary;
description description
"PCR value."; "PCR value.";
} }
} }
} }
container pcr-digest-algo-in-quote {
uses TPM2_Algo;
description
"The hash algorithm for PCR value digest in Quote output.";
}
} }
grouping log-identifier { grouping log-identifier {
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 attested-event-log-type; base attested_event_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
PCR"; the 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";
} }
leaf pcr-index { leaf pcr-index {
type pcr; type pcr;
description description
"Defines the PCR index that this event extended"; "Defines the PCR index that this event extended";
} }
list digest-list { list digest-list {
description description
"Hash of event data"; "Hash of event data";
leaf hash-algo { leaf hash-algo {
type identityref { type identityref {
base aa:asymmetric-algorithm-type; base taa:hash;
} }
description description
"The hash scheme that is used to compress the event data in each of "The hash scheme that is used to compress the event data in
the leaf-list digest items."; each of the leaf-list digest items.";
} }
leaf-list digest { leaf-list digest {
type binary; type binary;
description description
"The hash of the event data"; "The hash of the event data";
} }
} }
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";
skipping to change at page 22, line 18 skipping to change at page 22, line 24
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 bios-event-log {
description
"Measurement log created by the BIOS/UEFI.";
list bios-event-entry {
key event-number;
description
"Ordered list of TCG described event log
that extended the PCRs in the order they
were logged";
uses boot-event-log;
}
}
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;
skipping to change at page 23, line 20 skipping to change at page 23, line 39
description description
"Defines the PCR index that this event extended"; "Defines the PCR index that this event extended";
} }
leaf signature { leaf signature {
type binary; type binary;
description description
"The file signature"; "The file signature";
} }
} }
grouping bios-event-log {
description
"Measurement log created by the BIOS/UEFI.";
list bios-event-entry {
key event-number;
description
"Ordered list of TCG described event log
that extended the PCRs in the order they
were logged";
uses boot-event-log;
}
}
grouping ima-event-log { grouping ima-event-log {
description
"Measurement log created by IMA.";
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;
} }
}
grouping netequip-boot-event {
description description
"Measurement log created by IMA."; "Defines an hash log extend event for Network Equipment Boot.";
leaf event-number {
type uint64;
description
"Unique number for this event for sequencing";
}
leaf filename-hint {
type string;
description
"File that was measured";
}
leaf filedata-hash {
type binary;
description
"Hash of filedata";
}
leaf filedata-hash-algorithm {
type string;
description
"Algorithm used for filedata-hash.";
}
leaf file-version {
type string;
description
"File version information.";
}
leaf file-type {
type string;
description
"Indicating at which boot stage the file is loaded,
such as BIOS, BootLoader, etc.";
}
leaf pcr-index {
type pcr;
description
"Defines the PCR index that this event extended";
}
}
grouping network-equipment-boot-event-log {
description
"Measurement log created by Network Equipment Boot.";
list boot-event-entry {
key event-number;
description
"Ordered list of Network Equipment Boot event logs
by event-number.";
uses netequip-boot-event;
}
} }
grouping event-logs { grouping event-logs {
description description
"A selector for the log and its type."; "A selector for the log and its type.";
choice attested-event-log-type { choice attested_event_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 "BIOS/UEFI event logs";
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 "IMA event logs.";
Registry based on TPM_ALG_ID.";
uses ima-event-log; uses ima-event-log;
} }
} }
case netequip_boot {
description
"Network Equipment Boot event logs";
container boot-event-logs {
description
"Network equipment boot event logs.";
uses network-equipment-boot-event-log;
}
}
} }
} }
/**********************/ /**********************/
/* RPC operations */ /* RPC operations */
/**********************/ /**********************/
rpc tpm12-challenge-response-attestation { rpc tpm12-challenge-response-attestation {
if-feature "TPM12"; if-feature "taa:TPM12";
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 made to the
managed device. ComponentIndex from the hardware manager YANG attesting device.";
module to refer to dedicated TPM in composite devices,
e.g. smart NICs, is still a TODO.";
input { input {
container tpm1-attestation-challenge { container tpm12-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 1.2 structure definitions"; TPM 1.2 structure definitions";
uses tpm12-pcr-selection; uses tpm12-pcr-selection;
uses nonce; uses nonce;
uses TPM12_Algo;
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.";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007,
Section 21.6";
}
leaf-list certificate-name {
must "/tpm:rats-support-structures/tpm:tpms" +
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']" +
"/tpm:certificates/" +
"/tpm:certificate[certificate-name-ref=current()]" {
error-message "Not an available TPM1.2 AIK certificate.";
}
type certificate-name-ref;
description
"When populated, the RPC will only get a Quote for the
TPMs associated with these certificate(s).";
} }
uses tpm-name-selector;
/* if this scheme is desired, we should define XPATH to limit
selection to just 'tpm-name' that are '../tpm-specification-version'
equals 'TPM12' and where '../hardware-based' equals 'true' */
} }
} }
output { output {
list tpm12-attestation-response { list tpm12-attestation-response {
unique "certificate-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 certificate-name-ref {
description
"Certificate associated with this tpm12-attestation.";
}
uses tpm12-attestation; uses tpm12-attestation;
} }
} }
} }
rpc tpm20-challenge-response-attestation { rpc tpm20-challenge-response-attestation {
if-feature "TPM20"; if-feature "taa:TPM20";
description description
"This RPC accepts the input for TSS TPM 2.0 commands of the "This RPC accepts the input for TSS TPM 2.0 commands of the
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 nonce; uses nonce;
list challenge-objects { uses tpm20-pcr-selection;
description leaf-list certificate-name {
"Nodes to fetch attestation information, PCR selection must "/tpm:rats-support-structures/tpm:tpms" +
and AK identifier."; "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']" +
uses tpm20-pcr-selection; "/tpm:certificates/" +
uses TPM2_Algo; "/tpm:certificate[certificate-name-ref=current()]" {
uses tpm20-attestation-key-identifier; error-message "Not an available TPM2.0 AIK certificate.";
uses tpm-name-selector; }
/* if this scheme is desired, we should define XPATH to limit type certificate-name-ref;
selection to just 'tpm-name' that are '../tpm-specification-version' description
equals 'TPM2' and where '../hardware-based' equals 'true' */ "When populated, the RPC will only get a Quote for the
TPMs associated with the certificates.";
} }
} }
} }
output { output {
list tpm20-attestation-response { list tpm20-attestation-response {
unique "certificate-name"; /* should have XPATH making this mandatory unique "certificate-name";
when there is more than one list entry */
description description
"The binary output of TPM2b_Quote in one TPM chip of the "The binary output of TPM2b_Quote in one TPM chip of the
node which identified by node-id. An TPMS_ATTEST structure 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 tpm20-attestation; uses certificate-name-ref {
}
}
}
rpc basic-trust-establishment {
description
"This RPC creates a tpm-resident, non-migratable key to be used
in TPM_Quote commands, an attestation certificate.";
input {
uses nonce;
uses TPM2_Algo;
leaf-list tpm-name {
when "not(../certificate-name)"; /* ensures both are not populated */
type string;
description
"Path to a unique TPM on a device. If there are no elements in the
leaf-list, all TPMs which are 'hardware-based' should have keys
established.";
}
uses certificate-name {
description
"It is possible to request a new certificate using the old one as a
reference.";
}
}
output {
list attestation-certificates {
description
"Attestation Certificate data from a TPM identified by the TPM
name";
leaf attestation-certificate {
type ct:end-entity-cert-cms;
description description
"The binary signed certificate chain data for this identity "Certificate associated with this tpm20-attestation.";
certificate.";
} }
uses tpm20-attestation-key-identifier; uses tpm20-attestation;
} }
} }
} }
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 {
description description
skipping to change at page 27, line 35 skipping to change at page 28, line 30
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 last-index-number { leaf last-index-number {
type uint64; type uint64;
description description
"The last numeric index number of a log entry. "The last numeric index number of a log entry.
Zero means to start at the beginning of the log. Zero means to start at the beginning of the log.
Entries 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
log entry subsequent to this timestamp is to be sent."; next 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 { leaf log-entry-quantity {
type uint16; type uint16;
description description
"The number of log entries to be returned. If omitted, it "The number of log entries to be returned. If omitted, it
means all of them."; means all of them.";
} }
} }
uses log-identifier; uses log-identifier;
} }
skipping to change at page 28, line 22 skipping to change at page 29, line 21
} }
} }
uses log-identifier; uses log-identifier;
} }
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 {
unique "certificate-name"; unique "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 tpm-name;
uses node-uptime; uses node-uptime;
uses certificate-name;
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;
} }
} }
} }
} }
} }
/**************************************/ /**************************************/
/* Config & Oper accessible nodes */ /* Config & Oper accessible nodes */
/**************************************/ /**************************************/
container rats-support-structures { container rats-support-structures {
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 { container compute-nodes {
config true; presence
type identityref { "Indicates that more than one TPM exists on a device.";
base aa:asymmetric-algorithm-type;
}
description
"Supported algorithms values for an Attester.";
}
list compute-nodes {
config false;
key node-id;
uses compute-node-identifier;
description description
"A list names of hardware components in this composite "Holds the set device subsystems/components in this composite
device that RATS can be conducted with."; device that support TPM operations.";
leaf node-name { list compute-node {
type string; key node-id;
config false;
min-elements 2;
uses compute-node-identifier;
description description
"Name of the compute node."; "A components in this composite device that RATS which
supports TPM operations.";
leaf node-name {
type string;
description
"Name of the compute node.";
}
leaf node-location {
type string;
description
"Location of the compute node, such as slot number.";
}
} }
leaf node-location { }
type string; container tpms {
description description
"Location of the compute node, such as slot number."; "Holds the set of TPMs within an Attester.";
list tpm {
key tpm-name;
unique "tpm-path";
description
"A list of TPMs in this composite device that RATS
can be conducted with.";
uses tpm-name;
leaf hardware-based {
type boolean;
config false;
description
"Answers the question: is this TPM is a hardware based
TPM?";
}
leaf tpm-physical-index {
if-feature ietfhw:entity-mib;
type int32 {
range "1..2147483647";
}
config false;
description
"The entPhysicalIndex for the TPM.";
reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
}
leaf tpm-path {
type string;
config false;
description
"Path to a unique TPM on a device. This can change agross
reboots.";
}
leaf compute-node {
when "../../../compute-nodes";
type compute-node-ref;
config false;
mandatory true;
description
"When there is more that one TPM, this indicates for which
compute node this TPM services.";
}
leaf tpm-manufacturer {
type string;
config false;
description
"TPM manufacturer name.";
}
leaf tpm-firmware-version {
type identityref {
base taa:cryptoprocessor;
}
mandatory true;
description
"Identifies the cryptoprocessor API set supported. This
cannot be configured. However it is referenced via XPATH
as part of configuration, so is shown as 'rw'
to eliminate YANG warnings related NMDA.";
}
uses TPM12-hash-algo {
when "tpm-firmware-version = 'taa:tpm12'";
refine TPM12-hash-algo {
description
"The hash algorithm overwrites the default used for PCRs
on this TPM1.2 compliant cryptoprocessor.";
}
}
leaf-list TPM12-pcrs {
when "../tpm-firmware-version = 'taa:tpm12'";
type pcr;
description
"The PCRs which may be extracted from this TPM1.2
compliant cryptoprocessor.";
}
list tpm20-pcr-bank {
when "../tpm-firmware-version = 'taa:tpm20'";
key "TPM20-hash-algo";
description
"Specifies the list of PCRs that may be extracted for
a specific Hash Algorithm on this TPM2 compliant
cryptoprocessor. A bank is a set of PCRs which are
extended using a particular hash algorithm.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7";
leaf TPM20-hash-algo {
must "/tpm:rats-support-structures"
+ "/tpm:attester-supported-algos"
+ "/tpm:tpm20-hash" {
error-message "Not a platform supported TPM20-hash-algo";
}
type identityref {
base taa:hash;
}
description
"The hash scheme actively being used to hash a
one or more TPM2.0 PCRs.";
}
leaf-list pcr-index {
type tpm:pcr;
description
"Defines what TPM2 PCRs are available to be extracted.";
}
}
leaf tpm-status {
type enumeration {
enum operational {
value 0;
description
"The TPM currently is currently running normally and
is ready to accept and process TPM quotes.";
reference
"TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf
Section 12";
}
enum non-operational {
value 1;
description
"TPM is in a state such as startup or shutdown which
precludes the processing of TPM quotes.";
}
}
config false;
mandatory true;
description
"TPM chip self-test status.";
}
container certificates {
description
"The TPM's certificates, including EK certificates
and AK certificates.";
list certificate {
key "certificate-name";
description
"Three types of certificates can be accessed via
this statement, including Initial Attestation
Key Cert, Local Attestation Key Cert or
Endorsement Key Cert.";
leaf certificate-name {
type string;
description
"An arbitrary name uniquely identifying a certificate
associated within key within a TPM.";
}
leaf certificate-keystore-ref {
type leafref {
path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key"
+ "/ks:certificates/ks:certificate/ks:name";
}
description
"A reference to a specific certificate of an
asymmetric key in the Keystore.";
/* Note: It is also possible to import a grouping which
allows local definition via an imported keystore
schema. */
}
leaf certificate-type {
type enumeration {
enum endorsement-cert {
value 0;
description
"Endorsement Key (EK) Certificate type.";
}
enum initial-attestation-cert {
value 1;
description
"Initial Attestation key (IAK) Certificate type.";
}
enum local-attestation-cert {
value 2;
description
"Local Attestation Key (LAK) Certificate type.";
}
}
description
"Type of this certificate";
}
}
}
} }
} }
list tpms { container attester-supported-algos {
key tpm-name;
unique "tpm-path";
description description
"A list of TPMs in this composite device that RATS "Identifies which TPM algorithms are available for use on an
can be conducted with."; attesting platform.";
uses tpm-name; leaf-list tpm12-asymmetric-signing {
leaf hardware-based { if-feature "taa:TPM12";
config false; when "../../tpm:tpms" +
type boolean; "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']";
type identityref {
base taa:asymmetric;
}
description description
"Answers the question: is this TPM is a hardware based TPM?"; "Platform Supported TPM12 asymmetric algorithms.";
} }
leaf tpm-physical-index { leaf-list tpm12-hash {
if-feature ietfhw:entity-mib; if-feature "taa:TPM12";
config false; when "../../tpm:tpms" +
type int32 { "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']";
range "1..2147483647"; type identityref {
base taa:hash;
} }
description description
"The entPhysicalIndex for the TPM."; "Platform supported TPM12 hash algorithms.";
reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
} }
leaf tpm-path { leaf-list tpm20-asymmetric-signing {
type string; if-feature "taa:TPM20";
config false; when "../../tpm:tpms" +
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']";
type identityref {
base taa:asymmetric;
}
description description
"Path to a unique TPM on a device. This can change agross reboots."; "Platform Supported TPM20 asymmetric algorithms.";
} }
leaf-list tpm20-hash {
if-feature "taa:TPM20";
when "../../tpm:tpms" +
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']";
leaf compute-node {
when "../../compute-nodes";
config false;
mandatory true;
type compute-node-ref;
description
"When there is more that one TPM, this indicates for which
compute node this TPM services.";
}
leaf tpm-manufacturer {
config false;
type string;
description
"TPM manufacturer name.";
}
leaf tpm-firmware-version {
config false;
type string;
description
"TPM firmware version.";
}
leaf tpm-specification-version {
type identityref { type identityref {
base cryptoprocessor; base taa:hash;
} }
config false;
mandatory true;
description description
"Identifies the cryptoprocessor API set supported"; "Platform supported TPM20 hash algorithms.";
}
leaf tpm-status {
type string;
config false;
description
"TPM chip self-test status, normal or abnormal.";
}
container certificates {
description
"The TPM's certificates, including EK certificates
and AK certificates.";
list certificate {
config true;
key "certificate-name";
description
"Three types of certificates can be accessed via
this statement, including Initial Attestation
Key Cert, Local Attestation Key Cert or
Endorsement Key Cert.";
uses certificate-name;
leaf certificate-ref {
type leafref {
path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key"
+ "/ks:certificates/ks:certificate/ks:name";
}
description
"A reference to a specific certificate of an
asymmetric key in the Keystore.";
/* Note: It is also possible to import a grouping which allows
local definition via an imported keystore schema. */
}
leaf certificate-type {
type enumeration {
enum endorsement-cert {
value 0;
description
"Endorsement Key (EK) Certificate type.";
}
enum initial-attestation-cert {
value 1;
description
"Initial Attestation key (IAK) Certificate type.";
}
enum local-attestation-cert {
value 2;
description
"Local Attestation Key (LAK) Certificate type.";
}
}
description
"Type of this certificate";
}
}
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
2.3. ietf-asymmetric-algs
2.2.2. ietf-tcg-algs
Cryptographic algorithm types were initially included within -v14 Cryptographic algorithm types were initially included within -v14
NETCONF's iana-crypto-types.yang. Unfortunately all this content NETCONF's iana-crypto-types.yang. Unfortunately all this content
including the algorithms needed here failed to make the -v15 used including the algorithms needed here failed to make the -v15 used
WGLC. Therefore a modified version of this draft is included here. WGLC. As a result this document has encoded the TCG Algorithm
Perhaps someone will steward this list as a separate draft. definitions of [TCG-Algos], revision 1.32. By including this full
table as a separate YANG file within this document, it is possible
for other YANG models to leverage the contents of this model.
<CODE BEGINS> ietf-asymmetric-algs@2020-06-12.yang 2.2.2.1. Features
module ietf-asymmetric-algs {
There are two types of features supported <TPM12> and <TPM20>.
Support for either of these features indicates that a cryptoprocessor
supporting the corresponding type of TCG API is present on an
Attester. Most commonly, only one type of cryptoprocessor will be
available on an Attester.
2.2.2.2. Identities
There are three types of identities in this model.
The first are the cryptographic functions supportable by a TPM
algorithm, these include: <asymmetric>, <symmetric>, <hash>,
<signing>, <anonymous_signing>, <encryption_mode>, <method>, and
<object_type>. The definitions of each of these are in Table 2 of
[TCG-Algos].
The second are API specifications for tpms: <tpm12> and <tpm2>.
The third are specific algorithm types. Each algorithm type defines
what cryptographic functions may be supported, and on which type of
API specification. It is not required that an implementation of a
specific TPM will support all algorithm types. The contents of each
specific algorithm mirrors what is in Table 3 of [TCG-Algos].
2.2.2.3. YANG Module
<CODE BEGINS> ietf-tcg-algs@2020-09-18.yang
module ietf-tcg-algs {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-asymmetric-algs"; namespace "urn:ietf:params:xml:ns:yang:ietf-tcg-algs";
prefix aa; prefix taa;
organization organization
"IETF NETCONF (Network Configuration) Working Group"; "IETF RATS Working Group";
contact contact
"WG Web: <http://datatracker.ietf.org/wg/netconf/> "WG Web: <http://datatracker.ietf.org/wg/rats/>
WG List: <mailto:netconf@ietf.org> WG List: <mailto:rats@ietf.org>
Author: Eric Voit <mailto:evoit@cisco.com> Author: Eric Voit <mailto:evoit@cisco.com>";
Author: Kent Watsen <mailto:kent+ietf@watsen.net>
Author: Wang Haiguang <wang.haiguang.shieldlab@huawei.com>";
description description
"This module defines a identities for asymmetric algorithms. "This module defines a identities for asymmetric algorithms.
Copyright (c) 2020 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
skipping to change at page 32, line 49 skipping to change at page 36, line 42
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-06-12 { revision 2020-09-18 {
description description
"Initial version"; "Initial version";
reference reference
"RFC XXXX: tbd "RFC XXXX: tbd";
initial draft: draft-voit-rats-trusted-path-routing
concepts from ietf-asymmetric-algs.yang which did not progress to
WGLC in NETCONF.";
} }
/*****************/ /*****************/
/* Features */ /* Features */
/*****************/ /*****************/
feature TPM12 { feature TPM12 {
description description
"This feature indicates support for the TPM 1.2 API."; "This feature indicates algorithm support for the TPM 1.2 API
as per TPM-main-1.2-Rev94-part-2, Section 4.8.";
} }
feature TPM20 { feature TPM20 {
description description
"This feature indicates support for the TPM 2.0 API."; "This feature indicates algorithm support for the TPM 2.0 API
} as per TPM-Rev-2.0-Part-1-Architecture-01.38 Section 11.4.";
feature iana {
description
"This feature indicates support for the IANA algorithms defined
in Registry xxxxx";
} }
/*****************/ /*****************/
/* Identities */ /* Identities */
/*****************/ /*****************/
/* There needs to be collasping/verification of some of the identity types /* There needs to be collasping/verification of some of the identity
between the various algorithm types listed below */ types between the various algorithm types listed below */
identity asymmetric-algorithm-type { identity asymmetric {
description description
"Base identity identityerating various asymmetric key algorithms."; "A TCG recognized asymmetric algorithm with a public and
private key.";
reference
"http://trustedcomputinggroup.org/resource/tcg-algorithm-registry/
TCG_Algorithm_Registry_r1p32_pub Table 2";
} }
identity iana-asymmetric-algorithm { identity symmetric {
base asymmetric-algorithm-type;
description description
"Base identity identityerating various asymmetric key algorithms."; "A TCG recognized symmetric algorithm with only a private key.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
} }
identity tpm12-asymmetric-algorithm { identity hash {
base asymmetric-algorithm-type;
description description
"Base identity identityerating various asymmetric key algorithms."; "A TCG recognized hash algorithm that compresses input data to
a digest value or indicates a method that uses a hash.";
reference reference
"TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf "TCG_Algorithm_Registry_r1p32_pub Table 2";
TPM_ALGORITHM_ID values, page 18";
} }
identity tpm2-asymmetric-algorithm { identity signing {
base asymmetric-algorithm-type;
description description
"Base identity identityerating various asymmetric key algorithms."; "A TCG recognized signing algorithm";
reference reference
"TPM-Rev-2.0-Part-2-Structures-01.38.pdf "TCG_Algorithm_Registry_r1p32_pub Table 2";
The TCG Algorithm Registry ID value. Table 9";
} }
identity rsa { identity anonymous_signing {
base tpm12-asymmetric-algorithm;
base tpm2-asymmetric-algorithm;
description description
"RFC 3447 - the RSA algorithm"; "A TCG recognized anonymous signing algorithm.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
} }
identity rsa1024 { identity encryption_mode {
if-feature "iana";
base iana-asymmetric-algorithm;
base rsa;
description description
"The RSA algorithm using a 1024-bit key."; "A TCG recognized encryption mode.";
reference reference
"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; "TCG_Algorithm_Registry_r1p32_pub Table 2";
} }
identity rsa2048 { identity method {
if-feature "iana";
base iana-asymmetric-algorithm;
base rsa;
description description
"The RSA algorithm using a 2048-bit key."; "A TCG recognized method such as a mask generation function.";
reference reference
"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; "TCG_Algorithm_Registry_r1p32_pub Table 2";
} }
identity rsa3072 { identity object_type {
if-feature "iana";
base iana-asymmetric-algorithm;
base rsa;
description description
"The RSA algorithm using a 3072-bit key."; "A TCG recognized object type.";
reference reference
"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; "TCG_Algorithm_Registry_r1p32_pub Table 2";
} }
identity rsa4096 { identity cryptoprocessor {
if-feature "iana";
base iana-asymmetric-algorithm;
base rsa;
description description
"The RSA algorithm using a 4096-bit key."; "Base identity identifying a crytoprocessor.";
reference
"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2.";
} }
identity rsa7680 { identity tpm12 {
if-feature "iana"; if-feature "TPM12";
base iana-asymmetric-algorithm; base cryptoprocessor;
base rsa;
description description
"The RSA algorithm using a 7680-bit key."; "Supportable by a TPM1.2.";
reference reference
"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; "TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf
TPM_ALGORITHM_ID values, page 18";
} }
identity rsa15360 { identity tpm20 {
if-feature "iana"; if-feature "TPM12";
base iana-asymmetric-algorithm; base cryptoprocessor;
base rsa;
description description
"The RSA algorithm using a 15360-bit key."; "Supportable by a TPM2.";
reference reference
"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; "TPM-Rev-2.0-Part-2-Structures-01.38.pdf
The TCG Algorithm Registry. Table 9";
} }
identity secp192r1 { identity TPM_ALG_RSA {
if-feature "iana"; if-feature "TPM12 or TPM20";
base iana-asymmetric-algorithm; base tpm12;
base tpm20;
base asymmetric;
base object_type;
description description
"The asymmetric algorithm using a NIST P192 Curve."; "RSA algorithm";
reference reference
"RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. "TCG_Algorithm_Registry_r1p32_pub Table 3 and
RFC 5480: Elliptic Curve Cryptography Subject Public Key RFC 8017. ALG_ID: 0x0001";
Information.";
} }
identity secp224r1 { identity TPM_ALG_TDES {
if-feature "iana"; if-feature "TPM12";
base iana-asymmetric-algorithm; base tpm12;
base symmetric;
description description
"The asymmetric algorithm using a NIST P224 Curve."; "Block cipher with various key sizes (Triple Data Encryption
Algorithm, commonly called Triple Data Encryption Standard)
Note: was banned in TPM1.2 v94";
reference reference
"RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. "TCG_Algorithm_Registry_r1p32_pub Table 3 and
RFC 5480: Elliptic Curve Cryptography Subject Public Key ISO/IEC 18033-3. ALG_ID: 0x0003";
Information.";
} }
identity secp256r1 { identity TPM_ALG_SHA1 {
if-feature "iana"; if-feature "TPM12 or TPM20";
base iana-asymmetric-algorithm; base hash;
base tpm12;
base tpm20;
description description
"The asymmetric algorithm using a NIST P256 Curve."; "SHA1 algorithm - Deprecated due to insufficient cryptographic
protection. However it is still useful for hash algorithms
where protection is not required.";
reference reference
"RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. "TCG_Algorithm_Registry_r1p32_pub Table 3 and
RFC 5480: Elliptic Curve Cryptography Subject Public Key ISO/IEC 10118-3. ALG_ID: 0x0004";
Information.";
} }
identity secp384r1 { identity TPM_ALG_HMAC {
base iana-asymmetric-algorithm; if-feature "TPM12 or TPM20";
base tpm12;
base tpm20;
base hash;
base signing;
description description
"The asymmetric algorithm using a NIST P384 Curve."; "Hash Message Authentication Code (HMAC) algorithm";
reference reference
"RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. "TCG_Algorithm_Registry_r1p32_pub Table 3,
RFC 5480: Elliptic Curve Cryptography Subject Public Key ISO/IEC 9797-2 and RFC2014. ALG_ID: 0x0005";
Information.";
} }
identity secp521r1 { identity TPM_ALG_AES {
if-feature "iana"; if-feature "TPM12";
base iana-asymmetric-algorithm; base tpm12;
base symmetric;
description description
"The asymmetric algorithm using a NIST P521 Curve."; "The AES algorithm with various key sizes";
reference reference
"RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. "TCG_Algorithm_Registry_r1p32_pub Table 3 and
RFC 5480: Elliptic Curve Cryptography Subject Public Key ISO/IEC 18033-3. ALG_ID: 0x0006";
Information.";
} }
identity x25519 { identity TPM_ALG_MGF1 {
if-feature "iana"; if-feature "TPM20";
base iana-asymmetric-algorithm; base tpm20;
base hash;
base method;
description description
"The asymmetric algorithm using a x.25519 Curve."; "hash-based mask-generation function";
reference reference
"RFC 7748: Elliptic Curves for Security."; "TCG_Algorithm_Registry_r1p32_pub Table 3,
IEEE Std 1363-2000 and IEEE Std 1363a -2004.
ALG_ID: 0x0007";
} }
identity x448 {
if-feature "iana"; identity TPM_ALG_KEYEDHASH {
base iana-asymmetric-algorithm; if-feature "TPM20";
base tpm20;
base hash;
base object_type;
description description
"The asymmetric algorithm using a x.448 Curve."; "An encryption or signing algorithm using a keyed hash. These
may use XOR for encryption or an HMAC for signing and may
also refer to a data object that is neither signing nor
encrypting.";
reference reference
"RFC 7748: Elliptic Curves for Security."; "TCG_Algorithm_Registry_r1p32_pub Table 3 and
} TCG TPM 2.0 library specification. . ALG_ID: 0x0008";
identity SHA1 { }
if-feature "TPM20 or TPM12";
base tpm12-asymmetric-algorithm; identity TPM_ALG_XOR {
base tpm2-asymmetric-algorithm; if-feature "TPM12 or TPM20";
base tpm12;
base tpm20;
base hash;
base symmetric;
description description
"ISO/IEC 10118-3 - SHA1 algorithm"; "The XOR encryption algorithm.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x000A";
} }
identity HMAC { identity TPM_ALG_SHA256 {
if-feature "TPM20 or TPM12"; if-feature "TPM20";
base tpm12-asymmetric-algorithm; base tpm20;
base tpm2-asymmetric-algorithm; base hash;
description description
"ISO/IEC 9797-2 - Hash Message Authentication Code (HMAC) algorithm "The SHA 256 algorithm";
also RFC2014. reference
we need to verify if NMAC implementation isn't different in the two."; "TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x000B";
} }
identity AES { identity TPM_ALG_SHA384 {
if-feature "TPM20 or TPM12"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base hash;
description description
"ISO/IEC 18033-3 - the AES algorithm"; "The SHA 384 algorithm";
} reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x000C";
identity AES128 { }
if-feature "TPM12"; identity TPM_ALG_SHA512 {
base tpm12-asymmetric-algorithm; if-feature "TPM20";
base AES; base tpm20;
base hash;
description description
"ISO/IEC 18033-3 - the AES algorithm, key size 128"; "The SHA 512 algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x000D";
} }
identity AES192 { identity TPM_ALG_NULL {
if-feature "TPM12"; if-feature "TPM20";
base tpm12-asymmetric-algorithm; base tpm20;
base AES;
description description
"ISO/IEC 18033-3 - the AES algorithm, key size 192"; "NULL algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x0010";
} }
identity AES256 { identity TPM_ALG_SM3_256 {
if-feature "TPM12"; if-feature "TPM20";
base tpm12-asymmetric-algorithm; base tpm20;
base AES; base hash;
description description
"ISO/IEC 18033-3 - the AES algorithm, key size 256"; "The SM3 hash algorithm.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
GM/T 0004-2012 - SM3_256. ALG_ID: 0x0012";
} }
identity MGF1 { identity TPM_ALG_SM4 {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
description description
"IEEE Std 1363a -2004 - hash-based mask-generation function"; "SM4 symmetric block cipher";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
GB/T 32907-2016. ALG_ID: 0x0013";
} }
identity KEYEDHASH {
identity TPM_ALG_RSASSA {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base signing;
description description
"TPM2 KEYEDHASH - an encryption or signing algorithm using a keyed hash"; "Signature algorithm defined in section 8.2 (RSASSAPKCS1-v1_5)";
} reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017.
ALG_ID: 0x0014";
identity XOR { }
if-feature "TPM20 or TPM12";
base tpm12-asymmetric-algorithm; identity TPM_ALG_RSAES {
base tpm2-asymmetric-algorithm; if-feature "TPM20";
base tpm20;
base asymmetric;
base encryption_mode;
description description
"TPM2 XOR"; "Signature algorithm defined in section 7.2 (RSAES-PKCS1-v1_5)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017
ALG_ID: 0x0015";
} }
identity SHA256 { identity TPM_ALG_RSAPSS {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base signing;
description description
"ISO/IEC 10118-3 - the SHA 256 algorithm"; "Padding algorithm defined in section 8.1 (RSASSA PSS)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017.
ALG_ID: 0x0016";
} }
identity SHA384 { identity TPM_ALG_OAEP {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base encryption_mode;
description description
"ISO/IEC 10118-3 - the SHA 384 algorithm"; "Padding algorithm defined in section 7.1 (RSASSA OAEP)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017.
ALG_ID: 0x0017";
} }
identity SHA512 { identity TPM_ALG_ECDSA {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base signing;
description description
"ISO/IEC 10118-3 - the SHA 512 algorithm"; "Signature algorithm using elliptic curve cryptography (ECC)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 14888-3. ALG_ID: 0x0018";
} }
identity NULL { identity TPM_ALG_ECDH {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base method;
description description
"TPM2 NULL"; "Secret sharing using ECC";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-56A and RFC 7748. ALG_ID: 0x0019";
} }
identity SM3_256 { identity TPM_ALG_ECDAA {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base signing;
base anonymous_signing;
description description
"GM/T 0004-2012 - SM3_256"; "Elliptic-curve based anonymous signing scheme";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x001A";
} }
identity SM4 { identity TPM_ALG_SM2 {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base signing;
base encryption_mode;
base method;
description description
"GM/T 0004-2012 - SM4 symmetric block cipher"; "SM2 - depending on context, either an elliptic-curve based,
signature algorithm, an encryption scheme, or a key exchange
protocol";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
A GM/T 0003.1-2012, GM/T 0003.2-2012, GM/T 0003.3-2012,
GM/T 0003.5-2012 SM2. ALG_ID: 0x001B";
} }
identity RSASSA { identity TPM_ALG_ECSCHNORR {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base signing;
description description
"RFC 3447 - defined in section 8.2 (RSASSAPKCS1-v1_5)"; "Elliptic-curve based Schnorr signature";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x001C";
} }
identity RSAES { identity TPM_ALG_ECMQV {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base method;
description description
"RFC 3447 - defined in section 7.2 (RSAES-PKCS1-v1_5)"; "Two-phase elliptic-curve key";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-56A. ALG_ID: 0x001D";
} }
identity RSAPSS { identity TPM_ALG_KDF1_SP800_56A {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base hash;
base method;
description description
"RFC 3447 - defined in section 8.1 (RSASSA PSS)"; "Concatenation key derivation function";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-56A (approved alternative1) section 5.8.1.
ALG_ID: 0x0020";
} }
identity OAEP { identity TPM_ALG_KDF2 {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base hash;
base method;
description description
"RFC 3447 - defined in section 7.1 (RSASSA OAEP)"; "Key derivation function";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
IEEE 1363a-2004 KDF2 section 13.2. ALG_ID: 0x0021";
} }
identity ECDSA { identity TPM_ALG_KDF1_SP800_108 {
base TPM_ALG_KDF2;
description
"A key derivation method";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-108 - Section 5.1 KDF. ALG_ID: 0x0022";
}
identity TPM_ALG_ECC {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base object_type;
description description
"ISO/IEC 14888-3 - elliptic curve cryptography (ECC)"; "Prime field ECC";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 15946-1. ALG_ID: 0x0023";
} }
identity ECDH { identity TPM_ALG_SYMCIPHER {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
description description
"NIST SP800-56A - secret sharing using ECC"; "Object type for a symmetric block cipher";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x0025";
} }
identity ECDAA { identity TPM_ALG_CAMELLIA {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
description description
"TPM2 - elliptic-curve based anonymous signing scheme"; "The Camellia algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 18033-3. ALG_ID: 0x0026";
} }
identity SM2 { identity TPM_ALG_SHA3_256 {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base hash;
description description
"A GM/T 0003.1-2012, GM/T 0003.2-2012, GM/T 0003.3-2012, "ISO/IEC 10118-3 - the SHA 256 algorithm";
GM/T 0003.5-2012 SM2"; reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST PUB FIPS 202. ALG_ID: 0x0027";
} }
identity ECSCHNORR { identity TPM_ALG_SHA3_384 {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base hash;
description description
"TPM2 - elliptic-curve based Schnorr signature"; "The SHA 384 algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST PUB FIPS 202. ALG_ID: 0x0028";
} }
identity ECMQV { identity TPM_ALG_SHA3_512 {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base hash;
description description
"NIST SP800-56A - two-phase elliptic-curve key"; "The SHA 512 algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST PUB FIPS 202. ALG_ID: 0x0029";
} }
identity KDF1_SP800_56A {
identity TPM_ALG_CMAC {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base signing;
description description
"NIST SP800-56A - concatenation key derivation function, "block Cipher-based Message Authentication Code (CMAC)";
(approved alternative1) section 5.8.1"; reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 9797-1:2011 Algorithm 5. ALG_ID: 0x003F";
} }
identity KDF2 { identity TPM_ALG_CTR {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base encryption_mode;
description description
"IEEE 1363a-2004 - key derivation function KDF2 section 13.2"; "Counter mode";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0040";
} }
identity KDF1_SP800_108 { identity TPM_ALG_OFB {
base tpm20;
base symmetric;
base encryption_mode;
description
"Output Feedback mode";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0041";
}
identity TPM_ALG_CBC {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base encryption_mode;
description description
"NIST SP800-108 - Section 5.1 KDF in Counter Mode"; "Cipher Block Chaining mode";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0042";
} }
identity ECC { identity TPM_ALG_CFB {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base encryption_mode;
description description
"ISO/IEC 15946-1 - prime field ECC"; "Cipher Feedback mode";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0043";
} }
identity SYMCIPHER { identity TPM_ALG_ECB {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base encryption_mode;
description description
"TPM2 - object type for a symmetric block cipher"; "Electronic Codebook mode";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0044";
} }
identity CAMELLIA { identity TPM_ALG_CCM {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base signing;
base encryption_mode;
description description
"ISO/IEC 18033-3 - the Camellia algorithm"; "Counter with Cipher Block Chaining-Message Authentication
Code (CCM)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38C. ALG_ID: 0x0050";
} }
identity CTR { identity TPM_ALG_GCM {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base signing;
base encryption_mode;
description description
"ISO/IEC 10116 - Counter mode"; "Galois/Counter Mode (GCM)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38D. ALG_ID: 0x0051";
} }
identity OFB { identity TPM_ALG_KW {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base signing;
base encryption_mode;
description description
"ISO/IEC 10116 - Output Feedback mode"; "AES Key Wrap (KW)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38F. ALG_ID: 0x0052";
} }
identity CBC { identity TPM_ALG_KWP {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base signing;
base encryption_mode;
description description
"ISO/IEC 10116 - Cipher Block Chaining mode"; "AES Key Wrap with Padding (KWP)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38F. ALG_ID: 0x0053";
} }
identity CFB { identity TPM_ALG_EAX {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base symmetric;
base signing;
base encryption_mode;
description description
"ISO/IEC 10116 - Cipher Feedback mode"; "Authenticated-Encryption Mode";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38F. ALG_ID: 0x0054";
} }
identity ECB { identity TPM_ALG_EDDSA {
if-feature "TPM20"; if-feature "TPM20";
base tpm2-asymmetric-algorithm; base tpm20;
base asymmetric;
base signing;
description description
"ISO/IEC 10116 - Electronic Codebook mode"; "Edwards-curve Digital Signature Algorithm (PureEdDSA)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
RFC 8032. ALG_ID: 0x0060";
} }
} }
<CODE ENDS> <CODE ENDS>
Note that not all cryptographic functions are required for use by
ietf-tpm-remote-attestation.yang. However the full definition of
Table 3 of [TCG-Algos] will allow use by additional YANG
specifications.
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. But keeping up with changes to ietf-tcg-algs.yang
will be necessary.
4. Security Considerations 4. Security Considerations
There are always some. The YANG module specified in this document defines a schema for data
that is designed to be accessed via network management protocols such
as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer
is the secure transport layer, and the mandatory-to-implement secure
transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC5246].
There are a number of data nodes defined in this YANG module that are
writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive or vulnerable
in some network environments. Write operations (e.g., edit-config)
to these data nodes without proper protection can have a negative
effect on network operations. These are the subtrees and data nodes
and their sensitivity/vulnerability:
Container: </rats-support-structures/attester-supported-algos>
o <tpm12-asymmetric-signing>, <tpm12-hash>, <tpm20-asymmetric-
signing>, and <tpm20-hash> all could be populated with algorithms
which are not supported by the underlying physical TPM installed
by the equipment vendor.
Container: </rats-support-structures/tpms>
o <tpm-name> - Although shown as 'rw', it is system generated
o <tpm20-pcr-bank> - It is possible to configure PCRs for extraction
which are not being extended by system software. This could
unnecessarily use TPM resources.
o <certificates> - It is possible to provision a certificate which
does not correspond to a Attestation Identity Key (AIK) within the
TPM.
RPC: <tpm12-challenge-response-attestation> - Need to verify that the
certificate is for an active AIK.
RPC: <tpm20-challenge-response-attestation> - Need to verify that the
certificate is for an active AIK.
RPC: <log-retrieval> - Pulling lots of logs can chew up system
resources.
5. Acknowledgements 5. Acknowledgements
Not yet. Not yet.
6. Change Log 6. Change Log
Changes from version 02 to version 03:
o moved to tcg-algs
o cleaned up model to eliminate sources of errors
o removed key establishment RPC
o added lots of XPATH which must all be scrubbed still
o Descriptive text added on model contents.
Changes from version 01 to version 02: Changes from version 01 to version 02:
o Extracted Crypto-types into a separate YANG file o Extracted Crypto-types into a separate YANG file
o Mades the algorithms explicit, not strings o Mades the algorithms explicit, not strings
o Hash Algo as key the selected TPM2 PCRs o Hash Algo as key the selected TPM2 PCRs
o PCR numbers are their own type o PCR numbers are their own type
skipping to change at page 43, line 45 skipping to change at page 53, line 44
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 Models Birkholz, H., Eckel, M., Newton, C., and L. Chen,
for Remote Attestation Procedures", draft-birkholz-rats- "Reference Interaction Models for Remote Attestation
reference-interaction-model-02 (work in progress), January Procedures", draft-birkholz-rats-reference-interaction-
2020. model-03 (work in progress), July 2020.
[I-D.ietf-netconf-crypto-types] [I-D.ietf-netconf-keystore]
Watsen, K., "Common YANG Data Types for Cryptography", Watsen, K., "A YANG Data Model for a Keystore", draft-
draft-ietf-netconf-crypto-types-15 (work in progress), May ietf-netconf-keystore-20 (work in progress), August 2020.
2020.
[I-D.ietf-rats-architecture]
Birkholz, H., Thaler, D., Richardson, M., Smith, N., and
W. Pan, "Remote Attestation Procedures Architecture",
draft-ietf-rats-architecture-06 (work in progress),
September 2020.
[I-D.ietf-rats-tpm-based-network-device-attest]
Fedorkow, G., Voit, E., and J. Fitzgerald-McKay, "TPM-
based Network Device Remote Integrity Verification",
draft-ietf-rats-tpm-based-network-device-attest-04 (work
in progress), September 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>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
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>.
[TCG-Algos]
"TCG_Algorithm_Registry_r1p32_pub", n.d.,
<hhttp://trustedcomputinggroup.org/resource/tcg-algorithm-
registry/>.
[TPM1.2] TCG, ., "TPM 1.2 Main Specification", October 2003,
<https://trustedcomputinggroup.org/resource/tpm-main-
specification/>.
[TPM2.0] TCG, ., "TPM 2.0 Library Specification", March 2013,
<https://trustedcomputinggroup.org/resource/tpm-library-
specification/>.
7.2. Informative References 7.2. Informative References
[I-D.ietf-rats-architecture] [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
Birkholz, H., Thaler, D., Richardson, M., Smith, N., and (TLS) Protocol Version 1.2", RFC 5246,
W. Pan, "Remote Attestation Procedures Architecture", DOI 10.17487/RFC5246, August 2008,
draft-ietf-rats-architecture-04 (work in progress), May <https://www.rfc-editor.org/info/rfc5246>.
2020.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
<https://www.rfc-editor.org/info/rfc6242>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>.
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
skipping to change at page 45, line 4 skipping to change at page 55, line 32
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
Michael Eckel Michael Eckel
Fraunhofer SIT Fraunhofer SIT
Rheinstrasse 75 Rheinstrasse 75
Darmstadt 64295 Darmstadt 64295
Germany Germany
Email: michael.eckel@sit.fraunhofer.de Email: michael.eckel@sit.fraunhofer.de
Eric Voit
Cisco Systems
Email: evoit@cisco.com
Shwetha Bhandari Shwetha Bhandari
Cisco Systems Cisco Systems
Email: shwethab@cisco.com Email: shwethab@cisco.com
Bill Sulzen Bill Sulzen
Cisco Systems Cisco Systems
Email: bsulzen@cisco.com Email: bsulzen@cisco.com
Eric Voit
Cisco Systems
Email: evoit@cisco.com
Liang Xia (Frank) Liang Xia (Frank)
Huawei Technologies Huawei Technologies
101 Software Avenue, Yuhuatai District 101 Software Avenue, Yuhuatai District
Nanjing, Jiangsu 210012 Nanjing, Jiangsu 210012
China China
Email: Frank.Xialiang@huawei.com Email: Frank.Xialiang@huawei.com
Tom Laffey Tom Laffey
Hewlett Packard Enterprise Hewlett Packard Enterprise
 End of changes. 319 change blocks. 
840 lines changed or deleted 1361 lines changed or added

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