idnits 2.17.1 draft-ietf-rats-yang-tpm-charra-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 61 instances of too long lines in the document, the longest one being 4 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 184 has weird spacing: '...te-name cer...' == Line 213 has weird spacing: '...r-index pcr...' == Line 297 has weird spacing: '...-number uin...' == Line 356 has weird spacing: '...version ide...' == Line 360 has weird spacing: '...sh-algo ide...' -- The document date (12 August 2021) is 981 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-35) exists of draft-ietf-netconf-keystore-22 == Outdated reference: A later version (-22) exists of draft-ietf-rats-architecture-12 ** Downref: Normative reference to an Informational draft: draft-ietf-rats-architecture (ref. 'I-D.ietf-rats-architecture') == Outdated reference: A later version (-14) exists of draft-ietf-rats-tpm-based-network-device-attest-08 ** Downref: Normative reference to an Informational draft: draft-ietf-rats-tpm-based-network-device-attest (ref. 'I-D.ietf-rats-tpm-based-network-device-attest') -- Possible downref: Non-RFC (?) normative reference: ref. 'TCG-Algos' == Outdated reference: A later version (-09) exists of draft-ietf-rats-reference-interaction-models-04 Summary: 3 errors (**), 0 flaws (~~), 10 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 RATS Working Group H. Birkholz 3 Internet-Draft M. Eckel 4 Intended status: Standards Track Fraunhofer SIT 5 Expires: 13 February 2022 S. Bhandari 6 ThoughtSpot 7 E. Voit 8 B. Sulzen 9 Cisco 10 L. Xia 11 Huawei 12 T. Laffey 13 HPE 14 G. Fedorkow 15 Juniper 16 12 August 2021 18 A YANG Data Model for Challenge-Response-based Remote Attestation 19 Procedures using TPMs 20 draft-ietf-rats-yang-tpm-charra-10 22 Abstract 24 This document defines YANG RPCs and a small number of configuration 25 nodes required to retrieve attestation evidence about integrity 26 measurements from a device, following the operational context defined 27 in TPM-based Network Device Remote Integrity Verification. 28 Complementary measurement logs are also provided by the YANG RPCs, 29 originating from one or more roots of trust for measurement (RTMs). 30 The module defined requires at least one TPM 1.2 or TPM 2.0 as well 31 as a corresponding TPM Software Stack (TSS), included in the device 32 components of the composite device the YANG server is running on. 34 Status of This Memo 36 This Internet-Draft is submitted in full conformance with the 37 provisions of BCP 78 and BCP 79. 39 Internet-Drafts are working documents of the Internet Engineering 40 Task Force (IETF). Note that other groups may also distribute 41 working documents as Internet-Drafts. The list of current Internet- 42 Drafts is at https://datatracker.ietf.org/drafts/current/. 44 Internet-Drafts are draft documents valid for a maximum of six months 45 and may be updated, replaced, or obsoleted by other documents at any 46 time. It is inappropriate to use Internet-Drafts as reference 47 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on 13 February 2022. 50 Copyright Notice 52 Copyright (c) 2021 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 57 license-info) in effect on the date of publication of this document. 58 Please review these documents carefully, as they describe your rights 59 and restrictions with respect to this document. Code Components 60 extracted from this document must include Simplified BSD License text 61 as described in Section 4.e of the Trust Legal Provisions and are 62 provided without warranty as described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 67 1.1. Requirements notation . . . . . . . . . . . . . . . . . . 3 68 2. The YANG Module for Basic Remote Attestation Procedures . . . 3 69 2.1. YANG Modules . . . . . . . . . . . . . . . . . . . . . . 3 70 2.1.1. 'ietf-tpm-remote-attestation' . . . . . . . . . . . . 3 71 2.1.2. 'ietf-tcg-algs' . . . . . . . . . . . . . . . . . . . 32 72 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 47 73 4. Security Considerations . . . . . . . . . . . . . . . . . . . 47 74 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 48 75 6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 48 76 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 49 77 7.1. Normative References . . . . . . . . . . . . . . . . . . 49 78 7.2. Informative References . . . . . . . . . . . . . . . . . 51 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51 81 1. Introduction 83 This document is based on the general terminology defined in the 84 [I-D.ietf-rats-architecture] and uses the operational context defined 85 in [I-D.ietf-rats-tpm-based-network-device-attest] as well as the 86 interaction model and information elements defined in 87 [I-D.ietf-rats-reference-interaction-models]. The currently 88 supported hardware security modules (HSMs) are the Trusted Platform 89 Modules (TPMs) [TPM1.2] and [TPM2.0] as specified by the Trusted 90 Computing Group (TCG). One or more TPMs embedded in the components 91 of a Composite Device are required in order to use the YANG module 92 defined in this document. A TPM is used as a root of trust for 93 reporting (RTR) in order to retrieve attestation Evidence from a 94 composite device (_TPM Quote_ primitive operation). Additionally, it 95 is used as a root of trust for storage (RTS) in order to retain 96 shielded secrets and store system measurements using a folding hash 97 function (_TPM PCR Extend_ primitive operation). 99 Specific terms imported from [I-D.ietf-rats-architecture] and used in 100 this document include: Attester, Composite Device, Evidence. 102 Specific terms imported from [TPM2.0-Key] and used in this document 103 include: Endorsement Key (EK), Initial Attestation Key (IAK), Local 104 Attestation Key (LAK). 106 1.1. Requirements notation 108 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 109 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 110 "OPTIONAL" in this document are to be interpreted as described in 111 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 112 capitals, as shown here. 114 2. The YANG Module for Basic Remote Attestation Procedures 116 One or more TPMs MUST be embedded in a Composite Device that provides 117 attestation evidence via the YANG module defined in this document. 118 The ietf-basic-remote-attestation YANG module enables a composite 119 device to take on the role of an Attester, in accordance with the 120 Remote Attestation Procedures (RATS) architecture 121 [I-D.ietf-rats-architecture], and the corresponding challenge- 122 response interaction model defined in the 123 [I-D.ietf-rats-reference-interaction-models] document. A fresh nonce 124 with an appropriate amount of entropy MUST be supplied by the YANG 125 client in order to enable a proof-of-freshness with respect to the 126 attestation Evidence provided by the Attester running the YANG 127 datastore. Further, this nonce is used to prevent replay attacks. 128 The functions of this YANG module are restricted to 0-1 TPMs per 129 hardware component. 131 2.1. YANG Modules 133 In this section the several YANG modules are defined. 135 2.1.1. 'ietf-tpm-remote-attestation' 137 This YANG module imports modules from [RFC6991], [RFC8348], 138 [I-D.ietf-netconf-keystore], and "ietf-tcg-algs.yang" 139 Section 2.1.2.3. 141 2.1.1.1. Features 143 This module supports the following features: 145 * 'TPMs': Indicates that multiple TPMs on the device can support 146 remote attestation. This feature is applicable in cases where 147 multiple line cards are present, each with its own TPM. 149 * 'bios': Indicates that the device supports the retrieval of BIOS/ 150 UEFI event logs. 152 * 'ima': Indicates that the device supports the retrieval of event 153 logs from the Linux Integrity Measurement Architecture (IMA). 155 * 'netequip_boot': Indicates that the device supports the retrieval 156 of netequip boot event logs. 158 2.1.1.2. Identities 160 This module supports the following types of attestation event logs: 161 'bios', 'ima', and 'netequip_boot'. 163 2.1.1.3. Remote Procedure Calls (RPCs) 165 In the following, RPCs for both TPM 1.2 and TPM 2.0 attestation 166 procedures are defined. 168 2.1.1.3.1. 'tpm12-challenge-response-attestation' 170 This RPC allows a Verifier to request signed TPM PCRs (_TPM Quote_ 171 operation) from a TPM 1.2 compliant cryptoprocessor. Where the 172 feature 'TPMs' is active, and one or more 'certificate-name' is not 173 provided, all TPM 1.2 compliant cryptoprocessors will respond. A 174 YANG tree diagram of this RPC is as follows: 176 +---x tpm12-challenge-response-attestation {taa:TPM12}? 177 +---w input 178 | +---w tpm12-attestation-challenge 179 | +---w pcr-index* pcr 180 | +---w nonce-value binary 181 | +---w certificate-name* certificate-name-ref {tpm:TPMs}? 182 +--ro output 183 +--ro tpm12-attestation-response* [] 184 +--ro certificate-name certificate-name-ref 185 +--ro up-time? uint32 186 +--ro TPM_QUOTE2? binary 188 2.1.1.3.2. 'tpm20-challenge-response-attestation' 190 This RPC allows a Verifier to request signed TPM PCRs (_TPM Quote_ 191 operation) from a TPM 2.0 compliant cryptoprocessor. Where the 192 feature 'TPMs' is active, and one or more 'certificate-name' is not 193 provided, all TPM 2.0 compliant cryptoprocessors will respond. A 194 YANG tree diagram of this RPC is as follows: 196 +---x tpm20-challenge-response-attestation {taa:TPM20}? 197 +---w input 198 | +---w tpm20-attestation-challenge 199 | +---w nonce-value binary 200 | +---w tpm20-pcr-selection* [] 201 | | +---w TPM20-hash-algo? identityref 202 | | +---w pcr-index* tpm:pcr 203 | +---w certificate-name* certificate-name-ref {tpm:TPMs}? 204 +--ro output 205 +--ro tpm20-attestation-response* [] 206 +--ro certificate-name certificate-name-ref 207 +--ro TPMS_QUOTE_INFO binary 208 +--ro quote-signature? binary 209 +--ro up-time? uint32 210 +--ro unsigned-pcr-values* [] 211 +--ro TPM20-hash-algo? identityref 212 +--ro pcr-values* [pcr-index] 213 +--ro pcr-index pcr 214 +--ro pcr-value? binary 216 An example of an RPC challenge requesting PCRs 0-7 from a SHA-256 217 bank could look like the following: 219 220 221 xmlns="urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation"> 222 223 (identifier of a TPM signature key with which the Verifier is supposed 224 to sign the attestation data) 225 226 227 0xe041307208d9f78f5b1bbecd19e2d152ad49de2fc5a7d8dbf769f6b8ffdeab9d 228 229 230 232 taa:TPM_ALG_SHA256 233 234 0 235 1 236 2 237 3 238 4 239 5 240 6 241 7 242 243 244 246 A successful response could be formatted as follows: 248 250 252 254 ks:(instance of Certificate name in the Keystore) 255 256 257 (raw attestation data, i.e. the TPM quote; this includes 258 a composite digest of requested PCRs, the nonce, 259 and TPM 2.0 time information.) 260 261 262 (signature over attestation-data using the TPM key 263 identified by sig-key-id) 264 265 266 268 2.1.1.4. 'log-retrieval' 270 This RPC allows a Verifier to acquire the evidence which was extended 271 into specific TPM PCRs. A YANG tree diagram of this RPC is as 272 follows: 274 +---x log-retrieval 275 +---w input 276 | +---w log-selector* [] 277 | | +---w name* string 278 | | +---w (index-type)? 279 | | | +--:(last-entry) 280 | | | | +---w last-entry-value? binary 281 | | | +--:(index) 282 | | | | +---w last-index-number? uint64 283 | | | +--:(timestamp) 284 | | | +---w timestamp? yang:date-and-time 285 | | +---w log-entry-quantity? uint16 286 | +---w log-type identityref 287 +--ro output 288 +--ro system-event-logs 289 +--ro node-data* [] 290 +--ro name? string 291 +--ro up-time? uint32 292 +--ro log-result 293 +--ro (attested_event_log_type) 294 +--:(bios) {bios}? 295 | +--ro bios-event-logs 296 | +--ro bios-event-entry* [event-number] 297 | +--ro event-number uint32 298 | +--ro event-type? uint32 299 | +--ro pcr-index? pcr 300 | +--ro digest-list* [] 301 | | +--ro hash-algo? identityref 302 | | +--ro digest* binary 303 | +--ro event-size? uint32 304 | +--ro event-data* uint8 305 +--:(ima) {ima}? 306 | +--ro ima-event-logs 307 | +--ro ima-event-entry* [event-number] 308 | +--ro event-number uint64 309 | +--ro ima-template? string 310 | +--ro filename-hint? string 311 | +--ro filedata-hash? binary 312 | +--ro filedata-hash-algorithm? string 313 | +--ro template-hash-algorithm? string 314 | +--ro template-hash? binary 315 | +--ro pcr-index? pcr 316 | +--ro signature? binary 317 +--:(netequip_boot) {netequip_boot}? 318 +--ro boot-event-logs 319 +--ro boot-event-entry* [event-number] 320 +--ro event-number uint64 321 +--ro ima-template? string 322 +--ro filename-hint? string 323 +--ro filedata-hash? binary 324 +--ro filedata-hash-algorithm? string 325 +--ro template-hash-algorithm? string 326 +--ro template-hash? binary 327 +--ro pcr-index? pcr 328 +--ro signature? binary 330 2.1.1.5. Data Nodes 332 This section provides a high level description of the data nodes 333 containing the configuration and operational objects with the YANG 334 model. For more details, please see the YANG model itself in 335 Figure 1. 337 Container 'rats-support-structures': This houses the set of 338 information relating to a device's TPM(s). 340 Container 'tpms': Provides configuration and operational details for 341 each supported TPM, including the tpm-firmware-version, PCRs which 342 may be quoted, certificates which are associated with that TPM, 343 and the current operational status. Of note are the certificates 344 which are associated with that TPM. As a certificate is 345 associated with a particular TPM attestation key, knowledge of the 346 certificate allows a specific TPM to be identified. 348 +--rw tpms 349 +--rw tpm* [name] 350 +--rw name string 351 +--ro hardware-based? boolean 352 +--ro physical-index? int32 {ietfhw:entity-mib}? 353 +--ro path? string 354 +--ro compute-node compute-node-ref {tpm:tpms}? 355 +--ro manufacturer? string 356 +--rw firmware-version identityref 357 +--rw tpm12-hash-algo? identityref 358 +--rw tpm12-pcrs* pcr 359 +--rw tpm20-pcr-bank* [tpm20-hash-algo] 360 | +--rw tpm20-hash-algo identityref 361 | +--rw pcr-index* tpm:pcr 362 +--ro status enumeration 363 +--rw certificates 364 +--rw certificate* [name] 365 +--rw name string 366 +--rw keystore-ref? leafref 367 +--rw type? enumeration 369 container 'attester-supported-algos' - Identifies which TCG hash 370 algorithms are available for use on the Attesting platform. This 371 allows an operator to limit algorithms available for use by RPCs to 372 just a desired set from the universe of all allowed hash algorithms 373 by the TCG. 375 +--rw attester-supported-algos 376 +--rw tpm12-asymmetric-signing* identityref 377 +--rw tpm12-hash* identityref 378 +--rw tpm20-asymmetric-signing* identityref 379 +--rw tpm20-hash* identityref 381 container 'compute-nodes' - When there is more than one TPM 382 supported, this container maintains the set of information related to 383 the compute node associated with a specific TPM. This allows each 384 specific TPM to identify to which 'compute-node' it belongs. 386 +--rw compute-nodes {tpm:TPMs}? 387 +--ro compute-node* [node-id] 388 +--ro node-id string 389 +--ro node-physical-index? int32 {ietfhw:entity-mib}? 390 +--ro node-name? string 391 +--ro node-location? string 393 2.1.1.6. YANG Module 394 file "ietf-tpm-remote-attestation@2021-05-11.yang" 395 module ietf-tpm-remote-attestation { 396 namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation"; 397 prefix tpm; 399 import ietf-yang-types { 400 prefix yang; 401 } 402 import ietf-hardware { 403 prefix ietfhw; 404 } 405 import ietf-keystore { 406 prefix ks; 407 } 408 import ietf-tcg-algs { 409 prefix taa; 410 } 412 organization 413 "IETF RATS (Remote ATtestation procedureS) Working Group"; 414 contact 415 "WG Web : 416 WG List : 417 Author : Eric Voit 418 Author : Henk Birkholz 419 Author : Michael Eckel 420 Author : Shwetha Bhandari 421 Author : Bill Sulzen 422 Author : Liang Xia (Frank) 423 Author : Tom Laffey 424 Author : Guy Fedorkow "; 425 description 426 "A YANG module to enable a TPM 1.2 and TPM 2.0 based 427 remote attestation procedure using a challenge-response 428 interaction model and the TPM 1.2 and TPM 2.0 Quote 429 primitive operations. 430 Copyright (c) 2021 IETF Trust and the persons identified 431 as authors of the code. All rights reserved. 432 Redistribution and use in source and binary forms, with 433 or without modification, is permitted pursuant to, and 434 subject to the license terms contained in, the Simplified 435 BSD License set forth in Section 4.c of the IETF Trust's 436 Legal Provisions Relating to IETF Documents 437 (https://trustee.ietf.org/license-info). 438 This version of this YANG module is part of RFC XXXX 439 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC 440 itself for full legal notices. 442 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 443 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 444 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 445 are to be interpreted as described in BCP 14 (RFC 2119) 446 (RFC 8174) when, and only when, they appear in all 447 capitals, as shown here."; 449 revision 2021-08-11 { 450 description 451 "Initial version"; 452 reference 453 "draft-ietf-rats-yang-tpm-charra"; 454 } 456 /*****************/ 457 /* Features */ 458 /*****************/ 460 feature tpms { 461 description 462 "The device supports the remote attestation of multiple 463 TPM based cryptoprocessors."; 464 } 466 feature bios { 467 description 468 "The device supports the bios logs."; 469 reference 470 "https://trustedcomputinggroup.org/wp-content/uploads/ 471 PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v51.pdf 472 Section 9.4.5.2"; 473 } 475 feature ima { 476 description 477 "The device supports Integrity Measurement Architecture logs."; 478 reference 479 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 480 TCG_IWG_CEL_v1_r0p30_13feb2021.pdf Section 4.3"; 481 } 483 feature netequip_boot { 484 description 485 "The device supports the netequip_boot logs."; 486 } 488 /*****************/ 489 /* Typedefs */ 490 /*****************/ 492 typedef pcr { 493 type uint8 { 494 range "0..31"; 495 } 496 description 497 "Valid index number for a PCR. At this point 0-31 is viable."; 498 } 500 typedef compute-node-ref { 501 type leafref { 502 path "/tpm:rats-support-structures/tpm:compute-nodes" 503 + "/tpm:compute-node/tpm:node-name"; 504 } 505 description 506 "This type is used to reference a hardware node. It is quite 507 possible this leafref will eventually point to another YANG 508 module's node."; 509 } 511 typedef certificate-name-ref { 512 type leafref { 513 path "/tpm:rats-support-structures/tpm:tpms/tpm:tpm" 514 + "/tpm:certificates/tpm:certificate/tpm:name"; 515 } 516 description 517 "A type which allows identification of a TPM based certificate."; 518 } 520 /******************/ 521 /* Identities */ 522 /******************/ 524 identity attested_event_log_type { 525 description 526 "Base identity allowing categorization of the reasons why and 527 attested measurement has been taken on an Attester."; 528 } 530 identity ima { 531 base attested_event_log_type; 532 description 533 "An event type recorded in IMA."; 534 } 536 identity bios { 537 base attested_event_log_type; 538 description 539 "An event type associated with BIOS/UEFI."; 540 } 542 identity netequip_boot { 543 base attested_event_log_type; 544 description 545 "An event type associated with Network Equipment Boot."; 546 } 548 /*****************/ 549 /* Groupings */ 550 /*****************/ 552 grouping tpm20-hash-algo { 553 description 554 "The cryptographic algorithm used to hash the TPM2 PCRs. This 555 must be from the list of platform supported options."; 556 leaf tpm20-hash-algo { 557 type identityref { 558 base taa:hash; 559 } 560 must '/tpm:rats-support-structures/tpm:attester-supported-algos' 561 + '/tpm:tpm20-hash' { 562 error-message "This platform does not support tpm20-hash-algo"; 563 } 564 default "taa:TPM_ALG_SHA256"; 565 description 566 "The hash scheme that is used to hash a TPM1.2 PCR. This 567 must be one of those supported by a platform."; 568 } 569 } 571 grouping tpm12-hash-algo { 572 description 573 "The cryptographic algorithm used to hash the TPM1.2 PCRs."; 574 leaf tpm12-hash-algo { 575 type identityref { 576 base taa:hash; 577 } 578 must '/tpm:rats-support-structures/tpm:attester-supported-algos' 579 + '/tpm:tpm12-hash' { 580 error-message "This platform does not support tpm12-hash-algo"; 581 } 582 default "taa:TPM_ALG_SHA1"; 583 description 584 "The hash scheme that is used to hash a TPM1.2 PCR. This 585 MUST be one of those supported by a platform. This assumes 586 that an algorithm other than SHA1 can be supported on some 587 TPM1.2 cryptoprocessor variant."; 588 } 589 } 591 grouping nonce { 592 description 593 "A random number intended to be used once to show freshness 594 and to allow the detection of replay attacks."; 595 leaf nonce-value { 596 type binary; 597 mandatory true; 598 description 599 "A cryptographically generated random number which should 600 not be predictable prior to its issuance from a random 601 number generation function. The random number MUST be 602 derived from an entropy source external to the Attester."; 603 } 604 } 606 grouping tpm12-pcr-selection { 607 description 608 "A Verifier can request one or more PCR values using its 609 individually created Attestation Key Certificate (AC). 610 The corresponding selection filter is represented in this 611 grouping. 612 Requesting a PCR value that is not in scope of the AC used, 613 detailed exposure via error msg should be avoided."; 614 leaf-list pcr-index { 615 type pcr; 616 description 617 "The numbers/indexes of the PCRs. At the moment this is limited 618 to 32. In addition, any selection of PCRs MUST verify that 619 the set of PCRs requested are a subset the set of PCRs 620 exposed by in the leaf-list /tpm:rats-support-structures 621 /tpm:tpms/tpm:tpm[name=current()]/tpm:tpm12-pcrs"; 622 } 623 } 625 grouping tpm20-pcr-selection { 626 description 627 "A Verifier can acquire one or more PCR values, which are hashed 628 together in a TPM2B_DIGEST coming from the TPM2. The selection 629 list of desired PCRs and the Hash Algorithm is represented in 630 this grouping."; 631 list tpm20-pcr-selection { 632 unique "tpm20-hash-algo"; 633 description 634 "Specifies the list of PCRs and Hash Algorithms that can be 635 returned within a TPM2B_DIGEST."; 636 reference 637 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 638 TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; 639 uses tpm20-hash-algo; 640 leaf-list pcr-index { 641 type pcr; 642 must '/tpm:rats-support-structures/tpm:tpms' 643 + '/tpm:tpm[name = current()] and ' 644 + '/tpm:rats-support-structures/tpm:tpms/tpm:tpm' 645 + '/tpm:tpm20-pcr-bank[pcr-index = current()]' { 646 error-message "Acquiring this PCR index is not supported"; 647 } 648 description 649 "The numbers of the PCRs that which are being tracked 650 with a hash based on the tpm20-hash-algo. In addition, 651 any selection of PCRs MUST verify that the set of PCRs 652 requested are a subset the set of PCR indexes exposed 653 within /tpm:rats-support-structures/tpm:tpms 654 /tpm:tpm[name=current()]/tpm:tpm20-pcr-bank 655 /tpm:pcr-index"; 656 } 657 } 658 } 660 grouping certificate-name-ref { 661 description 662 "Identifies a certificate in a keystore."; 663 leaf certificate-name { 664 type certificate-name-ref; 665 mandatory true; 666 description 667 "Identifies a certificate in a keystore."; 668 } 669 } 671 grouping tpm-name { 672 description 673 "A unique TPM on a device."; 674 leaf name { 675 type string; 676 description 677 "Unique system generated name for a TPM on a device."; 678 } 679 } 681 grouping tpm-name-selector { 682 description 683 "One or more TPM on a device."; 684 leaf-list name { 685 type string; 686 config false; 687 description 688 "Name of one or more unique TPMs on a device. If this object 689 exists, a selection should pull only the objects related to 690 these TPM(s). If it does not exist, all qualifying TPMs that 691 are 'hardware-based' equals true on the device are selected."; 692 } 693 } 695 grouping node-uptime { 696 description 697 "Uptime in seconds of the node."; 698 leaf up-time { 699 type uint32; 700 description 701 "Uptime in seconds of this node reporting its data"; 702 } 703 } 705 grouping tpm12-attestation { 706 description 707 "Contains an instance of TPM1.2 style signed cryptoprocessor 708 measurements. It is supplemented by unsigned Attester 709 information."; 710 uses node-uptime; 711 leaf TPM_QUOTE2 { 712 type binary; 713 description 714 "Result of a TPM1.2 Quote2 operation. This includes PCRs, 715 signatures, locality, the provided nonce and other data which 716 can be further parsed to appraise the Attester."; 717 reference 718 "TPM1.2 commands rev116 July 2007, Section 16.5"; 719 } 720 } 722 grouping tpm20-attestation { 723 description 724 "Contains an instance of TPM2 style signed cryptoprocessor 725 measurements. It is supplemented by unsigned Attester 726 information."; 727 leaf TPMS_QUOTE_INFO { 728 type binary; 729 mandatory true; 730 description 731 "A hash of the latest PCR values (and the hash algorithm used) 732 which have been returned from a Verifier for the selected PCRs 733 and Hash Algorithms."; 734 reference 735 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 736 TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.12.1"; 737 } 738 leaf quote-signature { 739 type binary; 740 description 741 "Quote signature returned by TPM Quote. The signature was 742 generated using the key associated with the 743 certificate 'name'."; 744 reference 745 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 746 TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 11.2.1"; 747 } 748 uses node-uptime; 749 list unsigned-pcr-values { 750 description 751 "PCR values in each PCR bank. This might appear redundant with 752 the TPM2B_DIGEST, but that digest is calculated across multiple 753 PCRs. Having to verify across multiple PCRs does not 754 necessarily make it easy for a Verifier to appraise just the 755 minimum set of PCR information which has changed since the last 756 received TPM2B_DIGEST. Put another way, why should a Verifier 757 reconstruct the proper value of all PCR Quotes when only a 758 single PCR has changed? 759 To help this happen, if the Attester does know specific PCR 760 values, the Attester can provide these individual values via 761 'unsigned-pcr-values'. By comparing this information to the 762 what has previously been validated, it is possible for a 763 Verifier to confirm the Attester's signature while eliminating 764 significant processing."; 765 uses tpm20-hash-algo; 766 list pcr-values { 767 key "pcr-index"; 768 description 769 "List of one PCR bank."; 770 leaf pcr-index { 771 type pcr; 772 description 773 "PCR index number."; 774 } 775 leaf pcr-value { 776 type binary; 777 description 778 "PCR value."; 779 reference 780 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 781 TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; 782 } 783 } 784 } 785 } 787 grouping log-identifier { 788 description 789 "Identifier for type of log to be retrieved."; 790 leaf log-type { 791 type identityref { 792 base attested_event_log_type; 793 } 794 mandatory true; 795 description 796 "The corresponding measurement log type identity."; 797 } 798 } 799 grouping boot-event-log { 800 description 801 "Defines an event log corresponding to the event that extended 802 the PCR"; 803 leaf event-number { 804 type uint32; 805 description 806 "Unique event number of this event"; 807 } 808 leaf event-type { 809 type uint32; 810 description 811 "log event type"; 812 } 813 leaf pcr-index { 814 type pcr; 815 description 816 "Defines the PCR index that this event extended"; 817 } 818 list digest-list { 819 description 820 "Hash of event data"; 821 leaf hash-algo { 822 type identityref { 823 base taa:hash; 824 } 825 description 826 "The hash scheme that is used to compress the event data in 827 each of the leaf-list digest items."; 828 } 829 leaf-list digest { 830 type binary; 831 description 832 "The hash of the event data using the algorithm of the 833 'hash-algo' against 'event data'."; 834 } 835 } 836 leaf event-size { 837 type uint32; 838 description 839 "Size of the event data"; 840 } 841 leaf-list event-data { 842 type uint8; 843 description 844 "The event data size determined by event-size"; 845 } 846 } 847 grouping bios-event-log { 848 description 849 "Measurement log created by the BIOS/UEFI."; 850 list bios-event-entry { 851 key event-number; 852 description 853 "Ordered list of TCG described event log 854 that extended the PCRs in the order they 855 were logged"; 856 uses boot-event-log; 857 } 858 } 859 grouping ima-event { 860 description 861 "Defines an hash log extend event for IMA measurements"; 862 reference 863 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 864 TCG_IWG_CEL_v1_r0p30_13feb2021.pdf Section 4.3"; 865 leaf event-number { 866 type uint64; 867 description 868 "Unique number for this event for sequencing"; 869 } 870 leaf ima-template { 871 type string; 872 description 873 "Name of the template used for event logs 874 for e.g. ima, ima-ng, ima-sig"; 875 } 876 leaf filename-hint { 877 type string; 878 description 879 "File that was measured"; 880 } 881 leaf filedata-hash { 882 type binary; 883 description 884 "Hash of filedata"; 885 } 886 leaf filedata-hash-algorithm { 887 type string; 888 description 889 "Algorithm used for filedata-hash"; 890 } 891 leaf template-hash-algorithm { 892 type string; 893 description 894 "Algorithm used for template-hash"; 895 } 896 leaf template-hash { 897 type binary; 898 description 899 "hash(filedata-hash, filename-hint)"; 900 } 901 leaf pcr-index { 902 type pcr; 903 description 904 "Defines the PCR index that this event extended"; 905 } 906 leaf signature { 907 type binary; 908 description 909 "The file signature"; 910 } 911 } 912 grouping ima-event-log { 913 description 914 "Measurement log created by IMA."; 915 list ima-event-entry { 916 key event-number; 917 description 918 "Ordered list of ima event logs by event-number"; 919 uses ima-event; 920 } 921 } 922 grouping network-equipment-boot-event-log { 923 description 924 "Measurement log created by Network Equipment Boot. The Network 925 Equipment Boot format is identical to the IMA format. In 926 contrast to the IMA log, the Network Equipment Boot log 927 includes every measurable event from an Attester, including 928 the boot stages of BIOS, Bootloader, etc. In essence, the scope 929 of events represented in this format combines the scope of BIOS 930 events and IMA events."; 931 list boot-event-entry { 932 key event-number; 933 description 934 "Ordered list of Network Equipment Boot event logs 935 by event-number, using the IMA event format."; 936 uses ima-event; 937 } 938 } 939 grouping event-logs { 940 description 941 "A selector for the log and its type."; 942 choice attested_event_log_type { 943 mandatory true; 944 description 945 "Event log type determines the event logs content."; 946 case bios { 947 if-feature "bios"; 948 description 949 "BIOS/UEFI event logs"; 950 container bios-event-logs { 951 description 952 "BIOS/UEFI event logs"; 953 uses bios-event-log; 954 } 955 } 956 case ima { 957 if-feature "ima"; 958 description 959 "IMA event logs."; 960 container ima-event-logs { 961 description 962 "IMA event logs."; 963 uses ima-event-log; 964 } 965 } 966 case netequip_boot { 967 if-feature "netequip_boot"; 968 description 969 "Network Equipment Boot event logs"; 971 container boot-event-logs { 972 description 973 "Network equipment boot event logs."; 974 uses network-equipment-boot-event-log; 975 } 976 } 977 } 978 } 980 /**********************/ 981 /* RPC operations */ 982 /**********************/ 984 rpc tpm12-challenge-response-attestation { 985 if-feature "taa:tpm12"; 986 description 987 "This RPC accepts the input for TSS TPM 1.2 commands made to the 988 attesting device."; 989 input { 990 container tpm12-attestation-challenge { 991 description 992 "This container includes every information element defined 993 in the reference challenge-response interaction model for 994 remote attestation. Corresponding values are based on 995 TPM 1.2 structure definitions"; 996 uses tpm12-pcr-selection; 997 uses nonce; 998 leaf-list certificate-name { 999 if-feature "tpm:tpms"; 1000 type certificate-name-ref; 1001 must "/tpm:rats-support-structures/tpm:tpms" 1002 + "/tpm:tpm[tpm:firmware-version='taa:tpm12']" 1003 + "/tpm:certificates/" 1004 + "/tpm:certificate[name=current()]" { 1005 error-message "Not an available TPM1.2 AIK certificate."; 1006 } 1007 description 1008 "When populated, the RPC will only get a Quote for the 1009 TPMs associated with these certificate(s)."; 1010 } 1011 } 1012 } 1013 output { 1014 list tpm12-attestation-response { 1015 unique "certificate-name"; 1016 description 1017 "The binary output of TPM 1.2 TPM_Quote/TPM_Quote2, including 1018 the PCR selection and other associated attestation evidence 1019 metadata"; 1020 uses certificate-name-ref { 1021 description 1022 "Certificate associated with this tpm12-attestation."; 1023 } 1024 uses tpm12-attestation; 1025 } 1026 } 1027 } 1029 rpc tpm20-challenge-response-attestation { 1030 if-feature "taa:tpm20"; 1031 description 1032 "This RPC accepts the input for TSS TPM 2.0 commands of the 1033 managed device. ComponentIndex from the hardware manager YANG 1034 module to refer to dedicated TPM in composite devices, 1035 e.g. smart NICs, is still a TODO."; 1036 input { 1037 container tpm20-attestation-challenge { 1038 description 1039 "This container includes every information element defined 1040 in the reference challenge-response interaction model for 1041 remote attestation. Corresponding values are based on 1042 TPM 2.0 structure definitions"; 1043 uses nonce; 1044 uses tpm20-pcr-selection; 1045 leaf-list certificate-name { 1046 if-feature "tpm:tpms"; 1047 type certificate-name-ref; 1048 must "/tpm:rats-support-structures/tpm:tpms" 1049 + "/tpm:tpm[tpm:firmware-version='taa:tpm20']" 1050 + "/tpm:certificates/" 1051 + "/tpm:certificate[name=current()]" { 1052 error-message "Not an available TPM2.0 AIK certificate."; 1053 } 1054 description 1055 "When populated, the RPC will only get a Quote for the 1056 TPMs associated with the certificates."; 1057 } 1058 } 1059 } 1060 output { 1061 list tpm20-attestation-response { 1062 unique "certificate-name"; 1063 description 1064 "The binary output of TPM2b_Quote in one TPM chip of the 1065 node which identified by node-id. An TPMS_ATTEST structure 1066 including a length, encapsulated in a signature"; 1068 uses certificate-name-ref { 1069 description 1070 "Certificate associated with this tpm20-attestation."; 1071 } 1072 uses tpm20-attestation; 1073 } 1074 } 1075 } 1077 rpc log-retrieval { 1078 description 1079 "Logs Entries are either identified via indices or via providing 1080 the last line received. The number of lines returned can be 1081 limited. The type of log is a choice that can be augmented."; 1082 input { 1083 list log-selector { 1084 description 1085 "Selection of log entries to be reported."; 1086 uses tpm-name-selector; 1087 choice index-type { 1088 description 1089 "Last log entry received, log index number, or timestamp."; 1090 case last-entry { 1091 description 1092 "The last entry of the log already retrieved."; 1093 leaf last-entry-value { 1094 type binary; 1095 description 1096 "Content of an log event which matches 1:1 with a 1097 unique event record contained within the log. Log 1098 entries subsequent to this will be passed to the 1099 requester. Note: if log entry values are not unique, 1100 this MUST return an error."; 1101 } 1102 } 1103 case index { 1104 description 1105 "Numeric index of the last log entry retrieved, or 1106 zero."; 1107 leaf last-index-number { 1108 type uint64; 1109 description 1110 "The last numeric index number of a log entry. 1111 Zero means to start at the beginning of the log. 1112 Entries subsequent to this will be passed to the 1113 requester."; 1114 } 1115 } 1116 case timestamp { 1117 leaf timestamp { 1118 type yang:date-and-time; 1119 description 1120 "Timestamp from which to start the extraction. The 1121 next log entry subsequent to this timestamp is to 1122 be sent."; 1123 } 1124 description 1125 "Timestamp from which to start the extraction."; 1126 } 1127 } 1128 leaf log-entry-quantity { 1129 type uint16; 1130 description 1131 "The number of log entries to be returned. If omitted, it 1132 means all of them."; 1133 } 1134 } 1135 uses log-identifier; 1136 } 1137 output { 1138 container system-event-logs { 1139 description 1140 "The requested data of the measurement event logs"; 1141 list node-data { 1142 unique "name"; 1143 description 1144 "Event logs of a node in a distributed system 1145 identified by the node name"; 1146 uses tpm-name; 1147 uses node-uptime; 1148 container log-result { 1149 description 1150 "The requested entries of the corresponding log."; 1151 uses event-logs; 1152 } 1153 } 1154 } 1155 } 1156 } 1158 /**************************************/ 1159 /* Config & Oper accessible nodes */ 1160 /**************************************/ 1162 container rats-support-structures { 1163 description 1164 "The datastore definition enabling verifiers or relying 1165 parties to discover the information necessary to use the 1166 remote attestation RPCs appropriately."; 1167 container compute-nodes { 1168 if-feature "tpm:tpms"; 1169 description 1170 "Holds the set device subsystems/components in this composite 1171 device that support TPM operations."; 1172 list compute-node { 1173 key "node-id"; 1174 config false; 1175 min-elements 2; 1176 description 1177 "A component within this composite device which 1178 supports TPM operations."; 1179 leaf node-id { 1180 type string; 1181 description 1182 "ID of the compute node, such as Board Serial Number."; 1183 } 1184 leaf node-physical-index { 1185 if-feature "ietfhw:entity-mib"; 1186 type int32 { 1187 range "1..2147483647"; 1188 } 1189 config false; 1190 description 1191 "The entPhysicalIndex for the compute node."; 1192 reference 1193 "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; 1194 } 1195 leaf node-name { 1196 type string; 1197 description 1198 "Name of the compute node."; 1199 } 1200 leaf node-location { 1201 type string; 1202 description 1203 "Location of the compute node, such as slot number."; 1204 } 1205 } 1206 } 1207 container tpms { 1208 description 1209 "Holds the set of TPMs within an Attester."; 1210 list tpm { 1211 key "name"; 1212 unique "path"; 1213 description 1214 "A list of TPMs in this composite device that RATS 1215 can be conducted with."; 1216 uses tpm-name; 1217 leaf hardware-based { 1218 type boolean; 1219 config false; 1220 description 1221 "Answers the question: is this TPM is a hardware based 1222 TPM?"; 1223 } 1224 leaf physical-index { 1225 if-feature "ietfhw:entity-mib"; 1226 type int32 { 1227 range "1..2147483647"; 1228 } 1229 config false; 1230 description 1231 "The entPhysicalIndex for the TPM."; 1232 reference 1233 "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; 1234 } 1235 leaf path { 1236 type string; 1237 config false; 1238 description 1239 "Path to a unique TPM on a device. This can change across 1240 reboots."; 1241 } 1242 leaf compute-node { 1243 if-feature "tpm:tpms"; 1244 type compute-node-ref; 1245 config false; 1246 mandatory true; 1247 description 1248 "Indicates the compute node measured by this TPM."; 1249 } 1250 leaf manufacturer { 1251 type string; 1252 config false; 1253 description 1254 "TPM manufacturer name."; 1255 } 1256 leaf firmware-version { 1257 type identityref { 1258 base taa:cryptoprocessor; 1259 } 1260 mandatory true; 1261 description 1262 "Identifies the cryptoprocessor API set supported. This 1263 is automatically configured by the device and should not 1264 be changed."; 1265 } 1266 uses tpm12-hash-algo { 1267 when "firmware-version = 'taa:tpm12'"; 1268 refine "tpm12-hash-algo" { 1269 description 1270 "The hash algorithm overwrites the default used for PCRs 1271 on this TPM1.2 compliant cryptoprocessor."; 1272 } 1273 } 1274 leaf-list tpm12-pcrs { 1275 when "../firmware-version = 'taa:tpm12'"; 1276 type pcr; 1277 description 1278 "The PCRs which may be extracted from this TPM1.2 1279 compliant cryptoprocessor."; 1280 } 1281 list tpm20-pcr-bank { 1282 when "../firmware-version = 'taa:tpm20'"; 1283 key "tpm20-hash-algo"; 1284 description 1285 "Specifies the list of PCRs that may be extracted for 1286 a specific Hash Algorithm on this TPM2 compliant 1287 cryptoprocessor. A bank is a set of PCRs which are 1288 extended using a particular hash algorithm."; 1289 reference 1290 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 1291 TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; 1292 leaf tpm20-hash-algo { 1293 type identityref { 1294 base taa:hash; 1295 } 1296 must '/tpm:rats-support-structures' 1297 + '/tpm:attester-supported-algos' 1298 + '/tpm:tpm20-hash' { 1299 error-message 1300 "This platform does not support tpm20-hash-algo"; 1301 } 1302 description 1303 "The hash scheme actively being used to hash a 1304 one or more TPM2.0 PCRs."; 1305 } 1306 leaf-list pcr-index { 1307 type tpm:pcr; 1308 description 1309 "Defines what TPM2 PCRs are available to be extracted."; 1310 } 1311 } 1312 leaf status { 1313 type enumeration { 1314 enum operational { 1315 value 0; 1316 description 1317 "The TPM currently is currently running normally and 1318 is ready to accept and process TPM quotes."; 1319 reference 1320 "TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf 1321 Section 12"; 1322 } 1323 enum non-operational { 1324 value 1; 1325 description 1326 "TPM is in a state such as startup or shutdown which 1327 precludes the processing of TPM quotes."; 1328 } 1329 } 1330 config false; 1331 mandatory true; 1332 description 1333 "TPM chip self-test status."; 1334 } 1335 container certificates { 1336 description 1337 "The TPM's certificates, including EK certificates 1338 and AK certificates."; 1339 list certificate { 1340 key "name"; 1341 description 1342 "Three types of certificates can be accessed via 1343 this statement, including Initial Attestation 1344 Key Certificate, Local Attestation Key Certificate or 1345 Endorsement Key Certificate."; 1346 leaf name { 1347 type string; 1348 description 1349 "An arbitrary name uniquely identifying a certificate 1350 associated within key within a TPM."; 1351 } 1352 leaf keystore-ref { 1353 type leafref { 1354 path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key" 1355 + "/ks:certificates/ks:certificate/ks:name"; 1357 } 1358 description 1359 "A reference to a specific certificate of an 1360 asymmetric key in the Keystore."; 1361 } 1362 leaf type { 1363 type enumeration { 1364 enum endorsement-certificate { 1365 value 0; 1366 description 1367 "Endorsement Key (EK) Certificate type."; 1368 reference 1369 "https://trustedcomputinggroup.org/wp-content/ 1370 uploads/TCG_IWG_DevID_v1r2_02dec2020.pdf 1371 Section 3.11"; 1372 } 1373 enum initial-attestation-certificate { 1374 value 1; 1375 description 1376 "Initial Attestation key (IAK) Certificate type."; 1377 reference 1378 "https://trustedcomputinggroup.org/wp-content/ 1379 uploads/TCG_IWG_DevID_v1r2_02dec2020.pdf 1380 Section 3.2"; 1381 } 1382 enum local-attestation-certificate { 1383 value 2; 1384 description 1385 "Local Attestation Key (LAK) Certificate type."; 1386 reference 1387 "https://trustedcomputinggroup.org/wp-content/ 1388 uploads/TCG_IWG_DevID_v1r2_02dec2020.pdf 1389 Section 3.2"; 1390 } 1391 } 1392 description 1393 "Function supported by this certificate from within the 1394 TPM."; 1395 } 1396 } 1397 } 1398 } 1399 } 1400 container attester-supported-algos { 1401 description 1402 "Identifies which TPM algorithms are available for use on an 1403 attesting platform."; 1404 leaf-list tpm12-asymmetric-signing { 1405 when "../../tpm:tpms" 1406 + "/tpm:tpm[tpm:firmware-version='taa:tpm12']"; 1407 type identityref { 1408 base taa:asymmetric; 1409 } 1410 description 1411 "Platform Supported TPM12 asymmetric algorithms."; 1412 } 1413 leaf-list tpm12-hash { 1414 when "../../tpm:tpms" 1415 + "/tpm:tpm[tpm:firmware-version='taa:tpm12']"; 1416 type identityref { 1417 base taa:hash; 1418 } 1419 description 1420 "Platform supported TPM12 hash algorithms."; 1421 } 1422 leaf-list tpm20-asymmetric-signing { 1423 when "../../tpm:tpms" 1424 + "/tpm:tpm[tpm:firmware-version='taa:tpm20']"; 1425 type identityref { 1426 base taa:asymmetric; 1427 } 1428 description 1429 "Platform Supported TPM20 asymmetric algorithms."; 1430 } 1431 leaf-list tpm20-hash { 1432 when "../../tpm:tpms" 1433 + "/tpm:tpm[tpm:firmware-version='taa:tpm20']"; 1434 type identityref { 1435 base taa:hash; 1436 } 1437 description 1438 "Platform supported TPM20 hash algorithms."; 1439 } 1440 } 1441 } 1442 } 1443 1445 Figure 1 1447 2.1.2. 'ietf-tcg-algs' 1449 Cryptographic algorithm types were initially included within -v14 1450 NETCONF's iana-crypto-types.yang. Unfortunately, all this content 1451 including the algorithms needed here failed to make the -v15 used 1452 WGLC. As a result, this document has encoded the TCG Algorithm 1453 definitions of [TCG-Algos], revision 1.32. By including this full 1454 table as a separate YANG file within this document, it is possible 1455 for other YANG models to leverage the contents of this model. 1457 2.1.2.1. Features 1459 There are two types of features supported: 'TPM12' and 'TPM20'. 1460 Support for either of these features indicates that a cryptoprocessor 1461 supporting the corresponding type of TCG TPM API is present on an 1462 Attester. Most commonly, only one type of cryptoprocessor will be 1463 available on an Attester. 1465 2.1.2.2. Identities 1467 There are three types of identities in this model: 1469 1. *Cryptographic functions* supported by a TPM algorithm; these 1470 include: 'asymmetric', 'symmetric', 'hash', 'signing', 1471 'anonymous_signing', 'encryption_mode', 'method', and 1472 'object_type'. The definitions of each of these are in Table 2 1473 of [TCG-Algos]. 1475 2. *API specifications* for TPMs: 'tpm12' and 'tpm20' 1477 3. *Specific algorithm types*: Each algorithm type defines what 1478 cryptographic functions may be supported, and on which type of 1479 API specification. It is not required that an implementation of 1480 a specific TPM will support all algorithm types. The contents of 1481 each specific algorithm mirrors what is in Table 3 of 1482 [TCG-Algos]. 1484 2.1.2.3. YANG Module 1486 file "ietf-tcg-algs@2021-05-11.yang" 1487 module ietf-tcg-algs { 1488 yang-version 1.1; 1489 namespace "urn:ietf:params:xml:ns:yang:ietf-tcg-algs"; 1490 prefix taa; 1492 organization 1493 "IETF RATS Working Group"; 1495 contact 1496 "WG Web: 1497 WG List: 1498 Author: Eric Voit "; 1500 description 1501 "This module defines a identities for asymmetric algorithms. 1503 Copyright (c) 2021 IETF Trust and the persons identified 1504 as authors of the code. All rights reserved. 1505 Redistribution and use in source and binary forms, with 1506 or without modification, is permitted pursuant to, and 1507 subject to the license terms contained in, the Simplified 1508 BSD License set forth in Section 4.c of the IETF Trust's 1509 Legal Provisions Relating to IETF Documents 1510 (https://trustee.ietf.org/license-info). 1511 This version of this YANG module is part of RFC XXXX 1512 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC 1513 itself for full legal notices. 1514 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 1515 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 1516 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 1517 are to be interpreted as described in BCP 14 (RFC 2119) 1518 (RFC 8174) when, and only when, they appear in all 1519 capitals, as shown here."; 1521 revision 2021-05-11 { 1522 description 1523 "Initial version"; 1524 reference 1525 "RFC XXXX: tbd"; 1526 } 1528 /*****************/ 1529 /* Features */ 1530 /*****************/ 1532 feature tpm12 { 1533 description 1534 "This feature indicates algorithm support for the TPM 1.2 API 1535 as per TPM-main-1.2-Rev94-part-2, Section 4.8."; 1536 } 1538 feature tpm20 { 1539 description 1540 "This feature indicates algorithm support for the TPM 2.0 API 1541 as per TPM-Rev-2.0-Part-1-Architecture-01.38 Section 11.4."; 1542 } 1543 /*****************/ 1544 /* Identities */ 1545 /*****************/ 1547 /* There needs to be collasping/verification of some of the identity 1548 types between the various algorithm types listed below */ 1550 identity asymmetric { 1551 description 1552 "A TCG recognized asymmetric algorithm with a public and 1553 private key."; 1554 reference 1555 "http://trustedcomputinggroup.org/resource/tcg-algorithm-registry/ 1556 TCG_Algorithm_Registry_r1p32_pub Table 2"; 1557 } 1559 identity symmetric { 1560 description 1561 "A TCG recognized symmetric algorithm with only a private key."; 1562 reference 1563 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1564 } 1566 identity hash { 1567 description 1568 "A TCG recognized hash algorithm that compresses input data to 1569 a digest value or indicates a method that uses a hash."; 1570 reference 1571 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1572 } 1574 identity signing { 1575 description 1576 "A TCG recognized signing algorithm"; 1577 reference 1578 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1579 } 1581 identity anonymous_signing { 1582 description 1583 "A TCG recognized anonymous signing algorithm."; 1584 reference 1585 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1586 } 1588 identity encryption_mode { 1589 description 1590 "A TCG recognized encryption mode."; 1592 reference 1593 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1594 } 1596 identity method { 1597 description 1598 "A TCG recognized method such as a mask generation function."; 1599 reference 1600 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1601 } 1603 identity object_type { 1604 description 1605 "A TCG recognized object type."; 1606 reference 1607 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1608 } 1610 identity cryptoprocessor { 1611 description 1612 "Base identity identifying a crytoprocessor."; 1613 } 1615 identity tpm12 { 1616 if-feature "tpm12"; 1617 base cryptoprocessor; 1618 description 1619 "Supportable by a TPM1.2."; 1620 reference 1621 "TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf 1622 TPM_ALGORITHM_ID values, page 18"; 1623 } 1625 identity tpm20 { 1626 if-feature "tpm12"; 1627 base cryptoprocessor; 1628 description 1629 "Supportable by a TPM2."; 1630 reference 1631 "TPM-Rev-2.0-Part-2-Structures-01.38.pdf 1632 The TCG Algorithm Registry. Table 9"; 1633 } 1635 identity TPM_ALG_RSA { 1636 if-feature "tpm12 or tpm20"; 1637 base tpm12; 1638 base tpm20; 1639 base asymmetric; 1640 base object_type; 1641 description 1642 "RSA algorithm"; 1643 reference 1644 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1645 RFC 8017. ALG_ID: 0x0001"; 1646 } 1648 identity TPM_ALG_TDES { 1649 if-feature "tpm12"; 1650 base tpm12; 1651 base symmetric; 1652 description 1653 "Block cipher with various key sizes (Triple Data Encryption 1654 Algorithm, commonly called Triple Data Encryption Standard) 1655 Note: was banned in TPM1.2 v94"; 1656 reference 1657 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1658 ISO/IEC 18033-3. ALG_ID: 0x0003"; 1659 } 1661 identity TPM_ALG_SHA1 { 1662 if-feature "tpm12 or tpm20"; 1663 base hash; 1664 base tpm12; 1665 base tpm20; 1666 description 1667 "SHA1 algorithm - Deprecated due to insufficient cryptographic 1668 protection. However it is still useful for hash algorithms 1669 where protection is not required."; 1670 reference 1671 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1672 ISO/IEC 10118-3. ALG_ID: 0x0004"; 1673 } 1675 identity TPM_ALG_HMAC { 1676 if-feature "tpm12 or tpm20"; 1677 base tpm12; 1678 base tpm20; 1679 base hash; 1680 base signing; 1681 description 1682 "Hash Message Authentication Code (HMAC) algorithm"; 1683 reference 1684 "TCG_Algorithm_Registry_r1p32_pub Table 3, 1685 ISO/IEC 9797-2 and RFC2014. ALG_ID: 0x0005"; 1686 } 1687 identity TPM_ALG_AES { 1688 if-feature "tpm12"; 1689 base tpm12; 1690 base symmetric; 1691 description 1692 "The AES algorithm with various key sizes"; 1693 reference 1694 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1695 ISO/IEC 18033-3. ALG_ID: 0x0006"; 1696 } 1698 identity TPM_ALG_MGF1 { 1699 if-feature "tpm20"; 1700 base tpm20; 1701 base hash; 1702 base method; 1703 description 1704 "hash-based mask-generation function"; 1705 reference 1706 "TCG_Algorithm_Registry_r1p32_pub Table 3, 1707 IEEE Std 1363-2000 and IEEE Std 1363a -2004. 1708 ALG_ID: 0x0007"; 1709 } 1711 identity TPM_ALG_KEYEDHASH { 1712 if-feature "tpm20"; 1713 base tpm20; 1714 base hash; 1715 base object_type; 1716 description 1717 "An encryption or signing algorithm using a keyed hash. These 1718 may use XOR for encryption or an HMAC for signing and may 1719 also refer to a data object that is neither signing nor 1720 encrypting."; 1721 reference 1722 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1723 TCG TPM 2.0 library specification. . ALG_ID: 0x0008"; 1724 } 1726 identity TPM_ALG_XOR { 1727 if-feature "tpm12 or tpm20"; 1728 base tpm12; 1729 base tpm20; 1730 base hash; 1731 base symmetric; 1732 description 1733 "The XOR encryption algorithm."; 1734 reference 1735 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1736 TCG TPM 2.0 library specification. ALG_ID: 0x000A"; 1737 } 1739 identity TPM_ALG_SHA256 { 1740 if-feature "tpm20"; 1741 base tpm20; 1742 base hash; 1743 description 1744 "The SHA 256 algorithm"; 1745 reference 1746 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1747 ISO/IEC 10118-3. ALG_ID: 0x000B"; 1748 } 1750 identity TPM_ALG_SHA384 { 1751 if-feature "tpm20"; 1752 base tpm20; 1753 base hash; 1754 description 1755 "The SHA 384 algorithm"; 1756 reference 1757 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1758 ISO/IEC 10118-3. ALG_ID: 0x000C"; 1759 } 1761 identity TPM_ALG_SHA512 { 1762 if-feature "tpm20"; 1763 base tpm20; 1764 base hash; 1765 description 1766 "The SHA 512 algorithm"; 1767 reference 1768 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1769 ISO/IEC 10118-3. ALG_ID: 0x000D"; 1770 } 1772 identity TPM_ALG_NULL { 1773 if-feature "tpm20"; 1774 base tpm20; 1775 description 1776 "NULL algorithm"; 1777 reference 1778 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1779 TCG TPM 2.0 library specification. ALG_ID: 0x0010"; 1780 } 1782 identity TPM_ALG_SM3_256 { 1783 if-feature "tpm20"; 1784 base tpm20; 1785 base hash; 1786 description 1787 "The SM3 hash algorithm."; 1788 reference 1789 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1790 GM/T 0004-2012 - SM3_256. ALG_ID: 0x0012"; 1791 } 1793 identity TPM_ALG_SM4 { 1794 if-feature "tpm20"; 1795 base tpm20; 1796 base symmetric; 1797 description 1798 "SM4 symmetric block cipher"; 1799 reference 1800 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1801 GB/T 32907-2016. ALG_ID: 0x0013"; 1802 } 1804 identity TPM_ALG_RSASSA { 1805 if-feature "tpm20"; 1806 base tpm20; 1807 base asymmetric; 1808 base signing; 1809 description 1810 "Signature algorithm defined in section 8.2 (RSASSAPKCS1-v1_5)"; 1811 reference 1812 "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. 1813 ALG_ID: 0x0014"; 1814 } 1816 identity TPM_ALG_RSAES { 1817 if-feature "tpm20"; 1818 base tpm20; 1819 base asymmetric; 1820 base encryption_mode; 1821 description 1822 "Signature algorithm defined in section 7.2 (RSAES-PKCS1-v1_5)"; 1823 reference 1824 "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017 1825 ALG_ID: 0x0015"; 1826 } 1828 identity TPM_ALG_RSAPSS { 1829 if-feature "tpm20"; 1830 base tpm20; 1831 base asymmetric; 1832 base signing; 1833 description 1834 "Padding algorithm defined in section 8.1 (RSASSA PSS)"; 1835 reference 1836 "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. 1837 ALG_ID: 0x0016"; 1838 } 1840 identity TPM_ALG_OAEP { 1841 if-feature "tpm20"; 1842 base tpm20; 1843 base asymmetric; 1844 base encryption_mode; 1845 description 1846 "Padding algorithm defined in section 7.1 (RSASSA OAEP)"; 1847 reference 1848 "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. 1849 ALG_ID: 0x0017"; 1850 } 1852 identity TPM_ALG_ECDSA { 1853 if-feature "tpm20"; 1854 base tpm20; 1855 base asymmetric; 1856 base signing; 1857 description 1858 "Signature algorithm using elliptic curve cryptography (ECC)"; 1859 reference 1860 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1861 ISO/IEC 14888-3. ALG_ID: 0x0018"; 1862 } 1864 identity TPM_ALG_ECDH { 1865 if-feature "tpm20"; 1866 base tpm20; 1867 base asymmetric; 1868 base method; 1869 description 1870 "Secret sharing using ECC"; 1871 reference 1872 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1873 NIST SP800-56A and RFC 7748. ALG_ID: 0x0019"; 1874 } 1876 identity TPM_ALG_ECDAA { 1877 if-feature "tpm20"; 1878 base tpm20; 1879 base asymmetric; 1880 base signing; 1881 base anonymous_signing; 1882 description 1883 "Elliptic-curve based anonymous signing scheme"; 1884 reference 1885 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1886 TCG TPM 2.0 library specification. ALG_ID: 0x001A"; 1887 } 1889 identity TPM_ALG_SM2 { 1890 if-feature "tpm20"; 1891 base tpm20; 1892 base asymmetric; 1893 base signing; 1894 base encryption_mode; 1895 base method; 1896 description 1897 "SM2 - depending on context, either an elliptic-curve based, 1898 signature algorithm, an encryption scheme, or a key exchange 1899 protocol"; 1900 reference 1901 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1902 A GM/T 0003.1-2012, GM/T 0003.2-2012, GM/T 0003.3-2012, 1903 GM/T 0003.5-2012 SM2. ALG_ID: 0x001B"; 1904 } 1906 identity TPM_ALG_ECSCHNORR { 1907 if-feature "tpm20"; 1908 base tpm20; 1909 base asymmetric; 1910 base signing; 1911 description 1912 "Elliptic-curve based Schnorr signature"; 1913 reference 1914 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1915 TCG TPM 2.0 library specification. ALG_ID: 0x001C"; 1916 } 1918 identity TPM_ALG_ECMQV { 1919 if-feature "tpm20"; 1920 base tpm20; 1921 base asymmetric; 1922 base method; 1923 description 1924 "Two-phase elliptic-curve key"; 1925 reference 1926 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1927 NIST SP800-56A. ALG_ID: 0x001D"; 1928 } 1930 identity TPM_ALG_KDF1_SP800_56A { 1931 if-feature "tpm20"; 1932 base tpm20; 1933 base hash; 1934 base method; 1935 description 1936 "Concatenation key derivation function"; 1937 reference 1938 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1939 NIST SP800-56A (approved alternative1) section 5.8.1. 1940 ALG_ID: 0x0020"; 1941 } 1943 identity TPM_ALG_KDF2 { 1944 if-feature "tpm20"; 1945 base tpm20; 1946 base hash; 1947 base method; 1948 description 1949 "Key derivation function"; 1950 reference 1951 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1952 IEEE 1363a-2004 KDF2 section 13.2. ALG_ID: 0x0021"; 1953 } 1955 identity TPM_ALG_KDF1_SP800_108 { 1956 base TPM_ALG_KDF2; 1957 description 1958 "A key derivation method"; 1959 reference 1960 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1961 NIST SP800-108 - Section 5.1 KDF. ALG_ID: 0x0022"; 1962 } 1964 identity TPM_ALG_ECC { 1965 if-feature "tpm20"; 1966 base tpm20; 1967 base asymmetric; 1968 base object_type; 1969 description 1970 "Prime field ECC"; 1971 reference 1972 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1973 ISO/IEC 15946-1. ALG_ID: 0x0023"; 1974 } 1975 identity TPM_ALG_SYMCIPHER { 1976 if-feature "tpm20"; 1977 base tpm20; 1978 description 1979 "Object type for a symmetric block cipher"; 1980 reference 1981 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1982 TCG TPM 2.0 library specification. ALG_ID: 0x0025"; 1983 } 1985 identity TPM_ALG_CAMELLIA { 1986 if-feature "tpm20"; 1987 base tpm20; 1988 base symmetric; 1989 description 1990 "The Camellia algorithm"; 1991 reference 1992 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1993 ISO/IEC 18033-3. ALG_ID: 0x0026"; 1994 } 1996 identity TPM_ALG_SHA3_256 { 1997 if-feature "tpm20"; 1998 base tpm20; 1999 base hash; 2000 description 2001 "ISO/IEC 10118-3 - the SHA 256 algorithm"; 2002 reference 2003 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2004 NIST PUB FIPS 202. ALG_ID: 0x0027"; 2005 } 2007 identity TPM_ALG_SHA3_384 { 2008 if-feature "tpm20"; 2009 base tpm20; 2010 base hash; 2011 description 2012 "The SHA 384 algorithm"; 2013 reference 2014 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2015 NIST PUB FIPS 202. ALG_ID: 0x0028"; 2016 } 2018 identity TPM_ALG_SHA3_512 { 2019 if-feature "tpm20"; 2020 base tpm20; 2021 base hash; 2022 description 2023 "The SHA 512 algorithm"; 2024 reference 2025 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2026 NIST PUB FIPS 202. ALG_ID: 0x0029"; 2027 } 2029 identity TPM_ALG_CMAC { 2030 if-feature "tpm20"; 2031 base tpm20; 2032 base symmetric; 2033 base signing; 2034 description 2035 "block Cipher-based Message Authentication Code (CMAC)"; 2036 reference 2037 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2038 ISO/IEC 9797-1:2011 Algorithm 5. ALG_ID: 0x003F"; 2039 } 2041 identity TPM_ALG_CTR { 2042 if-feature "tpm20"; 2043 base tpm20; 2044 base symmetric; 2045 base encryption_mode; 2046 description 2047 "Counter mode"; 2048 reference 2049 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2050 ISO/IEC 10116. ALG_ID: 0x0040"; 2051 } 2053 identity TPM_ALG_OFB { 2054 base tpm20; 2055 base symmetric; 2056 base encryption_mode; 2057 description 2058 "Output Feedback mode"; 2059 reference 2060 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2061 ISO/IEC 10116. ALG_ID: 0x0041"; 2062 } 2064 identity TPM_ALG_CBC { 2065 if-feature "tpm20"; 2066 base tpm20; 2067 base symmetric; 2068 base encryption_mode; 2069 description 2070 "Cipher Block Chaining mode"; 2072 reference 2073 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2074 ISO/IEC 10116. ALG_ID: 0x0042"; 2075 } 2077 identity TPM_ALG_CFB { 2078 if-feature "tpm20"; 2079 base tpm20; 2080 base symmetric; 2081 base encryption_mode; 2082 description 2083 "Cipher Feedback mode"; 2084 reference 2085 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2086 ISO/IEC 10116. ALG_ID: 0x0043"; 2087 } 2089 identity TPM_ALG_ECB { 2090 if-feature "tpm20"; 2091 base tpm20; 2092 base symmetric; 2093 base encryption_mode; 2094 description 2095 "Electronic Codebook mode"; 2096 reference 2097 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2098 ISO/IEC 10116. ALG_ID: 0x0044"; 2099 } 2101 identity TPM_ALG_CCM { 2102 if-feature "tpm20"; 2103 base tpm20; 2104 base symmetric; 2105 base signing; 2106 base encryption_mode; 2107 description 2108 "Counter with Cipher Block Chaining-Message Authentication 2109 Code (CCM)"; 2110 reference 2111 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2112 NIST SP800-38C. ALG_ID: 0x0050"; 2113 } 2115 identity TPM_ALG_GCM { 2116 if-feature "tpm20"; 2117 base tpm20; 2118 base symmetric; 2119 base signing; 2120 base encryption_mode; 2121 description 2122 "Galois/Counter Mode (GCM)"; 2123 reference 2124 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2125 NIST SP800-38D. ALG_ID: 0x0051"; 2126 } 2128 identity TPM_ALG_KW { 2129 if-feature "tpm20"; 2130 base tpm20; 2131 base symmetric; 2132 base signing; 2133 base encryption_mode; 2134 description 2135 "AES Key Wrap (KW)"; 2136 reference 2137 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2138 NIST SP800-38F. ALG_ID: 0x0052"; 2139 } 2141 identity TPM_ALG_KWP { 2142 if-feature "tpm20"; 2143 base tpm20; 2144 base symmetric; 2145 base signing; 2146 base encryption_mode; 2147 description 2148 "AES Key Wrap with Padding (KWP)"; 2149 reference 2150 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2151 NIST SP800-38F. ALG_ID: 0x0053"; 2152 } 2154 identity TPM_ALG_EAX { 2155 if-feature "tpm20"; 2156 base tpm20; 2157 base symmetric; 2158 base signing; 2159 base encryption_mode; 2160 description 2161 "Authenticated-Encryption Mode"; 2162 reference 2163 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2164 NIST SP800-38F. ALG_ID: 0x0054"; 2165 } 2167 identity TPM_ALG_EDDSA { 2168 if-feature "tpm20"; 2169 base tpm20; 2170 base asymmetric; 2171 base signing; 2172 description 2173 "Edwards-curve Digital Signature Algorithm (PureEdDSA)"; 2174 reference 2175 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2176 RFC 8032. ALG_ID: 0x0060"; 2177 } 2178 } 2179 2181 Note that not all cryptographic functions are required for use by 2182 "ietf-tpm-remote-attestation.yang". However the full definition of 2183 Table 3 of [TCG-Algos] will allow use by additional YANG 2184 specifications. 2186 3. IANA Considerations 2188 This document will include requests to IANA: 2190 To be defined yet. But keeping up with changes to "ietf-tcg- 2191 algs.yang" will be necessary. 2193 4. Security Considerations 2195 The YANG module specified in this document defines a schema for data 2196 that is designed to be accessed via network management protocols such 2197 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 2198 is the secure transport layer, and the mandatory-to-implement secure 2199 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 2200 is HTTPS, and the mandatory-to-implement secure transport is TLS 2201 [RFC8446]. 2203 There are a number of data nodes defined in this YANG module that are 2204 writable/creatable/deletable (i.e., _config true_, which is the 2205 default). These data nodes may be considered sensitive or vulnerable 2206 in some network environments. Write operations (e.g., _edit-config_) 2207 to these data nodes without proper protection can have a negative 2208 effect on network operations. These are the subtrees and data nodes 2209 as well as their sensitivity/vulnerability: 2211 Container '/rats-support-structures/attester-supported-algos': 'tpm1 2212 2-asymmetric-signing', 'tpm12-hash', 'tpm20-asymmetric-signing', 2213 and 'tpm20-hash'. All could be populated with algorithms that are 2214 not supported by the underlying physical TPM installed by the 2215 equipment vendor. 2217 Container: '/rats-support-structures/tpms': 'name': Although shown 2218 as 'rw', it is system generated. Therefore it should not be 2219 possible for an operator to add or remove a TPM from the 2220 configuration. 2222 'tpm20-pcr-bank': It is possible to configure PCRs for extraction 2223 which are not being extended by system software. This could 2224 unnecessarily use TPM resources. 2226 'certificates': It is possible to provision a certificate which 2227 does not correspond to an Attestation Identity Key (AIK) within 2228 the TPM 1.2, or an Attestation Key (AK) within the TPM 2.0 2229 respectively. 2231 RPC 'tpm12-challenge-response-attestation': It must be verified that 2232 the certificate is for an active AIK, i. e. the certificate 2233 provided is able to support Attestation on the targeted TPM 1.2. 2235 RPC 'tpm20-challenge-response-attestation': It must be verified that 2236 the certificate is for an active AK, i. e. the certificate 2237 provided is able to support Attestation on the targeted TPM 2.0. 2239 RPC 'log-retrieval': Pulling lots of logs can chew up system 2240 resources. 2242 5. Acknowledgements 2244 Not yet. 2246 6. Change Log 2248 Changes from version 05 to version 06: 2250 * More YANG Dr comments covered 2252 Changes from version 04 to version 05: 2254 * YANG Dr comments covered 2256 Changes from version 03 to version 04: 2258 * TPM1.2 Quote1 eliminated 2260 * YANG model simplifications so redundant info isn't exposed 2262 Changes from version 02 to version 03: 2264 * moved to tcg-algs 2265 * cleaned up model to eliminate sources of errors 2267 * removed key establishment RPC 2269 * added lots of XPATH which must all be scrubbed still 2271 * Descriptive text added on model contents. 2273 Changes from version 01 to version 02: 2275 * Extracted Crypto-types into a separate YANG file 2277 * Mades the algorithms explicit, not strings 2279 * Hash Algo as key the selected TPM2 PCRs 2281 * PCR numbers are their own type 2283 * Eliminated nested keys for node-id plus tpm-name 2285 * Eliminated TPM-Name of "ALL" 2287 * Added TPM-Path 2289 Changes from version 00 to version 01: 2291 * Addressed author's comments 2293 * Extended complementary details about attestation-certificates 2295 * Relabeled chunk-size to log-entry-quantity 2297 * Relabeled location with compute-node or tpm-name where appropriate 2299 * Added a valid entity-mib physical-index to compute-node and tpm- 2300 name to map it back to hardware inventory 2302 * Relabeled name to tpm_name 2304 * Removed event-string in last-entry 2306 7. References 2308 7.1. Normative References 2310 [I-D.ietf-netconf-keystore] 2311 Watsen, K., "A YANG Data Model for a Keystore", Work in 2312 Progress, Internet-Draft, draft-ietf-netconf-keystore-22, 2313 18 May 2021, . 2316 [I-D.ietf-rats-architecture] 2317 Birkholz, H., Thaler, D., Richardson, M., Smith, N., and 2318 W. Pan, "Remote Attestation Procedures Architecture", Work 2319 in Progress, Internet-Draft, draft-ietf-rats-architecture- 2320 12, 23 April 2021, . 2323 [I-D.ietf-rats-tpm-based-network-device-attest] 2324 Fedorkow, G., Voit, E., and J. Fitzgerald-McKay, "TPM- 2325 based Network Device Remote Integrity Verification", Work 2326 in Progress, Internet-Draft, draft-ietf-rats-tpm-based- 2327 network-device-attest-08, 26 July 2021, 2328 . 2331 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2332 Requirement Levels", BCP 14, RFC 2119, 2333 DOI 10.17487/RFC2119, March 1997, 2334 . 2336 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2337 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2338 . 2340 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2341 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2342 May 2017, . 2344 [RFC8348] Bierman, A., Bjorklund, M., Dong, J., and D. Romascanu, "A 2345 YANG Data Model for Hardware Management", RFC 8348, 2346 DOI 10.17487/RFC8348, March 2018, 2347 . 2349 [TCG-Algos] 2350 "TCG_Algorithm_Registry_r1p32_pub", n.d., 2351 . 2354 [TPM1.2] TCG, ., "TPM 1.2 Main Specification", 2 October 2003, 2355 . 2358 [TPM2.0] TCG, ., "TPM 2.0 Library Specification", 15 March 2013, 2359 . 2362 [TPM2.0-Key] 2363 TCG, ., "TPM 2.0 Keys for Device Identity and Attestation, 2364 Rev10", 14 April 2021, . 2367 7.2. Informative References 2369 [I-D.ietf-rats-reference-interaction-models] 2370 Birkholz, H., Eckel, M., Pan, W., and E. Voit, "Reference 2371 Interaction Models for Remote Attestation Procedures", 2372 Work in Progress, Internet-Draft, draft-ietf-rats- 2373 reference-interaction-models-04, 26 July 2021, 2374 . 2377 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 2378 and A. Bierman, Ed., "Network Configuration Protocol 2379 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 2380 . 2382 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 2383 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 2384 . 2386 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 2387 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 2388 . 2390 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 2391 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 2392 . 2394 Authors' Addresses 2396 Henk Birkholz 2397 Fraunhofer SIT 2398 Rheinstrasse 75 2399 64295 Darmstadt 2400 Germany 2402 Email: henk.birkholz@sit.fraunhofer.de 2403 Michael Eckel 2404 Fraunhofer SIT 2405 Rheinstrasse 75 2406 64295 Darmstadt 2407 Germany 2409 Email: michael.eckel@sit.fraunhofer.de 2411 Shwetha Bhandari 2412 ThoughtSpot 2414 Email: shwetha.bhandari@thoughtspot.com 2416 Eric Voit 2417 Cisco Systems 2419 Email: evoit@cisco.com 2421 Bill Sulzen 2422 Cisco Systems 2424 Email: bsulzen@cisco.com 2426 Liang Xia (Frank) 2427 Huawei Technologies 2428 101 Software Avenue, Yuhuatai District 2429 Nanjing 2430 Jiangsu, 210012 2431 China 2433 Email: Frank.Xialiang@huawei.com 2435 Tom Laffey 2436 Hewlett Packard Enterprise 2438 Email: tom.laffey@hpe.com 2440 Guy C. Fedorkow 2441 Juniper Networks 2442 10 Technology Park Drive 2443 Westford 2444 Email: gfedorkow@juniper.net