idnits 2.17.1 draft-ietf-rats-yang-tpm-charra-02.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 29 instances of too long lines in the document, the longest one being 7 characters in excess of 72. == 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 143 has weird spacing: '...version ide...' == Line 147 has weird spacing: '...te-name str...' == Line 205 has weird spacing: '...M2_Algo ide...' == Line 226 has weird spacing: '...r-index pcr...' == Line 267 has weird spacing: '...-number uin...' -- The document date (June 24, 2020) is 1395 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 (-03) exists of draft-birkholz-rats-reference-interaction-model-02 ** 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 (-34) exists of draft-ietf-netconf-crypto-types-15 == Outdated reference: A later version (-22) exists of draft-ietf-rats-architecture-04 Summary: 2 errors (**), 0 flaws (~~), 10 warnings (==), 1 comment (--). 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: December 26, 2020 S. Bhandari 6 B. Sulzen 7 E. Voit 8 Cisco 9 L. Xia 10 Huawei 11 T. Laffey 12 HPE 13 G. Fedorkow 14 Juniper 15 June 24, 2020 17 A YANG Data Model for Challenge-Response-based Remote Attestation 18 Procedures using TPMs 19 draft-ietf-rats-yang-tpm-charra-02 21 Abstract 23 This document defines a YANG RPC and a minimal datastore tree 24 required to retrieve attestation evidence about integrity 25 measurements from a composite device with one or more roots of trust 26 for reporting. Complementary measurement logs are also provided by 27 the YANG RPC originating from one or more roots of trust of 28 measurement. The module defined requires at least one TPM 1.2 or TPM 29 2.0 and corresponding Trusted Software Stack included in the device 30 components of the composite device the YANG server is running on. 32 Status of This Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at https://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on December 26, 2020. 49 Copyright Notice 51 Copyright (c) 2020 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents 56 (https://trustee.ietf.org/license-info) in effect on the date of 57 publication of this document. Please review these documents 58 carefully, as they describe your rights and restrictions with respect 59 to this document. Code Components extracted from this document must 60 include Simplified BSD License text as described in Section 4.e of 61 the Trust Legal Provisions and are provided without warranty as 62 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. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 3 70 2.2. YANG Modules . . . . . . . . . . . . . . . . . . . . . . 7 71 2.2.1. ietf-tpm-remote-attestation . . . . . . . . . . . . . 7 72 2.3. ietf-asymmetric-algs . . . . . . . . . . . . . . . . . . 32 73 3. IANA considerations . . . . . . . . . . . . . . . . . . . . . 42 74 4. Security Considerations . . . . . . . . . . . . . . . . . . . 42 75 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 42 76 6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 43 77 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 43 78 7.1. Normative References . . . . . . . . . . . . . . . . . . 43 79 7.2. Informative References . . . . . . . . . . . . . . . . . 44 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 44 82 1. Introduction 84 This document is based on the terminology defined in the 85 [I-D.ietf-rats-architecture] and uses the interaction model and 86 information elements defined in the 87 [I-D.birkholz-rats-reference-interaction-model] document. The 88 currently supported hardware security modules (HWM) - sometimes also 89 referred to as an embedded secure element (eSE) - is the Trusted 90 Platform Module (TPM) version 1.2 and 2.0 specified by the Trusted 91 Computing Group (TCG). One ore more TPMs embedded in the components 92 of a composite device - sometimes also referred to as an aggregate 93 device - are required in order to use the YANG module defined in this 94 document. A TPM is used as a root of trust for reporting (RTR) in 95 order to retrieve attestation evidence from a composite device (quote 96 primitive operation). Additionally, it is used as a root of trust 97 for storage (RTS) in order to retain shielded secrets and store 98 system measurements using a folding hash function (extend primitive 99 operation). 101 1.1. Requirements notation 103 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 104 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 105 "OPTIONAL" in this document are to be interpreted as described in 106 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 107 capitals, as shown here. 109 2. The YANG Module for Basic Remote Attestation Procedures 111 One or more TPMs MUST be embedded in the composite device that is 112 providing attestation evidence via the YANG module defined in this 113 document. The ietf-basic-remote-attestation YANG module enables a 114 composite device to take on the role of Claimant and Attester in 115 accordance with the Remote Attestation Procedures (RATS) architecture 116 [I-D.ietf-rats-architecture] and the corresponding challenge-response 117 interaction model defined in the 118 [I-D.birkholz-rats-reference-interaction-model] document. A fresh 119 nonce with an appropriate amount of entropy MUST be supplied by the 120 YANG client in order to enable a proof-of-freshness with respect to 121 the attestation evidence provided by the attester running the YANG 122 datastore. The functions of this YANG module are restricted to 0-1 123 TPMs per hardware component. 125 2.1. Tree Diagram 127 module: ietf-tpm-remote-attestation 128 +--rw rats-support-structures 129 +--rw supported-algos* identityref 130 +--ro compute-nodes* [node-id] 131 | +--ro node-id string 132 | +--ro node-physical-index? int32 {ietfhw:entity-mib}? 133 | +--ro node-name? string 134 | +--ro node-location? string 135 +--rw tpms* [tpm-name] 136 +--rw tpm-name string 137 +--ro hardware-based? boolean 138 +--ro tpm-physical-index? int32 {ietfhw:entity-mib}? 139 +--ro tpm-path? string 140 +--ro compute-node compute-node-ref 141 +--ro tpm-manufacturer? string 142 +--ro tpm-firmware-version? string 143 +--ro tpm-specification-version identityref 144 +--ro tpm-status? string 145 +--rw certificates 146 +--rw certificate* [certificate-name] 147 +--rw certificate-name string 148 +--rw certificate-ref? leafref 149 +--rw certificate-type? enumeration 151 rpcs: 152 +---x tpm12-challenge-response-attestation {TPM12}? 153 | +---w input 154 | | +---w tpm1-attestation-challenge 155 | | +---w pcr-index* pcr 156 | | +---w nonce-value binary 157 | | +---w TPM12_Algo? identityref 158 | | +---w (key-identifier)? 159 | | | +--:(public-key) 160 | | | | +---w pub-key-id? binary 161 | | | +--:(TSS_UUID) 162 | | | +---w TSS_UUID-value 163 | | | +---w ulTimeLow? uint32 164 | | | +---w usTimeMid? uint16 165 | | | +---w usTimeHigh? uint16 166 | | | +---w bClockSeqHigh? uint8 167 | | | +---w bClockSeqLow? uint8 168 | | | +---w rgbNode* uint8 169 | | +---w add-version? boolean 170 | | +---w tpm-name* string 171 | +--ro output 172 | +--ro tpm12-attestation-response* [] 173 | +--ro certificate-name? string 174 | +--ro up-time? uint32 175 | +--ro node-id? string 176 | +--ro node-physical-index? int32 177 | | {ietfhw:entity-mib}? 178 | +--ro fixed? binary 179 | +--ro external-data? binary 180 | +--ro signature-size? uint32 181 | +--ro signature? binary 182 | +--ro (tpm12-quote) 183 | +--:(tpm12-quote1) 184 | | +--ro version* [] 185 | | | +--ro major? uint8 186 | | | +--ro minor? uint8 187 | | | +--ro revMajor? uint8 188 | | | +--ro revMinor? uint8 189 | | +--ro digest-value? binary 190 | | +--ro TPM_PCR_COMPOSITE* [] 191 | | +--ro pcr-index* pcr 192 | | +--ro value-size? uint32 193 | | +--ro tpm12-pcr-value* binary 194 | +--:(tpm12-quote2) 195 | +--ro tag? uint8 196 | +--ro pcr-index* pcr 197 | +--ro locality-at-release? uint8 198 | +--ro digest-at-release? binary 199 +---x tpm20-challenge-response-attestation {TPM20}? 200 | +---w input 201 | | +---w tpm20-attestation-challenge 202 | | +---w nonce-value binary 203 | | +---w challenge-objects* [] 204 | | +---w pcr-list* [TPM2_Algo] 205 | | | +---w TPM2_Algo identityref 206 | | | +---w pcr-index* tpm:pcr 207 | | +---w TPM2_Algo? identityref 208 | | +---w (key-identifier)? 209 | | | +--:(public-key) 210 | | | | +---w pub-key-id? binary 211 | | | +--:(uuid) 212 | | | +---w uuid-value? binary 213 | | +---w tpm-name* string 214 | +--ro output 215 | +--ro tpm20-attestation-response* [] 216 | +--ro certificate-name? string 217 | +--ro up-time? uint32 218 | +--ro node-id? string 219 | +--ro node-physical-index? int32 220 | | {ietfhw:entity-mib}? 221 | +--ro quote? binary 222 | +--ro quote-signature? binary 223 | +--ro pcr-bank-values* [] 224 | | +--ro TPM2_Algo? identityref 225 | | +--ro pcr-values* [pcr-index] 226 | | +--ro pcr-index pcr 227 | | +--ro pcr-value? binary 228 | +--ro pcr-digest-algo-in-quote 229 | +--ro TPM2_Algo? identityref 230 +---x basic-trust-establishment 231 | +---w input 232 | | +---w nonce-value binary 233 | | +---w TPM2_Algo? identityref 234 | | +---w tpm-name* string 235 | | +---w certificate-name? string 236 | +--ro output 237 | +--ro attestation-certificates* [] 238 | +--ro attestation-certificate? ct:end-entity-cert-cms 239 | +--ro (key-identifier)? 240 | +--:(public-key) 241 | | +--ro pub-key-id? binary 242 | +--:(uuid) 243 | +--ro uuid-value? binary 244 +---x log-retrieval 245 +---w input 246 | +---w log-selector* [] 247 | | +---w tpm-name* string 248 | | +---w (index-type)? 249 | | | +--:(last-entry) 250 | | | | +---w last-entry-value? binary 251 | | | +--:(index) 252 | | | | +---w last-index-number? uint64 253 | | | +--:(timestamp) 254 | | | +---w timestamp? yang:date-and-time 255 | | +---w log-entry-quantity? uint16 256 | +---w log-type identityref 257 +--ro output 258 +--ro system-event-logs 259 +--ro node-data* [] 260 +--ro up-time? uint32 261 +--ro certificate-name? string 262 +--ro log-result 263 +--ro (attested-event-log-type) 264 +--:(bios) 265 | +--ro bios-event-logs 266 | +--ro bios-event-entry* [event-number] 267 | +--ro event-number uint32 268 | +--ro event-type? uint32 269 | +--ro pcr-index? pcr 270 | +--ro digest-list* [] 271 | | +--ro hash-algo? identityref 272 | | +--ro digest* binary 273 | +--ro event-size? uint32 274 | +--ro event-data* uint8 275 +--:(ima) 276 +--ro ima-event-logs 277 +--ro ima-event-entry* [event-number] 278 +--ro event-number uint64 279 +--ro ima-template? string 280 +--ro filename-hint? string 281 +--ro filedata-hash? binary 282 +--ro filedata-hash-algorithm? string 283 +--ro template-hash-algorithm? string 284 +--ro template-hash? binary 285 +--ro pcr-index? pcr 286 +--ro signature? binary 288 2.2. YANG Modules 290 2.2.1. ietf-tpm-remote-attestation 292 This YANG module imports modules from [RFC6991], [RFC8348], 293 [I-D.ietf-netconf-crypto-types], ietf-asymmetric-algs.yang. 295 file ietf-tpm-remote-attestation@2020-06-23.yang 296 module ietf-tpm-remote-attestation { 297 namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation"; 298 prefix "tpm"; 300 import ietf-yang-types { 301 prefix yang; 302 } 303 import ietf-hardware { 304 prefix ietfhw; 305 } 306 import ietf-crypto-types { 307 prefix ct; 308 } 309 import ietf-keystore { 310 prefix ks; 311 } 312 import ietf-asymmetric-algs { 313 prefix aa; 314 } 316 organization 317 "IETF RATS (Remote ATtestation procedureS) Working Group"; 319 contact 320 "WG Web : 321 WG List : 322 Author : Henk Birkholz 323 Author : Michael Eckel 324 Author : Shwetha Bhandari 325 Author : Bill Sulzen 326 Author : Eric Voit 327 Author : Liang Xia (Frank) 328 Author : Tom Laffey 329 Author : Guy Fedorkow "; 331 description 332 "A YANG module to enable a TPM 1.2 and TPM 2.0 based 333 remote attestation procedure using a challenge-response 334 interaction model and the TPM 1.2 and TPM 2.0 Quote 335 primitive operations. 337 Copyright (c) 2020 IETF Trust and the persons identified as 338 authors of the code. All rights reserved. 340 Redistribution and use in source and binary forms, with or 341 without modification, is permitted pursuant to, and subject to 342 the license terms contained in, the Simplified BSD License set 343 forth in Section 4.c of the IETF Trust's Legal Provisions 344 Relating to IETF Documents 345 (https://trustee.ietf.org/license-info). 347 Redistribution and use in source and binary forms, with or 348 without modification, is permitted pursuant to, and subject to 349 the license terms contained in, the Simplified BSD License set 350 forth in Section 4.c of the IETF Trust's Legal Provisions 351 Relating to IETF Documents 352 (https://trustee.ietf.org/license-info). 354 This version of this YANG module is part of RFC XXXX 355 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 356 for full legal notices. 358 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 359 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 360 'MAY', and 'OPTIONAL' in this document are to be interpreted as 361 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 362 they appear in all capitals, as shown here."; 364 revision "2020-06-23" { 365 description 366 "Initial version"; 367 reference 368 "draft-ietf-rats-yang-tpm-charra"; 369 } 371 /*****************/ 372 /* Features */ 373 /*****************/ 375 feature TPM12 { 376 description 377 "This feature indicates that an Attester includes cryptoprocessors 378 capable of supporting the TPM 1.2 API."; 379 } 381 feature TPM20 { 382 description 383 "This feature indicates that an Attester includes cryptoprocessors 384 capable of supporting the TPM 2 API."; 386 } 388 /*****************/ 389 /* Typedefs */ 390 /*****************/ 392 typedef pcr { 393 type uint8 { 394 range "0..31"; 395 } 396 description 397 "Valid index number for a PCR. At this point 0-31 is viable."; 398 } 400 typedef compute-node-ref { 401 type leafref { 402 path "/tpm:rats-support-structures/tpm:compute-nodes/tpm:node-name"; 403 } 404 description 405 "This type is used to reference a hardware node. It is quite possible 406 this leafref will eventually point to another YANG module's node."; 407 } 409 /******************/ 410 /* Identities */ 411 /******************/ 413 identity attested-event-log-type { 414 description 415 "Base identity allowing categorization of the reasons why and 416 attested measurement has been taken on an Attester."; 417 } 419 identity ima { 420 base attested-event-log-type; 421 description 422 "An event type recorded in IMA."; 423 } 425 identity bios { 426 base attested-event-log-type; 427 description 428 "An event type associated with BIOS/UEFI."; 429 } 431 identity cryptoprocessor { 432 description 433 "Base identity identifying a crytoprocessor."; 434 } 436 identity tpm12 { 437 base cryptoprocessor; 438 description 439 "A cryptoprocessor capable of supporting the TPM 1.2 API."; 440 } 442 identity tpm20 { 443 base cryptoprocessor; 444 description 445 "A cryptoprocessor capable of supporting the TPM 2.0 API."; 446 } 448 /*****************/ 449 /* Groupings */ 450 /*****************/ 452 grouping TPM2_Algo { 453 description 454 "The signature scheme that is used to sign the TPM2 Quote 455 information response."; 456 leaf TPM2_Algo { 457 type identityref { 458 base aa:tpm2-asymmetric-algorithm; 459 } 460 description 461 "The signature scheme that is used to sign the TPM 462 Quote information response."; 463 } 464 } 466 grouping TPM12_Algo { 467 description 468 "The signature scheme that is used to sign the TPM2 Quote 469 information response."; 470 leaf TPM12_Algo { 471 type identityref { 472 base aa:tpm12-asymmetric-algorithm; 473 } 474 description 475 "The signature scheme that is used to sign the TPM1.2 476 Quote information response."; 477 } 478 } 479 grouping nonce { 480 description 481 "A nonce to show freshness and counter replays."; 482 leaf nonce-value { 483 type binary; 484 mandatory true; 485 description 486 "This nonce SHOULD be generated via a registered 487 cryptographic-strength algorithm. In consequence, 488 the length of the nonce depends on the hash algorithm 489 used. The algorithm used in this case is independent 490 from the hash algorithm used to create the hash-value 491 in the response of the attestor."; 492 } 493 } 495 grouping tpm12-pcr-selection { 496 description 497 "A Verifier can request one or more PCR values using its 498 individually created Attestation Key Certificate (AC). 499 The corresponding selection filter is represented in this 500 grouping. 501 Requesting a PCR value that is not in scope of the AC used, 502 detailed exposure via error msg should be avoided."; 503 leaf-list pcr-index { 504 type pcr; 505 description 506 "The numbers/indexes of the PCRs. At the moment this is limited 507 to 32."; 508 } 509 } 511 grouping tpm20-pcr-selection { 512 description 513 "A Verifier can acquire one or more PCR values, which are hashed 514 together in a TPM2B_DIGEST coming from the TPM2. The selection 515 list of desired PCRs and the Hash Algorithm is represented in this 516 grouping."; 517 list pcr-list { 518 key "TPM2_Algo"; 519 description 520 "Specifies the list of PCRs and Hash Algorithms used for the 521 latest returned TPM2B_DIGEST."; 522 reference 523 "https://www.trustedcomputinggroup.org/wp-content/uploads/ 524 TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7"; 525 uses tpm:TPM2_Algo; 526 leaf-list pcr-index { 527 type tpm:pcr; 528 description 529 "The numbers of the PCRs that are associated with 530 the created key."; 531 } 532 } 533 } 535 grouping tpm12-attestation-key-identifier { 536 description 537 "A selector for a suitable key identifier for a TPM 1.2."; 538 choice key-identifier { 539 description 540 "Identifier for the attestation key to use for signing 541 attestation evidence."; 542 case public-key { 543 leaf pub-key-id { 544 type binary; 545 description 546 "The value of the identifier for the public key."; 547 } 548 } 549 case TSS_UUID { 550 description 551 "Use a YANG agent generated (and maintained) attestation 552 key UUID that complies with the TSS_UUID datatype of the TCG 553 Software Stack (TSS) Specification, Version 1.10 Golden, 554 August 20, 2003."; 555 container TSS_UUID-value { 556 description 557 "A detailed structure that is used to create the 558 TPM 1.2 native TSS_UUID as defined in the TCG Software 559 Stack (TSS) Specification, Version 1.10 Golden, 560 August 20, 2003."; 561 leaf ulTimeLow { 562 type uint32; 563 description 564 "The low field of the timestamp."; 565 } 566 leaf usTimeMid { 567 type uint16; 568 description 569 "The middle field of the timestamp."; 570 } 571 leaf usTimeHigh { 572 type uint16; 573 description 574 "The high field of the timestamp multiplexed with the 575 version number."; 576 } 577 leaf bClockSeqHigh { 578 type uint8; 579 description 580 "The high field of the clock sequence multiplexed with 581 the variant."; 582 } 583 leaf bClockSeqLow { 584 type uint8; 585 description 586 "The low field of the clock sequence."; 587 } 588 leaf-list rgbNode { 589 type uint8; 590 description 591 "The spatially unique node identifier."; 592 } 593 } 594 } 595 } 596 } 598 grouping tpm20-attestation-key-identifier { 599 description 600 "A selector for a suitable key identifier."; 601 choice key-identifier { 602 description 603 "Identifier for the attestation key to use for signing 604 attestation evidence."; 605 case public-key { 606 leaf pub-key-id { 607 type binary; 608 description 609 "The value of the identifier for the public key."; 610 } 611 } 612 case uuid { 613 description 614 "Use a YANG agent generated (and maintained) attestation 615 key UUID."; 616 leaf uuid-value { 617 type binary; 618 description 619 "The UUID identifying the corresponding public key."; 620 } 621 } 622 } 624 } 626 grouping certificate-name { 627 description 628 "An arbitrary name for the identity certificate chain requested."; 629 leaf certificate-name { 630 type string; 631 description 632 "An arbitrary name for the identity certificate chain requested."; 633 } 634 } 636 grouping tpm-name { 637 description 638 "Path to a unique TPM on a device."; 639 leaf tpm-name { 640 type string; 641 description 642 "Unique system generated name for a TPM on a device."; 643 } 644 } 646 grouping tpm-name-selector { 647 description 648 "One or more TPM on a device."; 649 leaf-list tpm-name { 650 type string; 651 config false; 652 description 653 "Name of one or more unique TPMs on a device. If this object exists, 654 a selection should pull only the objects related to these TPM(s). If 655 it does not exist, all qualifying TPMs that are 'hardware-based' 656 equals true on the device are selected."; 657 } 658 } 660 grouping compute-node-identifier { 661 description 662 "In a distributed system with multiple compute nodes 663 this is the node identified by name and physical-index."; 664 leaf node-id { 665 type string; 666 description 667 "ID of the compute node, such as Board Serial Number."; 668 } 669 leaf node-physical-index { 670 if-feature ietfhw:entity-mib; 671 type int32 { 672 range "1..2147483647"; 673 } 674 config false; 675 description 676 "The entPhysicalIndex for the compute node."; 677 reference 678 "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; 679 } 680 } 682 grouping tpm12-pcr-info-short { 683 description 684 "This structure is for defining a digest at release when the only 685 information that is necessary is the release configuration."; 686 uses tpm12-pcr-selection; 687 leaf locality-at-release { 688 type uint8; 689 description 690 "This SHALL be the locality modifier required to release the 691 information (TPM 1.2 type TPM_LOCALITY_SELECTION)"; 692 } 693 leaf digest-at-release { 694 type binary; 695 description 696 "This SHALL be the digest of the PCR indices and PCR values 697 to verify when revealing auth data (TPM 1.2 type 698 TPM_COMPOSITE_HASH)."; 699 } 700 } 702 grouping tpm12-version { 703 description 704 "This structure provides information relative the version of 705 the TPM."; 706 list version { 707 description 708 "This indicates the version of the structure 709 (TPM 1.2 type TPM_STRUCT_VER). This MUST be 1.1.0.0."; 710 leaf major { 711 type uint8; 712 description 713 "Indicates the major version of the structure. 714 MUST be 0x01."; 715 } 716 leaf minor { 717 type uint8; 718 description 719 "Indicates the minor version of the structure. 721 MUST be 0x01."; 722 } 723 leaf revMajor { 724 type uint8; 725 description 726 "Indicates the rev major version of the structure. 727 MUST be 0x00."; 728 } 729 leaf revMinor { 730 type uint8; 731 description 732 "Indicates the rev minor version of the structure. 733 MUST be 0x00."; 734 } 735 } 736 } 738 grouping tpm12-quote-info-common { 739 description 740 "These statements are used in bot quote variants of the TPM 1.2"; 741 leaf fixed { 742 type binary; 743 description 744 "This SHALL always be the string 'QUOT' or 'QUO2' 745 (length is 4 bytes)."; 746 } 747 leaf external-data { 748 type binary; 749 description 750 "160 bits of externally supplied data, typically a nonce."; 751 } 752 leaf signature-size { 753 type uint32; 754 description 755 "The size of TPM 1.2 'signature' value."; 756 } 757 leaf signature { 758 type binary; 759 description 760 "Signature over SHA-1 hash of tpm12-quote-info2'."; 761 } 762 } 764 grouping tpm12-quote-info { 765 description 766 "This structure provides the mechanism for the TPM to quote the 767 current values of a list of PCRs (as used by the TPM_Quote2 768 command)."; 770 uses tpm12-version; 771 leaf digest-value { 772 type binary; 773 description 774 "This SHALL be the result of the composite hash algorithm using 775 the current values of the requested PCR indices 776 (TPM 1.2 type TPM_COMPOSITE_HASH.)"; 777 } 778 } 780 grouping tpm12-quote-info2 { 781 description 782 "This structure provides the mechanism for the TPM to quote the 783 current values of a list of PCRs 784 (as used by the TPM_Quote2 command)."; 785 leaf tag { 786 type uint8; 787 description 788 "This SHALL be TPM_TAG_QUOTE_INFO2."; 789 } 790 uses tpm12-pcr-info-short; 791 } 793 grouping tpm12-cap-version-info { 794 description 795 "TPM returns the current version and revision of the TPM 1.2 ."; 796 list TPM_PCR_COMPOSITE { 797 description 798 "The TPM 1.2 TPM_PCRVALUEs for the pcr-indices."; 799 uses tpm12-pcr-selection; 800 leaf value-size { 801 type uint32; 802 description 803 "This SHALL be the size of the 'tpm12-pcr-value' field 804 (not the number of PCRs)."; 805 } 806 leaf-list tpm12-pcr-value { 807 type binary; 808 description 809 "The list of TPM_PCRVALUEs from each PCR selected in sequence 810 of tpm12-pcr-selection."; 811 } 812 list version-info { 813 description 814 "An optional output parameter from a TPM 1.2 TPM_Quote2."; 815 leaf tag { 816 type uint16; /* This should be converted into an ENUM */ 817 description 818 "The TPM 1.2 version and revision 819 (TPM 1.2 type TPM_STRUCTURE_TAG). 820 This MUST be TPM_CAP_VERSION_INFO (0x0030)"; 821 } 822 uses tpm12-version; 823 leaf spec-level { 824 type uint16; 825 description 826 "A number indicating the level of ordinals supported."; 827 } 828 leaf errata-rev { 829 type uint8; 830 description 831 "A number indicating the errata version of the 832 specification."; 833 } 834 leaf tpm-vendor-id { 835 type binary; 836 description 837 "The vendor ID unique to each TPM manufacturer."; 838 } 839 leaf vendor-specific-size { 840 type uint16; 841 description 842 "The size of the vendor-specific area."; 843 } 844 leaf vendor-specific { 845 type binary; 846 description 847 "Vendor specific information."; 848 } 849 } 850 } 851 } 853 grouping tpm12-pcr-composite { 854 description 855 "The actual values of the selected PCRs (a list of TPM_PCRVALUEs 856 (binary) and associated metadata for TPM 1.2."; 857 list TPM_PCR_COMPOSITE { 858 description 859 "The TPM 1.2 TPM_PCRVALUEs for the pcr-indices."; 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)."; 867 } 868 leaf-list tpm12-pcr-value { 869 type binary; 870 description 871 "The list of TPM_PCRVALUEs from each PCR selected in sequence 872 of tpm12-pcr-selection."; 873 } 874 } 875 } 877 grouping node-uptime { 878 description 879 "Uptime in seconds of the node."; 880 leaf up-time { 881 type uint32; 882 description 883 "Uptime in seconds of this node reporting its data"; 884 } 885 } 887 grouping tpm12-attestation { 888 description 889 "Contains an instance of TPM1.2 style signed cryptoprocessor 890 measurements. It is supplemented by unsigned Attester information."; 891 uses certificate-name; 892 uses node-uptime; 893 uses compute-node-identifier; 894 uses tpm12-quote-info-common; 895 choice tpm12-quote { 896 mandatory true; 897 description 898 "Either a tpm12-quote-info or tpm12-quote-info2, depending 899 on whether TPM_Quote or TPM_Quote2 was used 900 (cf. input field add-verson)."; 901 case tpm12-quote1 { 902 description 903 "BIOS/UEFI event logs"; 904 uses tpm12-quote-info; 905 uses tpm12-pcr-composite; 906 } 907 case tpm12-quote2 { 908 description 909 "BIOS/UEFI event logs"; 910 uses tpm12-quote-info2; 911 } 912 } 913 } 914 grouping tpm20-attestation { 915 description 916 "Contains an instance of TPM2 style signed cryptoprocessor 917 measurements. It is supplemented by unsigned Attester information."; 918 uses certificate-name; 919 uses node-uptime; 920 uses compute-node-identifier; 921 leaf quote { 922 type binary; 923 description 924 "Quote data returned by TPM Quote, including PCR selection, 925 PCR digest and etc."; 926 } 927 leaf quote-signature { 928 type binary; 929 description 930 "Quote signature returned by TPM Quote."; 931 } 932 list pcr-bank-values { 933 /* This often should not be necessary for TPM2, as the information 934 if validated will need to be coming from the 'quote' leaf */ 935 description 936 "PCR values in each PCR bank."; 937 uses TPM2_Algo; 938 list pcr-values { 939 key pcr-index; 940 description 941 "List of one PCR bank."; 942 leaf pcr-index { 943 type pcr; 944 description 945 "PCR index number."; 946 } 947 leaf pcr-value { 948 type binary; 949 description 950 "PCR value."; 951 } 952 } 953 } 954 container pcr-digest-algo-in-quote { 955 uses TPM2_Algo; 956 description 957 "The hash algorithm for PCR value digest in Quote output."; 958 } 959 } 960 grouping log-identifier { 961 description 962 "Identifier for type of log to be retrieved."; 963 leaf log-type { 964 type identityref { 965 base attested-event-log-type; 966 } 967 mandatory true; 968 description 969 "The corresponding measurement log type identity."; 970 } 971 } 973 grouping boot-event-log { 974 description 975 "Defines an event log corresponding to the event that extended the 976 PCR"; 977 leaf event-number { 978 type uint32; 979 description 980 "Unique event number of this event"; 981 } 982 leaf event-type { 983 type uint32; 984 description 985 "log event type"; 986 } 987 leaf pcr-index { 988 type pcr; 989 description 990 "Defines the PCR index that this event extended"; 991 } 992 list digest-list { 993 description 994 "Hash of event data"; 995 leaf hash-algo { 996 type identityref { 997 base aa:asymmetric-algorithm-type; 998 } 999 description 1000 "The hash scheme that is used to compress the event data in each of 1001 the leaf-list digest items."; 1002 } 1003 leaf-list digest { 1004 type binary; 1005 description 1006 "The hash of the event data"; 1007 } 1009 } 1010 leaf event-size { 1011 type uint32; 1012 description 1013 "Size of the event data"; 1014 } 1015 leaf-list event-data { 1016 type uint8; 1017 description 1018 "The event data size determined by event-size"; 1019 } 1020 } 1022 grouping ima-event { 1023 description 1024 "Defines an hash log extend event for IMA measurements"; 1025 leaf event-number { 1026 type uint64; 1027 description 1028 "Unique number for this event for sequencing"; 1029 } 1030 leaf ima-template { 1031 type string; 1032 description 1033 "Name of the template used for event logs 1034 for e.g. ima, ima-ng, ima-sig"; 1035 } 1036 leaf filename-hint { 1037 type string; 1038 description 1039 "File that was measured"; 1040 } 1041 leaf filedata-hash { 1042 type binary; 1043 description 1044 "Hash of filedata"; 1045 } 1046 leaf filedata-hash-algorithm { 1047 type string; 1048 description 1049 "Algorithm used for filedata-hash"; 1050 } 1051 leaf template-hash-algorithm { 1052 type string; 1053 description 1054 "Algorithm used for template-hash"; 1055 } 1056 leaf template-hash { 1057 type binary; 1058 description 1059 "hash(filedata-hash, filename-hint)"; 1060 } 1061 leaf pcr-index { 1062 type pcr; 1063 description 1064 "Defines the PCR index that this event extended"; 1065 } 1066 leaf signature { 1067 type binary; 1068 description 1069 "The file signature"; 1070 } 1071 } 1073 grouping bios-event-log { 1074 description 1075 "Measurement log created by the BIOS/UEFI."; 1076 list bios-event-entry { 1077 key event-number; 1078 description 1079 "Ordered list of TCG described event log 1080 that extended the PCRs in the order they 1081 were logged"; 1082 uses boot-event-log; 1083 } 1084 } 1086 grouping ima-event-log { 1087 list ima-event-entry { 1088 key event-number; 1089 description 1090 "Ordered list of ima event logs by event-number"; 1091 uses ima-event; 1092 } 1093 description 1094 "Measurement log created by IMA."; 1095 } 1097 grouping event-logs { 1098 description 1099 "A selector for the log and its type."; 1100 choice attested-event-log-type { 1101 mandatory true; 1102 description 1103 "Event log type determines the event logs content."; 1104 case bios { 1105 description 1106 "BIOS/UEFI event logs"; 1107 container bios-event-logs { 1108 description 1109 "This is an index referencing the TCG Algorithm 1110 Registry based on TPM_ALG_ID."; 1111 uses bios-event-log; 1112 } 1113 } 1114 case ima { 1115 description 1116 "IMA event logs"; 1117 container ima-event-logs { 1118 description 1119 "This is an index referencing the TCG Algorithm 1120 Registry based on TPM_ALG_ID."; 1121 uses ima-event-log; 1122 } 1123 } 1124 } 1125 } 1127 /**********************/ 1128 /* RPC operations */ 1129 /**********************/ 1131 rpc tpm12-challenge-response-attestation { 1132 if-feature "TPM12"; 1133 description 1134 "This RPC accepts the input for TSS TPM 1.2 commands of the 1135 managed device. ComponentIndex from the hardware manager YANG 1136 module to refer to dedicated TPM in composite devices, 1137 e.g. smart NICs, is still a TODO."; 1138 input { 1139 container tpm1-attestation-challenge { 1140 description 1141 "This container includes every information element defined 1142 in the reference challenge-response interaction model for 1143 remote attestation. Corresponding values are based on 1144 TPM 1.2 structure definitions"; 1145 uses tpm12-pcr-selection; 1146 uses nonce; 1147 uses TPM12_Algo; 1148 uses tpm12-attestation-key-identifier; 1149 leaf add-version { 1150 type boolean; 1151 description 1152 "Whether or not to include TPM_CAP_VERSION_INFO; if true, 1153 then TPM_Quote2 must be used to create the response."; 1154 } 1155 uses tpm-name-selector; 1156 /* if this scheme is desired, we should define XPATH to limit 1157 selection to just 'tpm-name' that are '../tpm-specification-version' 1158 equals 'TPM12' and where '../hardware-based' equals 'true' */ 1159 } 1160 } 1161 output { 1162 list tpm12-attestation-response { 1163 description 1164 "The binary output of TPM 1.2 TPM_Quote/TPM_Quote2, including 1165 the PCR selection and other associated attestation evidence 1166 metadata"; 1167 uses tpm12-attestation; 1168 } 1169 } 1170 } 1172 rpc tpm20-challenge-response-attestation { 1173 if-feature "TPM20"; 1174 description 1175 "This RPC accepts the input for TSS TPM 2.0 commands of the 1176 managed device. ComponentIndex from the hardware manager YANG 1177 module to refer to dedicated TPM in composite devices, 1178 e.g. smart NICs, is still a TODO."; 1179 input { 1180 container tpm20-attestation-challenge { 1181 description 1182 "This container includes every information element defined 1183 in the reference challenge-response interaction model for 1184 remote attestation. Corresponding values are based on 1185 TPM 2.0 structure definitions"; 1186 uses nonce; 1187 list challenge-objects { 1188 description 1189 "Nodes to fetch attestation information, PCR selection 1190 and AK identifier."; 1191 uses tpm20-pcr-selection; 1192 uses TPM2_Algo; 1193 uses tpm20-attestation-key-identifier; 1194 uses tpm-name-selector; 1195 /* if this scheme is desired, we should define XPATH to limit 1196 selection to just 'tpm-name' that are '../tpm-specification-version' 1197 equals 'TPM2' and where '../hardware-based' equals 'true' */ 1198 } 1199 } 1200 } 1201 output { 1202 list tpm20-attestation-response { 1203 unique "certificate-name"; /* should have XPATH making this mandatory 1204 when there is more than one list entry */ 1205 description 1206 "The binary output of TPM2b_Quote in one TPM chip of the 1207 node which identified by node-id. An TPMS_ATTEST structure 1208 including a length, encapsulated in a signature"; 1209 uses tpm20-attestation; 1210 } 1211 } 1212 } 1214 rpc basic-trust-establishment { 1215 description 1216 "This RPC creates a tpm-resident, non-migratable key to be used 1217 in TPM_Quote commands, an attestation certificate."; 1218 input { 1219 uses nonce; 1220 uses TPM2_Algo; 1221 leaf-list tpm-name { 1222 when "not(../certificate-name)"; /* ensures both are not populated */ 1223 type string; 1224 description 1225 "Path to a unique TPM on a device. If there are no elements in the 1226 leaf-list, all TPMs which are 'hardware-based' should have keys 1227 established."; 1228 } 1229 uses certificate-name { 1230 description 1231 "It is possible to request a new certificate using the old one as a 1232 reference."; 1233 } 1234 } 1235 output { 1236 list attestation-certificates { 1237 description 1238 "Attestation Certificate data from a TPM identified by the TPM 1239 name"; 1240 leaf attestation-certificate { 1241 type ct:end-entity-cert-cms; 1242 description 1243 "The binary signed certificate chain data for this identity 1244 certificate."; 1245 } 1246 uses tpm20-attestation-key-identifier; 1247 } 1248 } 1250 } 1252 rpc log-retrieval { 1253 description 1254 "Logs Entries are either identified via indices or via providing 1255 the last line received. The number of lines returned can be 1256 limited. The type of log is a choice that can be augmented."; 1257 input { 1258 list log-selector { 1259 description 1260 "Selection of log entries to be reported."; 1261 uses tpm-name-selector; 1262 choice index-type { 1263 description 1264 "Last log entry received, log index number, or timestamp."; 1265 case last-entry { 1266 description 1267 "The last entry of the log already retrieved."; 1268 leaf last-entry-value { 1269 type binary; 1270 description 1271 "Content of an log event which matches 1:1 with a 1272 unique event record contained within the log. Log 1273 entries subsequent to this will be passed to the 1274 requester. Note: if log entry values are not unique, 1275 this MUST return an error."; 1276 } 1277 } 1278 case index { 1279 description 1280 "Numeric index of the last log entry retrieved, or zero."; 1281 leaf last-index-number { 1282 type uint64; 1283 description 1284 "The last numeric index number of a log entry. 1285 Zero means to start at the beginning of the log. 1286 Entries subsequent to this will be passed to the 1287 requester."; 1288 } 1289 } 1290 case timestamp { 1291 leaf timestamp { 1292 type yang:date-and-time; 1293 description 1294 "Timestamp from which to start the extraction. The next 1295 log entry subsequent to this timestamp is to be sent."; 1296 } 1297 description 1298 "Timestamp from which to start the extraction."; 1299 } 1300 } 1301 leaf log-entry-quantity { 1302 type uint16; 1303 description 1304 "The number of log entries to be returned. If omitted, it 1305 means all of them."; 1306 } 1307 } 1308 uses log-identifier; 1309 } 1311 output { 1312 container system-event-logs { 1313 description 1314 "The requested data of the measurement event logs"; 1315 list node-data { 1316 unique "certificate-name"; 1317 description 1318 "Event logs of a node in a distributed system 1319 identified by the node name"; 1320 uses node-uptime; 1321 uses certificate-name; 1322 container log-result { 1323 description 1324 "The requested entries of the corresponding log."; 1325 uses event-logs; 1326 } 1327 } 1328 } 1329 } 1330 } 1332 /**************************************/ 1333 /* Config & Oper accessible nodes */ 1334 /**************************************/ 1336 container rats-support-structures { 1337 description 1338 "The datastore definition enabling verifiers or relying 1339 parties to discover the information necessary to use the 1340 remote attestation RPCs appropriately."; 1341 leaf-list supported-algos { 1342 config true; 1343 type identityref { 1344 base aa:asymmetric-algorithm-type; 1345 } 1346 description 1347 "Supported algorithms values for an Attester."; 1348 } 1349 list compute-nodes { 1350 config false; 1351 key node-id; 1352 uses compute-node-identifier; 1353 description 1354 "A list names of hardware components in this composite 1355 device that RATS can be conducted with."; 1356 leaf node-name { 1357 type string; 1358 description 1359 "Name of the compute node."; 1360 } 1361 leaf node-location { 1362 type string; 1363 description 1364 "Location of the compute node, such as slot number."; 1365 } 1366 } 1367 list tpms { 1368 key tpm-name; 1369 unique "tpm-path"; 1370 description 1371 "A list of TPMs in this composite device that RATS 1372 can be conducted with."; 1373 uses tpm-name; 1374 leaf hardware-based { 1375 config false; 1376 type boolean; 1377 description 1378 "Answers the question: is this TPM is a hardware based TPM?"; 1379 } 1380 leaf tpm-physical-index { 1381 if-feature ietfhw:entity-mib; 1382 config false; 1383 type int32 { 1384 range "1..2147483647"; 1385 } 1386 description 1387 "The entPhysicalIndex for the TPM."; 1388 reference 1389 "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; 1390 } 1391 leaf tpm-path { 1392 type string; 1393 config false; 1394 description 1395 "Path to a unique TPM on a device. This can change agross reboots."; 1396 } 1398 leaf compute-node { 1399 when "../../compute-nodes"; 1400 config false; 1401 mandatory true; 1402 type compute-node-ref; 1403 description 1404 "When there is more that one TPM, this indicates for which 1405 compute node this TPM services."; 1406 } 1407 leaf tpm-manufacturer { 1408 config false; 1409 type string; 1410 description 1411 "TPM manufacturer name."; 1412 } 1413 leaf tpm-firmware-version { 1414 config false; 1415 type string; 1416 description 1417 "TPM firmware version."; 1418 } 1419 leaf tpm-specification-version { 1420 type identityref { 1421 base cryptoprocessor; 1422 } 1423 config false; 1424 mandatory true; 1425 description 1426 "Identifies the cryptoprocessor API set supported"; 1427 } 1428 leaf tpm-status { 1429 type string; 1430 config false; 1431 description 1432 "TPM chip self-test status, normal or abnormal."; 1433 } 1434 container certificates { 1435 description 1436 "The TPM's certificates, including EK certificates 1437 and AK certificates."; 1438 list certificate { 1439 config true; 1440 key "certificate-name"; 1441 description 1442 "Three types of certificates can be accessed via 1443 this statement, including Initial Attestation 1444 Key Cert, Local Attestation Key Cert or 1445 Endorsement Key Cert."; 1446 uses certificate-name; 1447 leaf certificate-ref { 1448 type leafref { 1449 path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key" 1450 + "/ks:certificates/ks:certificate/ks:name"; 1451 } 1452 description 1453 "A reference to a specific certificate of an 1454 asymmetric key in the Keystore."; 1455 /* Note: It is also possible to import a grouping which allows 1456 local definition via an imported keystore schema. */ 1457 } 1458 leaf certificate-type { 1459 type enumeration { 1460 enum endorsement-cert { 1461 value 0; 1462 description 1463 "Endorsement Key (EK) Certificate type."; 1464 } 1465 enum initial-attestation-cert { 1466 value 1; 1467 description 1468 "Initial Attestation key (IAK) Certificate type."; 1469 } 1470 enum local-attestation-cert { 1471 value 2; 1472 description 1473 "Local Attestation Key (LAK) Certificate type."; 1474 } 1475 } 1476 description 1477 "Type of this certificate"; 1478 } 1479 } 1480 } 1481 } 1482 } 1483 } 1484 1485 2.3. ietf-asymmetric-algs 1487 Cryptographic algorithm types were initially included within -v14 1488 NETCONF's iana-crypto-types.yang. Unfortunately all this content 1489 including the algorithms needed here failed to make the -v15 used 1490 WGLC. Therefore a modified version of this draft is included here. 1491 Perhaps someone will steward this list as a separate draft. 1493 ietf-asymmetric-algs@2020-06-12.yang 1494 module ietf-asymmetric-algs { 1495 yang-version 1.1; 1496 namespace "urn:ietf:params:xml:ns:yang:ietf-asymmetric-algs"; 1497 prefix aa; 1499 organization 1500 "IETF NETCONF (Network Configuration) Working Group"; 1502 contact 1503 "WG Web: 1504 WG List: 1505 Author: Eric Voit 1506 Author: Kent Watsen 1507 Author: Wang Haiguang "; 1509 description 1510 "This module defines a identities for asymmetric algorithms. 1512 Copyright (c) 2020 IETF Trust and the persons identified 1513 as authors of the code. All rights reserved. 1514 Redistribution and use in source and binary forms, with 1515 or without modification, is permitted pursuant to, and 1516 subject to the license terms contained in, the Simplified 1517 BSD License set forth in Section 4.c of the IETF Trust's 1518 Legal Provisions Relating to IETF Documents 1519 (https://trustee.ietf.org/license-info). 1520 This version of this YANG module is part of RFC XXXX 1521 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC 1522 itself for full legal notices. 1523 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 1524 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 1525 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 1526 are to be interpreted as described in BCP 14 (RFC 2119) 1527 (RFC 8174) when, and only when, they appear in all 1528 capitals, as shown here."; 1530 revision 2020-06-12 { 1531 description 1532 "Initial version"; 1534 reference 1535 "RFC XXXX: tbd 1536 initial draft: draft-voit-rats-trusted-path-routing 1537 concepts from ietf-asymmetric-algs.yang which did not progress to 1538 WGLC in NETCONF."; 1539 } 1541 /*****************/ 1542 /* Features */ 1543 /*****************/ 1545 feature TPM12 { 1546 description 1547 "This feature indicates support for the TPM 1.2 API."; 1548 } 1550 feature TPM20 { 1551 description 1552 "This feature indicates support for the TPM 2.0 API."; 1553 } 1555 feature iana { 1556 description 1557 "This feature indicates support for the IANA algorithms defined 1558 in Registry xxxxx"; 1559 } 1561 /*****************/ 1562 /* Identities */ 1563 /*****************/ 1565 /* There needs to be collasping/verification of some of the identity types 1566 between the various algorithm types listed below */ 1568 identity asymmetric-algorithm-type { 1569 description 1570 "Base identity identityerating various asymmetric key algorithms."; 1571 } 1573 identity iana-asymmetric-algorithm { 1574 base asymmetric-algorithm-type; 1575 description 1576 "Base identity identityerating various asymmetric key algorithms."; 1577 } 1579 identity tpm12-asymmetric-algorithm { 1580 base asymmetric-algorithm-type; 1581 description 1582 "Base identity identityerating various asymmetric key algorithms."; 1583 reference 1584 "TPM-Main-Part-2-TPM-Structures_v1.2_rev116_01032011.pdf 1585 TPM_ALGORITHM_ID values, page 18"; 1586 } 1588 identity tpm2-asymmetric-algorithm { 1589 base asymmetric-algorithm-type; 1590 description 1591 "Base identity identityerating various asymmetric key algorithms."; 1592 reference 1593 "TPM-Rev-2.0-Part-2-Structures-01.38.pdf 1594 The TCG Algorithm Registry ID value. Table 9"; 1595 } 1597 identity rsa { 1598 base tpm12-asymmetric-algorithm; 1599 base tpm2-asymmetric-algorithm; 1600 description 1601 "RFC 3447 - the RSA algorithm"; 1602 } 1604 identity rsa1024 { 1605 if-feature "iana"; 1606 base iana-asymmetric-algorithm; 1607 base rsa; 1608 description 1609 "The RSA algorithm using a 1024-bit key."; 1610 reference 1611 "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; 1612 } 1614 identity rsa2048 { 1615 if-feature "iana"; 1616 base iana-asymmetric-algorithm; 1617 base rsa; 1618 description 1619 "The RSA algorithm using a 2048-bit key."; 1620 reference 1621 "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; 1622 } 1624 identity rsa3072 { 1625 if-feature "iana"; 1626 base iana-asymmetric-algorithm; 1627 base rsa; 1628 description 1629 "The RSA algorithm using a 3072-bit key."; 1631 reference 1632 "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; 1633 } 1635 identity rsa4096 { 1636 if-feature "iana"; 1637 base iana-asymmetric-algorithm; 1638 base rsa; 1639 description 1640 "The RSA algorithm using a 4096-bit key."; 1641 reference 1642 "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; 1643 } 1645 identity rsa7680 { 1646 if-feature "iana"; 1647 base iana-asymmetric-algorithm; 1648 base rsa; 1649 description 1650 "The RSA algorithm using a 7680-bit key."; 1651 reference 1652 "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; 1653 } 1655 identity rsa15360 { 1656 if-feature "iana"; 1657 base iana-asymmetric-algorithm; 1658 base rsa; 1659 description 1660 "The RSA algorithm using a 15360-bit key."; 1661 reference 1662 "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; 1663 } 1665 identity secp192r1 { 1666 if-feature "iana"; 1667 base iana-asymmetric-algorithm; 1668 description 1669 "The asymmetric algorithm using a NIST P192 Curve."; 1670 reference 1671 "RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. 1672 RFC 5480: Elliptic Curve Cryptography Subject Public Key 1673 Information."; 1674 } 1676 identity secp224r1 { 1677 if-feature "iana"; 1678 base iana-asymmetric-algorithm; 1679 description 1680 "The asymmetric algorithm using a NIST P224 Curve."; 1681 reference 1682 "RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. 1683 RFC 5480: Elliptic Curve Cryptography Subject Public Key 1684 Information."; 1685 } 1687 identity secp256r1 { 1688 if-feature "iana"; 1689 base iana-asymmetric-algorithm; 1690 description 1691 "The asymmetric algorithm using a NIST P256 Curve."; 1692 reference 1693 "RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. 1694 RFC 5480: Elliptic Curve Cryptography Subject Public Key 1695 Information."; 1696 } 1698 identity secp384r1 { 1699 base iana-asymmetric-algorithm; 1700 description 1701 "The asymmetric algorithm using a NIST P384 Curve."; 1702 reference 1703 "RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. 1704 RFC 5480: Elliptic Curve Cryptography Subject Public Key 1705 Information."; 1706 } 1708 identity secp521r1 { 1709 if-feature "iana"; 1710 base iana-asymmetric-algorithm; 1711 description 1712 "The asymmetric algorithm using a NIST P521 Curve."; 1713 reference 1714 "RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms. 1715 RFC 5480: Elliptic Curve Cryptography Subject Public Key 1716 Information."; 1717 } 1719 identity x25519 { 1720 if-feature "iana"; 1721 base iana-asymmetric-algorithm; 1722 description 1723 "The asymmetric algorithm using a x.25519 Curve."; 1724 reference 1725 "RFC 7748: Elliptic Curves for Security."; 1726 } 1727 identity x448 { 1728 if-feature "iana"; 1729 base iana-asymmetric-algorithm; 1730 description 1731 "The asymmetric algorithm using a x.448 Curve."; 1732 reference 1733 "RFC 7748: Elliptic Curves for Security."; 1734 } 1736 identity SHA1 { 1737 if-feature "TPM20 or TPM12"; 1738 base tpm12-asymmetric-algorithm; 1739 base tpm2-asymmetric-algorithm; 1740 description 1741 "ISO/IEC 10118-3 - SHA1 algorithm"; 1742 } 1744 identity HMAC { 1745 if-feature "TPM20 or TPM12"; 1746 base tpm12-asymmetric-algorithm; 1747 base tpm2-asymmetric-algorithm; 1748 description 1749 "ISO/IEC 9797-2 - Hash Message Authentication Code (HMAC) algorithm 1750 also RFC2014. 1751 we need to verify if NMAC implementation isn't different in the two."; 1752 } 1754 identity AES { 1755 if-feature "TPM20 or TPM12"; 1756 base tpm2-asymmetric-algorithm; 1757 description 1758 "ISO/IEC 18033-3 - the AES algorithm"; 1759 } 1761 identity AES128 { 1762 if-feature "TPM12"; 1763 base tpm12-asymmetric-algorithm; 1764 base AES; 1765 description 1766 "ISO/IEC 18033-3 - the AES algorithm, key size 128"; 1767 } 1769 identity AES192 { 1770 if-feature "TPM12"; 1771 base tpm12-asymmetric-algorithm; 1772 base AES; 1773 description 1774 "ISO/IEC 18033-3 - the AES algorithm, key size 192"; 1776 } 1778 identity AES256 { 1779 if-feature "TPM12"; 1780 base tpm12-asymmetric-algorithm; 1781 base AES; 1782 description 1783 "ISO/IEC 18033-3 - the AES algorithm, key size 256"; 1784 } 1786 identity MGF1 { 1787 if-feature "TPM20"; 1788 base tpm2-asymmetric-algorithm; 1789 description 1790 "IEEE Std 1363a -2004 - hash-based mask-generation function"; 1791 } 1792 identity KEYEDHASH { 1793 if-feature "TPM20"; 1794 base tpm2-asymmetric-algorithm; 1795 description 1796 "TPM2 KEYEDHASH - an encryption or signing algorithm using a keyed hash"; 1797 } 1799 identity XOR { 1800 if-feature "TPM20 or TPM12"; 1801 base tpm12-asymmetric-algorithm; 1802 base tpm2-asymmetric-algorithm; 1803 description 1804 "TPM2 XOR"; 1805 } 1807 identity SHA256 { 1808 if-feature "TPM20"; 1809 base tpm2-asymmetric-algorithm; 1810 description 1811 "ISO/IEC 10118-3 - the SHA 256 algorithm"; 1812 } 1814 identity SHA384 { 1815 if-feature "TPM20"; 1816 base tpm2-asymmetric-algorithm; 1817 description 1818 "ISO/IEC 10118-3 - the SHA 384 algorithm"; 1819 } 1821 identity SHA512 { 1822 if-feature "TPM20"; 1823 base tpm2-asymmetric-algorithm; 1824 description 1825 "ISO/IEC 10118-3 - the SHA 512 algorithm"; 1826 } 1828 identity NULL { 1829 if-feature "TPM20"; 1830 base tpm2-asymmetric-algorithm; 1831 description 1832 "TPM2 NULL"; 1833 } 1835 identity SM3_256 { 1836 if-feature "TPM20"; 1837 base tpm2-asymmetric-algorithm; 1838 description 1839 "GM/T 0004-2012 - SM3_256"; 1840 } 1842 identity SM4 { 1843 if-feature "TPM20"; 1844 base tpm2-asymmetric-algorithm; 1845 description 1846 "GM/T 0004-2012 - SM4 symmetric block cipher"; 1847 } 1849 identity RSASSA { 1850 if-feature "TPM20"; 1851 base tpm2-asymmetric-algorithm; 1852 description 1853 "RFC 3447 - defined in section 8.2 (RSASSAPKCS1-v1_5)"; 1854 } 1856 identity RSAES { 1857 if-feature "TPM20"; 1858 base tpm2-asymmetric-algorithm; 1859 description 1860 "RFC 3447 - defined in section 7.2 (RSAES-PKCS1-v1_5)"; 1861 } 1863 identity RSAPSS { 1864 if-feature "TPM20"; 1865 base tpm2-asymmetric-algorithm; 1866 description 1867 "RFC 3447 - defined in section 8.1 (RSASSA PSS)"; 1868 } 1870 identity OAEP { 1871 if-feature "TPM20"; 1872 base tpm2-asymmetric-algorithm; 1873 description 1874 "RFC 3447 - defined in section 7.1 (RSASSA OAEP)"; 1875 } 1877 identity ECDSA { 1878 if-feature "TPM20"; 1879 base tpm2-asymmetric-algorithm; 1880 description 1881 "ISO/IEC 14888-3 - elliptic curve cryptography (ECC)"; 1882 } 1884 identity ECDH { 1885 if-feature "TPM20"; 1886 base tpm2-asymmetric-algorithm; 1887 description 1888 "NIST SP800-56A - secret sharing using ECC"; 1889 } 1891 identity ECDAA { 1892 if-feature "TPM20"; 1893 base tpm2-asymmetric-algorithm; 1894 description 1895 "TPM2 - elliptic-curve based anonymous signing scheme"; 1896 } 1898 identity SM2 { 1899 if-feature "TPM20"; 1900 base tpm2-asymmetric-algorithm; 1901 description 1902 "A GM/T 0003.1-2012, GM/T 0003.2-2012, GM/T 0003.3-2012, 1903 GM/T 0003.5-2012 SM2"; 1904 } 1906 identity ECSCHNORR { 1907 if-feature "TPM20"; 1908 base tpm2-asymmetric-algorithm; 1909 description 1910 "TPM2 - elliptic-curve based Schnorr signature"; 1911 } 1913 identity ECMQV { 1914 if-feature "TPM20"; 1915 base tpm2-asymmetric-algorithm; 1916 description 1917 "NIST SP800-56A - two-phase elliptic-curve key"; 1918 } 1919 identity KDF1_SP800_56A { 1920 if-feature "TPM20"; 1921 base tpm2-asymmetric-algorithm; 1922 description 1923 "NIST SP800-56A - concatenation key derivation function, 1924 (approved alternative1) section 5.8.1"; 1925 } 1927 identity KDF2 { 1928 if-feature "TPM20"; 1929 base tpm2-asymmetric-algorithm; 1930 description 1931 "IEEE 1363a-2004 - key derivation function KDF2 section 13.2"; 1932 } 1934 identity KDF1_SP800_108 { 1935 if-feature "TPM20"; 1936 base tpm2-asymmetric-algorithm; 1937 description 1938 "NIST SP800-108 - Section 5.1 KDF in Counter Mode"; 1939 } 1941 identity ECC { 1942 if-feature "TPM20"; 1943 base tpm2-asymmetric-algorithm; 1944 description 1945 "ISO/IEC 15946-1 - prime field ECC"; 1946 } 1948 identity SYMCIPHER { 1949 if-feature "TPM20"; 1950 base tpm2-asymmetric-algorithm; 1951 description 1952 "TPM2 - object type for a symmetric block cipher"; 1953 } 1955 identity CAMELLIA { 1956 if-feature "TPM20"; 1957 base tpm2-asymmetric-algorithm; 1958 description 1959 "ISO/IEC 18033-3 - the Camellia algorithm"; 1960 } 1962 identity CTR { 1963 if-feature "TPM20"; 1964 base tpm2-asymmetric-algorithm; 1965 description 1966 "ISO/IEC 10116 - Counter mode"; 1968 } 1970 identity OFB { 1971 if-feature "TPM20"; 1972 base tpm2-asymmetric-algorithm; 1973 description 1974 "ISO/IEC 10116 - Output Feedback mode"; 1975 } 1977 identity CBC { 1978 if-feature "TPM20"; 1979 base tpm2-asymmetric-algorithm; 1980 description 1981 "ISO/IEC 10116 - Cipher Block Chaining mode"; 1982 } 1984 identity CFB { 1985 if-feature "TPM20"; 1986 base tpm2-asymmetric-algorithm; 1987 description 1988 "ISO/IEC 10116 - Cipher Feedback mode"; 1989 } 1991 identity ECB { 1992 if-feature "TPM20"; 1993 base tpm2-asymmetric-algorithm; 1994 description 1995 "ISO/IEC 10116 - Electronic Codebook mode"; 1996 } 1998 } 1999 2001 3. IANA considerations 2003 This document will include requests to IANA: 2005 To be defined yet. 2007 4. Security Considerations 2009 There are always some. 2011 5. Acknowledgements 2013 Not yet. 2015 6. Change Log 2017 Changes from version 01 to version 02: 2019 o Extracted Crypto-types into a separate YANG file 2021 o Mades the algorithms explicit, not strings 2023 o Hash Algo as key the selected TPM2 PCRs 2025 o PCR numbers are their own type 2027 o Eliminated nested keys for node-id plus tpm-name 2029 o Eliminated TPM-Name of "ALL" 2031 o Added TPM-Path 2033 Changes from version 00 to version 01: 2035 o Addressed author's comments 2037 o Extended complementary details about attestation-certificates 2039 o Relabeled chunk-size to log-entry-quantity 2041 o Relabeled location with compute-node or tpm-name where appropriate 2043 o Added a valid entity-mib physical-index to compute-node and tpm- 2044 name to map it back to hardware inventory 2046 o Relabeled name to tpm_name 2048 o Removed event-string in last-entry 2050 7. References 2052 7.1. Normative References 2054 [I-D.birkholz-rats-reference-interaction-model] 2055 Birkholz, H. and M. Eckel, "Reference Interaction Models 2056 for Remote Attestation Procedures", draft-birkholz-rats- 2057 reference-interaction-model-02 (work in progress), January 2058 2020. 2060 [I-D.ietf-netconf-crypto-types] 2061 Watsen, K., "Common YANG Data Types for Cryptography", 2062 draft-ietf-netconf-crypto-types-15 (work in progress), May 2063 2020. 2065 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2066 Requirement Levels", BCP 14, RFC 2119, 2067 DOI 10.17487/RFC2119, March 1997, 2068 . 2070 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2071 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2072 . 2074 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2075 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2076 May 2017, . 2078 [RFC8348] Bierman, A., Bjorklund, M., Dong, J., and D. Romascanu, "A 2079 YANG Data Model for Hardware Management", RFC 8348, 2080 DOI 10.17487/RFC8348, March 2018, 2081 . 2083 7.2. Informative References 2085 [I-D.ietf-rats-architecture] 2086 Birkholz, H., Thaler, D., Richardson, M., Smith, N., and 2087 W. Pan, "Remote Attestation Procedures Architecture", 2088 draft-ietf-rats-architecture-04 (work in progress), May 2089 2020. 2091 Authors' Addresses 2093 Henk Birkholz 2094 Fraunhofer SIT 2095 Rheinstrasse 75 2096 Darmstadt 64295 2097 Germany 2099 Email: henk.birkholz@sit.fraunhofer.de 2100 Michael Eckel 2101 Fraunhofer SIT 2102 Rheinstrasse 75 2103 Darmstadt 64295 2104 Germany 2106 Email: michael.eckel@sit.fraunhofer.de 2108 Shwetha Bhandari 2109 Cisco Systems 2111 Email: shwethab@cisco.com 2113 Bill Sulzen 2114 Cisco Systems 2116 Email: bsulzen@cisco.com 2118 Eric Voit 2119 Cisco Systems 2121 Email: evoit@cisco.com 2123 Liang Xia (Frank) 2124 Huawei Technologies 2125 101 Software Avenue, Yuhuatai District 2126 Nanjing, Jiangsu 210012 2127 China 2129 Email: Frank.Xialiang@huawei.com 2131 Tom Laffey 2132 Hewlett Packard Enterprise 2134 Email: tom.laffey@hpe.com 2136 Guy C. Fedorkow 2137 Juniper Networks 2138 10 Technology Park Drive 2139 Westford, Massachusetts 01886 2141 Email: gfedorkow@juniper.net