idnits 2.17.1 draft-ietf-rats-yang-tpm-charra-03.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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([I-D.ietf-rats-tpm-based-network-device-attest]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == There are 1 instance of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 144 has weird spacing: '...version ide...' == Line 148 has weird spacing: '...sh-algo ide...' == Line 217 has weird spacing: '...r-index pcr...' == Line 242 has weird spacing: '...-number uin...' -- The document date (September 30, 2020) is 1296 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) == Missing Reference: 'TPM20-hash-algo' is mentioned on line 147, but not defined ** Downref: Normative reference to an Informational draft: draft-birkholz-rats-reference-interaction-model (ref. 'I-D.birkholz-rats-reference-interaction-model') == Outdated reference: A later version (-35) exists of draft-ietf-netconf-keystore-20 == Outdated reference: A later version (-22) exists of draft-ietf-rats-architecture-06 ** 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-04 ** 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' -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) Summary: 4 errors (**), 0 flaws (~~), 10 warnings (==), 3 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: April 3, 2021 E. Voit 6 S. Bhandari 7 B. Sulzen 8 Cisco 9 L. Xia 10 Huawei 11 T. Laffey 12 HPE 13 G. Fedorkow 14 Juniper 15 September 30, 2020 17 A YANG Data Model for Challenge-Response-based Remote Attestation 18 Procedures using TPMs 19 draft-ietf-rats-yang-tpm-charra-03 21 Abstract 23 This document defines a YANG RPC and a minimal datastore required to 24 retrieve attestation evidence about integrity measurements from a 25 device following the operational context defined in 26 [I-D.ietf-rats-tpm-based-network-device-attest]. Complementary 27 measurement logs are also provided by the YANG RPC originating from 28 one or more roots of trust of measurement. The module defined 29 requires at least one TPM 1.2 or TPM 2.0 and corresponding Trusted 30 Software Stack included in the device components of the composite 31 device the YANG server is running on. 33 Status of This Memo 35 This Internet-Draft is submitted in full conformance with the 36 provisions of BCP 78 and BCP 79. 38 Internet-Drafts are working documents of the Internet Engineering 39 Task Force (IETF). Note that other groups may also distribute 40 working documents as Internet-Drafts. The list of current Internet- 41 Drafts is at https://datatracker.ietf.org/drafts/current/. 43 Internet-Drafts are draft documents valid for a maximum of six months 44 and may be updated, replaced, or obsoleted by other documents at any 45 time. It is inappropriate to use Internet-Drafts as reference 46 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on April 3, 2021. 50 Copyright Notice 52 Copyright (c) 2020 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 57 (https://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the Simplified BSD License. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 68 1.1. Requirements notation . . . . . . . . . . . . . . . . . . 3 69 2. The YANG Module for Basic Remote Attestation Procedures . . . 3 70 2.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 3 71 2.2. YANG Modules . . . . . . . . . . . . . . . . . . . . . . 6 72 2.2.1. ietf-tpm-remote-attestation . . . . . . . . . . . . . 6 73 2.2.2. ietf-tcg-algs . . . . . . . . . . . . . . . . . . . . 35 74 3. IANA considerations . . . . . . . . . . . . . . . . . . . . . 51 75 4. Security Considerations . . . . . . . . . . . . . . . . . . . 51 76 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 52 77 6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 52 78 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 53 79 7.1. Normative References . . . . . . . . . . . . . . . . . . 53 80 7.2. Informative References . . . . . . . . . . . . . . . . . 54 81 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 55 83 1. Introduction 85 This document is based on the terminology defined in the 86 [I-D.ietf-rats-architecture] and uses the operational context defined 87 in [I-D.ietf-rats-tpm-based-network-device-attest] as well as the 88 interaction model and information elements defined in 89 [I-D.birkholz-rats-reference-interaction-model]. The currently 90 supported hardware security modules (HWM) are the Trusted Platform 91 Module (TPM) [TPM1.2] and [TPM2.0] specified by the Trusted Computing 92 Group (TCG). One ore more TPMs embedded in the components of a 93 composite device - sometimes also referred to as an aggregate device 94 - are required in order to use the YANG module defined in this 95 document. A TPM is used as a root of trust for reporting (RTR) in 96 order to retrieve attestation evidence from a composite device (quote 97 primitive operation). Additionally, it is used as a root of trust 98 for storage (RTS) in order to retain shielded secrets and store 99 system measurements using a folding hash function (extend primitive 100 operation). 102 1.1. Requirements notation 104 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 105 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 106 "OPTIONAL" in this document are to be interpreted as described in 107 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 108 capitals, as shown here. 110 2. The YANG Module for Basic Remote Attestation Procedures 112 One or more TPMs MUST be embedded in the composite device that is 113 providing attestation evidence via the YANG module defined in this 114 document. The ietf-basic-remote-attestation YANG module enables a 115 composite device to take on the role of Claimant and Attester in 116 accordance with the Remote Attestation Procedures (RATS) architecture 117 [I-D.ietf-rats-architecture] and the corresponding challenge-response 118 interaction model defined in the 119 [I-D.birkholz-rats-reference-interaction-model] document. A fresh 120 nonce with an appropriate amount of entropy MUST be supplied by the 121 YANG client in order to enable a proof-of-freshness with respect to 122 the attestation evidence provided by the attester running the YANG 123 datastore. The functions of this YANG module are restricted to 0-1 124 TPMs per hardware component. 126 2.1. Tree Diagram 128 module: ietf-tpm-remote-attestation 129 +--rw rats-support-structures 130 +--rw compute-nodes! 131 | +--ro compute-node* [node-id] 132 | +--ro node-id string 133 | +--ro node-physical-index? int32 {ietfhw:entity-mib}? 134 | +--ro node-name? string 135 | +--ro node-location? string 136 +--rw tpms 137 | +--rw tpm* [tpm-name] 138 | +--rw tpm-name string 139 | +--ro hardware-based? boolean 140 | +--ro tpm-physical-index? int32 {ietfhw:entity-mib}? 141 | +--ro tpm-path? string 142 | +--ro compute-node compute-node-ref 143 | +--ro tpm-manufacturer? string 144 | +--rw tpm-firmware-version identityref 145 | +--rw TPM12-hash-algo? identityref 146 | +--rw TPM12-pcrs* pcr 147 | +--rw tpm20-pcr-bank* [TPM20-hash-algo] 148 | | +--rw TPM20-hash-algo identityref 149 | | +--rw pcr-index* tpm:pcr 150 | +--ro tpm-status enumeration 151 | +--rw certificates 152 | +--rw certificate* [certificate-name] 153 | +--rw certificate-name string 154 | +--rw certificate-keystore-ref? leafref 155 | +--rw certificate-type? enumeration 156 +--rw attester-supported-algos 157 +--rw tpm12-asymmetric-signing* identityref {taa:TPM12}? 158 +--rw tpm12-hash* identityref {taa:TPM12}? 159 +--rw tpm20-asymmetric-signing* identityref {taa:TPM20}? 160 +--rw tpm20-hash* identityref {taa:TPM20}? 162 rpcs: 163 +---x tpm12-challenge-response-attestation {taa:TPM12}? 164 | +---w input 165 | | +---w tpm12-attestation-challenge 166 | | +---w pcr-index* pcr 167 | | +---w nonce-value binary 168 | | +---w add-version? boolean 169 | | +---w certificate-name* certificate-name-ref 170 | +--ro output 171 | +--ro tpm12-attestation-response* [] 172 | +--ro certificate-name? certificate-name-ref 173 | +--ro up-time? uint32 174 | +--ro node-id? string 175 | +--ro node-physical-index? int32 176 | | {ietfhw:entity-mib}? 177 | +--ro fixed? binary 178 | +--ro external-data? binary 179 | +--ro signature-size? uint32 180 | +--ro signature? binary 181 | +--ro (tpm12-quote) 182 | +--:(tpm12-quote1) 183 | | +--ro version* [] 184 | | | +--ro major? uint8 185 | | | +--ro minor? uint8 186 | | | +--ro rev-Major? uint8 187 | | | +--ro rev-Minor? uint8 188 | | +--ro digest-value? binary 189 | | +--ro TPM_PCR_COMPOSITE* [] 190 | | +--ro pcr-index* pcr 191 | | +--ro value-size? uint32 192 | | +--ro tpm12-pcr-value* binary 193 | +--:(tpm12-quote2) 194 | +--ro tag? uint8 195 | +--ro pcr-index* pcr 196 | +--ro locality-at-release? uint8 197 | +--ro digest-at-release? binary 198 +---x tpm20-challenge-response-attestation {taa:TPM20}? 199 | +---w input 200 | | +---w tpm20-attestation-challenge 201 | | +---w nonce-value binary 202 | | +---w tpm20-pcr-selection* [] 203 | | | +---w TPM20-hash-algo? identityref 204 | | | +---w pcr-index* tpm:pcr 205 | | +---w certificate-name* certificate-name-ref 206 | +--ro output 207 | +--ro tpm20-attestation-response* [] 208 | +--ro certificate-name? certificate-name-ref 209 | +--ro TPMS_QUOTE_INFO binary 210 | +--ro quote-signature? binary 211 | +--ro up-time? uint32 212 | +--ro node-id? string 213 | +--ro node-physical-index? int32 {ietfhw:entity-mib}? 214 | +--ro unsigned-pcr-values* [] 215 | +--ro TPM20-hash-algo? identityref 216 | +--ro pcr-values* [pcr-index] 217 | +--ro pcr-index pcr 218 | +--ro pcr-value? binary 219 +---x log-retrieval 220 +---w input 221 | +---w log-selector* [] 222 | | +---w tpm-name* string 223 | | +---w (index-type)? 224 | | | +--:(last-entry) 225 | | | | +---w last-entry-value? binary 226 | | | +--:(index) 227 | | | | +---w last-index-number? uint64 228 | | | +--:(timestamp) 229 | | | +---w timestamp? yang:date-and-time 230 | | +---w log-entry-quantity? uint16 231 | +---w log-type identityref 232 +--ro output 233 +--ro system-event-logs 234 +--ro node-data* [] 235 +--ro tpm-name? string 236 +--ro up-time? uint32 237 +--ro log-result 238 +--ro (attested_event_log_type) 239 +--:(bios) 240 | +--ro bios-event-logs 241 | +--ro bios-event-entry* [event-number] 242 | +--ro event-number uint32 243 | +--ro event-type? uint32 244 | +--ro pcr-index? pcr 245 | +--ro digest-list* [] 246 | | +--ro hash-algo? identityref 247 | | +--ro digest* binary 248 | +--ro event-size? uint32 249 | +--ro event-data* uint8 250 +--:(ima) 251 | +--ro ima-event-logs 252 | +--ro ima-event-entry* [event-number] 253 | +--ro event-number uint64 254 | +--ro ima-template? string 255 | +--ro filename-hint? string 256 | +--ro filedata-hash? binary 257 | +--ro filedata-hash-algorithm? string 258 | +--ro template-hash-algorithm? string 259 | +--ro template-hash? binary 260 | +--ro pcr-index? pcr 261 | +--ro signature? binary 262 +--:(netequip_boot) 263 +--ro boot-event-logs 264 +--ro boot-event-entry* [event-number] 265 +--ro event-number uint64 266 +--ro filename-hint? string 267 +--ro filedata-hash? binary 268 +--ro filedata-hash-algorithm? string 269 +--ro file-version? string 270 +--ro file-type? string 271 +--ro pcr-index? pcr 273 2.2. YANG Modules 275 2.2.1. ietf-tpm-remote-attestation 277 This YANG module imports modules from [RFC6991], [RFC8348], 278 [I-D.ietf-netconf-keystore], ietf-tcg-algs.yang. 280 2.2.1.1. Identities 282 This module supports the following types of attestation event logs: 283 , , and . 285 2.2.1.2. RPCs 287 - Allows a Verifier to request 288 a quote of PCRs from a TPM1.2 compliant cryptoprocessor. When one or 289 more is not provided, all TPM1.2 compliant 290 cryptoprocessors will respond. 292 - Allows a Verifier to request 293 a quote of PCRs from a TPM2.0 compliant cryptoprocessor. When one or 294 more is not provided, all TPM2.0 compliant 295 cryptoprocessors will respond. 297 - Allows a Verifier to acquire the evidence which was 298 extended into specific PCRs. 300 2.2.1.3. Data Nodes 302 container - This exists when there are more 303 than one TPM for a particular Attester. This allows each specific 304 TPM to identify on which it belongs. 306 container - Provides configuration and operational details for 307 each supported TPM, including the tpm-firmware-version, PCRs which 308 may be quoted, certificates which are associated with that TPM, and 309 the current operational status. Of note is the certificates which 310 are associated with that TPM. As a certificate is associated with a 311 single Attestation key, knowledge of the certificate allows a 312 specific TPM to be identified. 314 container - Identifies which TCG 315 algorithms are available for use the Attesting platform. This allows 316 an operator to limit algorithms available for use by RPCs to just a 317 desired set from the universe of all allowed by TCG. 319 2.2.1.4. YANG Module 321 file ietf-tpm-remote-attestation@2020-09-18.yang 322 module ietf-tpm-remote-attestation { 323 namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation"; 324 prefix "tpm"; 326 import ietf-yang-types { 327 prefix yang; 328 } 329 import ietf-hardware { 330 prefix ietfhw; 331 } 332 import ietf-keystore { 333 prefix ks; 334 } 335 import ietf-tcg-algs { 336 prefix taa; 338 } 340 organization 341 "IETF RATS (Remote ATtestation procedureS) Working Group"; 343 contact 344 "WG Web : 345 WG List : 346 Author : Eric Voit 347 Author : Henk Birkholz 348 Author : Michael Eckel 349 Author : Shwetha Bhandari 350 Author : Bill Sulzen 351 Author : Liang Xia (Frank) 352 Author : Tom Laffey 353 Author : Guy Fedorkow "; 355 description 356 "A YANG module to enable a TPM 1.2 and TPM 2.0 based 357 remote attestation procedure using a challenge-response 358 interaction model and the TPM 1.2 and TPM 2.0 Quote 359 primitive operations. 361 Copyright (c) 2020 IETF Trust and the persons identified 362 as authors of the code. All rights reserved. 364 Redistribution and use in source and binary forms, with 365 or without modification, is permitted pursuant to, and 366 subject to the license terms contained in, the Simplified 367 BSD License set forth in Section 4.c of the IETF Trust's 368 Legal Provisions Relating to IETF Documents 369 (https://trustee.ietf.org/license-info). 371 Redistribution and use in source and binary forms, with or 372 without modification, is permitted pursuant to, and subject to 373 the license terms contained in, the Simplified BSD License set 374 forth in Section 4.c of the IETF Trust's Legal Provisions 375 Relating to IETF Documents 376 (https://trustee.ietf.org/license-info). 378 This version of this YANG module is part of RFC XXXX 379 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC 380 itself for full legal notices. 382 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 383 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 384 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 385 are to be interpreted as described in BCP 14 (RFC 2119) 386 (RFC 8174) when, and only when, they appear in all 387 capitals, as shown here."; 389 revision "2020-09-18" { 390 description 391 "Initial version"; 392 reference 393 "draft-ietf-rats-yang-tpm-charra"; 394 } 396 /*****************/ 397 /* Typedefs */ 398 /*****************/ 400 typedef pcr { 401 type uint8 { 402 range "0..31"; 403 } 404 description 405 "Valid index number for a PCR. At this point 0-31 is viable."; 406 } 408 typedef compute-node-ref { 409 type leafref { 410 path "/tpm:rats-support-structures/tpm:compute-nodes" + 411 "/tpm:compute-node/tpm:node-name"; 412 } 413 description 414 "This type is used to reference a hardware node. It is quite 415 possible this leafref will eventually point to another YANG 416 module's node."; 417 } 419 typedef certificate-name-ref { 420 type leafref { 421 path "/tpm:rats-support-structures/tpm:tpms/tpm:tpm" + 422 "/tpm:certificates/tpm:certificate/tpm:certificate-name"; 423 } 424 description 425 "A type which allows identification of a TPM based certificate."; 426 } 428 /******************/ 429 /* Identities */ 430 /******************/ 431 identity attested_event_log_type { 432 description 433 "Base identity allowing categorization of the reasons why and 434 attested measurement has been taken on an Attester."; 435 } 437 identity ima { 438 base attested_event_log_type; 439 description 440 "An event type recorded in IMA."; 441 } 443 identity bios { 444 base attested_event_log_type; 445 description 446 "An event type associated with BIOS/UEFI."; 447 } 449 identity netequip_boot { 450 base attested_event_log_type; 451 description 452 "An event type associated with Network Equipment Boot."; 453 } 455 /*****************/ 456 /* Groupings */ 457 /*****************/ 459 grouping TPM20-asymmetric-signing-algo { 460 description 461 "The signature scheme that is used to sign the TPM2 Quote 462 information response."; 463 leaf TPM20-asymmetric-signing-algo { 464 must "/tpm:rats-support-structures/tpm:attester-supported-algos" 465 + "/tpm:tpm20-asymmetric-signing" { 466 error-message "Not a platform supported " + 467 "TPM20-asymmetric-signing-algo"; 468 } 469 type identityref { 470 base taa:asymmetric; 471 } 472 description 473 "The signature scheme that is used to sign the TPM2.0 474 Quote information response. This must be one of those 475 supported by a platform."; 476 default taa:TPM_ALG_RSA; 477 } 478 } 479 grouping TPM12-asymmetric-signing-algo { 480 description 481 "The signature scheme that is used to sign the TPM12 Quote 482 information response."; 483 leaf TPM12-asymmetric-signing-algo { 484 must "/tpm:rats-support-structures/tpm:attester-supported-algos" 485 + "/tpm:tpm12-asymmetric-signing" { 486 error-message "Not a platform supported " + 487 "TPM12-asymmetric-signing-algo"; 488 } 489 type identityref { 490 base taa:asymmetric; 491 } 492 description 493 "The signature scheme that is used to sign the TPM1.2 494 Quote information response. This must be one of those 495 supported by a platform."; 496 default taa:TPM_ALG_RSA; 497 } 498 } 500 grouping TPM20-hash-algo { 501 description 502 "The cryptographic algorithm used to hash the TPM2 PCRs. This 503 must be from the list of platform supported options."; 504 leaf TPM20-hash-algo { 505 must "/tpm:rats-support-structures/tpm:attester-supported-algos" 506 + "/tpm:tpm20-hash" { 507 error-message "Not a platform supported TPM20-hash-algo"; 508 } 509 type identityref { 510 base taa:hash; 511 } 512 description 513 "The hash scheme that is used to hash a TPM1.2 PCR. This 514 must be one of those supported by a platform."; 515 default taa:TPM_ALG_SHA256; 516 } 517 } 519 grouping TPM12-hash-algo { 520 description 521 "The cryptographic algorithm used to hash the TPM1.2 PCRs."; 522 leaf TPM12-hash-algo { 523 must "/tpm:rats-support-structures/tpm:attester-supported-algos" 524 + "/tpm:tpm12-hash" { 525 error-message "Not a platform supported TPM12-hash-algo"; 526 } 527 type identityref { 528 base taa:hash; 529 } 530 description 531 "The hash scheme that is used to hash a TPM1.2 PCR. This 532 must be one of those supported by a platform. This assumes 533 that an algorithm other than SHA1 can be supported on some 534 TPM1.2 cryptoprocessor variant."; 535 default taa:TPM_ALG_SHA1; 536 } 537 } 539 grouping nonce { 540 description 541 "A nonce to show freshness and to allow the detection 542 of replay attacks."; 543 leaf nonce-value { 544 type binary; 545 mandatory true; 546 description 547 "This nonce SHOULD be generated via a registered 548 cryptographic-strength algorithm. In consequence, 549 the length of the nonce depends on the hash algorithm 550 used. The algorithm used in this case is independent 551 from the hash algorithm used to create the hash-value 552 in the response of the attestor."; 553 } 554 } 556 grouping tpm12-pcr-selection { 557 description 558 "A Verifier can request one or more PCR values using its 559 individually created Attestation Key Certificate (AC). 560 The corresponding selection filter is represented in this 561 grouping. 562 Requesting a PCR value that is not in scope of the AC used, 563 detailed exposure via error msg should be avoided."; 564 leaf-list pcr-index { 565 /* the following XPATH must be updated to ensure that only 566 selectable PCRs are allowed in the RPC 567 must "/tpm:rats-support-structures/tpm:tpms" + 568 "/tpm:tpm[tpm-name = current()]" + 569 "/tpm:tpm[TPM12-pcrs = current()]" { 570 error-message "Acquiring this PCR index is not supported"; 571 } 572 */ 573 type pcr; 574 description 575 "The numbers/indexes of the PCRs. At the moment this is limited 576 to 32."; 577 } 578 } 580 grouping tpm20-pcr-selection { 581 description 582 "A Verifier can acquire one or more PCR values, which are hashed 583 together in a TPM2B_DIGEST coming from the TPM2. The selection 584 list of desired PCRs and the Hash Algorithm is represented in 585 this grouping."; 586 list tpm20-pcr-selection { 587 unique "TPM20-hash-algo"; 588 description 589 "Specifies the list of PCRs and Hash Algorithms that can be 590 returned within a TPM2B_DIGEST."; 591 reference 592 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 593 TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; 594 uses TPM20-hash-algo; 595 leaf-list pcr-index { 596 /* the following XPATH must be updated to ensure that only 597 selectable PCRs are allowed in the RPC 598 must "/tpm:rats-support-structures/tpm:tpms" + 599 "/tpm:tpm[tpm-name = current()]" + 600 "/tpm:tpm20-pcr-bank[pcr-index = current()]" { 601 error-message "Acquiring this PCR index is not supported"; 602 } 603 */ 604 type tpm:pcr; 605 description 606 "The numbers of the PCRs that which are being tracked 607 with a hash based on the TPM20-hash-algo."; 608 } 609 } 610 } 612 grouping certificate-name-ref { 613 description 614 "Identifies a certificate in a keystore."; 615 leaf certificate-name { 616 type certificate-name-ref; 617 description 618 "Identifies a certificate in a keystore."; 619 } 620 } 622 grouping tpm-name { 623 description 624 "A unique TPM on a device."; 625 leaf tpm-name { 626 type string; 627 description 628 "Unique system generated name for a TPM on a device."; 629 } 630 } 632 grouping tpm-name-selector { 633 description 634 "One or more TPM on a device."; 635 leaf-list tpm-name { 636 type string; 637 config false; 638 description 639 "Name of one or more unique TPMs on a device. If this object 640 exists, a selection should pull only the objects related to 641 these TPM(s). If it does not exist, all qualifying TPMs that 642 are 'hardware-based' equals true on the device are selected."; 643 } 644 } 646 grouping compute-node-identifier { 647 description 648 "In a distributed system with multiple compute nodes 649 this is the node identified by name and physical-index."; 650 leaf node-id { 651 type string; 652 description 653 "ID of the compute node, such as Board Serial Number."; 654 } 655 leaf node-physical-index { 656 if-feature ietfhw:entity-mib; 657 type int32 { 658 range "1..2147483647"; 659 } 660 config false; 661 description 662 "The entPhysicalIndex for the compute node."; 663 reference 664 "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; 665 } 666 } 668 grouping tpm12-pcr-info-short { 669 description 670 "This structure is for defining a digest at release when the only 671 information that is necessary is the release configuration."; 672 uses tpm12-pcr-selection; 673 leaf locality-at-release { 674 type uint8; 675 description 676 "This SHALL be the locality modifier required to release the 677 information (TPM 1.2 type TPM_LOCALITY_SELECTION)"; 678 reference 679 "TPM Main Part 2 TPM Structures v1.2 July 2007 680 Section 8.6"; 681 } 682 leaf digest-at-release { 683 type binary; 684 description 685 "This SHALL be the digest of the PCR indices and PCR values 686 to verify when revealing auth data (TPM 1.2 type 687 TPM_COMPOSITE_HASH)."; 688 reference 689 "TPM Main Part 2 TPM Structures v1.2 July 2007 690 Section 5.4.1."; 691 } 692 } 694 grouping tpm12-version { 695 description 696 "This structure provides information relative the version of 697 the TPM."; 698 list version { 699 description 700 "This indicates the version of the structure 701 (TPM 1.2 type TPM_STRUCT_VER). This MUST be 1.1.0.0."; 702 reference 703 "TPM Main Part 2 TPM Structures v1.2 July 2007 704 Section 5.1."; 705 leaf major { 706 type uint8; 707 description 708 "Indicates the major version of the structure. 709 MUST be 0x01."; 710 } 711 leaf minor { 712 type uint8; 713 description 714 "Indicates the minor version of the structure. 715 MUST be 0x01."; 716 } 717 leaf rev-Major { 718 type uint8; 719 description 720 "Indicates the rev major version of the structure. 721 MUST be 0x00."; 722 } 723 leaf rev-Minor { 724 type uint8; 725 description 726 "Indicates the rev minor version of the structure. 727 MUST be 0x00."; 728 } 729 } 730 } 732 grouping tpm12-quote-info-common { 733 description 734 "These statements are within both quote variants of the TPM 1.2"; 735 reference 736 "TPM Main Part 2 TPM Structures v1.2 July 2007, 737 Section 11.3 & 11.4."; 738 leaf fixed { 739 type binary; 740 description 741 "This SHALL always be the string 'QUOT' or 'QUO2' 742 (length is 4 bytes)."; 743 } 744 leaf external-data { 745 type binary; 746 description 747 "160 bits of externally supplied data, typically a nonce."; 748 } 749 leaf signature-size { 750 type uint32; 751 description 752 "The size of TPM 1.2 'signature' value."; 753 } 754 leaf signature { 755 type binary; 756 description 757 "Signature over hash of tpm12-quote-info2'."; 758 } 759 } 761 grouping tpm12-quote-info { 762 description 763 "This structure provides the mechanism for the TPM to quote the 764 current values of a list of PCRs (as used by the TPM_Quote2 765 command)."; 766 uses tpm12-version; 767 leaf digest-value { 768 type binary; 769 description 770 "This SHALL be the result of the composite hash algorithm using 771 the current values of the requested PCR indices 772 (TPM 1.2 type TPM_COMPOSITE_HASH.)"; 773 } 774 } 776 grouping tpm12-quote-info2 { 777 description 778 "This structure provides the mechanism for the TPM to quote the 779 current values of a list of PCRs 780 (as used by the TPM_Quote2 command)."; 781 leaf tag { 782 type uint8; 783 description 784 "This SHALL be TPM_TAG_QUOTE_INFO2."; 785 } 786 uses tpm12-pcr-info-short; 787 } 789 grouping tpm12-cap-version-info { 790 description 791 "TPM returns the current version and revision of the TPM 1.2 ."; 792 list TPM_PCR_COMPOSITE { 793 description 794 "The TPM 1.2 TPM_PCRVALUEs for the pcr-indices."; 795 reference 796 "TPM Main Part 2 TPM Structures v1.2 July 2007, Section 8.2"; 797 uses tpm12-pcr-selection; 798 leaf value-size { 799 type uint32; 800 description 801 "This SHALL be the size of the 'tpm12-pcr-value' field 802 (not the number of PCRs)."; 803 } 804 leaf-list tpm12-pcr-value { 805 type binary; 806 description 807 "The list of TPM_PCRVALUEs from each PCR selected in sequence 808 of tpm12-pcr-selection."; 809 } 810 list version-info { 811 description 812 "An optional output parameter from a TPM 1.2 TPM_Quote2."; 813 leaf tag { 814 type uint16; /* This should be converted into an ENUM */ 815 description 816 "The TPM 1.2 version and revision 817 (TPM 1.2 type TPM_STRUCTURE_TAG). 818 This MUST be TPM_CAP_VERSION_INFO (0x0030)"; 819 } 820 uses tpm12-version; 821 leaf spec-level { 822 type uint16; 823 description 824 "A number indicating the level of ordinals supported."; 825 } 826 leaf errata-rev { 827 type uint8; 828 description 829 "A number indicating the errata version of the 830 specification."; 831 } 832 leaf tpm-vendor-id { 833 type binary; 834 description 835 "The vendor ID unique to each TPM manufacturer."; 836 } 837 leaf vendor-specific-size { 838 type uint16; 839 description 840 "The size of the vendor-specific area."; 841 } 842 leaf vendor-specific { 843 type binary; 844 description 845 "Vendor specific information."; 846 } 847 } 848 } 849 } 851 grouping tpm12-pcr-composite { 852 description 853 "The actual values of the selected PCRs (a list of TPM_PCRVALUEs 854 (binary) and associated metadata for TPM 1.2."; 855 list TPM_PCR_COMPOSITE { 856 description 857 "The TPM 1.2 TPM_PCRVALUEs for the pcr-indices."; 858 reference 859 "TPM Main Part 2 TPM Structures v1.2 July 2007, Section 8.2"; 860 uses tpm12-pcr-selection; 861 leaf value-size { 862 type uint32; 863 description 864 "This SHALL be the size of the 'tpm12-pcr-value' field 865 (not the number of PCRs)."; 866 } 867 leaf-list tpm12-pcr-value { 868 type binary; 869 description 870 "The list of TPM_PCRVALUEs from each PCR selected in sequence 871 of tpm12-pcr-selection."; 872 } 873 } 874 } 876 grouping node-uptime { 877 description 878 "Uptime in seconds of the node."; 879 leaf up-time { 880 type uint32; 881 description 882 "Uptime in seconds of this node reporting its data"; 883 } 884 } 886 grouping tpm12-attestation { 887 description 888 "Contains an instance of TPM1.2 style signed cryptoprocessor 889 measurements. It is supplemented by unsigned Attester 890 information."; 891 uses node-uptime; 892 uses compute-node-identifier; 893 uses tpm12-quote-info-common; 894 choice tpm12-quote { 895 mandatory true; 896 description 897 "Either a tpm12-quote-info or tpm12-quote-info2, depending 898 on whether TPM_Quote or TPM_Quote2 was used 899 (cf. input field add-verson)."; 900 case tpm12-quote1 { 901 description 902 "BIOS/UEFI event logs"; 903 uses tpm12-quote-info; 904 uses tpm12-pcr-composite; 905 } 906 case tpm12-quote2 { 907 description 908 "BIOS/UEFI event logs"; 909 uses tpm12-quote-info2; 910 } 912 } 913 } 915 grouping tpm20-attestation { 916 description 917 "Contains an instance of TPM2 style signed cryptoprocessor 918 measurements. It is supplemented by unsigned Attester 919 information."; 920 leaf TPMS_QUOTE_INFO { 921 mandatory true; 922 type binary; 923 description 924 "A hash of the latest PCR values (and the hash algorithm used) 925 which have been returned from a Verifier for the selected PCRs 926 and Hash Algorithms."; 927 reference 928 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 929 TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.12.1"; 930 } 931 leaf quote-signature { 932 type binary; 933 description 934 "Quote signature returned by TPM Quote. The signature was 935 generated using the key associated with the 936 certificate-name."; 937 } 938 uses node-uptime; 939 uses compute-node-identifier; 940 list unsigned-pcr-values { 941 description 942 "PCR values in each PCR bank. This often should not be 943 necessary for TPM2, as the raw information needing 944 signature and hash validation will be coming from 945 the 'quote' leaf"; 946 uses TPM20-hash-algo; 947 list pcr-values { 948 key pcr-index; 949 description 950 "List of one PCR bank."; 951 leaf pcr-index { 952 type pcr; 953 description 954 "PCR index number."; 955 } 956 leaf pcr-value { 957 type binary; 958 description 959 "PCR value."; 961 } 962 } 963 } 964 } 966 grouping log-identifier { 967 description 968 "Identifier for type of log to be retrieved."; 969 leaf log-type { 970 type identityref { 971 base attested_event_log_type; 972 } 973 mandatory true; 974 description 975 "The corresponding measurement log type identity."; 976 } 977 } 979 grouping boot-event-log { 980 description 981 "Defines an event log corresponding to the event that extended 982 the PCR"; 983 leaf event-number { 984 type uint32; 985 description 986 "Unique event number of this event"; 987 } 988 leaf event-type { 989 type uint32; 990 description 991 "log event type"; 992 } 993 leaf pcr-index { 994 type pcr; 995 description 996 "Defines the PCR index that this event extended"; 997 } 998 list digest-list { 999 description 1000 "Hash of event data"; 1001 leaf hash-algo { 1002 type identityref { 1003 base taa:hash; 1004 } 1005 description 1006 "The hash scheme that is used to compress the event data in 1007 each of the leaf-list digest items."; 1009 } 1010 leaf-list digest { 1011 type binary; 1012 description 1013 "The hash of the event data"; 1014 } 1015 } 1016 leaf event-size { 1017 type uint32; 1018 description 1019 "Size of the event data"; 1020 } 1021 leaf-list event-data { 1022 type uint8; 1023 description 1024 "The event data size determined by event-size"; 1025 } 1026 } 1028 grouping bios-event-log { 1029 description 1030 "Measurement log created by the BIOS/UEFI."; 1031 list bios-event-entry { 1032 key event-number; 1033 description 1034 "Ordered list of TCG described event log 1035 that extended the PCRs in the order they 1036 were logged"; 1037 uses boot-event-log; 1038 } 1039 } 1041 grouping ima-event { 1042 description 1043 "Defines an hash log extend event for IMA measurements"; 1044 leaf event-number { 1045 type uint64; 1046 description 1047 "Unique number for this event for sequencing"; 1048 } 1049 leaf ima-template { 1050 type string; 1051 description 1052 "Name of the template used for event logs 1053 for e.g. ima, ima-ng, ima-sig"; 1054 } 1055 leaf filename-hint { 1056 type string; 1057 description 1058 "File that was measured"; 1059 } 1060 leaf filedata-hash { 1061 type binary; 1062 description 1063 "Hash of filedata"; 1064 } 1065 leaf filedata-hash-algorithm { 1066 type string; 1067 description 1068 "Algorithm used for filedata-hash"; 1069 } 1070 leaf template-hash-algorithm { 1071 type string; 1072 description 1073 "Algorithm used for template-hash"; 1074 } 1075 leaf template-hash { 1076 type binary; 1077 description 1078 "hash(filedata-hash, filename-hint)"; 1079 } 1080 leaf pcr-index { 1081 type pcr; 1082 description 1083 "Defines the PCR index that this event extended"; 1084 } 1085 leaf signature { 1086 type binary; 1087 description 1088 "The file signature"; 1089 } 1090 } 1092 grouping ima-event-log { 1093 description 1094 "Measurement log created by IMA."; 1095 list ima-event-entry { 1096 key event-number; 1097 description 1098 "Ordered list of ima event logs by event-number"; 1099 uses ima-event; 1100 } 1101 } 1103 grouping netequip-boot-event { 1104 description 1105 "Defines an hash log extend event for Network Equipment Boot."; 1106 leaf event-number { 1107 type uint64; 1108 description 1109 "Unique number for this event for sequencing"; 1110 } 1111 leaf filename-hint { 1112 type string; 1113 description 1114 "File that was measured"; 1115 } 1116 leaf filedata-hash { 1117 type binary; 1118 description 1119 "Hash of filedata"; 1120 } 1121 leaf filedata-hash-algorithm { 1122 type string; 1123 description 1124 "Algorithm used for filedata-hash."; 1125 } 1126 leaf file-version { 1127 type string; 1128 description 1129 "File version information."; 1130 } 1131 leaf file-type { 1132 type string; 1133 description 1134 "Indicating at which boot stage the file is loaded, 1135 such as BIOS, BootLoader, etc."; 1136 } 1137 leaf pcr-index { 1138 type pcr; 1139 description 1140 "Defines the PCR index that this event extended"; 1141 } 1142 } 1144 grouping network-equipment-boot-event-log { 1145 description 1146 "Measurement log created by Network Equipment Boot."; 1147 list boot-event-entry { 1148 key event-number; 1149 description 1150 "Ordered list of Network Equipment Boot event logs 1151 by event-number."; 1152 uses netequip-boot-event; 1154 } 1155 } 1157 grouping event-logs { 1158 description 1159 "A selector for the log and its type."; 1160 choice attested_event_log_type { 1161 mandatory true; 1162 description 1163 "Event log type determines the event logs content."; 1164 case bios { 1165 description 1166 "BIOS/UEFI event logs"; 1167 container bios-event-logs { 1168 description 1169 "BIOS/UEFI event logs"; 1170 uses bios-event-log; 1171 } 1172 } 1173 case ima { 1174 description 1175 "IMA event logs."; 1176 container ima-event-logs { 1177 description 1178 "IMA event logs."; 1179 uses ima-event-log; 1180 } 1181 } 1182 case netequip_boot { 1183 description 1184 "Network Equipment Boot event logs"; 1185 container boot-event-logs { 1186 description 1187 "Network equipment boot event logs."; 1188 uses network-equipment-boot-event-log; 1189 } 1190 } 1191 } 1192 } 1194 /**********************/ 1195 /* RPC operations */ 1196 /**********************/ 1198 rpc tpm12-challenge-response-attestation { 1199 if-feature "taa:TPM12"; 1200 description 1201 "This RPC accepts the input for TSS TPM 1.2 commands made to the 1202 attesting device."; 1203 input { 1204 container tpm12-attestation-challenge { 1205 description 1206 "This container includes every information element defined 1207 in the reference challenge-response interaction model for 1208 remote attestation. Corresponding values are based on 1209 TPM 1.2 structure definitions"; 1210 uses tpm12-pcr-selection; 1211 uses nonce; 1212 leaf add-version { 1213 type boolean; 1214 description 1215 "Whether or not to include TPM_CAP_VERSION_INFO; if true, 1216 then TPM_Quote2 must be used to create the response."; 1217 reference 1218 "TPM Main Part 2 TPM Structures v1.2 July 2007, 1219 Section 21.6"; 1220 } 1221 leaf-list certificate-name { 1222 must "/tpm:rats-support-structures/tpm:tpms" + 1223 "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']" + 1224 "/tpm:certificates/" + 1225 "/tpm:certificate[certificate-name-ref=current()]" { 1226 error-message "Not an available TPM1.2 AIK certificate."; 1227 } 1228 type certificate-name-ref; 1229 description 1230 "When populated, the RPC will only get a Quote for the 1231 TPMs associated with these certificate(s)."; 1232 } 1233 } 1234 } 1235 output { 1236 list tpm12-attestation-response { 1237 unique "certificate-name"; 1238 description 1239 "The binary output of TPM 1.2 TPM_Quote/TPM_Quote2, including 1240 the PCR selection and other associated attestation evidence 1241 metadata"; 1242 uses certificate-name-ref { 1243 description 1244 "Certificate associated with this tpm12-attestation."; 1245 } 1246 uses tpm12-attestation; 1247 } 1248 } 1249 } 1250 rpc tpm20-challenge-response-attestation { 1251 if-feature "taa:TPM20"; 1252 description 1253 "This RPC accepts the input for TSS TPM 2.0 commands of the 1254 managed device. ComponentIndex from the hardware manager YANG 1255 module to refer to dedicated TPM in composite devices, 1256 e.g. smart NICs, is still a TODO."; 1257 input { 1258 container tpm20-attestation-challenge { 1259 description 1260 "This container includes every information element defined 1261 in the reference challenge-response interaction model for 1262 remote attestation. Corresponding values are based on 1263 TPM 2.0 structure definitions"; 1264 uses nonce; 1265 uses tpm20-pcr-selection; 1266 leaf-list certificate-name { 1267 must "/tpm:rats-support-structures/tpm:tpms" + 1268 "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']" + 1269 "/tpm:certificates/" + 1270 "/tpm:certificate[certificate-name-ref=current()]" { 1271 error-message "Not an available TPM2.0 AIK certificate."; 1272 } 1273 type certificate-name-ref; 1274 description 1275 "When populated, the RPC will only get a Quote for the 1276 TPMs associated with the certificates."; 1277 } 1278 } 1279 } 1280 output { 1281 list tpm20-attestation-response { 1282 unique "certificate-name"; 1283 description 1284 "The binary output of TPM2b_Quote in one TPM chip of the 1285 node which identified by node-id. An TPMS_ATTEST structure 1286 including a length, encapsulated in a signature"; 1287 uses certificate-name-ref { 1288 description 1289 "Certificate associated with this tpm20-attestation."; 1290 } 1291 uses tpm20-attestation; 1292 } 1293 } 1294 } 1296 rpc log-retrieval { 1297 description 1298 "Logs Entries are either identified via indices or via providing 1299 the last line received. The number of lines returned can be 1300 limited. The type of log is a choice that can be augmented."; 1301 input { 1302 list log-selector { 1303 description 1304 "Selection of log entries to be reported."; 1305 uses tpm-name-selector; 1306 choice index-type { 1307 description 1308 "Last log entry received, log index number, or timestamp."; 1309 case last-entry { 1310 description 1311 "The last entry of the log already retrieved."; 1312 leaf last-entry-value { 1313 type binary; 1314 description 1315 "Content of an log event which matches 1:1 with a 1316 unique event record contained within the log. Log 1317 entries subsequent to this will be passed to the 1318 requester. Note: if log entry values are not unique, 1319 this MUST return an error."; 1320 } 1321 } 1322 case index { 1323 description 1324 "Numeric index of the last log entry retrieved, or 1325 zero."; 1326 leaf last-index-number { 1327 type uint64; 1328 description 1329 "The last numeric index number of a log entry. 1330 Zero means to start at the beginning of the log. 1331 Entries subsequent to this will be passed to the 1332 requester."; 1333 } 1334 } 1335 case timestamp { 1336 leaf timestamp { 1337 type yang:date-and-time; 1338 description 1339 "Timestamp from which to start the extraction. The 1340 next log entry subsequent to this timestamp is to 1341 be sent."; 1342 } 1343 description 1344 "Timestamp from which to start the extraction."; 1345 } 1347 } 1348 leaf log-entry-quantity { 1349 type uint16; 1350 description 1351 "The number of log entries to be returned. If omitted, it 1352 means all of them."; 1353 } 1354 } 1355 uses log-identifier; 1356 } 1358 output { 1359 container system-event-logs { 1360 description 1361 "The requested data of the measurement event logs"; 1362 list node-data { 1363 unique "tpm-name"; 1364 description 1365 "Event logs of a node in a distributed system 1366 identified by the node name"; 1367 uses tpm-name; 1368 uses node-uptime; 1369 container log-result { 1370 description 1371 "The requested entries of the corresponding log."; 1372 uses event-logs; 1373 } 1374 } 1375 } 1376 } 1377 } 1379 /**************************************/ 1380 /* Config & Oper accessible nodes */ 1381 /**************************************/ 1383 container rats-support-structures { 1384 description 1385 "The datastore definition enabling verifiers or relying 1386 parties to discover the information necessary to use the 1387 remote attestation RPCs appropriately."; 1388 container compute-nodes { 1389 presence 1390 "Indicates that more than one TPM exists on a device."; 1391 description 1392 "Holds the set device subsystems/components in this composite 1393 device that support TPM operations."; 1394 list compute-node { 1395 key node-id; 1396 config false; 1397 min-elements 2; 1398 uses compute-node-identifier; 1399 description 1400 "A components in this composite device that RATS which 1401 supports TPM operations."; 1402 leaf node-name { 1403 type string; 1404 description 1405 "Name of the compute node."; 1406 } 1407 leaf node-location { 1408 type string; 1409 description 1410 "Location of the compute node, such as slot number."; 1411 } 1412 } 1413 } 1414 container tpms { 1415 description 1416 "Holds the set of TPMs within an Attester."; 1417 list tpm { 1418 key tpm-name; 1419 unique "tpm-path"; 1420 description 1421 "A list of TPMs in this composite device that RATS 1422 can be conducted with."; 1423 uses tpm-name; 1424 leaf hardware-based { 1425 type boolean; 1426 config false; 1427 description 1428 "Answers the question: is this TPM is a hardware based 1429 TPM?"; 1430 } 1431 leaf tpm-physical-index { 1432 if-feature ietfhw:entity-mib; 1433 type int32 { 1434 range "1..2147483647"; 1435 } 1436 config false; 1437 description 1438 "The entPhysicalIndex for the TPM."; 1439 reference 1440 "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; 1441 } 1442 leaf tpm-path { 1443 type string; 1444 config false; 1445 description 1446 "Path to a unique TPM on a device. This can change agross 1447 reboots."; 1448 } 1449 leaf compute-node { 1450 when "../../../compute-nodes"; 1451 type compute-node-ref; 1452 config false; 1453 mandatory true; 1454 description 1455 "When there is more that one TPM, this indicates for which 1456 compute node this TPM services."; 1457 } 1458 leaf tpm-manufacturer { 1459 type string; 1460 config false; 1461 description 1462 "TPM manufacturer name."; 1463 } 1464 leaf tpm-firmware-version { 1465 type identityref { 1466 base taa:cryptoprocessor; 1467 } 1468 mandatory true; 1469 description 1470 "Identifies the cryptoprocessor API set supported. This 1471 cannot be configured. However it is referenced via XPATH 1472 as part of configuration, so is shown as 'rw' 1473 to eliminate YANG warnings related NMDA."; 1474 } 1475 uses TPM12-hash-algo { 1476 when "tpm-firmware-version = 'taa:tpm12'"; 1477 refine TPM12-hash-algo { 1478 description 1479 "The hash algorithm overwrites the default used for PCRs 1480 on this TPM1.2 compliant cryptoprocessor."; 1481 } 1482 } 1483 leaf-list TPM12-pcrs { 1484 when "../tpm-firmware-version = 'taa:tpm12'"; 1485 type pcr; 1486 description 1487 "The PCRs which may be extracted from this TPM1.2 1488 compliant cryptoprocessor."; 1489 } 1490 list tpm20-pcr-bank { 1491 when "../tpm-firmware-version = 'taa:tpm20'"; 1492 key "TPM20-hash-algo"; 1493 description 1494 "Specifies the list of PCRs that may be extracted for 1495 a specific Hash Algorithm on this TPM2 compliant 1496 cryptoprocessor. A bank is a set of PCRs which are 1497 extended using a particular hash algorithm."; 1498 reference 1499 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 1500 TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; 1501 leaf TPM20-hash-algo { 1502 must "/tpm:rats-support-structures" 1503 + "/tpm:attester-supported-algos" 1504 + "/tpm:tpm20-hash" { 1505 error-message "Not a platform supported TPM20-hash-algo"; 1506 } 1507 type identityref { 1508 base taa:hash; 1509 } 1510 description 1511 "The hash scheme actively being used to hash a 1512 one or more TPM2.0 PCRs."; 1513 } 1514 leaf-list pcr-index { 1515 type tpm:pcr; 1516 description 1517 "Defines what TPM2 PCRs are available to be extracted."; 1518 } 1519 } 1520 leaf tpm-status { 1521 type enumeration { 1522 enum operational { 1523 value 0; 1524 description 1525 "The TPM currently is currently running normally and 1526 is ready to accept and process TPM quotes."; 1527 reference 1528 "TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf 1529 Section 12"; 1530 } 1531 enum non-operational { 1532 value 1; 1533 description 1534 "TPM is in a state such as startup or shutdown which 1535 precludes the processing of TPM quotes."; 1536 } 1537 } 1538 config false; 1539 mandatory true; 1540 description 1541 "TPM chip self-test status."; 1542 } 1543 container certificates { 1544 description 1545 "The TPM's certificates, including EK certificates 1546 and AK certificates."; 1547 list certificate { 1548 key "certificate-name"; 1549 description 1550 "Three types of certificates can be accessed via 1551 this statement, including Initial Attestation 1552 Key Cert, Local Attestation Key Cert or 1553 Endorsement Key Cert."; 1554 leaf certificate-name { 1555 type string; 1556 description 1557 "An arbitrary name uniquely identifying a certificate 1558 associated within key within a TPM."; 1559 } 1560 leaf certificate-keystore-ref { 1561 type leafref { 1562 path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key" 1563 + "/ks:certificates/ks:certificate/ks:name"; 1564 } 1565 description 1566 "A reference to a specific certificate of an 1567 asymmetric key in the Keystore."; 1568 /* Note: It is also possible to import a grouping which 1569 allows local definition via an imported keystore 1570 schema. */ 1571 } 1572 leaf certificate-type { 1573 type enumeration { 1574 enum endorsement-cert { 1575 value 0; 1576 description 1577 "Endorsement Key (EK) Certificate type."; 1578 } 1579 enum initial-attestation-cert { 1580 value 1; 1581 description 1582 "Initial Attestation key (IAK) Certificate type."; 1583 } 1584 enum local-attestation-cert { 1585 value 2; 1586 description 1587 "Local Attestation Key (LAK) Certificate type."; 1588 } 1589 } 1590 description 1591 "Type of this certificate"; 1592 } 1593 } 1594 } 1595 } 1596 } 1597 container attester-supported-algos { 1598 description 1599 "Identifies which TPM algorithms are available for use on an 1600 attesting platform."; 1601 leaf-list tpm12-asymmetric-signing { 1602 if-feature "taa:TPM12"; 1603 when "../../tpm:tpms" + 1604 "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']"; 1605 type identityref { 1606 base taa:asymmetric; 1607 } 1608 description 1609 "Platform Supported TPM12 asymmetric algorithms."; 1610 } 1611 leaf-list tpm12-hash { 1612 if-feature "taa:TPM12"; 1613 when "../../tpm:tpms" + 1614 "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm12']"; 1615 type identityref { 1616 base taa:hash; 1617 } 1618 description 1619 "Platform supported TPM12 hash algorithms."; 1620 } 1621 leaf-list tpm20-asymmetric-signing { 1622 if-feature "taa:TPM20"; 1623 when "../../tpm:tpms" + 1624 "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']"; 1625 type identityref { 1626 base taa:asymmetric; 1627 } 1628 description 1629 "Platform Supported TPM20 asymmetric algorithms."; 1630 } 1631 leaf-list tpm20-hash { 1632 if-feature "taa:TPM20"; 1633 when "../../tpm:tpms" + 1634 "/tpm:tpm[tpm:tpm-firmware-version='taa:tpm20']"; 1636 type identityref { 1637 base taa:hash; 1638 } 1639 description 1640 "Platform supported TPM20 hash algorithms."; 1641 } 1642 } 1643 } 1644 } 1645 1647 2.2.2. ietf-tcg-algs 1649 Cryptographic algorithm types were initially included within -v14 1650 NETCONF's iana-crypto-types.yang. Unfortunately all this content 1651 including the algorithms needed here failed to make the -v15 used 1652 WGLC. As a result this document has encoded the TCG Algorithm 1653 definitions of [TCG-Algos], revision 1.32. By including this full 1654 table as a separate YANG file within this document, it is possible 1655 for other YANG models to leverage the contents of this model. 1657 2.2.2.1. Features 1659 There are two types of features supported and . 1660 Support for either of these features indicates that a cryptoprocessor 1661 supporting the corresponding type of TCG API is present on an 1662 Attester. Most commonly, only one type of cryptoprocessor will be 1663 available on an Attester. 1665 2.2.2.2. Identities 1667 There are three types of identities in this model. 1669 The first are the cryptographic functions supportable by a TPM 1670 algorithm, these include: , , , 1671 , , , , and 1672 . The definitions of each of these are in Table 2 of 1673 [TCG-Algos]. 1675 The second are API specifications for tpms: and . 1677 The third are specific algorithm types. Each algorithm type defines 1678 what cryptographic functions may be supported, and on which type of 1679 API specification. It is not required that an implementation of a 1680 specific TPM will support all algorithm types. The contents of each 1681 specific algorithm mirrors what is in Table 3 of [TCG-Algos]. 1683 2.2.2.3. YANG Module 1685 ietf-tcg-algs@2020-09-18.yang 1686 module ietf-tcg-algs { 1687 yang-version 1.1; 1688 namespace "urn:ietf:params:xml:ns:yang:ietf-tcg-algs"; 1689 prefix taa; 1691 organization 1692 "IETF RATS Working Group"; 1694 contact 1695 "WG Web: 1696 WG List: 1697 Author: Eric Voit "; 1699 description 1700 "This module defines a identities for asymmetric algorithms. 1702 Copyright (c) 2020 IETF Trust and the persons identified 1703 as authors of the code. All rights reserved. 1704 Redistribution and use in source and binary forms, with 1705 or without modification, is permitted pursuant to, and 1706 subject to the license terms contained in, the Simplified 1707 BSD License set forth in Section 4.c of the IETF Trust's 1708 Legal Provisions Relating to IETF Documents 1709 (https://trustee.ietf.org/license-info). 1710 This version of this YANG module is part of RFC XXXX 1711 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC 1712 itself for full legal notices. 1713 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 1714 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 1715 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 1716 are to be interpreted as described in BCP 14 (RFC 2119) 1717 (RFC 8174) when, and only when, they appear in all 1718 capitals, as shown here."; 1720 revision 2020-09-18 { 1721 description 1722 "Initial version"; 1723 reference 1724 "RFC XXXX: tbd"; 1725 } 1727 /*****************/ 1728 /* Features */ 1729 /*****************/ 1730 feature TPM12 { 1731 description 1732 "This feature indicates algorithm support for the TPM 1.2 API 1733 as per TPM-main-1.2-Rev94-part-2, Section 4.8."; 1734 } 1736 feature TPM20 { 1737 description 1738 "This feature indicates algorithm support for the TPM 2.0 API 1739 as per TPM-Rev-2.0-Part-1-Architecture-01.38 Section 11.4."; 1740 } 1742 /*****************/ 1743 /* Identities */ 1744 /*****************/ 1746 /* There needs to be collasping/verification of some of the identity 1747 types between the various algorithm types listed below */ 1749 identity asymmetric { 1750 description 1751 "A TCG recognized asymmetric algorithm with a public and 1752 private key."; 1753 reference 1754 "http://trustedcomputinggroup.org/resource/tcg-algorithm-registry/ 1755 TCG_Algorithm_Registry_r1p32_pub Table 2"; 1756 } 1758 identity symmetric { 1759 description 1760 "A TCG recognized symmetric algorithm with only a private key."; 1761 reference 1762 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1763 } 1765 identity hash { 1766 description 1767 "A TCG recognized hash algorithm that compresses input data to 1768 a digest value or indicates a method that uses a hash."; 1769 reference 1770 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1771 } 1773 identity signing { 1774 description 1775 "A TCG recognized signing algorithm"; 1776 reference 1777 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1778 } 1780 identity anonymous_signing { 1781 description 1782 "A TCG recognized anonymous signing algorithm."; 1783 reference 1784 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1785 } 1787 identity encryption_mode { 1788 description 1789 "A TCG recognized encryption mode."; 1790 reference 1791 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1792 } 1794 identity method { 1795 description 1796 "A TCG recognized method such as a mask generation function."; 1797 reference 1798 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1799 } 1801 identity object_type { 1802 description 1803 "A TCG recognized object type."; 1804 reference 1805 "TCG_Algorithm_Registry_r1p32_pub Table 2"; 1806 } 1808 identity cryptoprocessor { 1809 description 1810 "Base identity identifying a crytoprocessor."; 1811 } 1813 identity tpm12 { 1814 if-feature "TPM12"; 1815 base cryptoprocessor; 1816 description 1817 "Supportable by a TPM1.2."; 1818 reference 1819 "TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf 1820 TPM_ALGORITHM_ID values, page 18"; 1821 } 1823 identity tpm20 { 1824 if-feature "TPM12"; 1825 base cryptoprocessor; 1826 description 1827 "Supportable by a TPM2."; 1828 reference 1829 "TPM-Rev-2.0-Part-2-Structures-01.38.pdf 1830 The TCG Algorithm Registry. Table 9"; 1831 } 1833 identity TPM_ALG_RSA { 1834 if-feature "TPM12 or TPM20"; 1835 base tpm12; 1836 base tpm20; 1837 base asymmetric; 1838 base object_type; 1839 description 1840 "RSA algorithm"; 1841 reference 1842 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1843 RFC 8017. ALG_ID: 0x0001"; 1845 } 1847 identity TPM_ALG_TDES { 1848 if-feature "TPM12"; 1849 base tpm12; 1850 base symmetric; 1851 description 1852 "Block cipher with various key sizes (Triple Data Encryption 1853 Algorithm, commonly called Triple Data Encryption Standard) 1854 Note: was banned in TPM1.2 v94"; 1855 reference 1856 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1857 ISO/IEC 18033-3. ALG_ID: 0x0003"; 1859 } 1861 identity TPM_ALG_SHA1 { 1862 if-feature "TPM12 or TPM20"; 1863 base hash; 1864 base tpm12; 1865 base tpm20; 1866 description 1867 "SHA1 algorithm - Deprecated due to insufficient cryptographic 1868 protection. However it is still useful for hash algorithms 1869 where protection is not required."; 1870 reference 1871 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1872 ISO/IEC 10118-3. ALG_ID: 0x0004"; 1874 } 1876 identity TPM_ALG_HMAC { 1877 if-feature "TPM12 or TPM20"; 1878 base tpm12; 1879 base tpm20; 1880 base hash; 1881 base signing; 1882 description 1883 "Hash Message Authentication Code (HMAC) algorithm"; 1884 reference 1885 "TCG_Algorithm_Registry_r1p32_pub Table 3, 1886 ISO/IEC 9797-2 and RFC2014. ALG_ID: 0x0005"; 1888 } 1890 identity TPM_ALG_AES { 1891 if-feature "TPM12"; 1892 base tpm12; 1893 base symmetric; 1894 description 1895 "The AES algorithm with various key sizes"; 1896 reference 1897 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1898 ISO/IEC 18033-3. ALG_ID: 0x0006"; 1900 } 1902 identity TPM_ALG_MGF1 { 1903 if-feature "TPM20"; 1904 base tpm20; 1905 base hash; 1906 base method; 1907 description 1908 "hash-based mask-generation function"; 1909 reference 1910 "TCG_Algorithm_Registry_r1p32_pub Table 3, 1911 IEEE Std 1363-2000 and IEEE Std 1363a -2004. 1912 ALG_ID: 0x0007"; 1914 } 1916 identity TPM_ALG_KEYEDHASH { 1917 if-feature "TPM20"; 1918 base tpm20; 1919 base hash; 1920 base object_type; 1921 description 1922 "An encryption or signing algorithm using a keyed hash. These 1923 may use XOR for encryption or an HMAC for signing and may 1924 also refer to a data object that is neither signing nor 1925 encrypting."; 1926 reference 1927 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1928 TCG TPM 2.0 library specification. . ALG_ID: 0x0008"; 1930 } 1932 identity TPM_ALG_XOR { 1933 if-feature "TPM12 or TPM20"; 1934 base tpm12; 1935 base tpm20; 1936 base hash; 1937 base symmetric; 1938 description 1939 "The XOR encryption algorithm."; 1940 reference 1941 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1942 TCG TPM 2.0 library specification. ALG_ID: 0x000A"; 1944 } 1946 identity TPM_ALG_SHA256 { 1947 if-feature "TPM20"; 1948 base tpm20; 1949 base hash; 1950 description 1951 "The SHA 256 algorithm"; 1952 reference 1953 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1954 ISO/IEC 10118-3. ALG_ID: 0x000B"; 1956 } 1958 identity TPM_ALG_SHA384 { 1959 if-feature "TPM20"; 1960 base tpm20; 1961 base hash; 1962 description 1963 "The SHA 384 algorithm"; 1964 reference 1965 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1966 ISO/IEC 10118-3. ALG_ID: 0x000C"; 1968 } 1969 identity TPM_ALG_SHA512 { 1970 if-feature "TPM20"; 1971 base tpm20; 1972 base hash; 1973 description 1974 "The SHA 512 algorithm"; 1975 reference 1976 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1977 ISO/IEC 10118-3. ALG_ID: 0x000D"; 1979 } 1981 identity TPM_ALG_NULL { 1982 if-feature "TPM20"; 1983 base tpm20; 1984 description 1985 "NULL algorithm"; 1986 reference 1987 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 1988 TCG TPM 2.0 library specification. ALG_ID: 0x0010"; 1990 } 1992 identity TPM_ALG_SM3_256 { 1993 if-feature "TPM20"; 1994 base tpm20; 1995 base hash; 1996 description 1997 "The SM3 hash algorithm."; 1998 reference 1999 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2000 GM/T 0004-2012 - SM3_256. ALG_ID: 0x0012"; 2002 } 2004 identity TPM_ALG_SM4 { 2005 if-feature "TPM20"; 2006 base tpm20; 2007 base symmetric; 2008 description 2009 "SM4 symmetric block cipher"; 2010 reference 2011 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2012 GB/T 32907-2016. ALG_ID: 0x0013"; 2014 } 2016 identity TPM_ALG_RSASSA { 2017 if-feature "TPM20"; 2018 base tpm20; 2019 base asymmetric; 2020 base signing; 2021 description 2022 "Signature algorithm defined in section 8.2 (RSASSAPKCS1-v1_5)"; 2023 reference 2024 "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. 2025 ALG_ID: 0x0014"; 2027 } 2029 identity TPM_ALG_RSAES { 2030 if-feature "TPM20"; 2031 base tpm20; 2032 base asymmetric; 2033 base encryption_mode; 2034 description 2035 "Signature algorithm defined in section 7.2 (RSAES-PKCS1-v1_5)"; 2036 reference 2037 "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017 2038 ALG_ID: 0x0015"; 2040 } 2042 identity TPM_ALG_RSAPSS { 2043 if-feature "TPM20"; 2044 base tpm20; 2045 base asymmetric; 2046 base signing; 2047 description 2048 "Padding algorithm defined in section 8.1 (RSASSA PSS)"; 2049 reference 2050 "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. 2051 ALG_ID: 0x0016"; 2053 } 2055 identity TPM_ALG_OAEP { 2056 if-feature "TPM20"; 2057 base tpm20; 2058 base asymmetric; 2059 base encryption_mode; 2060 description 2061 "Padding algorithm defined in section 7.1 (RSASSA OAEP)"; 2062 reference 2063 "TCG_Algorithm_Registry_r1p32_pub Table 3 and RFC 8017. 2064 ALG_ID: 0x0017"; 2066 } 2068 identity TPM_ALG_ECDSA { 2069 if-feature "TPM20"; 2070 base tpm20; 2071 base asymmetric; 2072 base signing; 2073 description 2074 "Signature algorithm using elliptic curve cryptography (ECC)"; 2075 reference 2076 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2077 ISO/IEC 14888-3. ALG_ID: 0x0018"; 2079 } 2081 identity TPM_ALG_ECDH { 2082 if-feature "TPM20"; 2083 base tpm20; 2084 base asymmetric; 2085 base method; 2086 description 2087 "Secret sharing using ECC"; 2088 reference 2089 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2090 NIST SP800-56A and RFC 7748. ALG_ID: 0x0019"; 2092 } 2094 identity TPM_ALG_ECDAA { 2095 if-feature "TPM20"; 2096 base tpm20; 2097 base asymmetric; 2098 base signing; 2099 base anonymous_signing; 2100 description 2101 "Elliptic-curve based anonymous signing scheme"; 2102 reference 2103 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2104 TCG TPM 2.0 library specification. ALG_ID: 0x001A"; 2106 } 2108 identity TPM_ALG_SM2 { 2109 if-feature "TPM20"; 2110 base tpm20; 2111 base asymmetric; 2112 base signing; 2113 base encryption_mode; 2114 base method; 2115 description 2116 "SM2 - depending on context, either an elliptic-curve based, 2117 signature algorithm, an encryption scheme, or a key exchange 2118 protocol"; 2119 reference 2120 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2121 A GM/T 0003.1-2012, GM/T 0003.2-2012, GM/T 0003.3-2012, 2122 GM/T 0003.5-2012 SM2. ALG_ID: 0x001B"; 2124 } 2126 identity TPM_ALG_ECSCHNORR { 2127 if-feature "TPM20"; 2128 base tpm20; 2129 base asymmetric; 2130 base signing; 2131 description 2132 "Elliptic-curve based Schnorr signature"; 2133 reference 2134 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2135 TCG TPM 2.0 library specification. ALG_ID: 0x001C"; 2137 } 2139 identity TPM_ALG_ECMQV { 2140 if-feature "TPM20"; 2141 base tpm20; 2142 base asymmetric; 2143 base method; 2144 description 2145 "Two-phase elliptic-curve key"; 2146 reference 2147 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2148 NIST SP800-56A. ALG_ID: 0x001D"; 2150 } 2152 identity TPM_ALG_KDF1_SP800_56A { 2153 if-feature "TPM20"; 2154 base tpm20; 2155 base hash; 2156 base method; 2157 description 2158 "Concatenation key derivation function"; 2159 reference 2160 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2161 NIST SP800-56A (approved alternative1) section 5.8.1. 2163 ALG_ID: 0x0020"; 2165 } 2167 identity TPM_ALG_KDF2 { 2168 if-feature "TPM20"; 2169 base tpm20; 2170 base hash; 2171 base method; 2172 description 2173 "Key derivation function"; 2174 reference 2175 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2176 IEEE 1363a-2004 KDF2 section 13.2. ALG_ID: 0x0021"; 2178 } 2180 identity TPM_ALG_KDF1_SP800_108 { 2181 base TPM_ALG_KDF2; 2182 description 2183 "A key derivation method"; 2184 reference 2185 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2186 NIST SP800-108 - Section 5.1 KDF. ALG_ID: 0x0022"; 2188 } 2190 identity TPM_ALG_ECC { 2191 if-feature "TPM20"; 2192 base tpm20; 2193 base asymmetric; 2194 base object_type; 2195 description 2196 "Prime field ECC"; 2197 reference 2198 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2199 ISO/IEC 15946-1. ALG_ID: 0x0023"; 2201 } 2203 identity TPM_ALG_SYMCIPHER { 2204 if-feature "TPM20"; 2205 base tpm20; 2206 description 2207 "Object type for a symmetric block cipher"; 2208 reference 2209 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2210 TCG TPM 2.0 library specification. ALG_ID: 0x0025"; 2212 } 2214 identity TPM_ALG_CAMELLIA { 2215 if-feature "TPM20"; 2216 base tpm20; 2217 base symmetric; 2218 description 2219 "The Camellia algorithm"; 2220 reference 2221 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2222 ISO/IEC 18033-3. ALG_ID: 0x0026"; 2224 } 2226 identity TPM_ALG_SHA3_256 { 2227 if-feature "TPM20"; 2228 base tpm20; 2229 base hash; 2230 description 2231 "ISO/IEC 10118-3 - the SHA 256 algorithm"; 2232 reference 2233 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2234 NIST PUB FIPS 202. ALG_ID: 0x0027"; 2236 } 2238 identity TPM_ALG_SHA3_384 { 2239 if-feature "TPM20"; 2240 base tpm20; 2241 base hash; 2242 description 2243 "The SHA 384 algorithm"; 2244 reference 2245 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2246 NIST PUB FIPS 202. ALG_ID: 0x0028"; 2248 } 2250 identity TPM_ALG_SHA3_512 { 2251 if-feature "TPM20"; 2252 base tpm20; 2253 base hash; 2254 description 2255 "The SHA 512 algorithm"; 2256 reference 2257 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2258 NIST PUB FIPS 202. ALG_ID: 0x0029"; 2260 } 2262 identity TPM_ALG_CMAC { 2263 if-feature "TPM20"; 2264 base tpm20; 2265 base symmetric; 2266 base signing; 2267 description 2268 "block Cipher-based Message Authentication Code (CMAC)"; 2269 reference 2270 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2271 ISO/IEC 9797-1:2011 Algorithm 5. ALG_ID: 0x003F"; 2273 } 2275 identity TPM_ALG_CTR { 2276 if-feature "TPM20"; 2277 base tpm20; 2278 base symmetric; 2279 base encryption_mode; 2280 description 2281 "Counter mode"; 2282 reference 2283 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2284 ISO/IEC 10116. ALG_ID: 0x0040"; 2286 } 2288 identity TPM_ALG_OFB { 2289 base tpm20; 2290 base symmetric; 2291 base encryption_mode; 2292 description 2293 "Output Feedback mode"; 2294 reference 2295 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2296 ISO/IEC 10116. ALG_ID: 0x0041"; 2298 } 2300 identity TPM_ALG_CBC { 2301 if-feature "TPM20"; 2302 base tpm20; 2303 base symmetric; 2304 base encryption_mode; 2305 description 2306 "Cipher Block Chaining mode"; 2307 reference 2308 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2309 ISO/IEC 10116. ALG_ID: 0x0042"; 2311 } 2313 identity TPM_ALG_CFB { 2314 if-feature "TPM20"; 2315 base tpm20; 2316 base symmetric; 2317 base encryption_mode; 2318 description 2319 "Cipher Feedback mode"; 2320 reference 2321 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2322 ISO/IEC 10116. ALG_ID: 0x0043"; 2324 } 2326 identity TPM_ALG_ECB { 2327 if-feature "TPM20"; 2328 base tpm20; 2329 base symmetric; 2330 base encryption_mode; 2331 description 2332 "Electronic Codebook mode"; 2333 reference 2334 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2335 ISO/IEC 10116. ALG_ID: 0x0044"; 2337 } 2339 identity TPM_ALG_CCM { 2340 if-feature "TPM20"; 2341 base tpm20; 2342 base symmetric; 2343 base signing; 2344 base encryption_mode; 2345 description 2346 "Counter with Cipher Block Chaining-Message Authentication 2347 Code (CCM)"; 2348 reference 2349 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2350 NIST SP800-38C. ALG_ID: 0x0050"; 2352 } 2354 identity TPM_ALG_GCM { 2355 if-feature "TPM20"; 2356 base tpm20; 2357 base symmetric; 2358 base signing; 2359 base encryption_mode; 2360 description 2361 "Galois/Counter Mode (GCM)"; 2362 reference 2363 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2364 NIST SP800-38D. ALG_ID: 0x0051"; 2366 } 2368 identity TPM_ALG_KW { 2369 if-feature "TPM20"; 2370 base tpm20; 2371 base symmetric; 2372 base signing; 2373 base encryption_mode; 2374 description 2375 "AES Key Wrap (KW)"; 2376 reference 2377 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2378 NIST SP800-38F. ALG_ID: 0x0052"; 2380 } 2382 identity TPM_ALG_KWP { 2383 if-feature "TPM20"; 2384 base tpm20; 2385 base symmetric; 2386 base signing; 2387 base encryption_mode; 2388 description 2389 "AES Key Wrap with Padding (KWP)"; 2390 reference 2391 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2392 NIST SP800-38F. ALG_ID: 0x0053"; 2394 } 2396 identity TPM_ALG_EAX { 2397 if-feature "TPM20"; 2398 base tpm20; 2399 base symmetric; 2400 base signing; 2401 base encryption_mode; 2402 description 2403 "Authenticated-Encryption Mode"; 2405 reference 2406 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2407 NIST SP800-38F. ALG_ID: 0x0054"; 2409 } 2411 identity TPM_ALG_EDDSA { 2412 if-feature "TPM20"; 2413 base tpm20; 2414 base asymmetric; 2415 base signing; 2416 description 2417 "Edwards-curve Digital Signature Algorithm (PureEdDSA)"; 2418 reference 2419 "TCG_Algorithm_Registry_r1p32_pub Table 3 and 2420 RFC 8032. ALG_ID: 0x0060"; 2422 } 2424 } 2425 2427 Note that not all cryptographic functions are required for use by 2428 ietf-tpm-remote-attestation.yang. However the full definition of 2429 Table 3 of [TCG-Algos] will allow use by additional YANG 2430 specifications. 2432 3. IANA considerations 2434 This document will include requests to IANA: 2436 To be defined yet. But keeping up with changes to ietf-tcg-algs.yang 2437 will be necessary. 2439 4. Security Considerations 2441 The YANG module specified in this document defines a schema for data 2442 that is designed to be accessed via network management protocols such 2443 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 2444 is the secure transport layer, and the mandatory-to-implement secure 2445 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 2446 is HTTPS, and the mandatory-to-implement secure transport is TLS 2447 [RFC5246]. 2449 There are a number of data nodes defined in this YANG module that are 2450 writable/creatable/deletable (i.e., config true, which is the 2451 default). These data nodes may be considered sensitive or vulnerable 2452 in some network environments. Write operations (e.g., edit-config) 2453 to these data nodes without proper protection can have a negative 2454 effect on network operations. These are the subtrees and data nodes 2455 and their sensitivity/vulnerability: 2457 Container: 2459 o , , , and all could be populated with algorithms 2461 which are not supported by the underlying physical TPM installed 2462 by the equipment vendor. 2464 Container: 2466 o - Although shown as 'rw', it is system generated 2468 o - It is possible to configure PCRs for extraction 2469 which are not being extended by system software. This could 2470 unnecessarily use TPM resources. 2472 o - It is possible to provision a certificate which 2473 does not correspond to a Attestation Identity Key (AIK) within the 2474 TPM. 2476 RPC: - Need to verify that the 2477 certificate is for an active AIK. 2479 RPC: - Need to verify that the 2480 certificate is for an active AIK. 2482 RPC: - Pulling lots of logs can chew up system 2483 resources. 2485 5. Acknowledgements 2487 Not yet. 2489 6. Change Log 2491 Changes from version 02 to version 03: 2493 o moved to tcg-algs 2495 o cleaned up model to eliminate sources of errors 2497 o removed key establishment RPC 2499 o added lots of XPATH which must all be scrubbed still 2500 o Descriptive text added on model contents. 2502 Changes from version 01 to version 02: 2504 o Extracted Crypto-types into a separate YANG file 2506 o Mades the algorithms explicit, not strings 2508 o Hash Algo as key the selected TPM2 PCRs 2510 o PCR numbers are their own type 2512 o Eliminated nested keys for node-id plus tpm-name 2514 o Eliminated TPM-Name of "ALL" 2516 o Added TPM-Path 2518 Changes from version 00 to version 01: 2520 o Addressed author's comments 2522 o Extended complementary details about attestation-certificates 2524 o Relabeled chunk-size to log-entry-quantity 2526 o Relabeled location with compute-node or tpm-name where appropriate 2528 o Added a valid entity-mib physical-index to compute-node and tpm- 2529 name to map it back to hardware inventory 2531 o Relabeled name to tpm_name 2533 o Removed event-string in last-entry 2535 7. References 2537 7.1. Normative References 2539 [I-D.birkholz-rats-reference-interaction-model] 2540 Birkholz, H., Eckel, M., Newton, C., and L. Chen, 2541 "Reference Interaction Models for Remote Attestation 2542 Procedures", draft-birkholz-rats-reference-interaction- 2543 model-03 (work in progress), July 2020. 2545 [I-D.ietf-netconf-keystore] 2546 Watsen, K., "A YANG Data Model for a Keystore", draft- 2547 ietf-netconf-keystore-20 (work in progress), August 2020. 2549 [I-D.ietf-rats-architecture] 2550 Birkholz, H., Thaler, D., Richardson, M., Smith, N., and 2551 W. Pan, "Remote Attestation Procedures Architecture", 2552 draft-ietf-rats-architecture-06 (work in progress), 2553 September 2020. 2555 [I-D.ietf-rats-tpm-based-network-device-attest] 2556 Fedorkow, G., Voit, E., and J. Fitzgerald-McKay, "TPM- 2557 based Network Device Remote Integrity Verification", 2558 draft-ietf-rats-tpm-based-network-device-attest-04 (work 2559 in progress), September 2020. 2561 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2562 Requirement Levels", BCP 14, RFC 2119, 2563 DOI 10.17487/RFC2119, March 1997, 2564 . 2566 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2567 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2568 . 2570 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2571 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2572 May 2017, . 2574 [RFC8348] Bierman, A., Bjorklund, M., Dong, J., and D. Romascanu, "A 2575 YANG Data Model for Hardware Management", RFC 8348, 2576 DOI 10.17487/RFC8348, March 2018, 2577 . 2579 [TCG-Algos] 2580 "TCG_Algorithm_Registry_r1p32_pub", n.d., 2581 . 2584 [TPM1.2] TCG, ., "TPM 1.2 Main Specification", October 2003, 2585 . 2588 [TPM2.0] TCG, ., "TPM 2.0 Library Specification", March 2013, 2589 . 2592 7.2. Informative References 2594 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2595 (TLS) Protocol Version 1.2", RFC 5246, 2596 DOI 10.17487/RFC5246, August 2008, 2597 . 2599 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 2600 and A. Bierman, Ed., "Network Configuration Protocol 2601 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 2602 . 2604 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 2605 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 2606 . 2608 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 2609 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 2610 . 2612 Authors' Addresses 2614 Henk Birkholz 2615 Fraunhofer SIT 2616 Rheinstrasse 75 2617 Darmstadt 64295 2618 Germany 2620 Email: henk.birkholz@sit.fraunhofer.de 2622 Michael Eckel 2623 Fraunhofer SIT 2624 Rheinstrasse 75 2625 Darmstadt 64295 2626 Germany 2628 Email: michael.eckel@sit.fraunhofer.de 2630 Eric Voit 2631 Cisco Systems 2633 Email: evoit@cisco.com 2635 Shwetha Bhandari 2636 Cisco Systems 2638 Email: shwethab@cisco.com 2639 Bill Sulzen 2640 Cisco Systems 2642 Email: bsulzen@cisco.com 2644 Liang Xia (Frank) 2645 Huawei Technologies 2646 101 Software Avenue, Yuhuatai District 2647 Nanjing, Jiangsu 210012 2648 China 2650 Email: Frank.Xialiang@huawei.com 2652 Tom Laffey 2653 Hewlett Packard Enterprise 2655 Email: tom.laffey@hpe.com 2657 Guy C. Fedorkow 2658 Juniper Networks 2659 10 Technology Park Drive 2660 Westford, Massachusetts 01886 2662 Email: gfedorkow@juniper.net