RATS Working Group H. Birkholz Internet-Draft M. Eckel Intended status: Standards Track Fraunhofer SIT Expires:December 26, 2020April 3, 2021 E. Voit S. Bhandari B. SulzenE. VoitCisco L. Xia Huawei T. Laffey HPE G. Fedorkow JuniperJune 24,September 30, 2020 A YANG Data Model for Challenge-Response-based Remote Attestation Procedures using TPMsdraft-ietf-rats-yang-tpm-charra-02draft-ietf-rats-yang-tpm-charra-03 Abstract This document defines a YANG RPC and a minimal datastoretreerequired to retrieve attestation evidence about integrity measurements from acompositedevicewith one or more roots of trust for reporting.following the operational context defined in [I-D.ietf-rats-tpm-based-network-device-attest]. Complementary measurement logs are also provided by the YANG RPC originating from one or more roots of trust of measurement. The module defined requires at least one TPM 1.2 or TPM 2.0 and corresponding Trusted Software Stack included in the device components of the composite device the YANG server is running on. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onDecember 26, 2020.April 3, 2021. Copyright Notice Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Requirements notation . . . . . . . . . . . . . . . . . . 3 2. The YANG Module for Basic Remote Attestation Procedures . . . 3 2.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 3 2.2. YANG Modules . . . . . . . . . . . . . . . . . . . . . .76 2.2.1. ietf-tpm-remote-attestation . . . . . . . . . . . . .7 2.3. ietf-asymmetric-algs6 2.2.2. ietf-tcg-algs . . . . . . . . . . . . . . . . . . .32. 35 3. IANA considerations . . . . . . . . . . . . . . . . . . . . .4251 4. Security Considerations . . . . . . . . . . . . . . . . . . .4251 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . .4252 6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . .4352 7. References . . . . . . . . . . . . . . . . . . . . . . . . .4353 7.1. Normative References . . . . . . . . . . . . . . . . . .4353 7.2. Informative References . . . . . . . . . . . . . . . . .4454 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .4455 1. Introduction This document is based on the terminology defined in the [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 interaction model and information elements defined inthe [I-D.birkholz-rats-reference-interaction-model] document.[I-D.birkholz-rats-reference-interaction-model]. The currently supported hardware security modules (HWM)- sometimes also referred to as an embedded secure element (eSE) - isare the Trusted Platform Module (TPM)version 1.2[TPM1.2] and2.0[TPM2.0] specified by the Trusted Computing Group (TCG). One ore more TPMs embedded in the components of a composite device - sometimes also referred to as an aggregate device - are required in order to use the YANG module defined in this document. A TPM is used as a root of trust for reporting (RTR) in order to retrieve attestation evidence from a composite device (quote primitive operation). Additionally, it is used as a root of trust for storage (RTS) in order to retain shielded secrets and store system measurements using a folding hash function (extend primitive operation). 1.1. Requirements notation 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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. 2. The YANG Module for Basic Remote Attestation Procedures One or more TPMs MUST be embedded in the composite device that is providing attestation evidence via the YANG module defined in this document. The ietf-basic-remote-attestation YANG module enables a composite device to take on the role of Claimant and Attester in accordance with the Remote Attestation Procedures (RATS) architecture [I-D.ietf-rats-architecture] and the corresponding challenge-response interaction model defined in the [I-D.birkholz-rats-reference-interaction-model] document. A fresh nonce with an appropriate amount of entropy MUST be supplied by the YANG client in order to enable a proof-of-freshness with respect to the attestation evidence provided by the attester running the YANG datastore. The functions of this YANG module are restricted to 0-1 TPMs per hardware component. 2.1. Tree Diagram module: ietf-tpm-remote-attestation +--rw rats-support-structures +--rwsupported-algos* identityrefcompute-nodes! | +--rocompute-nodes*compute-node* [node-id] | +--ro node-id string | +--ro node-physical-index? int32 {ietfhw:entity-mib}? | +--ro node-name? string | +--ro node-location? string +--rwtpms*tpms | +--rw tpm* [tpm-name] | +--rw tpm-name string | +--ro hardware-based? boolean | +--ro tpm-physical-index? int32 {ietfhw:entity-mib}? | +--ro tpm-path? string | +--ro compute-node compute-node-ref | +--ro tpm-manufacturer? string+--ro tpm-firmware-version? string +--ro tpm-specification-version| +--rw tpm-firmware-version identityref | +--rw TPM12-hash-algo? identityref | +--rw TPM12-pcrs* pcr | +--rw tpm20-pcr-bank* [TPM20-hash-algo] | | +--rw TPM20-hash-algo identityref | | +--rw pcr-index* tpm:pcr | +--rotpm-status? stringtpm-status enumeration | +--rw certificates | +--rw certificate* [certificate-name] | +--rw certificate-name string | +--rwcertificate-ref?certificate-keystore-ref? leafref | +--rw certificate-type? enumeration +--rw attester-supported-algos +--rw tpm12-asymmetric-signing* identityref {taa:TPM12}? +--rw tpm12-hash* identityref {taa:TPM12}? +--rw tpm20-asymmetric-signing* identityref {taa:TPM20}? +--rw tpm20-hash* identityref {taa:TPM20}? rpcs: +---x tpm12-challenge-response-attestation{TPM12}?{taa:TPM12}? | +---w input | | +---wtpm1-attestation-challengetpm12-attestation-challenge | | +---w pcr-index* pcr | | +---w nonce-value binary | | +---wTPM12_Algo? identityref | | +---w (key-identifier)? | | | +--:(public-key) | | | | +---w pub-key-id? binary | | | +--:(TSS_UUID) | | | +---w TSS_UUID-value | | | +---w ulTimeLow? uint32 | | | +---w usTimeMid? uint16 | | | +---w usTimeHigh? uint16 | | | +---w bClockSeqHigh? uint8 | | | +---w bClockSeqLow? uint8 | | | +---w rgbNode* uint8 | | +---wadd-version? boolean | | +---wtpm-name* stringcertificate-name* certificate-name-ref | +--ro output | +--ro tpm12-attestation-response* [] | +--ro certificate-name?stringcertificate-name-ref | +--ro up-time? uint32 | +--ro node-id? string | +--ro node-physical-index? int32 | | {ietfhw:entity-mib}? | +--ro fixed? binary | +--ro external-data? binary | +--ro signature-size? uint32 | +--ro signature? binary | +--ro (tpm12-quote) | +--:(tpm12-quote1) | | +--ro version* [] | | | +--ro major? uint8 | | | +--ro minor? uint8 | | | +--rorevMajor?rev-Major? uint8 | | | +--rorevMinor?rev-Minor? uint8 | | +--ro digest-value? binary | | +--ro TPM_PCR_COMPOSITE* [] | | +--ro pcr-index* pcr | | +--ro value-size? uint32 | | +--ro tpm12-pcr-value* binary | +--:(tpm12-quote2) | +--ro tag? uint8 | +--ro pcr-index* pcr | +--ro locality-at-release? uint8 | +--ro digest-at-release? binary +---x tpm20-challenge-response-attestation{TPM20}?{taa:TPM20}? | +---w input | | +---w tpm20-attestation-challenge | | +---w nonce-value binary | | +---wchallenge-objects*tpm20-pcr-selection* [] | |+---w pcr-list* [TPM2_Algo] | || +---wTPM2_AlgoTPM20-hash-algo? identityref | | | +---w pcr-index* tpm:pcr | | +---wTPM2_Algo? identityref | | +---w (key-identifier)? | | | +--:(public-key) | | | | +---w pub-key-id? binary | | | +--:(uuid) | | | +---w uuid-value? binary | | +---w tpm-name* stringcertificate-name* certificate-name-ref | +--ro output | +--ro tpm20-attestation-response* [] | +--ro certificate-name?stringcertificate-name-ref | +--ro TPMS_QUOTE_INFO binary | +--ro quote-signature? binary | +--ro up-time? uint32 | +--ro node-id? string | +--ro node-physical-index? int32| |{ietfhw:entity-mib}? | +--roquote? binary | +--ro quote-signature? binary | +--ro pcr-bank-values*unsigned-pcr-values* [] ||+--roTPM2_Algo?TPM20-hash-algo? identityref ||+--ro pcr-values* [pcr-index] ||+--ro pcr-index pcr ||+--ro pcr-value? binary| +--ro pcr-digest-algo-in-quote | +--ro TPM2_Algo? identityref +---x basic-trust-establishment | +---w input | | +---w nonce-value binary | | +---w TPM2_Algo? identityref | | +---w tpm-name* string | | +---w certificate-name? string | +--ro output | +--ro attestation-certificates* [] | +--ro attestation-certificate? ct:end-entity-cert-cms | +--ro (key-identifier)? | +--:(public-key) | | +--ro pub-key-id? binary | +--:(uuid) | +--ro uuid-value? binary+---x log-retrieval +---w input | +---w log-selector* [] | | +---w tpm-name* string | | +---w (index-type)? | | | +--:(last-entry) | | | | +---w last-entry-value? binary | | | +--:(index) | | | | +---w last-index-number? uint64 | | | +--:(timestamp) | | | +---w timestamp? yang:date-and-time | | +---w log-entry-quantity? uint16 | +---w log-type identityref +--ro output +--ro system-event-logs +--ro node-data* [] +--ro tpm-name? string +--ro up-time? uint32 +--rocertificate-name? string +--rolog-result +--ro(attested-event-log-type)(attested_event_log_type) +--:(bios) | +--ro bios-event-logs | +--ro bios-event-entry* [event-number] | +--ro event-number uint32 | +--ro event-type? uint32 | +--ro pcr-index? pcr | +--ro digest-list* [] | | +--ro hash-algo? identityref | | +--ro digest* binary | +--ro event-size? uint32 | +--ro event-data* uint8 +--:(ima) | +--ro ima-event-logs | +--ro ima-event-entry* [event-number] | +--ro event-number uint64 | +--ro ima-template? string | +--ro filename-hint? string | +--ro filedata-hash? binary | +--ro filedata-hash-algorithm? string | +--ro template-hash-algorithm? string | +--ro template-hash? binary | +--ro pcr-index? pcr | +--ro signature? binary +--:(netequip_boot) +--ro boot-event-logs +--ro boot-event-entry* [event-number] +--ro event-number uint64 +--ro filename-hint? string +--ro filedata-hash? binary +--ro filedata-hash-algorithm? string +--ro file-version? string +--ro file-type? string +--ro pcr-index? pcr 2.2. YANG Modules 2.2.1. ietf-tpm-remote-attestation This YANG module imports modules from [RFC6991], [RFC8348],[I-D.ietf-netconf-crypto-types], ietf-asymmetric-algs.yang.[I-D.ietf-netconf-keystore], ietf-tcg-algs.yang. 2.2.1.1. Identities This module supports the following types of attestation event logs: <ima>, <bios>, and <netequip_boot>. 2.2.1.2. RPCs <tpm12-challenge-response-attestation> - Allows a Verifier to request a quote of PCRs from a TPM1.2 compliant cryptoprocessor. When one or more <certificate-name> is not provided, all TPM1.2 compliant cryptoprocessors will respond. <tpm20-challenge-response-attestation> - Allows a Verifier to request a quote of PCRs from a TPM2.0 compliant cryptoprocessor. When one or more <certificate-name> is not provided, all TPM2.0 compliant cryptoprocessors will respond. <log-retrieval> - Allows a Verifier to acquire the evidence which was extended into specific PCRs. 2.2.1.3. Data Nodes container <rats-support-structures> - This exists when there are more than one TPM for a particular Attester. This allows each specific TPM to identify on which <compute-node> it belongs. container <tpms> - Provides configuration and operational details for each supported TPM, including the tpm-firmware-version, PCRs which may be quoted, certificates which are associated with that TPM, and the current operational status. Of note is the certificates which are associated with that TPM. As a certificate is associated with a single Attestation key, knowledge of the certificate allows a specific TPM to be identified. container <attester-supported-algos> - Identifies which TCG algorithms are available for use the Attesting platform. This allows an operator to limit algorithms available for use by RPCs to just a desired set from the universe of all allowed by TCG. 2.2.1.4. YANG Module <CODE BEGINS> fileietf-tpm-remote-attestation@2020-06-23.yangietf-tpm-remote-attestation@2020-09-18.yang module ietf-tpm-remote-attestation { namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation"; prefix "tpm"; import ietf-yang-types { prefix yang; } import ietf-hardware { prefix ietfhw; } importietf-crypto-types { prefix ct; } importietf-keystore { prefix ks; } importietf-asymmetric-algsietf-tcg-algs { prefixaa;taa; } organization "IETF RATS (Remote ATtestation procedureS) Working Group"; contact "WG Web : <http://datatracker.ietf.org/wg/rats/> 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 <shwethab@cisco.com> Author : Bill Sulzen <bsulzen@cisco.com> Author :Eric Voit <evoit@cisco.com> Author :Liang Xia (Frank) <frank.xialiang@huawei.com> Author : Tom Laffey <tom.laffey@hpe.com> Author : Guy Fedorkow <gfedorkow@juniper.net>"; description "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. 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). 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-06-23""2020-09-18" { description "Initial version"; reference "draft-ietf-rats-yang-tpm-charra"; } /*****************/ /*Features */ /*****************/ feature TPM12 { description "This feature indicates that an Attester includes cryptoprocessors capable of supporting the TPM 1.2 API."; } feature TPM20 { description "This feature indicates that an Attester includes cryptoprocessors capable of supporting the TPM 2 API."; } /*****************/ /*Typedefs */ /*****************/ typedef pcr { type uint8 { range "0..31"; } description "Valid index number for a PCR. At this point 0-31 is viable."; } typedef compute-node-ref { type leafref { path"/tpm:rats-support-structures/tpm:compute-nodes/tpm:node-name";"/tpm:rats-support-structures/tpm:compute-nodes" + "/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."; }/******************/ /* Identities */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 */ /******************/ identityattested-event-log-typeattested_event_log_type { description "Base identity allowing categorization of the reasons why and attested measurement has been taken on an Attester."; } identity ima { baseattested-event-log-type;attested_event_log_type; description "An event type recorded in IMA."; } identity bios { baseattested-event-log-type;attested_event_log_type; description "An event type associated with BIOS/UEFI."; } identitycryptoprocessor { description "Base identity identifying a crytoprocessor."; } identity tpm12 { base cryptoprocessor; description "A cryptoprocessor capable of supporting the TPM 1.2 API."; } identity tpm20netequip_boot { basecryptoprocessor;attested_event_log_type; description"A cryptoprocessor capable of supporting the TPM 2.0 API.";"An event type associated with Network Equipment Boot."; } /*****************/ /* Groupings */ /*****************/ groupingTPM2_AlgoTPM20-asymmetric-signing-algo { description "The signature scheme that is used to sign the TPM2 Quote information response."; leafTPM2_AlgoTPM20-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 { baseaa:tpm2-asymmetric-algorithm;taa:asymmetric; } description "The signature scheme that is used to sign theTPMTPM2.0 Quote informationresponse.";response. This must be one of those supported by a platform."; default taa:TPM_ALG_RSA; } } groupingTPM12_AlgoTPM12-asymmetric-signing-algo { description "The signature scheme that is used to sign theTPM2TPM12 Quote information response."; leafTPM12_AlgoTPM12-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 { baseaa:tpm12-asymmetric-algorithm;taa:asymmetric; } description "The signature scheme that is used to sign the TPM1.2 Quote informationresponse.";response. This must be one of those supported by a platform."; default taa:TPM_ALG_RSA; } } grouping TPM20-hash-algo { description "The cryptographic algorithm used to hash the TPM2 PCRs. This must be from the list of platform supported options."; leaf TPM20-hash-algo { must "/tpm:rats-support-structures/tpm:attester-supported-algos" + "/tpm:tpm20-hash" { error-message "Not a platform supported TPM20-hash-algo"; } type identityref { base taa:hash; } description "The hash scheme that is used to hash a TPM1.2 PCR. This must be one of those supported by a platform."; default taa:TPM_ALG_SHA256; } } grouping TPM12-hash-algo { description "The cryptographic algorithm used to hash the TPM1.2 PCRs."; leaf TPM12-hash-algo { must "/tpm:rats-support-structures/tpm:attester-supported-algos" + "/tpm:tpm12-hash" { error-message "Not a platform supported TPM12-hash-algo"; } type identityref { base taa:hash; } description "The hash scheme that is used to hash a TPM1.2 PCR. This must be one of those supported by a platform. This assumes that an algorithm other than SHA1 can be supported on some TPM1.2 cryptoprocessor variant."; default taa:TPM_ALG_SHA1; } } grouping nonce { description "A nonce to show freshness andcounter replays.";to allow the detection of replay attacks."; leaf nonce-value { type binary; mandatory true; description "This nonce SHOULD be generated via a registered cryptographic-strength algorithm. In consequence, 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 "A Verifier can request one or more PCR values using its individually created Attestation Key Certificate (AC). The corresponding selection filter is represented in this grouping. Requesting a PCR value that is not in scope of the AC used, 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 { description "A Verifier can acquire one or more PCR values, which are hashed together in a TPM2B_DIGEST coming from the TPM2. The selection list of desired PCRs and the Hash Algorithm is represented in this grouping."; listpcr-listtpm20-pcr-selection {key "TPM2_Algo";unique "TPM20-hash-algo"; description "Specifies the list of PCRs and Hash Algorithmsused for the latestthat 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"; usestpm:TPM2_Algo;TPM20-hash-algo; leaf-list pcr-index {type tpm:pcr; description "The numbers of the PCRs that are associated with the created key."; } } } grouping tpm12-attestation-key-identifier { description "A selector for a suitable key identifier for a TPM 1.2."; choice key-identifier { description "Identifier for/* theattestation keyfollowing XPATH must be updated touse for signing attestation evidence."; case public-key { leaf pub-key-id { type binary; description "The value of the identifier for the public key."; } } case TSS_UUID { description "Use a YANG agent generated (and maintained) attestation key UUID that complies with the TSS_UUID datatype of the TCG Software Stack (TSS) Specification, Version 1.10 Golden, August 20, 2003."; container TSS_UUID-value { description "A detailed structureensure thatis used to create the TPM 1.2 native TSS_UUID as definedonly selectable PCRs are allowed in theTCG Software Stack (TSS) Specification, Version 1.10 Golden, August 20, 2003."; leaf ulTimeLow { type uint32; description "The low field of the timestamp."; } leaf usTimeMid { type uint16; description "The middle field of the timestamp."; } leaf usTimeHighRPC must "/tpm:rats-support-structures/tpm:tpms" + "/tpm:tpm[tpm-name = current()]" + "/tpm:tpm20-pcr-bank[pcr-index = current()]" {type uint16; description "The high field of the timestamp multiplexed with the version number.";error-message "Acquiring this PCR index is not supported"; }leaf bClockSeqHigh {*/ typeuint8;tpm:pcr; description "Thehigh fieldnumbers of theclock sequence multiplexedPCRs that which are being tracked withthe variant."; } leaf bClockSeqLow { type uint8; description "The low field of the clock sequence."; } leaf-list rgbNode { type uint8; description "The spatially unique node identifier."; } } } } } grouping tpm20-attestation-key-identifier { description "A selector forasuitable key identifier."; choice key-identifier { description "Identifier for the attestation key to use for signing attestation evidence."; case public-key { leaf pub-key-id { type binary; description "The value of the identifier for the public key."; } } case uuid { description "Use a YANG agent generated (and maintained) attestation key UUID."; leaf uuid-value { type binary; description "The UUID identifyinghash based on thecorresponding public key."; }TPM20-hash-algo."; } } } groupingcertificate-namecertificate-name-ref { description"An arbitrary name for the identity"Identifies a certificatechain requested.";in a keystore."; leaf certificate-name { typestring;certificate-name-ref; description"An arbitrary name for the identity"Identifies a certificatechain requested.";in a keystore."; } } grouping tpm-name { description"Path to a"A unique TPM on a device."; leaf tpm-name { type string; description "Unique system generated name for a TPM on a device."; } } grouping tpm-name-selector { description "One or more TPM on a device."; leaf-list tpm-name { type string; config false; description "Name of one or more unique TPMs on a device. If this object 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 compute-node-identifier { description "In a distributed system with multiple compute nodes this is the node identified by name and physical-index."; leaf node-id { type string; description "ID of the compute node, such as Board Serial Number."; } leaf node-physical-index { if-feature ietfhw:entity-mib; type int32 { range "1..2147483647"; } config false; description "The entPhysicalIndex for the compute node."; reference "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; } } grouping tpm12-pcr-info-short { description "This structure is for defining a digest at release when the only information that is necessary is the release configuration."; uses tpm12-pcr-selection; leaf locality-at-release { type uint8; description "This SHALL be the locality modifier required to release the information (TPM 1.2 type TPM_LOCALITY_SELECTION)"; reference "TPM Main Part 2 TPM Structures v1.2 July 2007 Section 8.6"; } leaf digest-at-release { type binary; description "This SHALL be the digest of the PCR indices and PCR values to verify when revealing auth data (TPM 1.2 type TPM_COMPOSITE_HASH)."; reference "TPM Main Part 2 TPM Structures v1.2 July 2007 Section 5.4.1."; } } grouping tpm12-version { description "This structure provides information relative the version of the TPM."; list version { description "This indicates the version of the structure (TPM 1.2 type TPM_STRUCT_VER). This MUST be 1.1.0.0."; reference "TPM Main Part 2 TPM Structures v1.2 July 2007 Section 5.1."; leaf major { type uint8; description "Indicates the major version of the structure. MUST be 0x01."; } leaf minor { type uint8; description "Indicates the minor version of the structure. MUST be 0x01."; } leafrevMajorrev-Major { type uint8; description "Indicates the rev major version of the structure. MUST be 0x00."; } leafrevMinorrev-Minor { type uint8; description "Indicates the rev minor version of the structure. MUST be 0x00."; } } } grouping tpm12-quote-info-common { description "These statements areused in botwithin both quote variants of the TPM 1.2"; reference "TPM Main Part 2 TPM Structures v1.2 July 2007, Section 11.3 & 11.4."; leaf fixed { type binary; description "This SHALL always be the string 'QUOT' or 'QUO2' (length is 4 bytes)."; } leaf external-data { type binary; description "160 bits of externally supplied data, typically a nonce."; } leaf signature-size { type uint32; description "The size of TPM 1.2 'signature' value."; } leaf signature { type binary; description "Signature overSHA-1hash of tpm12-quote-info2'."; } } grouping tpm12-quote-info { description "This structure provides the mechanism for the TPM to quote the current values of a list of PCRs (as used by the TPM_Quote2 command)."; uses tpm12-version; leaf digest-value { type binary; description "This SHALL be the result of the composite hash algorithm using the current values of the requested PCR indices (TPM 1.2 type TPM_COMPOSITE_HASH.)"; } } grouping tpm12-quote-info2 { description "This structure provides the mechanism for the TPM to quote the current values of a list of PCRs (as used by the TPM_Quote2 command)."; leaf tag { type uint8; description "This SHALL be TPM_TAG_QUOTE_INFO2."; } uses tpm12-pcr-info-short; } grouping tpm12-cap-version-info { description "TPM returns the current version and revision of the TPM 1.2 ."; list TPM_PCR_COMPOSITE { description "The TPM 1.2 TPM_PCRVALUEs for the pcr-indices."; reference "TPM Main Part 2 TPM Structures v1.2 July 2007, Section 8.2"; uses tpm12-pcr-selection; leaf value-size { type uint32; description "This SHALL be the size of the 'tpm12-pcr-value' field (not the number of PCRs)."; } leaf-list tpm12-pcr-value { type binary; description "The list of TPM_PCRVALUEs from each PCR selected in sequence of tpm12-pcr-selection."; } list version-info { description "An optional output parameter from a TPM 1.2 TPM_Quote2."; leaf tag { type uint16; /* This should be converted into an ENUM */ description "The TPM 1.2 version and revision (TPM 1.2 type TPM_STRUCTURE_TAG). This MUST be TPM_CAP_VERSION_INFO (0x0030)"; } uses tpm12-version; leaf spec-level { type uint16; description "A number indicating the level of ordinals supported."; } leaf errata-rev { type uint8; description "A number indicating the errata version of the specification."; } leaf tpm-vendor-id { type binary; description "The vendor ID unique to each TPM manufacturer."; } leaf vendor-specific-size { type uint16; description "The size of the vendor-specific area."; } leaf vendor-specific { type binary; description "Vendor specific information."; } } } } grouping tpm12-pcr-composite { description "The actual values of the selected PCRs (a list of TPM_PCRVALUEs (binary) and associated metadata for TPM 1.2."; list TPM_PCR_COMPOSITE { description "The TPM 1.2 TPM_PCRVALUEs for the pcr-indices."; reference "TPM Main Part 2 TPM Structures v1.2 July 2007, Section 8.2"; uses tpm12-pcr-selection; leaf value-size { type uint32; description "This SHALL be the size of the 'tpm12-pcr-value' field (not the number of PCRs)."; } leaf-list tpm12-pcr-value { type binary; description "The list of TPM_PCRVALUEs from each PCR selected in sequence of tpm12-pcr-selection."; } } } grouping node-uptime { description "Uptime in seconds of the node."; leaf up-time { type uint32; description "Uptime in seconds of this node reporting its data"; } } grouping tpm12-attestation { description "Contains an instance of TPM1.2 style signed cryptoprocessor measurements. It is supplemented by unsigned Attester information."; usescertificate-name; usesnode-uptime; uses compute-node-identifier; uses tpm12-quote-info-common; choice tpm12-quote { mandatory true; description "Either a tpm12-quote-info or tpm12-quote-info2, depending on whether TPM_Quote or TPM_Quote2 was used (cf. input field add-verson)."; case tpm12-quote1 { description "BIOS/UEFI event logs"; uses tpm12-quote-info; uses tpm12-pcr-composite; } case tpm12-quote2 { description "BIOS/UEFI event logs"; uses tpm12-quote-info2; } } } grouping tpm20-attestation { description "Contains an instance of TPM2 style signed cryptoprocessor measurements. It is supplemented by unsigned Attester information.";uses certificate-name; uses node-uptime; uses compute-node-identifier;leafquoteTPMS_QUOTE_INFO { mandatory true; type binary; description"Quote data returned by TPM Quote, including PCR selection,"A hash of the latest PCRdigestvalues (and the hash algorithm used) which have been returned from a Verifier for the selected PCRs andetc.";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 TPMQuote.";Quote. The signature was generated using the key associated with the certificate-name."; } uses node-uptime; uses compute-node-identifier; listpcr-bank-valuesunsigned-pcr-values {/*description "PCR values in each PCR bank. This often should not be necessary for TPM2, as the raw informationif validatedneeding signature and hash validation willneed tobe coming from the 'quote'leaf */ description "PCR values in each PCR bank.";leaf"; usesTPM2_Algo;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."; } } }container pcr-digest-algo-in-quote { uses TPM2_Algo; description "The hash algorithm for PCR value digest in Quote output."; }} grouping log-identifier { description "Identifier for type of log to be retrieved."; leaf log-type { type identityref { baseattested-event-log-type;attested_event_log_type; } mandatory true; description "The corresponding measurement log type identity."; } } grouping boot-event-log { description "Defines an event log corresponding to the event that extended the PCR"; leaf event-number { type uint32; description "Unique event number of this event"; } leaf event-type { type uint32; description "log event type"; } leaf pcr-index { type pcr; description "Defines the PCR index that this event extended"; } list digest-list { description "Hash of event data"; leaf hash-algo { type identityref { baseaa:asymmetric-algorithm-type;taa:hash; } description "The hash scheme that is used to compress the event data in each of the leaf-list digest items."; } leaf-list digest { type binary; description "The hash of the event data"; } } leaf event-size { type uint32; description "Size of the event data"; } leaf-list event-data { type uint8; description "The eventdata size determined by event-size";data size determined by event-size"; } } grouping bios-event-log { description "Measurement log created by the BIOS/UEFI."; list bios-event-entry { key event-number; description "Ordered list of TCG described event log that extended the PCRs in the order they were logged"; uses boot-event-log; } } grouping ima-event { description "Defines an hash log extend event for IMA measurements"; leaf event-number { type uint64; description "Unique number for this event for sequencing"; } leaf ima-template { type string; description "Name of the template used for event logs for e.g. ima, ima-ng, ima-sig"; } leaf filename-hint { type string; description "File that was measured"; } leaf filedata-hash { type binary; description "Hash of filedata"; } leaf filedata-hash-algorithm { type string; description "Algorithm used for filedata-hash"; } leaf template-hash-algorithm { type string; description "Algorithm used for template-hash"; } leaf template-hash { type binary; description "hash(filedata-hash, filename-hint)"; } leaf pcr-index { type pcr; description "Defines the PCR index that this event extended"; } leaf signature { type binary; description "The file signature"; } } groupingbios-event-logima-event-log { description "Measurement log created bythe BIOS/UEFI.";IMA."; listbios-event-entryima-event-entry { key event-number; description "Ordered list ofTCG describedima event logs by event-number"; uses ima-event; } } grouping netequip-boot-event { description "Defines an hash log extend event for Network Equipment Boot."; leaf event-number { type uint64; description "Unique number for this event for sequencing"; } leaf filename-hint { type string; description "File thatextendedwas measured"; } leaf filedata-hash { type binary; description "Hash of filedata"; } leaf filedata-hash-algorithm { type string; description "Algorithm used for filedata-hash."; } leaf file-version { type string; description "File version information."; } leaf file-type { type string; description "Indicating at which boot stage thePCRs infile is loaded, such as BIOS, BootLoader, etc."; } leaf pcr-index { type pcr; description "Defines theorder they were logged"; uses boot-event-log;PCR index that this event extended"; } } groupingima-event-lognetwork-equipment-boot-event-log { description "Measurement log created by Network Equipment Boot."; listima-event-entryboot-event-entry { key event-number; description "Ordered list ofimaNetwork Equipment Boot event logs byevent-number";event-number."; usesima-event;netequip-boot-event; }description "Measurement log created by IMA.";} grouping event-logs { description "A selector for the log and its type."; choiceattested-event-log-typeattested_event_log_type { mandatory true; description "Event log type determines the event logs content."; case bios { description "BIOS/UEFI event logs"; container bios-event-logs { description"This is an index referencing the TCG Algorithm Registry based on TPM_ALG_ID.";"BIOS/UEFI event logs"; uses bios-event-log; } } case ima { description "IMA eventlogs";logs."; container ima-event-logs { description"This is an index referencing the TCG Algorithm Registry based on TPM_ALG_ID.";"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; } } } } /**********************/ /* RPC operations */ /**********************/ rpc tpm12-challenge-response-attestation { if-feature"TPM12";"taa:TPM12"; description "This RPC accepts the input for TSS TPM 1.2 commandsof the managed device. ComponentIndex from the hardware manager YANG module to refermade todedicated TPM in composite devices, e.g. smart NICs, is still a TODO.";the attesting device."; input { containertpm1-attestation-challengetpm12-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;uses TPM12_Algo; uses tpm12-attestation-key-identifier;leaf add-version { typeboolean;boolean; description "Whether or not to include TPM_CAP_VERSION_INFO; if true, then TPM_Quote2 must be used to create the response."; reference "TPM Main Part 2 TPM Structures v1.2 July 2007, Section 21.6"; } leaf-list certificate-name { must "/tpm:rats-support-structures/tpm:tpms" + "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']" + "/tpm:certificates/" + "/tpm:certificate[certificate-name-ref=current()]" { error-message "Not an available TPM1.2 AIK certificate."; } type certificate-name-ref; description"Whether or not to include TPM_CAP_VERSION_INFO; if true, then TPM_Quote2 must be used to create"When populated, theresponse.";RPC will only get a Quote for the TPMs associated with these certificate(s)."; }uses tpm-name-selector; /* if this scheme is desired, we should define XPATH to limit selection to just 'tpm-name' that are '../tpm-specification-version' equals 'TPM12' and where '../hardware-based' equals 'true' */} } output { 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 { if-feature"TPM20";"taa:TPM20"; description "This RPC accepts the input for TSS TPM 2.0 commands of the managed device. ComponentIndex from the hardware manager YANG module to refer to dedicated TPM in composite devices, e.g. smart NICs, is still a TODO."; input { container tpm20-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 2.0 structure definitions"; uses nonce;list challenge-objects { description "Nodes to fetch attestation information, PCR selection and AK identifier.";uses tpm20-pcr-selection;uses TPM2_Algo; uses tpm20-attestation-key-identifier; uses tpm-name-selector; /* if this scheme is desired, we should define XPATH to limit selection to just 'tpm-name' that are '../tpm-specification-version' equals 'TPM2' and where '../hardware-based' equals 'true' */leaf-list certificate-name { must "/tpm:rats-support-structures/tpm:tpms" + "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']" + "/tpm:certificates/" + "/tpm:certificate[certificate-name-ref=current()]" { error-message "Not an available TPM2.0 AIK certificate."; } type certificate-name-ref; description "When populated, the RPC will only get a Quote for the TPMs associated with the certificates."; } } } output { list tpm20-attestation-response { unique "certificate-name";/* should have XPATH making this mandatory when there is more than one list entry */description "The binary output of TPM2b_Quote in one TPM chip of the node which identified by node-id. An TPMS_ATTEST structure including a length, encapsulated in a signature"; usestpm20-attestation; } } } rpc basic-trust-establishment { description "This RPC creates a tpm-resident, non-migratable key to be used in TPM_Quote commands, an attestation certificate."; input { uses nonce; uses TPM2_Algo; leaf-list tpm-name { when "not(../certificate-name)"; /* ensures both are not populated */ type string; description "Path to a unique TPM on a device. If there are no elements in the leaf-list, all TPMs which are 'hardware-based' should have keys established."; } uses certificate-name { description "It is possible to request a new certificate using the old one as a reference."; } } output { list attestation-certificates { description "Attestation Certificate data from a TPM identified by the TPM name"; leaf attestation-certificatecertificate-name-ref {type ct:end-entity-cert-cms;description"The binary signed certificate chain data for"Certificate associated with thisidentity certificate.";tpm20-attestation."; } usestpm20-attestation-key-identifier;tpm20-attestation; } } } rpc log-retrieval { description "Logs Entries are either identified via indices or via providing 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; } output { container system-event-logs { description "The requested data of the measurement event logs"; list node-data { unique"certificate-name";"tpm-name"; description "Event logs of a node in a distributed system identified by the node name"; usesnode-uptime;tpm-name; usescertificate-name;node-uptime; container log-result { description "The requested entries of the corresponding log."; uses event-logs; } } } } } /**************************************/ /* Config & Oper accessible nodes */ /**************************************/ container rats-support-structures { description "The datastore definition enabling verifiers or relying parties to discover the information necessary to use theremote attestation RPCs appropriately."; leaf-list supported-algos { config true; type identityrefremote attestation RPCs appropriately."; container compute-nodes {base aa:asymmetric-algorithm-type; }presence "Indicates that more than one TPM exists on a device."; description"Supported algorithms values for an Attester."; }"Holds the set device subsystems/components in this composite device that support TPM operations."; listcompute-nodescompute-node {config false;key node-id; config false; min-elements 2; uses compute-node-identifier; description "Alist names of hardwarecomponents in this composite device that RATScan be conducted with.";which supports TPM operations."; leaf node-name { type string; description "Name of the compute node."; } leaf node-location { type string; description "Location of the compute node, such as slot number."; } }list} container tpms { description "Holds the set of TPMs within an Attester."; list tpm { key tpm-name; unique "tpm-path"; description "A list of TPMs in this composite device that RATS can be conducted with."; uses tpm-name; leaf hardware-based {config false;type boolean; config false; description "Answers the question: is this TPM is a hardware based TPM?"; } leaftpm-physical-indextpm-physical-index { if-feature ietfhw:entity-mib; type int32 { range "1..2147483647"; } config false; description "The entPhysicalIndex for the TPM."; reference "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; } leaf tpm-path { type string; config false; description "Path to a unique TPM on a device. This can change agross reboots."; } leaf compute-node { when "../../../compute-nodes"; type compute-node-ref; config false; mandatory true; description "When there is more that one TPM, this indicates for which compute node this TPM services."; } leaf tpm-manufacturer { type string; config false; description "TPM manufacturer name."; } leaf tpm-firmware-version { type identityref { base taa:cryptoprocessor; } mandatory true; description "Identifies the cryptoprocessor API set supported. This cannot be configured. However it is referenced via XPATH as part of configuration, so is shown as 'rw' to eliminate YANG warnings related NMDA."; } uses TPM12-hash-algo { when "tpm-firmware-version = 'taa:tpm12'"; refine TPM12-hash-algo { description "The hash algorithm overwrites the default used for PCRs on this TPM1.2 compliant cryptoprocessor."; } } leaf-list TPM12-pcrs { when "../tpm-firmware-version = 'taa:tpm12'"; type pcr; description "The PCRs which may be extracted from this TPM1.2 compliant cryptoprocessor."; } list tpm20-pcr-bank { when "../tpm-firmware-version = 'taa:tpm20'"; key "TPM20-hash-algo"; description "Specifies the list of PCRs that may be extracted for a specific Hash Algorithm on this TPM2 compliant cryptoprocessor. A bank is a set of PCRs which are extended using a particular hash algorithm."; reference "https://www.trustedcomputinggroup.org/wp-content/uploads/ TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; leaf TPM20-hash-algo {if-feature ietfhw:entity-mib; config false;must "/tpm:rats-support-structures" + "/tpm:attester-supported-algos" + "/tpm:tpm20-hash" { error-message "Not a platform supported TPM20-hash-algo"; } typeint32identityref {range "1..2147483647";base taa:hash; } description "TheentPhysicalIndex for the TPM."; reference "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";hash scheme actively being used to hash a one or more TPM2.0 PCRs."; }leaf tpm-pathleaf-list pcr-index { typestring; config false;tpm:pcr; description"Path"Defines what TPM2 PCRs are available toa unique TPM on a device. This can change agross reboots.";be extracted."; } } leafcompute-nodetpm-status {when "../../compute-nodes"; config false; mandatory true;typecompute-node-ref;enumeration { enum operational { value 0; description"When there"The TPM currently ismore that one TPM, this indicates for which compute node thiscurrently running normally and is ready to accept and process TPMservices."; } leaf tpm-manufacturer { config false; type string; description "TPM manufacturer name.";quotes."; reference "TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf Section 12"; }leaf tpm-firmware-versionenum non-operational {config false; type string;value 1; description "TPMfirmware version.";is in a state such as startup or shutdown which precludes the processing of TPM quotes."; }leaf tpm-specification-version { type identityref { base cryptoprocessor;} config false; mandatory true; description"Identifies the cryptoprocessor API set supported"; } leaf tpm-status { type string; config false; description"TPM chip self-teststatus, normal or abnormal.";status."; } container certificates { description "The TPM's certificates, including EK certificates and AK certificates."; list certificate {config true;key "certificate-name"; description "Three types of certificates can be accessed via this statement, including Initial Attestation Key Cert, Local Attestation Key Cert or Endorsement Key Cert.";uses certificate-name;leafcertificate-refcertificate-name { type string; description "An arbitrary name uniquely identifying a certificate associated within key within a TPM."; } leaf certificate-keystore-ref { type leafref { path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key" + "/ks:certificates/ks:certificate/ks:name"; } description "A reference to a specific certificate of an asymmetric key in the Keystore."; /* Note: It is also possible to import a grouping which allows local definition via an imported keystore schema. */ } leaf certificate-type { type enumeration { enum endorsement-cert { value 0; description "Endorsement Key (EK) Certificate type."; } enum initial-attestation-cert { value 1; description "Initial Attestation key (IAK) Certificate type."; } enum local-attestation-cert { value 2; description "Local Attestation Key (LAK) Certificate type."; } } description "Type of this certificate"; } } } } } container attester-supported-algos { description "Identifies which TPM algorithms are available for use on an attesting platform."; leaf-list tpm12-asymmetric-signing { if-feature "taa:TPM12"; when "../../tpm:tpms" + "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']"; type identityref { base taa:asymmetric; } description "Platform Supported TPM12 asymmetric algorithms."; } leaf-list tpm12-hash { if-feature "taa:TPM12"; when "../../tpm:tpms" + "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']"; type identityref { base taa:hash; } description "Platform supported TPM12 hash algorithms."; } leaf-list tpm20-asymmetric-signing { if-feature "taa:TPM20"; when "../../tpm:tpms" + "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']"; type identityref { base taa:asymmetric; } description "Platform Supported TPM20 asymmetric algorithms."; } leaf-list tpm20-hash { if-feature "taa:TPM20"; when "../../tpm:tpms" + "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']"; type identityref { base taa:hash; } description "Platform supported TPM20 hash algorithms."; } } } } <CODE ENDS>2.3. ietf-asymmetric-algs2.2.2. ietf-tcg-algs Cryptographic algorithm types were initially included within -v14 NETCONF's iana-crypto-types.yang. Unfortunately all this content including the algorithms needed here failed to make the -v15 used WGLC.ThereforeAs amodified versionresult this document has encoded the TCG Algorithm definitions of [TCG-Algos], revision 1.32. By including thisdraftfull table as a separate YANG file within this document, it isincluded here. Perhaps someonepossible for other YANG models to leverage the contents of this model. 2.2.2.1. Features There are two types of features supported <TPM12> and <TPM20>. Support for either of these features indicates that a cryptoprocessor supporting the corresponding type of TCG API is present on an Attester. Most commonly, only one type of cryptoprocessor willstewardbe available on an Attester. 2.2.2.2. Identities There are three types of identities in thislist asmodel. The first are the cryptographic functions supportable by aseparate draft.TPM algorithm, these include: <asymmetric>, <symmetric>, <hash>, <signing>, <anonymous_signing>, <encryption_mode>, <method>, and <object_type>. The definitions of each of these are in Table 2 of [TCG-Algos]. The second are API specifications for tpms: <tpm12> and <tpm2>. The third are specific algorithm types. Each algorithm type defines what cryptographic functions may be supported, and on which type of API specification. It is not required that an implementation of a specific TPM will support all algorithm types. The contents of each specific algorithm mirrors what is in Table 3 of [TCG-Algos]. 2.2.2.3. YANG Module <CODE BEGINS>ietf-asymmetric-algs@2020-06-12.yangietf-tcg-algs@2020-09-18.yang moduleietf-asymmetric-algsietf-tcg-algs { yang-version 1.1; namespace"urn:ietf:params:xml:ns:yang:ietf-asymmetric-algs";"urn:ietf:params:xml:ns:yang:ietf-tcg-algs"; prefixaa;taa; organization "IETFNETCONF (Network Configuration)RATS Working Group"; contact "WG Web:<http://datatracker.ietf.org/wg/netconf/><http://datatracker.ietf.org/wg/rats/> WG List:<mailto:netconf@ietf.org><mailto:rats@ietf.org> Author: Eric Voit<mailto:evoit@cisco.com> Author: Kent Watsen <mailto:kent+ietf@watsen.net> Author: Wang Haiguang <wang.haiguang.shieldlab@huawei.com>";<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."; revision2020-06-122020-09-18 { description "Initial version"; reference "RFC XXXX:tbd initial draft: draft-voit-rats-trusted-path-routing concepts from ietf-asymmetric-algs.yang which did not progress to WGLC in NETCONF.";tbd"; } /*****************/ /* Features */ /*****************/ feature TPM12 { description "This feature indicates algorithm support for the TPM 1.2API.";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.0API."; } feature iana { description "This feature indicates support for the IANA algorithms defined in Registry xxxxx";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 */ identityasymmetric-algorithm-typeasymmetric { 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"Base"A TCG recognized encryption mode."; reference "TCG_Algorithm_Registry_r1p32_pub Table 2"; } identityidentityerating various asymmetric key algorithms.";method { description "A TCG recognized method such as a mask generation function."; reference "TCG_Algorithm_Registry_r1p32_pub Table 2"; } identityiana-asymmetric-algorithmobject_type { description "A TCG recognized object type."; reference "TCG_Algorithm_Registry_r1p32_pub Table 2"; } identity cryptoprocessor {base asymmetric-algorithm-type;description "Base identityidentityerating various asymmetric key algorithms.";identifying a crytoprocessor."; } identitytpm12-asymmetric-algorithmtpm12 { if-feature "TPM12"; baseasymmetric-algorithm-type;cryptoprocessor; description"Base identity identityerating various asymmetric key algorithms.";"Supportable by a TPM1.2."; reference "TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf TPM_ALGORITHM_ID values, page 18"; } identitytpm2-asymmetric-algorithmtpm20 { if-feature "TPM12"; baseasymmetric-algorithm-type;cryptoprocessor; description"Base identity identityerating various asymmetric key algorithms.";"Supportable by a TPM2."; reference "TPM-Rev-2.0-Part-2-Structures-01.38.pdf The TCG AlgorithmRegistry ID value.Registry. Table 9"; } identityrsaTPM_ALG_RSA { if-feature "TPM12 or TPM20"; base tpm12; base tpm20; basetpm12-asymmetric-algorithm;asymmetric; basetpm2-asymmetric-algorithm;object_type; description"RFC 3447 - the RSA"RSA algorithm"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. ALG_ID: 0x0001"; } identityrsa1024TPM_ALG_TDES { if-feature"iana";"TPM12"; baseiana-asymmetric-algorithm;tpm12; basersa;symmetric; description"The RSA algorithm using a 1024-bit key.";"Block cipher with various key sizes (Triple Data Encryption Algorithm, commonly called Triple Data Encryption Standard) Note: was banned in TPM1.2 v94"; reference"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 18033-3. ALG_ID: 0x0003"; } identityrsa2048TPM_ALG_SHA1 { if-feature"iana";"TPM12 or TPM20"; base hash; baseiana-asymmetric-algorithm;tpm12; basersa;tpm20; description"The RSA"SHA1 algorithmusing a 2048-bit key.";- Deprecated due to insufficient cryptographic protection. However it is still useful for hash algorithms where protection is not required."; reference"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10118-3. ALG_ID: 0x0004"; } identityrsa3072TPM_ALG_HMAC { if-feature"iana";"TPM12 or TPM20"; base tpm12; baseiana-asymmetric-algorithm;tpm20; basersa;hash; base signing; description"The RSA algorithm using a 3072-bit key.";"Hash Message Authentication Code (HMAC) algorithm"; reference"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2.";"TCG_Algorithm_Registry_r1p32_pub Table 3, ISO/IEC 9797-2 and RFC2014. ALG_ID: 0x0005"; } identityrsa4096TPM_ALG_AES { if-feature"iana";"TPM12"; baseiana-asymmetric-algorithm;tpm12; basersa;symmetric; description "TheRSAAES algorithmusing a 4096-bit key.";with various key sizes"; reference"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 18033-3. ALG_ID: 0x0006"; } identityrsa7680TPM_ALG_MGF1 { if-feature"iana";"TPM20"; baseiana-asymmetric-algorithm;tpm20; basersa;hash; base method; description"The RSA algorithm using a 7680-bit key.";"hash-based mask-generation function"; reference"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2.";"TCG_Algorithm_Registry_r1p32_pub Table 3, IEEE Std 1363-2000 and IEEE Std 1363a -2004. ALG_ID: 0x0007"; } identityrsa15360TPM_ALG_KEYEDHASH { if-feature"iana";"TPM20"; baseiana-asymmetric-algorithm;tpm20; basersa;hash; base object_type; description"The RSA"An encryption or signing algorithm using a15360-bit key.";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"RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and TCG TPM 2.0 library specification. . ALG_ID: 0x0008"; } identitysecp192r1TPM_ALG_XOR { if-feature"iana";"TPM12 or TPM20"; base tpm12; baseiana-asymmetric-algorithm;tpm20; base hash; base symmetric; description "Theasymmetric algorithm using a NIST P192 Curve.";XOR encryption algorithm."; reference"RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. RFC 5480: Elliptic Curve Cryptography Subject Public Key Information.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and TCG TPM 2.0 library specification. ALG_ID: 0x000A"; } identitysecp224r1TPM_ALG_SHA256 { if-feature"iana";"TPM20"; base tpm20; baseiana-asymmetric-algorithm;hash; description "Theasymmetric algorithm using a NIST P224 Curve.";SHA 256 algorithm"; reference"RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. RFC 5480: Elliptic Curve Cryptography Subject Public Key Information.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10118-3. ALG_ID: 0x000B"; } identitysecp256r1TPM_ALG_SHA384 { if-feature"iana";"TPM20"; base tpm20; baseiana-asymmetric-algorithm;hash; description "Theasymmetric algorithm using a NIST P256 Curve."; reference "RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. RFC 5480: Elliptic Curve Cryptography Subject Public Key Information.";SHA 384 algorithm"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10118-3. ALG_ID: 0x000C"; } identitysecp384r1TPM_ALG_SHA512 { if-feature "TPM20"; baseiana-asymmetric-algorithm;tpm20; base hash; description "Theasymmetric algorithm using a NIST P384 Curve.";SHA 512 algorithm"; reference"RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. RFC 5480: Elliptic Curve Cryptography Subject Public Key Information.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10118-3. ALG_ID: 0x000D"; } identitysecp521r1TPM_ALG_NULL { if-feature"iana";"TPM20"; baseiana-asymmetric-algorithm;tpm20; description"The asymmetric algorithm using a NIST P521 Curve.";"NULL algorithm"; reference"RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. RFC 5480: Elliptic Curve Cryptography Subject Public Key Information.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and TCG TPM 2.0 library specification. ALG_ID: 0x0010"; } identityx25519TPM_ALG_SM3_256 { if-feature"iana";"TPM20"; base tpm20; baseiana-asymmetric-algorithm;hash; description "Theasymmetric algorithm using a x.25519 Curve.";SM3 hash algorithm."; reference"RFC 7748: Elliptic Curves for Security.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and GM/T 0004-2012 - SM3_256. ALG_ID: 0x0012"; } identityx448TPM_ALG_SM4 { if-feature"iana";"TPM20"; baseiana-asymmetric-algorithm;tpm20; base symmetric; description"The asymmetric algorithm using a x.448 Curve.";"SM4 symmetric block cipher"; reference"RFC 7748: Elliptic Curves for Security.";"TCG_Algorithm_Registry_r1p32_pub Table 3 and GB/T 32907-2016. ALG_ID: 0x0013"; } identitySHA1TPM_ALG_RSASSA { if-feature"TPM20 or TPM12";"TPM20"; base tpm20; basetpm12-asymmetric-algorithm;asymmetric; basetpm2-asymmetric-algorithm;signing; description"ISO/IEC 10118-3 - SHA1 algorithm";"Signature algorithm defined in section 8.2 (RSASSAPKCS1-v1_5)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. ALG_ID: 0x0014"; } identityHMACTPM_ALG_RSAES { if-feature"TPM20 or TPM12";"TPM20"; basetpm12-asymmetric-algorithm;tpm20; basetpm2-asymmetric-algorithm;asymmetric; base encryption_mode; description"ISO/IEC 9797-2 - Hash Message Authentication Code (HMAC)"Signature algorithmalso RFC2014. we need to verify if NMAC implementation isn't differentdefined inthe two.";section 7.2 (RSAES-PKCS1-v1_5)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017 ALG_ID: 0x0015"; } identityAESTPM_ALG_RSAPSS { if-feature"TPM20 or TPM12";"TPM20"; base tpm20; basetpm2-asymmetric-algorithm;asymmetric; base signing; description"ISO/IEC 18033-3 - the AES algorithm";"Padding algorithm defined in section 8.1 (RSASSA PSS)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. ALG_ID: 0x0016"; } identityAES128TPM_ALG_OAEP { if-feature"TPM12";"TPM20"; basetpm12-asymmetric-algorithm;tpm20; baseAES;asymmetric; base encryption_mode; description"ISO/IEC 18033-3 - the AES algorithm, key size 128";"Padding algorithm defined in section 7.1 (RSASSA OAEP)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. ALG_ID: 0x0017"; } identityAES192TPM_ALG_ECDSA { if-feature"TPM12";"TPM20"; basetpm12-asymmetric-algorithm;tpm20; baseAES;asymmetric; base signing; description"ISO/IEC 18033-3 - the AES algorithm, key size 192";"Signature algorithm using elliptic curve cryptography (ECC)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 14888-3. ALG_ID: 0x0018"; } identityAES256TPM_ALG_ECDH { if-feature"TPM12";"TPM20"; base tpm20; basetpm12-asymmetric-algorithm;asymmetric; baseAES;method; description"ISO/IEC 18033-3 - the AES algorithm, key size 256";"Secret sharing using ECC"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST SP800-56A and RFC 7748. ALG_ID: 0x0019"; } identityMGF1TPM_ALG_ECDAA { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base asymmetric; base signing; base anonymous_signing; description"IEEE Std 1363a -2004 - hash-based mask-generation function";"Elliptic-curve based anonymous signing scheme"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and TCG TPM 2.0 library specification. ALG_ID: 0x001A"; } identityKEYEDHASHTPM_ALG_SM2 { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base asymmetric; base signing; base encryption_mode; base method; description"TPM2 KEYEDHASH"SM2 - depending on context, either an elliptic-curve based, signature algorithm, an encryption scheme, orsigning algorithm usingakeyed hash";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"; } identityXORTPM_ALG_ECSCHNORR { if-feature"TPM20 or TPM12";"TPM20"; base tpm20; basetpm12-asymmetric-algorithm;asymmetric; basetpm2-asymmetric-algorithm;signing; description"TPM2 XOR";"Elliptic-curve based Schnorr signature"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and TCG TPM 2.0 library specification. ALG_ID: 0x001C"; } identitySHA256TPM_ALG_ECMQV { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base asymmetric; base method; description"ISO/IEC 10118-3 - the SHA 256 algorithm";"Two-phase elliptic-curve key"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST SP800-56A. ALG_ID: 0x001D"; } identitySHA384TPM_ALG_KDF1_SP800_56A { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base hash; base method; description"ISO/IEC 10118-3 - the SHA 384 algorithm";"Concatenation key derivation function"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST SP800-56A (approved alternative1) section 5.8.1. ALG_ID: 0x0020"; } identitySHA512TPM_ALG_KDF2 { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base hash; base method; description"ISO/IEC 10118-3 - the SHA 512 algorithm";"Key derivation function"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and IEEE 1363a-2004 KDF2 section 13.2. ALG_ID: 0x0021"; } identityNULLTPM_ALG_KDF1_SP800_108 {if-feature "TPM20";basetpm2-asymmetric-algorithm;TPM_ALG_KDF2; description"TPM2 NULL";"A key derivation method"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST SP800-108 - Section 5.1 KDF. ALG_ID: 0x0022"; } identitySM3_256TPM_ALG_ECC { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base asymmetric; base object_type; description"GM/T 0004-2012 - SM3_256";"Prime field ECC"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 15946-1. ALG_ID: 0x0023"; } identitySM4TPM_ALG_SYMCIPHER { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; description"GM/T 0004-2012 - SM4"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"; } identityRSASSATPM_ALG_CAMELLIA { if-feature "TPM20"; basetpm2-asymmetric-algorithm; description "RFC 3447 - defined in section 8.2 (RSASSAPKCS1-v1_5)"; } identity RSAES { if-feature "TPM20";tpm20; basetpm2-asymmetric-algorithm;symmetric; description"RFC 3447 - defined in section 7.2 (RSAES-PKCS1-v1_5)";"The Camellia algorithm"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 18033-3. ALG_ID: 0x0026"; } identityRSAPSSTPM_ALG_SHA3_256 { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base hash; description"RFC 3447"ISO/IEC 10118-3 -defined in section 8.1 (RSASSA PSS)";the SHA 256 algorithm"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST PUB FIPS 202. ALG_ID: 0x0027"; } identityOAEPTPM_ALG_SHA3_384 { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base hash; description"RFC 3447 - defined in section 7.1 (RSASSA OAEP)";"The SHA 384 algorithm"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST PUB FIPS 202. ALG_ID: 0x0028"; } identityECDSATPM_ALG_SHA3_512 { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base hash; description"ISO/IEC 14888-3 - elliptic curve cryptography (ECC)";"The SHA 512 algorithm"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST PUB FIPS 202. ALG_ID: 0x0029"; } identityECDHTPM_ALG_CMAC { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base symmetric; base signing; description"NIST SP800-56A - secret sharing using ECC";"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"; } identityECDAATPM_ALG_CTR { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base symmetric; base encryption_mode; description"TPM2 - elliptic-curve based anonymous signing scheme";"Counter mode"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10116. ALG_ID: 0x0040"; } identitySM2TPM_ALG_OFB {if-feature "TPM20";basetpm2-asymmetric-algorithm;tpm20; base symmetric; base encryption_mode; description"A GM/T 0003.1-2012, GM/T 0003.2-2012, GM/T 0003.3-2012, GM/T 0003.5-2012 SM2";"Output Feedback mode"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10116. ALG_ID: 0x0041"; } identityECSCHNORRTPM_ALG_CBC { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base symmetric; base encryption_mode; description"TPM2 - elliptic-curve based Schnorr signature";"Cipher Block Chaining mode"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10116. ALG_ID: 0x0042"; } identityECMQVTPM_ALG_CFB { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base symmetric; base encryption_mode; description"NIST SP800-56A - two-phase elliptic-curve key";"Cipher Feedback mode"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10116. ALG_ID: 0x0043"; } identityKDF1_SP800_56ATPM_ALG_ECB { if-feature "TPM20"; basetpm2-asymmetric-algorithm; description "NIST SP800-56A - concatenation key derivation function, (approved alternative1) section 5.8.1"; } identity KDF2 { if-feature "TPM20";tpm20; basetpm2-asymmetric-algorithm;symmetric; base encryption_mode; description"IEEE 1363a-2004 - key derivation function KDF2 section 13.2";"Electronic Codebook mode"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and ISO/IEC 10116. ALG_ID: 0x0044"; } identityKDF1_SP800_108TPM_ALG_CCM { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base symmetric; base signing; base encryption_mode; description"NIST SP800-108 - Section 5.1 KDF in Counter Mode";"Counter with Cipher Block Chaining-Message Authentication Code (CCM)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST SP800-38C. ALG_ID: 0x0050"; } identityECCTPM_ALG_GCM { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base symmetric; base signing; base encryption_mode; description"ISO/IEC 15946-1 - prime field ECC";"Galois/Counter Mode (GCM)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST SP800-38D. ALG_ID: 0x0051"; } identitySYMCIPHERTPM_ALG_KW { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base symmetric; base signing; base encryption_mode; description"TPM2 - object type for a symmetric block cipher";"AES Key Wrap (KW)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST SP800-38F. ALG_ID: 0x0052"; } identityCAMELLIATPM_ALG_KWP { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base symmetric; base signing; base encryption_mode; description"ISO/IEC 18033-3 - the Camellia algorithm";"AES Key Wrap with Padding (KWP)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST SP800-38F. ALG_ID: 0x0053"; } identityCTRTPM_ALG_EAX { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base symmetric; base signing; base encryption_mode; description"ISO/IEC 10116 - Counter mode";"Authenticated-Encryption Mode"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and NIST SP800-38F. ALG_ID: 0x0054"; } identityOFBTPM_ALG_EDDSA { if-feature "TPM20"; basetpm2-asymmetric-algorithm;tpm20; base asymmetric; base signing; description"ISO/IEC 10116"Edwards-curve Digital Signature Algorithm (PureEdDSA)"; reference "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8032. ALG_ID: 0x0060"; } } <CODE ENDS> Note that not all cryptographic functions are required for use by ietf-tpm-remote-attestation.yang. However the full definition of Table 3 of [TCG-Algos] will allow use by additional YANG specifications. 3. IANA considerations This document will include requests to IANA: To be defined yet. But keeping up with changes to ietf-tcg-algs.yang will be necessary. 4. Security Considerations The YANG module specified in this document defines a schema for data that is designed to be accessed via network management protocols such as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport layer, and the mandatory-to-implement secure transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the mandatory-to-implement secure transport is TLS [RFC5246]. There are a number of data nodes defined in this YANG module that are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive or vulnerable in some network environments. Write operations (e.g., edit-config) to these data nodes without proper protection can have a negative effect on network operations. These are the subtrees and data nodes and their sensitivity/vulnerability: Container: </rats-support-structures/attester-supported-algos> o <tpm12-asymmetric-signing>, <tpm12-hash>, <tpm20-asymmetric- signing>, and <tpm20-hash> all could be populated with algorithms which are not supported by the underlying physical TPM installed by the equipment vendor. Container: </rats-support-structures/tpms> o <tpm-name> -Output Feedback mode"; } identity CBC { if-feature "TPM20"; base tpm2-asymmetric-algorithm; description "ISO/IEC 10116Although shown as 'rw', it is system generated o <tpm20-pcr-bank> -Cipher Block Chaining mode"; } identity CFB { if-feature "TPM20"; base tpm2-asymmetric-algorithm; description "ISO/IEC 10116It is possible to configure PCRs for extraction which are not being extended by system software. This could unnecessarily use TPM resources. o <certificates> -Cipher Feedback mode"; } identity ECB { if-feature "TPM20"; base tpm2-asymmetric-algorithm; description "ISO/IEC 10116It is possible to provision a certificate which does not correspond to a Attestation Identity Key (AIK) within the TPM. RPC: <tpm12-challenge-response-attestation> -Electronic Codebook mode"; } } <CODE ENDS> 3. IANA considerations This document will include requestsNeed toIANA: To be defined yet. 4. Security Considerations There are always some.verify that the certificate is for an active AIK. RPC: <tpm20-challenge-response-attestation> - Need to verify that the certificate is for an active AIK. RPC: <log-retrieval> - Pulling lots of logs can chew up system resources. 5. Acknowledgements Not yet. 6. Change Log Changes from version 02 to version 03: o moved to tcg-algs o cleaned up model to eliminate sources of errors o removed key establishment RPC o added lots of XPATH which must all be scrubbed still o Descriptive text added on model contents. Changes from version 01 to version 02: o Extracted Crypto-types into a separate YANG file o Mades the algorithms explicit, not strings o Hash Algo as key the selected TPM2 PCRs o PCR numbers are their own type o Eliminated nested keys for node-id plus tpm-name o Eliminated TPM-Name of "ALL" o Added TPM-Path Changes from version 00 to version 01: o Addressed author's comments o Extended complementary details about attestation-certificates o Relabeled chunk-size to log-entry-quantity o Relabeled location with compute-node or tpm-name where appropriate o Added a valid entity-mib physical-index to compute-node and tpm- name to map it back to hardware inventory o Relabeled name to tpm_name o Removed event-string in last-entry 7. References 7.1. Normative References [I-D.birkholz-rats-reference-interaction-model] Birkholz,H. and M.H., Eckel, M., Newton, C., and L. Chen, "Reference Interaction Models for Remote Attestation Procedures",draft-birkholz-rats- reference-interaction-model-02draft-birkholz-rats-reference-interaction- model-03 (work in progress),JanuaryJuly 2020.[I-D.ietf-netconf-crypto-types][I-D.ietf-netconf-keystore] Watsen, K.,"Common"A YANG DataTypesModel forCryptography", draft-ietf-netconf-crypto-types-15a Keystore", draft- ietf-netconf-keystore-20 (work in progress),MayAugust 2020. [I-D.ietf-rats-architecture] Birkholz, H., Thaler, D., Richardson, M., Smith, N., and W. Pan, "Remote Attestation Procedures Architecture", draft-ietf-rats-architecture-06 (work in progress), September 2020. [I-D.ietf-rats-tpm-based-network-device-attest] Fedorkow, G., Voit, E., and J. Fitzgerald-McKay, "TPM- based Network Device Remote Integrity Verification", draft-ietf-rats-tpm-based-network-device-attest-04 (work in progress), September 2020. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>. [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6991, DOI 10.17487/RFC6991, July 2013, <https://www.rfc-editor.org/info/rfc6991>. [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>. [RFC8348] Bierman, A., Bjorklund, M., Dong, J., and D. Romascanu, "A YANG Data Model for Hardware Management", RFC 8348, DOI 10.17487/RFC8348, March 2018, <https://www.rfc-editor.org/info/rfc8348>. [TCG-Algos] "TCG_Algorithm_Registry_r1p32_pub", n.d., <hhttp://trustedcomputinggroup.org/resource/tcg-algorithm- registry/>. [TPM1.2] TCG, ., "TPM 1.2 Main Specification", October 2003, <https://trustedcomputinggroup.org/resource/tpm-main- specification/>. [TPM2.0] TCG, ., "TPM 2.0 Library Specification", March 2013, <https://trustedcomputinggroup.org/resource/tpm-library- specification/>. 7.2. Informative References[I-D.ietf-rats-architecture] Birkholz, H., Thaler, D., Richardson,[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008, <https://www.rfc-editor.org/info/rfc5246>. [RFC6241] Enns, R., Ed., Bjorklund, M.,Smith, N.,Ed., Schoenwaelder, J., Ed., andW. Pan, "Remote Attestation Procedures Architecture", draft-ietf-rats-architecture-04 (work in progress), May 2020.A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, <https://www.rfc-editor.org/info/rfc6241>. [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, <https://www.rfc-editor.org/info/rfc6242>. [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, <https://www.rfc-editor.org/info/rfc8040>. Authors' Addresses Henk Birkholz Fraunhofer SIT Rheinstrasse 75 Darmstadt 64295 Germany Email: henk.birkholz@sit.fraunhofer.de Michael Eckel Fraunhofer SIT Rheinstrasse 75 Darmstadt 64295 Germany Email: michael.eckel@sit.fraunhofer.de Eric Voit Cisco Systems Email: evoit@cisco.com Shwetha Bhandari Cisco Systems Email: shwethab@cisco.com Bill Sulzen Cisco Systems Email: bsulzen@cisco.comEric Voit Cisco Systems Email: evoit@cisco.comLiang Xia (Frank) Huawei Technologies 101 Software Avenue, Yuhuatai District Nanjing, Jiangsu 210012 China Email: Frank.Xialiang@huawei.com Tom Laffey Hewlett Packard Enterprise Email: tom.laffey@hpe.com Guy C. Fedorkow Juniper Networks 10 Technology Park Drive Westford, Massachusetts 01886 Email: gfedorkow@juniper.net