draft-ietf-rats-yang-tpm-charra-05.txt   draft-ietf-rats-yang-tpm-charra-06.txt 
RATS Working Group H. Birkholz RATS Working Group H. Birkholz
Internet-Draft M. Eckel Internet-Draft M. Eckel
Intended status: Standards Track Fraunhofer SIT Intended status: Standards Track Fraunhofer SIT
Expires: July 18, 2021 S. Bhandari Expires: 3 October 2021 S. Bhandari
ThoughtSpot ThoughtSpot
E. Voit E. Voit
B. Sulzen B. Sulzen
Cisco Cisco
L. Xia L. Xia
Huawei Huawei
T. Laffey T. Laffey
HPE HPE
G. Fedorkow G. Fedorkow
Juniper Juniper
January 14, 2021 1 April 2021
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-05 draft-ietf-rats-yang-tpm-charra-06
Abstract Abstract
This document defines a YANG RPC and a minimal datastore required to This document defines a YANG RPC and a small number of configuration
retrieve attestation evidence about integrity measurements from a node required to retrieve attestation evidence about integrity
device following the operational context defined in TPM-based Network measurements from a device following the operational context defined
Device Remote Integrity Verification. Complementary measurement logs in TPM-based Network Device Remote Integrity Verification.
are also provided by the YANG RPC originating from one or more roots Complementary measurement logs are also provided by the YANG RPC
of trust of measurement. The module defined requires at least one originating from one or more roots of trust of measurement. The
TPM 1.2 or TPM 2.0 and corresponding Trusted Software Stack included module defined requires at least one TPM 1.2 or TPM 2.0 and
in the device components of the composite device the YANG server is corresponding Trusted Software Stack included in the device
running on. 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 July 18, 2021. This Internet-Draft will expire on 3 October 2021.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2021 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/
(https://trustee.ietf.org/license-info) in effect on the date of license-info) in effect on the date of publication of this document.
publication of this document. Please review these documents Please review these documents carefully, as they describe your rights
carefully, as they describe your rights and restrictions with respect and restrictions with respect to this document. Code Components
to this document. Code Components extracted from this document must extracted from this document must include Simplified BSD License text
include Simplified BSD License text as described in Section 4.e of as described in Section 4.e of the Trust Legal Provisions and are
the Trust Legal Provisions and are provided without warranty as 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. YANG Modules . . . . . . . . . . . . . . . . . . . . . . 3 2.1. YANG Modules . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1. ietf-tpm-remote-attestation . . . . . . . . . . . . . 3 2.1.1. ietf-tpm-remote-attestation . . . . . . . . . . . . . 3
2.1.2. ietf-tcg-algs . . . . . . . . . . . . . . . . . . . . 32 2.1.2. ietf-tcg-algs . . . . . . . . . . . . . . . . . . . . 31
3. IANA considerations . . . . . . . . . . . . . . . . . . . . . 48 3. IANA considerations . . . . . . . . . . . . . . . . . . . . . 47
4. Security Considerations . . . . . . . . . . . . . . . . . . . 48 4. Security Considerations . . . . . . . . . . . . . . . . . . . 47
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 49 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 48
6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 49 6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 48
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 51 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.1. Normative References . . . . . . . . . . . . . . . . . . 51 7.1. Normative References . . . . . . . . . . . . . . . . . . 49
7.2. Informative References . . . . . . . . . . . . . . . . . 52 7.2. Informative References . . . . . . . . . . . . . . . . . 50
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 52 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51
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 operational context defined [I-D.ietf-rats-architecture] and uses the operational context defined
in [I-D.ietf-rats-tpm-based-network-device-attest] as well as the in [I-D.ietf-rats-tpm-based-network-device-attest] as well as the
interaction model and information elements defined in interaction model and information elements defined in
[I-D.ietf-rats-reference-interaction-models]. The currently [I-D.ietf-rats-reference-interaction-models]. The currently
supported hardware security modules (HWM) are the Trusted Platform supported hardware security modules (HWM) are the Trusted Platform
Module (TPM) [TPM1.2] and [TPM2.0] specified by the Trusted Computing Module (TPM) [TPM1.2] and [TPM2.0] specified by the Trusted Computing
skipping to change at page 4, line 26 skipping to change at page 4, line 23
2.1.1.3. RPCs 2.1.1.3. RPCs
2.1.1.3.1. <tpm20-challenge-response-attestation> 2.1.1.3.1. <tpm20-challenge-response-attestation>
This RPC allows a Verifier to request a quote of PCRs from a TPM2.0 This RPC allows a Verifier to request a quote of PCRs from a TPM2.0
compliant cryptoprocessor. Where the feature <TPMs> is active, and compliant cryptoprocessor. Where the feature <TPMs> is active, and
one or more <certificate-name> is not provided, all TPM2.0 compliant one or more <certificate-name> is not provided, all TPM2.0 compliant
cryptoprocessors will respond. A YANG tree diagram of this RPC is as cryptoprocessors will respond. A YANG tree diagram of this RPC is as
follows: follows:
+---x tpm20-challenge-response-attestation {taa: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 tpm20-pcr-selection* [] | +---w tpm20-pcr-selection* []
| | +---w TPM20-hash-algo? identityref | | +---w TPM20-hash-algo? identityref
| | +---w pcr-index* tpm:pcr | | +---w pcr-index* tpm:pcr
| +---w certificate-name* certificate-name-ref {tpm:TPMs}? | +---w certificate-name* certificate-name-ref {tpm:TPMs}?
+--ro output +--ro output
+--ro tpm20-attestation-response* [] +--ro tpm20-attestation-response* []
+--ro certificate-name certificate-name-ref +--ro certificate-name certificate-name-ref
+--ro TPMS_QUOTE_INFO binary +--ro TPMS_QUOTE_INFO binary
+--ro quote-signature? binary +--ro quote-signature? binary
+--ro up-time? uint32 +--ro up-time? uint32
+--ro unsigned-pcr-values* [] +--ro unsigned-pcr-values* []
+--ro TPM20-hash-algo? identityref +--ro TPM20-hash-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
An example of an RPC challenge requesting PCRs 0-7 from a SHA256 bank An example of an RPC challenge requesting PCRs 0-7 from a SHA256 bank
could look like the following: could look like the following:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<tpm20-challenge-response-attestation> <tpm20-challenge-response-attestation>
xmlns="urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation"> xmlns="urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation">
<nonce>110101010110011011111001010010100</nonce> <nonce>110101010110011011111001010010100</nonce>
<tpm20-pcr-selection> <tpm20-pcr-selection>
<TPM20-hash-algo <TPM20-hash-algo
skipping to change at page 8, line 5 skipping to change at page 8, line 5
information relating to a device's TPM(s). information relating to a device's TPM(s).
container <tpms> - Provides configuration and operational details for container <tpms> - Provides configuration and operational details for
each supported TPM, including the tpm-firmware-version, PCRs which each supported TPM, including the tpm-firmware-version, PCRs which
may be quoted, certificates which are associated with that TPM, and may be quoted, certificates which are associated with that TPM, and
the current operational status. Of note is the certificates which the current operational status. Of note is the certificates which
are associated with that TPM. As a certificate is associated with a are associated with that TPM. As a certificate is associated with a
single Attestation key, knowledge of the certificate allows a single Attestation key, knowledge of the certificate allows a
specific TPM to be identified. specific TPM to be identified.
+--rw tpms +--rw tpms
+--rw tpm* [tpm-name] +--rw tpm* [tpm-name]
+--rw tpm-name string +--rw tpm-name string
+--ro hardware-based? boolean +--ro hardware-based? boolean
+--ro tpm-physical-index? int32 {ietfhw:entity-mib}? +--ro tpm-physical-index? int32 {ietfhw:entity-mib}?
+--ro tpm-path? string +--ro tpm-path? string
+--ro compute-node compute-node-ref {tpm:TPMs}? +--ro compute-node compute-node-ref {tpm:TPMs}?
+--ro tpm-manufacturer? string +--ro tpm-manufacturer? string
+--rw tpm-firmware-version identityref +--rw tpm-firmware-version identityref
+--rw TPM12-hash-algo? identityref +--rw TPM12-hash-algo? identityref
+--rw TPM12-pcrs* pcr +--rw TPM12-pcrs* pcr
+--rw tpm20-pcr-bank* [TPM20-hash-algo] +--rw tpm20-pcr-bank* [TPM20-hash-algo]
| +--rw TPM20-hash-algo identityref | +--rw TPM20-hash-algo identityref
| +--rw pcr-index* tpm:pcr | +--rw pcr-index* tpm:pcr
+--ro tpm-status enumeration +--ro tpm-status enumeration
+--rw certificates +--rw certificates
+--rw certificate* [certificate-name] +--rw certificate* [certificate-name]
+--rw certificate-name string +--rw certificate-name string
+--rw certificate-keystore-ref? -> /ks:keystore/asymmetric-keys/asymmetric-key/certificates/certificate/name +--rw certificate-keystore-ref? -> /ks:keystore/asymmetric-keys/asymmetric-key/certificates/certificate/name
+--rw certificate-type? enumeration +--rw certificate-type? enumeration
container <attester-supported-algos> - Identifies which TCG container <attester-supported-algos> - Identifies which TCG
algorithms are available for use the Attesting platform. This allows algorithms are available for use the Attesting platform. This allows
an operator to limit algorithms available for use by RPCs to just a an operator to limit algorithms available for use by RPCs to just a
desired set from the universe of all allowed by TCG. desired set from the universe of all allowed by TCG.
+--rw attester-supported-algos +--rw attester-supported-algos
+--rw tpm12-asymmetric-signing* identityref {taa:TPM12}? +--rw tpm12-asymmetric-signing* identityref {taa:TPM12}?
+--rw tpm12-hash* identityref {taa:TPM12}? +--rw tpm12-hash* identityref {taa:TPM12}?
+--rw tpm20-asymmetric-signing* identityref {taa:TPM20}? +--rw tpm20-asymmetric-signing* identityref {taa:TPM20}?
skipping to change at page 9, line 6 skipping to change at page 9, line 4
specific TPM to identify on which <compute-node> it belongs. specific TPM to identify on which <compute-node> it belongs.
+--rw compute-nodes {tpm:TPMs}? +--rw compute-nodes {tpm:TPMs}?
+--ro compute-node* [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
2.1.1.7. YANG Module 2.1.1.7. YANG Module
<CODE BEGINS> file ietf-tpm-remote-attestation@2020-12-17.yang
module ietf-tpm-remote-attestation {
namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation";
prefix "tpm";
<CODE BEGINS> file ietf-tpm-remote-attestation@2020-12-17.yang import ietf-yang-types {
module ietf-tpm-remote-attestation { prefix yang;
namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation"; }
prefix "tpm"; import ietf-hardware {
prefix ietfhw;
import ietf-yang-types { }
prefix yang; import ietf-keystore {
} prefix ks;
import ietf-hardware { }
prefix ietfhw; import ietf-tcg-algs {
} prefix taa;
import ietf-keystore { }
prefix ks;
}
import ietf-tcg-algs {
prefix taa;
}
organization
"IETF RATS (Remote ATtestation procedureS) Working Group";
contact organization
"WG Web : <http://datatracker.ietf.org/wg/rats/> "IETF RATS (Remote ATtestation procedureS) Working Group";
WG List : <mailto:rats@ietf.org>
Author : Eric Voit <evoit@cisco.com>
Author : Henk Birkholz <henk.birkholz@sit.fraunhofer.de>
Author : Michael Eckel <michael.eckel@sit.fraunhofer.de>
Author : Shwetha Bhandari <shwetha.bhandari@thoughtspot.com>
Author : Bill Sulzen <bsulzen@cisco.com>
Author : Liang Xia (Frank) <frank.xialiang@huawei.com>
Author : Tom Laffey <tom.laffey@hpe.com>
Author : Guy Fedorkow <gfedorkow@juniper.net>";
description contact
"A YANG module to enable a TPM 1.2 and TPM 2.0 based "WG Web : <http://datatracker.ietf.org/wg/rats/>
remote attestation procedure using a challenge-response WG List : <mailto:rats@ietf.org>
interaction model and the TPM 1.2 and TPM 2.0 Quote Author : Eric Voit <evoit@cisco.com>
primitive operations. Author : Henk Birkholz <henk.birkholz@sit.fraunhofer.de>
Author : Michael Eckel <michael.eckel@sit.fraunhofer.de>
Author : Shwetha Bhandari <shwetha.bhandari@thoughtspot.com>
Author : Bill Sulzen <bsulzen@cisco.com>
Author : Liang Xia (Frank) <frank.xialiang@huawei.com>
Author : Tom Laffey <tom.laffey@hpe.com>
Author : Guy Fedorkow <gfedorkow@juniper.net>";
Copyright (c) 2020 IETF Trust and the persons identified description
as authors of the code. All rights reserved. "A YANG module to enable a TPM 1.2 and TPM 2.0 based
remote attestation procedure using a challenge-response
interaction model and the TPM 1.2 and TPM 2.0 Quote
primitive operations.
Redistribution and use in source and binary forms, with Copyright (c) 2020 IETF Trust and the persons identified
or without modification, is permitted pursuant to, and as authors of the code. All rights reserved.
subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(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
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).
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-12-15" { revision "2021-03-16" {
description description
"Initial version"; "Initial version";
reference reference
"draft-ietf-rats-yang-tpm-charra"; "draft-ietf-rats-yang-tpm-charra";
} }
/*****************/ /*****************/
/* Features */ /* Features */
/*****************/ /*****************/
feature TPMs { feature TPMs {
description description
"The device supports the remote attestation of multiple "The device supports the remote attestation of multiple
TPM based cryptoprocessors."; TPM based cryptoprocessors.";
} }
/*****************/ feature bios {
/* Typedefs */ description
/*****************/ "The device supports the bios logs.";
reference
"https://trustedcomputinggroup.org/wp-content/uploads/
PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v51.pdf
Section 9.4.5.2";
}
typedef pcr { feature ima {
type uint8 { description
range "0..31"; "The device supports Integrity Measurement Architecture logs.";
} reference
description "https://www.trustedcomputinggroup.org/wp-content/uploads/
"Valid index number for a PCR. At this point 0-31 is viable."; TCG_IWG_CEL_v1_r0p30_13feb2021.pdf Section 4.3";
} }
typedef compute-node-ref { feature netequip_boot {
type leafref { description
path "/tpm:rats-support-structures/tpm:compute-nodes" + "The device supports the netequip_boot logs.";
"/tpm:compute-node/tpm:node-name";
}
description
"This type is used to reference a hardware node. It is quite
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 */ /* Typedefs */
/******************/ /*****************/
identity attested_event_log_type { typedef pcr {
description type uint8 {
"Base identity allowing categorization of the reasons why and range "0..31";
attested measurement has been taken on an Attester."; }
} description
"Valid index number for a PCR. At this point 0-31 is viable.";
}
identity ima { typedef compute-node-ref {
base attested_event_log_type; type leafref {
description path "/tpm:rats-support-structures/tpm:compute-nodes" +
"An event type recorded in IMA."; "/tpm:compute-node/tpm:node-name";
} }
description
"This type is used to reference a hardware node. It is quite
possible this leafref will eventually point to another YANG
module's node.";
}
identity bios { typedef certificate-name-ref {
base attested_event_log_type; type leafref {
description path "/tpm:rats-support-structures/tpm:tpms/tpm:tpm" +
"An event type associated with BIOS/UEFI."; "/tpm:certificates/tpm:certificate/tpm:certificate-name";
} }
description
"A type which allows identification of a TPM based certificate.";
}
identity netequip_boot { /******************/
base attested_event_log_type; /* Identities */
description /******************/
"An event type associated with Network Equipment Boot.";
}
/*****************/ identity attested_event_log_type {
/* Groupings */ description
/*****************/ "Base identity allowing categorization of the reasons why and
attested measurement has been taken on an Attester.";
}
grouping TPM20-asymmetric-signing-algo { identity ima {
description base attested_event_log_type;
"The signature scheme that is used to sign the TPM2 Quote description
information response."; "An event type recorded in IMA.";
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 {
base taa:asymmetric;
}
description
"The signature scheme that is used to sign the TPM2.0
Quote information response. This must be one of those
supported by a platform.";
default taa:TPM_ALG_RSA;
}
}
grouping TPM12-asymmetric-signing-algo { identity bios {
description base attested_event_log_type;
"The signature scheme that is used to sign the TPM12 Quote description
information response."; "An event type associated with BIOS/UEFI.";
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 {
base taa:asymmetric;
}
description
"The signature scheme that is used to sign the TPM1.2
Quote information response. This must be one of those
supported by a platform.";
default taa:TPM_ALG_RSA;
}
} identity netequip_boot {
base attested_event_log_type;
description
"An event type associated with Network Equipment Boot.";
}
grouping TPM20-hash-algo { /*****************/
description /* Groupings */
"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 { grouping TPM20-hash-algo {
description description
"The cryptographic algorithm used to hash the TPM1.2 PCRs."; "The cryptographic algorithm used to hash the TPM2 PCRs. This
leaf TPM12-hash-algo { must be from the list of platform supported options.";
must "/tpm:rats-support-structures/tpm:attester-supported-algos" leaf TPM20-hash-algo {
+ "/tpm:tpm12-hash" { type identityref {
error-message "Not a platform supported TPM12-hash-algo"; base taa:hash;
} }
type identityref { must "/tpm:rats-support-structures/tpm:attester-supported-algos"
base taa:hash; + "/tpm:tpm20-hash" {
} error-message "Not a platform supported TPM20-hash-algo";
description }
"The hash scheme that is used to hash a TPM1.2 PCR. This default taa:TPM_ALG_SHA256;
must be one of those supported by a platform. This assumes description
that an algorithm other than SHA1 can be supported on some "The hash scheme that is used to hash a TPM1.2 PCR. This
TPM1.2 cryptoprocessor variant."; must be one of those supported by a platform.";
default taa:TPM_ALG_SHA1; }
} }
}
grouping nonce { grouping TPM12-hash-algo {
description description
"A nonce to show freshness and to allow the detection "The cryptographic algorithm used to hash the TPM1.2 PCRs.";
of replay attacks."; leaf TPM12-hash-algo {
leaf nonce-value { type identityref {
type binary; base taa:hash;
mandatory true; }
description must "/tpm:rats-support-structures/tpm:attester-supported-algos"
"This nonce SHOULD be generated via a registered + "/tpm:tpm12-hash" {
cryptographic-strength algorithm. In consequence, error-message "Not a platform supported TPM12-hash-algo";
the length of the nonce depends on the hash algorithm
used. The algorithm used in this case is independent
from the hash algorithm used to create the hash-value
in the response of the attestor.";
}
}
grouping tpm12-pcr-selection { }
description default taa:TPM_ALG_SHA1;
"A Verifier can request one or more PCR values using its description
individually created Attestation Key Certificate (AC). "The hash scheme that is used to hash a TPM1.2 PCR. This
The corresponding selection filter is represented in this MUST be one of those supported by a platform. This assumes
grouping. that an algorithm other than SHA1 can be supported on some
Requesting a PCR value that is not in scope of the AC used, TPM1.2 cryptoprocessor variant.";
detailed exposure via error msg should be avoided."; }
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;
description
"The numbers/indexes of the PCRs. At the moment this is limited
to 32.";
}
}
grouping tpm20-pcr-selection { grouping nonce {
description description
"A Verifier can acquire one or more PCR values, which are hashed "A random number intended to be used once to show freshness
together in a TPM2B_DIGEST coming from the TPM2. The selection and to allow the detection of replay attacks.";
list of desired PCRs and the Hash Algorithm is represented in leaf nonce-value {
this grouping."; type binary;
list tpm20-pcr-selection { mandatory true;
unique "TPM20-hash-algo"; description
description "This nonce SHOULD be generated via a registered
"Specifies the list of PCRs and Hash Algorithms that can be cryptographic-strength algorithm. In consequence,
returned within a TPM2B_DIGEST."; the length of the nonce depends on the hash algorithm
reference used. The algorithm used in this case is independent
"https://www.trustedcomputinggroup.org/wp-content/uploads/ from the hash algorithm used to create the hash-value
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; in the response of the attestor.";
}
}
uses TPM20-hash-algo; grouping tpm12-pcr-selection {
leaf-list pcr-index { description
/* the following XPATH must be updated to ensure that only "A Verifier can request one or more PCR values using its
selectable PCRs are allowed in the RPC individually created Attestation Key Certificate (AC).
must "/tpm:rats-support-structures/tpm:tpms" + The corresponding selection filter is represented in this
"/tpm:tpm[tpm-name = current()]" + grouping.
"/tpm:tpm20-pcr-bank[pcr-index = current()]" { Requesting a PCR value that is not in scope of the AC used,
error-message "Acquiring this PCR index is not supported"; detailed exposure via error msg should be avoided.";
} leaf-list pcr-index {
*/ /* the following XPATH must be updated to ensure that only
type tpm:pcr; selectable PCRs are allowed in the RPC
description must "/tpm:rats-support-structures/tpm:tpms" +
"The numbers of the PCRs that which are being tracked "/tpm:tpm[tpm-name = current()]" +
with a hash based on the TPM20-hash-algo."; "/tpm:tpm[TPM12-pcrs = current()]" {
} error-message "Acquiring this PCR index is not supported";
} }
} */
type pcr;
description
"The numbers/indexes of the PCRs. At the moment this is limited
to 32.";
grouping certificate-name-ref { }
description }
"Identifies a certificate in a keystore.";
leaf certificate-name {
type certificate-name-ref;
description
"Identifies a certificate in a keystore.";
mandatory true;
}
}
grouping tpm-name { grouping tpm20-pcr-selection {
description description
"A unique TPM on a device."; "A Verifier can acquire one or more PCR values, which are hashed
leaf tpm-name { together in a TPM2B_DIGEST coming from the TPM2. The selection
type string; list of desired PCRs and the Hash Algorithm is represented in
description this grouping.";
"Unique system generated name for a TPM on a device."; list tpm20-pcr-selection {
} unique "TPM20-hash-algo";
} description
"Specifies the list of PCRs and Hash Algorithms that can be
returned within a TPM2B_DIGEST.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7";
uses TPM20-hash-algo;
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:tpm20-pcr-bank[pcr-index = current()]" {
error-message "Acquiring this PCR index is not supported";
}
*/
type tpm:pcr;
description
"The numbers of the PCRs that which are being tracked
with a hash based on the TPM20-hash-algo.";
}
}
}
grouping tpm-name-selector { grouping certificate-name-ref {
description description
"One or more TPM on a device."; "Identifies a certificate in a keystore.";
leaf-list tpm-name { leaf certificate-name {
type string; type certificate-name-ref;
config false; mandatory true;
description description
"Name of one or more unique TPMs on a device. If this object "Identifies a certificate in a keystore.";
exists, a selection should pull only the objects related to }
these TPM(s). If it does not exist, all qualifying TPMs that }
are 'hardware-based' equals true on the device are selected.";
}
}
grouping node-uptime { grouping tpm-name {
description description
"Uptime in seconds of the node."; "A unique TPM on a device.";
leaf up-time { leaf tpm-name {
type uint32; type string;
description description
"Uptime in seconds of this node reporting its data"; "Unique system generated name for a TPM on a device.";
} }
} }
grouping tpm12-attestation { grouping tpm-name-selector {
description description
"Contains an instance of TPM1.2 style signed cryptoprocessor "One or more TPM on a device.";
measurements. It is supplemented by unsigned Attester leaf-list tpm-name {
information."; type string;
uses node-uptime; config false;
leaf TPM_QUOTE2 { description
type binary; "Name of one or more unique TPMs on a device. If this object
description exists, a selection should pull only the objects related to
"Result of a TPM1.2 Quote2 operation. This includes PCRs, these TPM(s). If it does not exist, all qualifying TPMs that
signatures, locality, the provided nonce and other data which are 'hardware-based' equals true on the device are selected.";
can be further parsed to appraise the Attester."; }
reference }
"TPM1.2 commands rev116 July 2007, Section 16.5";
}
}
grouping tpm20-attestation { grouping node-uptime {
description description
"Contains an instance of TPM2 style signed cryptoprocessor "Uptime in seconds of the node.";
measurements. It is supplemented by unsigned Attester leaf up-time {
information."; type uint32;
leaf TPMS_QUOTE_INFO { description
mandatory true; "Uptime in seconds of this node reporting its data";
type binary; }
description }
"A hash of the latest PCR values (and the hash algorithm used)
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 {
type binary;
description
"Quote signature returned by TPM Quote. The signature was
generated using the key associated with the
certificate-name.";
}
uses node-uptime;
list unsigned-pcr-values {
description
"PCR values in each PCR bank. This might appear redundant with
the TPM2B_DIGEST, but that digest is calculated across multiple
PCRs. Having to verify across multiple PCRs does not
necessarily make it easy for a Verifier to appraise just the
minimum set of PCR information which has changed since the last
received TPM2B_DIGEST. Put another way, why should a Verifier
reconstruct the proper value of all PCR Quotes when only a
single PCR has changed?
To help this happen, if the Attester does know specific PCR grouping tpm12-attestation {
values, the Attester can provide these individual values via description
'unsigned-pcr-values'. By comparing this information to the "Contains an instance of TPM1.2 style signed cryptoprocessor
what has previously been validated, it is possible for a measurements. It is supplemented by unsigned Attester
Verifier to confirm the Attester's signature while eliminating information.";
significant processing."; uses node-uptime;
uses TPM20-hash-algo; leaf TPM_QUOTE2 {
list pcr-values { type binary;
key pcr-index; description
description "Result of a TPM1.2 Quote2 operation. This includes PCRs,
"List of one PCR bank."; signatures, locality, the provided nonce and other data which
leaf pcr-index { can be further parsed to appraise the Attester.";
type pcr; reference
description "TPM1.2 commands rev116 July 2007, Section 16.5";
"PCR index number."; }
} }
leaf pcr-value { grouping tpm20-attestation {
type binary; description
description "Contains an instance of TPM2 style signed cryptoprocessor
"PCR value."; measurements. It is supplemented by unsigned Attester
} information.";
} leaf TPMS_QUOTE_INFO {
} type binary;
} mandatory true;
description
"A hash of the latest PCR values (and the hash algorithm used)
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 {
type binary;
description
"Quote signature returned by TPM Quote. The signature was
generated using the key associated with the
certificate-name.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 11.2.1";
}
uses node-uptime;
list unsigned-pcr-values {
description
"PCR values in each PCR bank. This might appear redundant with
the TPM2B_DIGEST, but that digest is calculated across multiple
PCRs. Having to verify across multiple PCRs does not
necessarily make it easy for a Verifier to appraise just the
minimum set of PCR information which has changed since the last
received TPM2B_DIGEST. Put another way, why should a Verifier
reconstruct the proper value of all PCR Quotes when only a
single PCR has changed?
grouping log-identifier { To help this happen, if the Attester does know specific PCR
description values, the Attester can provide these individual values via
"Identifier for type of log to be retrieved."; 'unsigned-pcr-values'. By comparing this information to the
what has previously been validated, it is possible for a
Verifier to confirm the Attester's signature while eliminating
significant processing.";
uses TPM20-hash-algo;
list pcr-values {
key pcr-index;
description
"List of one PCR bank.";
leaf pcr-index {
type pcr;
description
"PCR index number.";
}
leaf pcr-value {
type binary;
description
"PCR value.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7";
}
}
}
}
leaf log-type { grouping log-identifier {
type identityref { description
base attested_event_log_type; "Identifier for type of log to be retrieved.";
} leaf log-type {
mandatory true; type identityref {
description base attested_event_log_type;
"The corresponding measurement log type identity."; }
} mandatory true;
} description
"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 "Defines an event log corresponding to the event that extended
the 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 taa:hash; base taa:hash;
} }
description description
"The hash scheme that is used to compress the event data in "The hash scheme that is used to compress the event data in
each of 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 using the algorithm of the
} 'hash-algo' against 'event data'.";
} }
leaf event-size { }
type uint32; leaf event-size {
description type uint32;
"Size of the event data"; description
} "Size of the event data";
leaf-list event-data { }
type uint8; leaf-list event-data {
description type uint8;
"The event data size determined by event-size"; description
} "The event data size determined by event-size";
} }
}
grouping bios-event-log { grouping bios-event-log {
description description
"Measurement log created by the BIOS/UEFI."; "Measurement log created by the BIOS/UEFI.";
list bios-event-entry { list bios-event-entry {
key event-number; key event-number;
description description
"Ordered list of TCG described event log "Ordered list of TCG described event log
that extended the PCRs in the order they that extended the PCRs in the order they
were logged"; were logged";
uses boot-event-log; uses boot-event-log;
} }
} }
grouping ima-event { 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 { reference
type uint64; "https://www.trustedcomputinggroup.org/wp-content/uploads/
description TCG_IWG_CEL_v1_r0p30_13feb2021.pdf Section 4.3";
"Unique number for this event for sequencing"; leaf event-number {
} type uint64;
leaf ima-template { description
type string; "Unique number for this event for sequencing";
description }
"Name of the template used for event logs leaf ima-template {
for e.g. ima, ima-ng, ima-sig"; type string;
} description
leaf filename-hint { "Name of the template used for event logs
type string; for e.g. ima, ima-ng, ima-sig";
description }
"File that was measured"; leaf filename-hint {
} type string;
leaf filedata-hash { description
type binary; "File that was measured";
description }
"Hash of filedata"; leaf filedata-hash {
} type binary;
leaf filedata-hash-algorithm { description
type string; "Hash of filedata";
description }
"Algorithm used for filedata-hash"; leaf filedata-hash-algorithm {
} type string;
leaf template-hash-algorithm { description
type string; "Algorithm used for filedata-hash";
description }
"Algorithm used for template-hash"; leaf template-hash-algorithm {
} type string;
leaf template-hash { description
type binary; "Algorithm used for template-hash";
description }
"hash(filedata-hash, filename-hint)"; leaf template-hash {
} type binary;
leaf pcr-index { description
type pcr; "hash(filedata-hash, filename-hint)";
description }
"Defines the PCR index that this event extended"; leaf pcr-index {
} type pcr;
leaf signature { description
type binary; "Defines the PCR index that this event extended";
description }
"The file signature"; leaf signature {
} type binary;
} description
"The file signature";
}
}
grouping ima-event-log { grouping ima-event-log {
description description
"Measurement log created by IMA."; "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 { grouping netequip-boot-event {
description description
"Defines an hash log extend event for Network Equipment Boot."; "Defines an hash log extend event for Network Equipment Boot.";
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 filename-hint { leaf filename-hint {
type string; type string;
description description
"File that was measured"; "File that was measured";
} }
leaf filedata-hash { leaf filedata-hash {
type binary; type binary;
description description
"Hash of filedata"; "Hash of filedata";
} }
leaf filedata-hash-algorithm { leaf filedata-hash-algorithm {
type string; type string;
description description
"Algorithm used for filedata-hash."; "Algorithm used for filedata-hash.";
} }
leaf file-version { leaf file-version {
type string; type string;
description description
"File version information."; "File version information.";
} }
leaf file-type { leaf file-type {
type string; type string;
description description
"Indicating at which boot stage the file is loaded, "Indicating at which boot stage the file is loaded,
such as BIOS, BootLoader, etc."; 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 leaf pcr-index {
"Measurement log created by Network Equipment Boot."; type pcr;
list boot-event-entry { description
key event-number; "Defines the PCR index that this event extended";
description }
"Ordered list of Network Equipment Boot event logs }
by event-number.";
uses netequip-boot-event;
}
}
grouping event-logs { grouping network-equipment-boot-event-log {
description description
"A selector for the log and its type."; "Measurement log created by Network Equipment Boot.";
choice attested_event_log_type { list boot-event-entry {
mandatory true; key event-number;
description description
"Event log type determines the event logs content."; "Ordered list of Network Equipment Boot event logs
case bios { by event-number.";
description uses netequip-boot-event;
"BIOS/UEFI event logs"; }
container bios-event-logs { }
description
"BIOS/UEFI event logs";
uses bios-event-log;
}
}
case ima {
description
"IMA event logs.";
container ima-event-logs {
description
"IMA event logs.";
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;
}
}
}
}
/**********************/ grouping event-logs {
/* RPC operations */ description
/**********************/ "A selector for the log and its type.";
choice attested_event_log_type {
mandatory true;
description
"Event log type determines the event logs content.";
case bios {
if-feature "bios";
description
"BIOS/UEFI event logs";
container bios-event-logs {
description
"BIOS/UEFI event logs";
uses bios-event-log;
}
}
case ima {
if-feature "ima";
description
"IMA event logs.";
container ima-event-logs {
description
"IMA event logs.";
uses ima-event-log;
}
}
case netequip_boot {
if-feature "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 tpm12-challenge-response-attestation { /**********************/
if-feature "taa:TPM12"; /* RPC operations */
description /**********************/
"This RPC accepts the input for TSS TPM 1.2 commands made to the
attesting device.";
input {
container tpm12-attestation-challenge {
description
"This container includes every information element defined
in the reference challenge-response interaction model for
remote attestation. Corresponding values are based on
TPM 1.2 structure definitions";
uses tpm12-pcr-selection;
uses nonce;
leaf-list certificate-name {
if-feature "tpm:TPMs";
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).";
}
}
}
output {
list tpm12-attestation-response {
unique "certificate-name";
description
"The binary output of TPM 1.2 TPM_Quote/TPM_Quote2, including
the PCR selection and other associated attestation evidence
metadata";
uses certificate-name-ref {
description
"Certificate associated with this tpm12-attestation.";
}
uses tpm12-attestation;
}
}
}
rpc tpm20-challenge-response-attestation { rpc tpm12-challenge-response-attestation {
if-feature "taa:TPM20"; if-feature "taa:TPM12";
description description
"This RPC accepts the input for TSS TPM 2.0 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, input {
e.g. smart NICs, is still a TODO."; container tpm12-attestation-challenge {
input { description
container tpm20-attestation-challenge { "This container includes every information element defined
description in the reference challenge-response interaction model for
"This container includes every information element defined remote attestation. Corresponding values are based on
in the reference challenge-response interaction model for TPM 1.2 structure definitions";
remote attestation. Corresponding values are based on uses tpm12-pcr-selection;
TPM 2.0 structure definitions"; uses nonce;
uses nonce; leaf-list certificate-name {
uses tpm20-pcr-selection; if-feature "tpm:TPMs";
leaf-list certificate-name { type certificate-name-ref;
if-feature "tpm:TPMs"; must "/tpm:rats-support-structures/tpm:tpms" +
must "/tpm:rats-support-structures/tpm:tpms" + "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']" +
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']" + "/tpm:certificates/" +
"/tpm:certificates/" + "/tpm:certificate[certificate-name-ref=current()]" {
"/tpm:certificate[certificate-name-ref=current()]" { error-message "Not an available TPM1.2 AIK certificate.";
error-message "Not an available TPM2.0 AIK certificate."; }
} description
type certificate-name-ref; "When populated, the RPC will only get a Quote for the
description TPMs associated with these certificate(s).";
"When populated, the RPC will only get a Quote for the }
TPMs associated with the certificates."; }
} }
} output {
} list tpm12-attestation-response {
output { unique "certificate-name";
list tpm20-attestation-response { description
unique "certificate-name"; "The binary output of TPM 1.2 TPM_Quote/TPM_Quote2, including
description the PCR selection and other associated attestation evidence
"The binary output of TPM2b_Quote in one TPM chip of the metadata";
node which identified by node-id. An TPMS_ATTEST structure uses certificate-name-ref {
including a length, encapsulated in a signature"; description
uses certificate-name-ref { "Certificate associated with this tpm12-attestation.";
description }
"Certificate associated with this tpm20-attestation."; uses tpm12-attestation;
} }
uses tpm20-attestation; }
} }
}
}
rpc log-retrieval { rpc tpm20-challenge-response-attestation {
description if-feature "taa:TPM20";
"Logs Entries are either identified via indices or via providing description
the last line received. The number of lines returned can be "This RPC accepts the input for TSS TPM 2.0 commands of the
limited. The type of log is a choice that can be augmented."; managed device. ComponentIndex from the hardware manager YANG
input { module to refer to dedicated TPM in composite devices,
list log-selector { e.g. smart NICs, is still a TODO.";
description input {
"Selection of log entries to be reported."; container tpm20-attestation-challenge {
uses tpm-name-selector; description
choice index-type { "This container includes every information element defined
description in the reference challenge-response interaction model for
"Last log entry received, log index number, or timestamp."; remote attestation. Corresponding values are based on
case last-entry { TPM 2.0 structure definitions";
description uses nonce;
"The last entry of the log already retrieved."; uses tpm20-pcr-selection;
leaf last-entry-value { leaf-list certificate-name {
type binary; if-feature "tpm:TPMs";
description type certificate-name-ref;
"Content of an log event which matches 1:1 with a must "/tpm:rats-support-structures/tpm:tpms" +
unique event record contained within the log. Log "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']" +
entries subsequent to this will be passed to the "/tpm:certificates/" +
requester. Note: if log entry values are not unique, "/tpm:certificate[certificate-name-ref=current()]" {
this MUST return an error."; error-message "Not an available TPM2.0 AIK certificate.";
} }
} description
case index { "When populated, the RPC will only get a Quote for the
description TPMs associated with the certificates.";
"Numeric index of the last log entry retrieved, or }
zero."; }
leaf last-index-number { }
type uint64; output {
description list tpm20-attestation-response {
"The last numeric index number of a log entry. unique "certificate-name";
Zero means to start at the beginning of the log. description
Entries subsequent to this will be passed to the "The binary output of TPM2b_Quote in one TPM chip of the
requester."; node which identified by node-id. An TPMS_ATTEST structure
} including a length, encapsulated in a signature";
} uses certificate-name-ref {
case timestamp { description
leaf timestamp { "Certificate associated with this tpm20-attestation.";
type yang:date-and-time; }
description uses tpm20-attestation;
"Timestamp from which to start the extraction. The }
next log entry subsequent to this timestamp is to }
be sent."; }
}
description
"Timestamp from which to start the extraction.";
}
}
leaf log-entry-quantity {
type uint16;
description
"The number of log entries to be returned. If omitted, it
means all of them.";
}
}
uses log-identifier;
}
output { rpc log-retrieval {
container system-event-logs { description
description "Logs Entries are either identified via indices or via providing
"The requested data of the measurement event logs"; the last line received. The number of lines returned can be
limited. The type of log is a choice that can be augmented.";
input {
list log-selector {
description
"Selection of log entries to be reported.";
uses tpm-name-selector;
choice index-type {
description
"Last log entry received, log index number, or timestamp.";
case last-entry {
description
"The last entry of the log already retrieved.";
leaf last-entry-value {
type binary;
description
"Content of an log event which matches 1:1 with a
unique event record contained within the log. Log
entries subsequent to this will be passed to the
requester. Note: if log entry values are not unique,
this MUST return an error.";
}
}
case index {
description
"Numeric index of the last log entry retrieved, or
zero.";
leaf last-index-number {
type uint64;
description
"The last numeric index number of a log entry.
Zero means to start at the beginning of the log.
Entries subsequent to this will be passed to the
requester.";
}
}
case timestamp {
leaf timestamp {
type yang:date-and-time;
description
"Timestamp from which to start the extraction. The
next log entry subsequent to this timestamp is to
be sent.";
}
description
"Timestamp from which to start the extraction.";
}
}
leaf log-entry-quantity {
type uint16;
description
"The number of log entries to be returned. If omitted, it
means all of them.";
}
}
uses log-identifier;
}
list node-data { output {
unique "tpm-name"; container system-event-logs {
description description
"Event logs of a node in a distributed system "The requested data of the measurement event logs";
identified by the node name"; list node-data {
uses tpm-name; unique "tpm-name";
uses node-uptime; description
container log-result { "Event logs of a node in a distributed system
description identified by the node name";
"The requested entries of the corresponding log."; uses tpm-name;
uses event-logs; uses node-uptime;
} container log-result {
} description
} "The requested entries of the corresponding log.";
} 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.";
container compute-nodes { container compute-nodes {
if-feature "tpm:TPMs"; if-feature "tpm:TPMs";
description description
"Holds the set device subsystems/components in this composite "Holds the set device subsystems/components in this composite
device that support TPM operations."; device that support TPM operations.";
list compute-node { list compute-node {
key node-id; key node-id;
config false; config false;
min-elements 2; min-elements 2;
description description
"A component in this composite device that "A component within this composite device which
supports TPM operations."; supports TPM operations.";
leaf node-id { leaf node-id {
type string; type string;
description description
"ID of the compute node, such as Board Serial Number."; "ID of the compute node, such as Board Serial Number.";
} }
leaf node-physical-index { leaf node-physical-index {
if-feature ietfhw:entity-mib; if-feature ietfhw:entity-mib;
type int32 { type int32 {
range "1..2147483647"; range "1..2147483647";
} }
config false; config false;
description description
"The entPhysicalIndex for the compute node."; "The entPhysicalIndex for the compute node.";
reference reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
} }
leaf node-name { leaf node-name {
type string; type string;
description description
"Name of the compute node."; "Name of the compute node.";
} }
leaf node-location { leaf node-location {
type string; type string;
description description
"Location of the compute node, such as slot number."; "Location of the compute node, such as slot number.";
} }
} }
} }
container tpms { container tpms {
description description
"Holds the set of TPMs within an Attester."; "Holds the set of TPMs within an Attester.";
list tpm { list tpm {
key tpm-name; key tpm-name;
unique "tpm-path"; unique "tpm-path";
description description
"A list of TPMs in this composite device that RATS "A list of TPMs in this composite device that RATS
can be conducted with."; can be conducted with.";
uses tpm-name; uses tpm-name;
leaf hardware-based { leaf hardware-based {
type boolean; type boolean;
config false; config false;
description description
"Answers the question: is this TPM is a hardware based "Answers the question: is this TPM is a hardware based
TPM?"; TPM?";
} }
leaf tpm-physical-index { leaf tpm-physical-index {
if-feature ietfhw:entity-mib; if-feature ietfhw:entity-mib;
type int32 { type int32 {
range "1..2147483647"; range "1..2147483647";
} }
config false; config false;
description description
"The entPhysicalIndex for the TPM."; "The entPhysicalIndex for the TPM.";
reference reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
} }
leaf tpm-path { leaf tpm-path {
type string; type string;
config false; config false;
description description
"Path to a unique TPM on a device. This can change agross "Path to a unique TPM on a device. This can change across
reboots."; reboots.";
} }
leaf compute-node { leaf compute-node {
if-feature "tpm:TPMs"; if-feature "tpm:TPMs";
type compute-node-ref; type compute-node-ref;
config false; config false;
mandatory true; mandatory true;
description description
"When there is more that one TPM, this indicates for which "Indicates the compute node measured by this TPM.";
compute node this TPM services."; }
} leaf tpm-manufacturer {
leaf tpm-manufacturer { type string;
type string; config false;
config false; description
description "TPM manufacturer name.";
"TPM manufacturer name."; }
} leaf tpm-firmware-version {
leaf tpm-firmware-version { type identityref {
type identityref { base taa:cryptoprocessor;
base taa:cryptoprocessor; }
} mandatory true;
mandatory true; description
description "Identifies the cryptoprocessor API set supported. This
"Identifies the cryptoprocessor API set supported. This is automatically configured by the device and should not
cannot be configured. However it is referenced via XPATH be changed.";
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'";
uses TPM12-hash-algo { refine TPM12-hash-algo {
when "tpm-firmware-version = 'taa:tpm12'"; description
refine TPM12-hash-algo { "The hash algorithm overwrites the default used for PCRs
description on this TPM1.2 compliant cryptoprocessor.";
"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'";
leaf-list TPM12-pcrs { type pcr;
when "../tpm-firmware-version = 'taa:tpm12'"; description
type pcr; "The PCRs which may be extracted from this TPM1.2
description compliant cryptoprocessor.";
"The PCRs which may be extracted from this TPM1.2 }
compliant cryptoprocessor."; list tpm20-pcr-bank {
} when "../tpm-firmware-version = 'taa:tpm20'";
list tpm20-pcr-bank { key "TPM20-hash-algo";
when "../tpm-firmware-version = 'taa:tpm20'"; description
key "TPM20-hash-algo"; "Specifies the list of PCRs that may be extracted for
description a specific Hash Algorithm on this TPM2 compliant
"Specifies the list of PCRs that may be extracted for cryptoprocessor. A bank is a set of PCRs which are
a specific Hash Algorithm on this TPM2 compliant extended using a particular hash algorithm.";
cryptoprocessor. A bank is a set of PCRs which are reference
extended using a particular hash algorithm."; "https://www.trustedcomputinggroup.org/wp-content/uploads/
reference TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7";
"https://www.trustedcomputinggroup.org/wp-content/uploads/ leaf TPM20-hash-algo {
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; type identityref {
leaf TPM20-hash-algo { base taa:hash;
must "/tpm:rats-support-structures" }
+ "/tpm:attester-supported-algos" must "/tpm:rats-support-structures"
+ "/tpm:tpm20-hash" { + "/tpm:attester-supported-algos"
error-message "Not a platform supported TPM20-hash-algo"; + "/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
description one or more TPM2.0 PCRs.";
"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.";
} }
} leaf-list pcr-index {
description type tpm:pcr;
"Type of this certificate"; description
} "Defines what TPM2 PCRs are available to be extracted.";
} }
} }
} leaf tpm-status {
} type enumeration {
container attester-supported-algos { enum operational {
description value 0;
"Identifies which TPM algorithms are available for use on an description
attesting platform."; "The TPM currently is currently running normally and
leaf-list tpm12-asymmetric-signing { is ready to accept and process TPM quotes.";
if-feature "taa:TPM12"; reference
when "../../tpm:tpms" + "TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']"; Section 12";
type identityref { }
base taa:asymmetric; enum non-operational {
} value 1;
description description
"Platform Supported TPM12 asymmetric algorithms."; "TPM is in a state such as startup or shutdown which
} precludes the processing of TPM quotes.";
leaf-list tpm12-hash { }
if-feature "taa:TPM12"; }
when "../../tpm:tpms" + config false;
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']"; mandatory true;
type identityref { description
base taa:hash; "TPM chip self-test status.";
} }
description container certificates {
"Platform supported TPM12 hash algorithms."; description
} "The TPM's certificates, including EK certificates
leaf-list tpm20-asymmetric-signing { and AK certificates.";
if-feature "taa:TPM20"; list certificate {
when "../../tpm:tpms" + key "certificate-name";
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']"; description
type identityref { "Three types of certificates can be accessed via
base taa:asymmetric; this statement, including Initial Attestation
} Key Cert, Local Attestation Key Cert or
description Endorsement Key Cert.";
"Platform Supported TPM20 asymmetric algorithms."; leaf certificate-name {
} type string;
leaf-list tpm20-hash { description
if-feature "taa:TPM20"; "An arbitrary name uniquely identifying a certificate
when "../../tpm:tpms" + associated within key within a TPM.";
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']"; }
type identityref { leaf certificate-keystore-ref {
base taa:hash; type leafref {
} path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key"
description + "/ks:certificates/ks:certificate/ks:name";
"Platform supported TPM20 hash algorithms."; }
} description
} "A reference to a specific certificate of an
} asymmetric key in the Keystore.";
} /* Note: It is also possible to import a grouping which
<CODE ENDS> 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";
}
}
}
}
}
container attester-supported-algos {
description
"Identifies which TPM algorithms are available for use on an
attesting platform.";
leaf-list tpm12-asymmetric-signing {
when "../../tpm:tpms" +
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']";
if-feature "taa:TPM12";
type identityref {
base taa:asymmetric;
}
description
"Platform Supported TPM12 asymmetric algorithms.";
}
leaf-list tpm12-hash {
when "../../tpm:tpms" +
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']";
if-feature "taa:TPM12";
type identityref {
base taa:hash;
}
description
"Platform supported TPM12 hash algorithms.";
}
leaf-list tpm20-asymmetric-signing {
when "../../tpm:tpms" +
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']";
if-feature "taa:TPM20";
type identityref {
base taa:asymmetric;
}
description
"Platform Supported TPM20 asymmetric algorithms.";
}
leaf-list tpm20-hash {
when "../../tpm:tpms" +
"/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']";
if-feature "taa:TPM20";
type identityref {
base taa:hash;
}
description
"Platform supported TPM20 hash algorithms.";
}
}
}
}
<CODE ENDS>
2.1.2. ietf-tcg-algs 2.1.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. As a result this document has encoded the TCG Algorithm WGLC. As a result this document has encoded the TCG Algorithm
definitions of [TCG-Algos], revision 1.32. By including this full definitions of [TCG-Algos], revision 1.32. By including this full
table as a separate YANG file within this document, it is possible table as a separate YANG file within this document, it is possible
for other YANG models to leverage the contents of this model. for other YANG models to leverage the contents of this model.
skipping to change at page 33, line 7 skipping to change at page 32, line 33
The second are API specifications for tpms: <tpm12> and <tpm2>. The second are API specifications for tpms: <tpm12> and <tpm2>.
The third are specific algorithm types. Each algorithm type defines The third are specific algorithm types. Each algorithm type defines
what cryptographic functions may be supported, and on which type of what cryptographic functions may be supported, and on which type of
API specification. It is not required that an implementation of a API specification. It is not required that an implementation of a
specific TPM will support all algorithm types. The contents of each specific TPM will support all algorithm types. The contents of each
specific algorithm mirrors what is in Table 3 of [TCG-Algos]. specific algorithm mirrors what is in Table 3 of [TCG-Algos].
2.1.2.3. YANG Module 2.1.2.3. YANG Module
<CODE BEGINS> ietf-tcg-algs@2020-09-18.yang <CODE BEGINS> ietf-tcg-algs@2020-09-18.yang
module ietf-tcg-algs { module ietf-tcg-algs {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-tcg-algs"; namespace "urn:ietf:params:xml:ns:yang:ietf-tcg-algs";
prefix taa; prefix taa;
organization
"IETF RATS Working Group";
contact
"WG Web: <http://datatracker.ietf.org/wg/rats/>
WG List: <mailto:rats@ietf.org>
Author: Eric Voit <mailto:evoit@cisco.com>";
description
"This module defines a identities for asymmetric algorithms.
Copyright (c) 2020 IETF Trust and the persons identified
as authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with
or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all
capitals, as shown here.";
revision 2020-09-18 {
description
"Initial version";
reference
"RFC XXXX: tbd";
}
/*****************/
/* Features */
/*****************/
feature TPM12 {
description
"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 {
description
"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.";
}
/*****************/
/* Identities */
/*****************/
/* There needs to be collasping/verification of some of the identity
types between the various algorithm types listed below */
identity asymmetric {
description
"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 symmetric {
description
"A TCG recognized symmetric algorithm with only a private key.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity hash {
description
"A TCG recognized hash algorithm that compresses input data to
a digest value or indicates a method that uses a hash.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity signing {
description
"A TCG recognized signing algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity anonymous_signing {
description
"A TCG recognized anonymous signing algorithm.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity encryption_mode {
description
"A TCG recognized encryption mode.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity method {
description
"A TCG recognized method such as a mask generation function.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity object_type {
description
"A TCG recognized object type.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity cryptoprocessor {
description
"Base identity identifying a crytoprocessor.";
}
identity tpm12 {
if-feature "TPM12";
base cryptoprocessor;
description
"Supportable by a TPM1.2.";
reference
"TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf
TPM_ALGORITHM_ID values, page 18";
}
identity tpm20 {
if-feature "TPM12";
base cryptoprocessor;
description
"Supportable by a TPM2.";
reference
"TPM-Rev-2.0-Part-2-Structures-01.38.pdf
The TCG Algorithm Registry. Table 9";
}
identity TPM_ALG_RSA {
if-feature "TPM12 or TPM20";
base tpm12;
base tpm20;
base asymmetric;
base object_type;
description
"RSA algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
RFC 8017. ALG_ID: 0x0001";
}
identity TPM_ALG_TDES {
if-feature "TPM12";
base tpm12;
base symmetric;
description
"Block cipher with various key sizes (Triple Data Encryption
Algorithm, commonly called Triple Data Encryption Standard)
Note: was banned in TPM1.2 v94";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 18033-3. ALG_ID: 0x0003";
}
identity TPM_ALG_SHA1 {
if-feature "TPM12 or TPM20";
base hash;
base tpm12;
base tpm20;
description
"SHA1 algorithm - Deprecated due to insufficient cryptographic
protection. However it is still useful for hash algorithms
where protection is not required.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x0004";
}
identity TPM_ALG_HMAC {
if-feature "TPM12 or TPM20";
base tpm12;
base tpm20;
base hash;
base signing;
description
"Hash Message Authentication Code (HMAC) algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3,
ISO/IEC 9797-2 and RFC2014. ALG_ID: 0x0005";
}
identity TPM_ALG_AES {
if-feature "TPM12";
base tpm12;
base symmetric;
description
"The AES algorithm with various key sizes";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 18033-3. ALG_ID: 0x0006";
}
identity TPM_ALG_MGF1 {
if-feature "TPM20";
base tpm20;
base hash;
base method;
description
"hash-based mask-generation function";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3,
IEEE Std 1363-2000 and IEEE Std 1363a -2004.
ALG_ID: 0x0007";
}
identity TPM_ALG_KEYEDHASH {
if-feature "TPM20";
base tpm20;
base hash;
base object_type;
description
"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
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. . ALG_ID: 0x0008";
}
identity TPM_ALG_XOR {
if-feature "TPM12 or TPM20";
base tpm12;
base tpm20;
base hash;
base symmetric;
description
"The XOR encryption algorithm.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x000A";
}
identity TPM_ALG_SHA256 {
if-feature "TPM20";
base tpm20;
base hash;
description
"The SHA 256 algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x000B";
}
identity TPM_ALG_SHA384 {
if-feature "TPM20";
base tpm20;
base hash;
description
"The SHA 384 algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x000C";
}
identity TPM_ALG_SHA512 {
if-feature "TPM20";
base tpm20;
base hash;
description
"The SHA 512 algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x000D";
}
identity TPM_ALG_NULL {
if-feature "TPM20";
base tpm20;
description
"NULL algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x0010";
}
identity TPM_ALG_SM3_256 {
if-feature "TPM20";
base tpm20;
base hash;
description
"The SM3 hash algorithm.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
GM/T 0004-2012 - SM3_256. ALG_ID: 0x0012";
}
identity TPM_ALG_SM4 { organization
if-feature "TPM20"; "IETF RATS Working Group";
base tpm20;
base symmetric;
description
"SM4 symmetric block cipher";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
GB/T 32907-2016. ALG_ID: 0x0013";
} contact
"WG Web: <http://datatracker.ietf.org/wg/rats/>
WG List: <mailto:rats@ietf.org>
Author: Eric Voit <mailto:evoit@cisco.com>";
identity TPM_ALG_RSASSA { description
if-feature "TPM20"; "This module defines a identities for asymmetric algorithms.
base tpm20;
base asymmetric;
base signing;
description
"Signature algorithm defined in section 8.2 (RSASSAPKCS1-v1_5)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017.
ALG_ID: 0x0014";
} Copyright (c) 2020 IETF Trust and the persons identified
as authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with
or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all
capitals, as shown here.";
identity TPM_ALG_RSAES { revision 2020-09-18 {
if-feature "TPM20"; description
base tpm20; "Initial version";
base asymmetric; reference
base encryption_mode; "RFC XXXX: tbd";
description }
"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";
} /*****************/
/* Features */
/*****************/
identity TPM_ALG_RSAPSS { feature TPM12 {
if-feature "TPM20"; description
base tpm20; "This feature indicates algorithm support for the TPM 1.2 API
base asymmetric; as per TPM-main-1.2-Rev94-part-2, Section 4.8.";
base signing; }
description
"Padding algorithm defined in section 8.1 (RSASSA PSS)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017.
ALG_ID: 0x0016";
} feature TPM20 {
description
"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.";
}
identity TPM_ALG_OAEP { /*****************/
if-feature "TPM20"; /* Identities */
base tpm20; /*****************/
base asymmetric;
base encryption_mode;
description
"Padding algorithm defined in section 7.1 (RSASSA OAEP)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017.
ALG_ID: 0x0017";
} /* There needs to be collasping/verification of some of the identity
types between the various algorithm types listed below */
identity TPM_ALG_ECDSA { identity asymmetric {
if-feature "TPM20"; description
base tpm20; "A TCG recognized asymmetric algorithm with a public and
base asymmetric; private key.";
base signing; reference
description "http://trustedcomputinggroup.org/resource/tcg-algorithm-registry/
"Signature algorithm using elliptic curve cryptography (ECC)"; TCG_Algorithm_Registry_r1p32_pub Table 2";
reference }
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 14888-3. ALG_ID: 0x0018";
} identity symmetric {
description
"A TCG recognized symmetric algorithm with only a private key.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity TPM_ALG_ECDH { identity hash {
if-feature "TPM20"; description
base tpm20; "A TCG recognized hash algorithm that compresses input data to
base asymmetric; a digest value or indicates a method that uses a hash.";
base method; reference
description "TCG_Algorithm_Registry_r1p32_pub Table 2";
"Secret sharing using ECC"; }
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-56A and RFC 7748. ALG_ID: 0x0019";
} identity signing {
description
"A TCG recognized signing algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity TPM_ALG_ECDAA { identity anonymous_signing {
if-feature "TPM20"; description
base tpm20; "A TCG recognized anonymous signing algorithm.";
base asymmetric; reference
base signing; "TCG_Algorithm_Registry_r1p32_pub Table 2";
base anonymous_signing; }
description
"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 encryption_mode {
description
"A TCG recognized encryption mode.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 2";
}
identity TPM_ALG_SM2 { identity method {
if-feature "TPM20"; description
base tpm20; "A TCG recognized method such as a mask generation function.";
base asymmetric; reference
base signing; "TCG_Algorithm_Registry_r1p32_pub Table 2";
base encryption_mode;
base method;
description
"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 TPM_ALG_ECSCHNORR { identity object_type {
if-feature "TPM20"; description
base tpm20; "A TCG recognized object type.";
base asymmetric; reference
base signing; "TCG_Algorithm_Registry_r1p32_pub Table 2";
description }
"Elliptic-curve based Schnorr signature";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x001C";
} identity cryptoprocessor {
description
"Base identity identifying a crytoprocessor.";
}
identity TPM_ALG_ECMQV { identity tpm12 {
if-feature "TPM20"; if-feature "TPM12";
base tpm20; base cryptoprocessor;
base asymmetric; description
base method; "Supportable by a TPM1.2.";
description reference
"Two-phase elliptic-curve key"; "TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf
reference TPM_ALGORITHM_ID values, page 18";
"TCG_Algorithm_Registry_r1p32_pub Table 3 and }
NIST SP800-56A. ALG_ID: 0x001D";
} identity tpm20 {
if-feature "TPM12";
base cryptoprocessor;
description
"Supportable by a TPM2.";
reference
"TPM-Rev-2.0-Part-2-Structures-01.38.pdf
The TCG Algorithm Registry. Table 9";
}
identity TPM_ALG_KDF1_SP800_56A { identity TPM_ALG_RSA {
if-feature "TPM20"; if-feature "TPM12 or TPM20";
base tpm20; base tpm12;
base hash; base tpm20;
base method; base asymmetric;
description base object_type;
"Concatenation key derivation function"; description
reference "RSA algorithm";
"TCG_Algorithm_Registry_r1p32_pub Table 3 and reference
NIST SP800-56A (approved alternative1) section 5.8.1. "TCG_Algorithm_Registry_r1p32_pub Table 3 and
RFC 8017. ALG_ID: 0x0001";
}
ALG_ID: 0x0020"; identity TPM_ALG_TDES {
if-feature "TPM12";
base tpm12;
base symmetric;
description
"Block cipher with various key sizes (Triple Data Encryption
Algorithm, commonly called Triple Data Encryption Standard)
Note: was banned in TPM1.2 v94";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 18033-3. ALG_ID: 0x0003";
}
} identity TPM_ALG_SHA1 {
if-feature "TPM12 or TPM20";
base hash;
base tpm12;
base tpm20;
description
"SHA1 algorithm - Deprecated due to insufficient cryptographic
protection. However it is still useful for hash algorithms
where protection is not required.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x0004";
}
identity TPM_ALG_KDF2 { identity TPM_ALG_HMAC {
if-feature "TPM20"; if-feature "TPM12 or TPM20";
base tpm20; base tpm12;
base hash; base tpm20;
base method; base hash;
description base signing;
"Key derivation function"; description
reference "Hash Message Authentication Code (HMAC) algorithm";
"TCG_Algorithm_Registry_r1p32_pub Table 3 and reference
IEEE 1363a-2004 KDF2 section 13.2. ALG_ID: 0x0021"; "TCG_Algorithm_Registry_r1p32_pub Table 3,
ISO/IEC 9797-2 and RFC2014. ALG_ID: 0x0005";
}
} identity TPM_ALG_AES {
if-feature "TPM12";
base tpm12;
base symmetric;
description
"The AES algorithm with various key sizes";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 18033-3. ALG_ID: 0x0006";
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_MGF1 {
if-feature "TPM20";
base tpm20;
base hash;
base method;
description
"hash-based mask-generation function";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3,
IEEE Std 1363-2000 and IEEE Std 1363a -2004.
ALG_ID: 0x0007";
}
identity TPM_ALG_ECC { identity TPM_ALG_KEYEDHASH {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base asymmetric; base hash;
base object_type; base object_type;
description description
"Prime field ECC"; "An encryption or signing algorithm using a keyed hash. These
reference may use XOR for encryption or an HMAC for signing and may
"TCG_Algorithm_Registry_r1p32_pub Table 3 and also refer to a data object that is neither signing nor
ISO/IEC 15946-1. ALG_ID: 0x0023"; encrypting.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. . ALG_ID: 0x0008";
}
} identity TPM_ALG_XOR {
if-feature "TPM12 or TPM20";
base tpm12;
base tpm20;
base hash;
base symmetric;
description
"The XOR encryption algorithm.";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x000A";
}
identity TPM_ALG_SYMCIPHER { identity TPM_ALG_SHA256 {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
description base hash;
"Object type for a symmetric block cipher"; description
reference "The SHA 256 algorithm";
"TCG_Algorithm_Registry_r1p32_pub Table 3 and reference
TCG TPM 2.0 library specification. ALG_ID: 0x0025"; "TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x000B";
}
} identity TPM_ALG_SHA384 {
if-feature "TPM20";
base tpm20;
base hash;
description
"The SHA 384 algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10118-3. ALG_ID: 0x000C";
}
identity TPM_ALG_CAMELLIA { identity TPM_ALG_SHA512 {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base hash;
description description
"The Camellia algorithm"; "The SHA 512 algorithm";
reference reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and "TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 18033-3. ALG_ID: 0x0026"; ISO/IEC 10118-3. ALG_ID: 0x000D";
}
} identity TPM_ALG_NULL {
if-feature "TPM20";
base tpm20;
description
"NULL algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
TCG TPM 2.0 library specification. ALG_ID: 0x0010";
}
identity TPM_ALG_SHA3_256 { identity TPM_ALG_SM3_256 {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base hash; base hash;
description description
"ISO/IEC 10118-3 - the SHA 256 algorithm"; "The SM3 hash algorithm.";
reference reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and "TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST PUB FIPS 202. ALG_ID: 0x0027"; GM/T 0004-2012 - SM3_256. ALG_ID: 0x0012";
}
identity TPM_ALG_SM4 {
if-feature "TPM20";
base tpm20;
base symmetric;
description
"SM4 symmetric block cipher";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
GB/T 32907-2016. ALG_ID: 0x0013";
}
} identity TPM_ALG_RSASSA {
if-feature "TPM20";
base tpm20;
base asymmetric;
base signing;
description
"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 TPM_ALG_SHA3_384 { identity TPM_ALG_RSAES {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base hash; base asymmetric;
description base encryption_mode;
"The SHA 384 algorithm"; description
reference "Signature algorithm defined in section 7.2 (RSAES-PKCS1-v1_5)";
"TCG_Algorithm_Registry_r1p32_pub Table 3 and reference
NIST PUB FIPS 202. ALG_ID: 0x0028"; "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017
ALG_ID: 0x0015";
}
} identity TPM_ALG_RSAPSS {
if-feature "TPM20";
base tpm20;
base asymmetric;
base signing;
description
"Padding algorithm defined in section 8.1 (RSASSA PSS)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017.
ALG_ID: 0x0016";
}
identity TPM_ALG_SHA3_512 { identity TPM_ALG_OAEP {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base hash; base asymmetric;
description base encryption_mode;
"The SHA 512 algorithm"; description
reference "Padding algorithm defined in section 7.1 (RSASSA OAEP)";
"TCG_Algorithm_Registry_r1p32_pub Table 3 and reference
NIST PUB FIPS 202. ALG_ID: 0x0029"; "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017.
ALG_ID: 0x0017";
}
} identity TPM_ALG_ECDSA {
if-feature "TPM20";
base tpm20;
base asymmetric;
base signing;
description
"Signature algorithm using elliptic curve cryptography (ECC)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 14888-3. ALG_ID: 0x0018";
}
identity TPM_ALG_CMAC { identity TPM_ALG_ECDH {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base asymmetric;
base signing; base method;
description description
"block Cipher-based Message Authentication Code (CMAC)"; "Secret sharing using ECC";
reference reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and "TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 9797-1:2011 Algorithm 5. ALG_ID: 0x003F"; NIST SP800-56A and RFC 7748. ALG_ID: 0x0019";
}
} identity TPM_ALG_ECDAA {
if-feature "TPM20";
base tpm20;
base asymmetric;
base signing;
base anonymous_signing;
description
"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 TPM_ALG_SM2 {
if-feature "TPM20";
base tpm20;
base asymmetric;
base signing;
base encryption_mode;
base method;
description
"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 TPM_ALG_CTR { identity TPM_ALG_ECSCHNORR {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base asymmetric;
base encryption_mode; base signing;
description description
"Counter mode"; "Elliptic-curve based Schnorr signature";
reference reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and "TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0040"; TCG TPM 2.0 library specification. ALG_ID: 0x001C";
}
} identity TPM_ALG_ECMQV {
if-feature "TPM20";
base tpm20;
base asymmetric;
base method;
description
"Two-phase elliptic-curve key";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-56A. ALG_ID: 0x001D";
}
identity TPM_ALG_OFB { identity TPM_ALG_KDF1_SP800_56A {
base tpm20; if-feature "TPM20";
base symmetric; base tpm20;
base encryption_mode; base hash;
description base method;
"Output Feedback mode"; description
reference "Concatenation key derivation function";
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0041";
} reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-56A (approved alternative1) section 5.8.1.
ALG_ID: 0x0020";
}
identity TPM_ALG_CBC { identity TPM_ALG_KDF2 {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base hash;
base encryption_mode; base method;
description description
"Cipher Block Chaining mode"; "Key derivation function";
reference reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and "TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0042"; IEEE 1363a-2004 KDF2 section 13.2. ALG_ID: 0x0021";
}
} 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_CFB { identity TPM_ALG_ECC {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base asymmetric;
base encryption_mode; base object_type;
description description
"Cipher Feedback mode"; "Prime field ECC";
reference reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and "TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0043"; ISO/IEC 15946-1. ALG_ID: 0x0023";
}
} identity TPM_ALG_SYMCIPHER {
if-feature "TPM20";
base tpm20;
description
"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 TPM_ALG_CAMELLIA {
if-feature "TPM20";
base tpm20;
base symmetric;
description
"The Camellia algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 18033-3. ALG_ID: 0x0026";
}
identity TPM_ALG_ECB { identity TPM_ALG_SHA3_256 {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base hash;
base encryption_mode; description
description "ISO/IEC 10118-3 - the SHA 256 algorithm";
"Electronic Codebook mode"; reference
reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and
"TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST PUB FIPS 202. ALG_ID: 0x0027";
ISO/IEC 10116. ALG_ID: 0x0044"; }
} identity TPM_ALG_SHA3_384 {
if-feature "TPM20";
base tpm20;
base hash;
description
"The SHA 384 algorithm";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST PUB FIPS 202. ALG_ID: 0x0028";
}
identity TPM_ALG_CCM { identity TPM_ALG_SHA3_512 {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base hash;
base signing; description
base encryption_mode; "The SHA 512 algorithm";
description reference
"Counter with Cipher Block Chaining-Message Authentication "TCG_Algorithm_Registry_r1p32_pub Table 3 and
Code (CCM)"; NIST PUB FIPS 202. ALG_ID: 0x0029";
reference }
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38C. ALG_ID: 0x0050";
} identity TPM_ALG_CMAC {
if-feature "TPM20";
base tpm20;
base symmetric;
base signing;
description
"block Cipher-based Message Authentication Code (CMAC)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 9797-1:2011 Algorithm 5. ALG_ID: 0x003F";
}
identity TPM_ALG_GCM { identity TPM_ALG_CTR {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base symmetric;
base signing; base encryption_mode;
base encryption_mode; description
description "Counter mode";
"Galois/Counter Mode (GCM)"; reference
reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and
"TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10116. ALG_ID: 0x0040";
NIST SP800-38D. ALG_ID: 0x0051"; }
} 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_KW { identity TPM_ALG_CBC {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base symmetric;
base signing; base encryption_mode;
base encryption_mode; description
description "Cipher Block Chaining mode";
"AES Key Wrap (KW)"; reference
reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and
"TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10116. ALG_ID: 0x0042";
NIST SP800-38F. ALG_ID: 0x0052"; }
} identity TPM_ALG_CFB {
if-feature "TPM20";
base tpm20;
base symmetric;
base encryption_mode;
description
"Cipher Feedback mode";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
ISO/IEC 10116. ALG_ID: 0x0043";
}
identity TPM_ALG_KWP { identity TPM_ALG_ECB {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base symmetric;
base signing; base encryption_mode;
base encryption_mode; description
description "Electronic Codebook mode";
"AES Key Wrap with Padding (KWP)"; reference
reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and
"TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10116. ALG_ID: 0x0044";
NIST SP800-38F. ALG_ID: 0x0053"; }
} identity TPM_ALG_CCM {
if-feature "TPM20";
base tpm20;
base symmetric;
base signing;
base encryption_mode;
description
"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 TPM_ALG_EAX { identity TPM_ALG_GCM {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base symmetric; base symmetric;
base signing; base signing;
base encryption_mode; base encryption_mode;
description description
"Authenticated-Encryption Mode"; "Galois/Counter Mode (GCM)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38D. ALG_ID: 0x0051";
}
reference identity TPM_ALG_KW {
"TCG_Algorithm_Registry_r1p32_pub Table 3 and if-feature "TPM20";
NIST SP800-38F. ALG_ID: 0x0054"; base tpm20;
base symmetric;
base signing;
base encryption_mode;
description
"AES Key Wrap (KW)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38F. ALG_ID: 0x0052";
}
} identity TPM_ALG_KWP {
if-feature "TPM20";
base tpm20;
base symmetric;
base signing;
base encryption_mode;
description
"AES Key Wrap with Padding (KWP)";
reference
"TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38F. ALG_ID: 0x0053";
}
identity TPM_ALG_EDDSA { identity TPM_ALG_EAX {
if-feature "TPM20"; if-feature "TPM20";
base tpm20; base tpm20;
base asymmetric; base symmetric;
base signing; base signing;
description base encryption_mode;
"Edwards-curve Digital Signature Algorithm (PureEdDSA)"; description
reference "Authenticated-Encryption Mode";
"TCG_Algorithm_Registry_r1p32_pub Table 3 and reference
RFC 8032. ALG_ID: 0x0060"; "TCG_Algorithm_Registry_r1p32_pub Table 3 and
NIST SP800-38F. ALG_ID: 0x0054";
}
} identity TPM_ALG_EDDSA {
if-feature "TPM20";
base tpm20;
base asymmetric;
base signing;
description
"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 Note that not all cryptographic functions are required for use by
ietf-tpm-remote-attestation.yang. However the full definition of ietf-tpm-remote-attestation.yang. However the full definition of
Table 3 of [TCG-Algos] will allow use by additional YANG Table 3 of [TCG-Algos] will allow use by additional YANG
specifications. specifications.
3. IANA considerations 3. IANA considerations
This document will include requests to IANA: This document will include requests to IANA:
skipping to change at page 49, line 10 skipping to change at page 47, line 40
There are a number of data nodes defined in this YANG module that are There are a number of data nodes defined in this YANG module that are
writable/creatable/deletable (i.e., config true, which is the writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive or vulnerable default). These data nodes may be considered sensitive or vulnerable
in some network environments. Write operations (e.g., edit-config) in some network environments. Write operations (e.g., edit-config)
to these data nodes without proper protection can have a negative to these data nodes without proper protection can have a negative
effect on network operations. These are the subtrees and data nodes effect on network operations. These are the subtrees and data nodes
and their sensitivity/vulnerability: and their sensitivity/vulnerability:
Container: </rats-support-structures/attester-supported-algos> Container: </rats-support-structures/attester-supported-algos>
o <tpm12-asymmetric-signing>, <tpm12-hash>, <tpm20-asymmetric- * <tpm12-asymmetric-signing>, <tpm12-hash>, <tpm20-asymmetric-
signing>, and <tpm20-hash> all could be populated with algorithms signing>, and <tpm20-hash> all could be populated with algorithms
which are not supported by the underlying physical TPM installed which are not supported by the underlying physical TPM installed
by the equipment vendor. by the equipment vendor.
Container: </rats-support-structures/tpms> Container: </rats-support-structures/tpms>
o <tpm-name> - Although shown as 'rw', it is system generated * <tpm-name> - Although shown as 'rw', it is system generated
o <tpm20-pcr-bank> - It is possible to configure PCRs for extraction * <tpm20-pcr-bank> - It is possible to configure PCRs for extraction
which are not being extended by system software. This could which are not being extended by system software. This could
unnecessarily use TPM resources. unnecessarily use TPM resources.
o <certificates> - It is possible to provision a certificate which * <certificates> - It is possible to provision a certificate which
does not correspond to a Attestation Identity Key (AIK) within the does not correspond to a Attestation Identity Key (AIK) within the
TPM. TPM.
RPC: <tpm12-challenge-response-attestation> - Need to verify that the RPC: <tpm12-challenge-response-attestation> - Need to verify that the
certificate is for an active AIK. certificate is for an active AIK.
RPC: <tpm20-challenge-response-attestation> - Need to verify that the RPC: <tpm20-challenge-response-attestation> - Need to verify that the
certificate is for an active AIK. certificate is for an active AIK.
RPC: <log-retrieval> - Pulling lots of logs can chew up system RPC: <log-retrieval> - Pulling lots of logs can chew up system
resources. resources.
5. Acknowledgements 5. Acknowledgements
Not yet. Not yet.
6. Change Log 6. Change Log
Changes from version 04 to version 05: Changes from version 04 to version 05:
o YANG Dr comments covered * YANG Dr comments covered
Changes from version 03 to version 04: Changes from version 03 to version 04:
o TPM1.2 Quote1 eliminated * TPM1.2 Quote1 eliminated
* YANG model simplifications so redundant info isn't exposed
o YANG model simplifications so redundant info isn't exposed
Changes from version 02 to version 03: Changes from version 02 to version 03:
o moved to tcg-algs * moved to tcg-algs
o cleaned up model to eliminate sources of errors * cleaned up model to eliminate sources of errors
o removed key establishment RPC * removed key establishment RPC
o added lots of XPATH which must all be scrubbed still * added lots of XPATH which must all be scrubbed still
o Descriptive text added on model contents. * 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 * Extracted Crypto-types into a separate YANG file
o Mades the algorithms explicit, not strings
o Hash Algo as key the selected TPM2 PCRs * Mades the algorithms explicit, not strings
o PCR numbers are their own type * Hash Algo as key the selected TPM2 PCRs
* PCR numbers are their own type
o Eliminated nested keys for node-id plus tpm-name * Eliminated nested keys for node-id plus tpm-name
o Eliminated TPM-Name of "ALL" * Eliminated TPM-Name of "ALL"
o Added TPM-Path * Added TPM-Path
Changes from version 00 to version 01: Changes from version 00 to version 01:
o Addressed author's comments * Addressed author's comments
o Extended complementary details about attestation-certificates * Extended complementary details about attestation-certificates
o Relabeled chunk-size to log-entry-quantity * Relabeled chunk-size to log-entry-quantity
o Relabeled location with compute-node or tpm-name where appropriate * Relabeled location with compute-node or tpm-name where appropriate
o Added a valid entity-mib physical-index to compute-node and tpm- * Added a valid entity-mib physical-index to compute-node and tpm-
name to map it back to hardware inventory name to map it back to hardware inventory
o Relabeled name to tpm_name * Relabeled name to tpm_name
o Removed event-string in last-entry * Removed event-string in last-entry
7. References 7. References
7.1. Normative References 7.1. Normative References
[I-D.ietf-netconf-keystore] [I-D.ietf-netconf-keystore]
Watsen, K., "A YANG Data Model for a Keystore", draft- Watsen, K., "A YANG Data Model for a Keystore", Work in
ietf-netconf-keystore-20 (work in progress), August 2020. Progress, Internet-Draft, draft-ietf-netconf-keystore-21,
10 February 2021, <https://www.ietf.org/archive/id/draft-
ietf-netconf-keystore-21.txt>.
[I-D.ietf-rats-architecture] [I-D.ietf-rats-architecture]
Birkholz, H., Thaler, D., Richardson, M., Smith, N., and Birkholz, H., Thaler, D., Richardson, M., Smith, N., and
W. Pan, "Remote Attestation Procedures Architecture", W. Pan, "Remote Attestation Procedures Architecture", Work
draft-ietf-rats-architecture-08 (work in progress), in Progress, Internet-Draft, draft-ietf-rats-architecture-
December 2020. 11, 30 March 2021, <https://www.ietf.org/archive/id/draft-
ietf-rats-architecture-11.txt>.
[I-D.ietf-rats-reference-interaction-models] [I-D.ietf-rats-reference-interaction-models]
Birkholz, H., Eckel, M., Newton, C., and L. Chen, Birkholz, H., Eckel, M., Newton, C., and L. Chen,
"Reference Interaction Models for Remote Attestation "Reference Interaction Models for Remote Attestation
Procedures", draft-ietf-rats-reference-interaction- Procedures", Work in Progress, Internet-Draft, draft-ietf-
models-01 (work in progress), October 2020. rats-reference-interaction-models-01, 23 October 2020,
<https://www.ietf.org/archive/id/draft-ietf-rats-
reference-interaction-models-01.txt>.
[I-D.ietf-rats-tpm-based-network-device-attest] [I-D.ietf-rats-tpm-based-network-device-attest]
Fedorkow, G., Voit, E., and J. Fitzgerald-McKay, "TPM- Fedorkow, G., Voit, E., and J. Fitzgerald-McKay, "TPM-
based Network Device Remote Integrity Verification", based Network Device Remote Integrity Verification", Work
draft-ietf-rats-tpm-based-network-device-attest-06 (work in Progress, Internet-Draft, draft-ietf-rats-tpm-based-
in progress), December 2020. network-device-attest-06, 7 December 2020,
<https://www.ietf.org/archive/id/draft-ietf-rats-tpm-
based-network-device-attest-06.txt>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
RFC 6991, DOI 10.17487/RFC6991, July 2013, RFC 6991, DOI 10.17487/RFC6991, July 2013,
<https://www.rfc-editor.org/info/rfc6991>. <https://www.rfc-editor.org/info/rfc6991>.
skipping to change at page 52, line 5 skipping to change at page 50, line 44
[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-Algos]
"TCG_Algorithm_Registry_r1p32_pub", n.d., "TCG_Algorithm_Registry_r1p32_pub", n.d.,
<hhttp://trustedcomputinggroup.org/resource/tcg-algorithm- <hhttp://trustedcomputinggroup.org/resource/tcg-algorithm-
registry/>. registry/>.
[TPM1.2] TCG, ., "TPM 1.2 Main Specification", October 2003, [TPM1.2] TCG, ., "TPM 1.2 Main Specification", 2 October 2003,
<https://trustedcomputinggroup.org/resource/tpm-main- <https://trustedcomputinggroup.org/resource/tpm-main-
specification/>. specification/>.
[TPM2.0] TCG, ., "TPM 2.0 Library Specification", March 2013, [TPM2.0] TCG, ., "TPM 2.0 Library Specification", 15 March 2013,
<https://trustedcomputinggroup.org/resource/tpm-library- <https://trustedcomputinggroup.org/resource/tpm-library-
specification/>. specification/>.
7.2. Informative References 7.2. Informative References
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>. <https://www.rfc-editor.org/info/rfc6241>.
skipping to change at page 52, line 37 skipping to change at page 51, line 27
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>. <https://www.rfc-editor.org/info/rfc8446>.
Authors' Addresses Authors' Addresses
Henk Birkholz Henk Birkholz
Fraunhofer SIT Fraunhofer SIT
Rheinstrasse 75 Rheinstrasse 75
Darmstadt 64295 64295 Darmstadt
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 64295 Darmstadt
Germany Germany
Email: michael.eckel@sit.fraunhofer.de Email: michael.eckel@sit.fraunhofer.de
Shwetha Bhandari Shwetha Bhandari
ThoughtSpot ThoughtSpot
Email: shwetha.bhandari@thoughtspot.com Email: shwetha.bhandari@thoughtspot.com
Eric Voit Eric Voit
Cisco Systems Cisco Systems
Email: evoit@cisco.com Email: evoit@cisco.com
Bill Sulzen Bill Sulzen
Cisco Systems Cisco Systems
Email: bsulzen@cisco.com Email: bsulzen@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
Email: tom.laffey@hpe.com Email: tom.laffey@hpe.com
Guy C. Fedorkow Guy C. Fedorkow
Juniper Networks Juniper Networks
10 Technology Park Drive 10 Technology Park Drive
Westford, Massachusetts 01886 Westford
Email: gfedorkow@juniper.net Email: gfedorkow@juniper.net
 End of changes. 170 change blocks. 
1846 lines changed or deleted 1790 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/