idnits 2.17.1 draft-ietf-netconf-crypto-types-05.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 128 has weird spacing: '...gorithm asy...' == Line 137 has weird spacing: '...on-date iet...' == Line 141 has weird spacing: '...on-date iet...' == Line 149 has weird spacing: '...gorithm asy...' == Line 160 has weird spacing: '...on-date iet...' == (2 more instances...) -- The document date (March 9, 2019) is 1873 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) -- Possible downref: Non-RFC (?) normative reference: ref. 'ITU.X690.2015' -- Obsolete informational reference (is this intentional?): RFC 6125 (Obsoleted by RFC 9525) Summary: 0 errors (**), 0 flaws (~~), 7 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NETCONF Working Group K. Watsen 3 Internet-Draft Watsen Networks 4 Intended status: Standards Track H. Wang 5 Expires: September 10, 2019 Huawei 6 March 9, 2019 8 Common YANG Data Types for Cryptography 9 draft-ietf-netconf-crypto-types-05 11 Abstract 13 This document defines YANG identities, typedefs, the groupings useful 14 for cryptographic applications. 16 Editorial Note (To be removed by RFC Editor) 18 This draft contains many placeholder values that need to be replaced 19 with finalized values at the time of publication. This note 20 summarizes all of the substitutions that are needed. No other RFC 21 Editor instructions are specified elsewhere in this document. 23 Artwork in this document contains shorthand references to drafts in 24 progress. Please apply the following replacements: 26 o "XXXX" --> the assigned RFC value for this draft 28 Artwork in this document contains placeholder values for the date of 29 publication of this draft. Please apply the following replacement: 31 o "2019-03-09" --> the publication date of this draft 33 The following Appendix section is to be removed prior to publication: 35 o Appendix B. Change Log 37 Status of This Memo 39 This Internet-Draft is submitted in full conformance with the 40 provisions of BCP 78 and BCP 79. 42 Internet-Drafts are working documents of the Internet Engineering 43 Task Force (IETF). Note that other groups may also distribute 44 working documents as Internet-Drafts. The list of current Internet- 45 Drafts is at https://datatracker.ietf.org/drafts/current/. 47 Internet-Drafts are draft documents valid for a maximum of six months 48 and may be updated, replaced, or obsoleted by other documents at any 49 time. It is inappropriate to use Internet-Drafts as reference 50 material or to cite them other than as "work in progress." 52 This Internet-Draft will expire on September 10, 2019. 54 Copyright Notice 56 Copyright (c) 2019 IETF Trust and the persons identified as the 57 document authors. All rights reserved. 59 This document is subject to BCP 78 and the IETF Trust's Legal 60 Provisions Relating to IETF Documents 61 (https://trustee.ietf.org/license-info) in effect on the date of 62 publication of this document. Please review these documents 63 carefully, as they describe your rights and restrictions with respect 64 to this document. Code Components extracted from this document must 65 include Simplified BSD License text as described in Section 4.e of 66 the Trust Legal Provisions and are provided without warranty as 67 described in the Simplified BSD License. 69 Table of Contents 71 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 72 2. The Crypto Types Module . . . . . . . . . . . . . . . . . . . 3 73 2.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 3 74 2.2. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 4 75 3. Security Considerations . . . . . . . . . . . . . . . . . . . 38 76 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 39 77 4.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 39 78 4.2. The YANG Module Names Registry . . . . . . . . . . . . . 39 79 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 39 80 5.1. Normative References . . . . . . . . . . . . . . . . . . 39 81 5.2. Informative References . . . . . . . . . . . . . . . . . 42 82 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 44 83 A.1. The "asymmetric-key-pair-with-certs-grouping" Grouping . 44 84 A.2. The "generate-hidden-key" Action . . . . . . . . . . . . 46 85 A.3. The "install-hidden-key" Action . . . . . . . . . . . . . 47 86 A.4. The "generate-certificate-signing-request" Action . . . . 47 87 A.5. The "certificate-expiration" Notification . . . . . . . . 48 88 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 49 89 B.1. I-D to 00 . . . . . . . . . . . . . . . . . . . . . . . . 49 90 B.2. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 49 91 B.3. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 49 92 B.4. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 50 93 B.5. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 50 94 B.6. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 51 95 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 51 96 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51 98 1. Introduction 100 This document defines a YANG 1.1 [RFC7950] module specifying 101 identities, typedefs, and groupings useful for cryptography. 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 BCP 106 14 [RFC2119] [RFC8174] when, and only when, they appear in all 107 capitals, as shown here. 109 2. The Crypto Types Module 111 2.1. Tree Diagram 113 This section provides a tree diagram [RFC8340] for the "ietf-crypto- 114 types" module. Only the groupings as represented, as tree diagrams 115 have no means to represent identities or typedefs. 117 module: ietf-crypto-types 119 grouping public-key-grouping: 120 +---- algorithm? asymmetric-key-algorithm-ref 121 +---- public-key? binary 122 grouping asymmetric-key-pair-grouping: 123 +---- algorithm? asymmetric-key-algorithm-ref 124 +---- public-key? binary 125 +---- private-key? union 126 +---x generate-hidden-key 127 | +---- input 128 | +---w algorithm asymmetric-key-algorithm-ref 129 +---x install-hidden-key 130 +---- input 131 +---w algorithm asymmetric-key-algorithm-ref 132 +---w public-key? binary 133 +---w private-key? binary 134 grouping trust-anchor-cert-grouping: 135 +---- cert? trust-anchor-cert-cms 136 +---n certificate-expiration 137 +--ro expiration-date ietf-yang-types:date-and-time 138 grouping end-entity-cert-grouping: 139 +---- cert? end-entity-cert-cms 140 +---n certificate-expiration 141 +--ro expiration-date ietf-yang-types:date-and-time 142 grouping asymmetric-key-pair-with-certs-grouping: 143 +---- algorithm? 144 | asymmetric-key-algorithm-ref 145 +---- public-key? binary 146 +---- private-key? union 147 +---x generate-hidden-key 148 | +---- input 149 | +---w algorithm asymmetric-key-algorithm-ref 150 +---x install-hidden-key 151 | +---- input 152 | +---w algorithm asymmetric-key-algorithm-ref 153 | +---w public-key? binary 154 | +---w private-key? binary 155 +---- certificates 156 | +---- certificate* [name] 157 | +---- name string 158 | +---- cert? end-entity-cert-cms 159 | +---n certificate-expiration 160 | +--ro expiration-date ietf-yang-types:date-and-time 161 +---x generate-certificate-signing-request 162 +---- input 163 | +---w subject binary 164 | +---w attributes? binary 165 +---- output 166 +--ro certificate-signing-request binary 168 2.2. YANG Module 170 This module has normative references to [RFC2404], [RFC3565], 171 [RFC3686], [RFC4106], [RFC4253], [RFC4279], [RFC4309], [RFC4494], 172 [RFC4543], [RFC4868], [RFC5280], [RFC5652], [RFC5656], [RFC6187], 173 [RFC6991], [RFC7919], [RFC8268], [RFC8332], [RFC8341], [RFC8422], 174 [RFC8446], and [ITU.X690.2015]. 176 This module has an informational reference to [RFC2986], [RFC3174], 177 [RFC4493], [RFC5915], [RFC6125], [RFC6234], [RFC6239], [RFC6507], 178 [RFC8017], [RFC8032], [RFC8439]. 180 file "ietf-crypto-types@2019-03-09.yang" 182 module ietf-crypto-types { 183 yang-version 1.1; 184 namespace "urn:ietf:params:xml:ns:yang:ietf-crypto-types"; 185 prefix ct; 187 import ietf-yang-types { 188 prefix yang; 189 reference 190 "RFC 6991: Common YANG Data Types"; 191 } 192 import ietf-netconf-acm { 193 prefix nacm; 194 reference 195 "RFC 8341: Network Configuration Access Control Model"; 196 } 198 organization 199 "IETF NETCONF (Network Configuration) Working Group"; 200 contact 201 "WG Web: 202 WG List: 203 Author: Kent Watsen 204 Author: Wang Haiguang "; 205 description 206 "This module defines common YANG types for cryptographic 207 applications. 209 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 210 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 211 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 212 are to be interpreted as described in BCP 14 [RFC2119] 213 [RFC8174] when, and only when, they appear in all 214 capitals, as shown here. 216 Copyright (c) 2019 IETF Trust and the persons identified 217 as authors of the code. All rights reserved. 219 Redistribution and use in source and binary forms, with 220 or without modification, is permitted pursuant to, and 221 subject to the license terms contained in, the Simplified 222 BSD License set forth in Section 4.c of the IETF Trust's 223 Legal Provisions Relating to IETF Documents 224 (http://trustee.ietf.org/license-info). 226 This version of this YANG module is part of RFC XXXX; see 227 the RFC itself for full legal notices."; 229 revision 2019-03-09 { 230 description 231 "Initial version"; 232 reference 233 "RFC XXXX: Common YANG Data Types for Cryptography"; 234 } 236 /**************************************/ 237 /* Identities for Hash Algorithms */ 238 /**************************************/ 240 identity hash-algorithm { 241 description 242 "A base identity for hash algorithm verification."; 243 } 245 identity sha-224 { 246 base hash-algorithm; 247 description 248 "The SHA-224 algorithm."; 249 reference 250 "RFC 6234: US Secure Hash Algorithms."; 251 } 253 identity sha-256 { 254 base hash-algorithm; 255 description 256 "The SHA-256 algorithm."; 257 reference 258 "RFC 6234: US Secure Hash Algorithms."; 259 } 261 identity sha-384 { 262 base hash-algorithm; 263 description 264 "The SHA-384 algorithm."; 265 reference 266 "RFC 6234: US Secure Hash Algorithms."; 267 } 269 identity sha-512 { 270 base hash-algorithm; 271 description 272 "The SHA-512 algorithm."; 273 reference 274 "RFC 6234: US Secure Hash Algorithms."; 275 } 277 /***********************************************/ 278 /* Identities for Asymmetric Key Algorithms */ 279 /***********************************************/ 281 identity asymmetric-key-algorithm { 282 description 283 "Base identity from which all asymmetric key 284 encryption Algorithm."; 285 } 287 identity rsa1024 { 288 base asymmetric-key-algorithm; 289 description 290 "The RSA algorithm using a 1024-bit key."; 291 reference 292 "RFC 8017: 293 PKCS #1: RSA Cryptography Specifications Version 2.2."; 294 } 296 identity rsa2048 { 297 base asymmetric-key-algorithm; 298 description 299 "The RSA algorithm using a 2048-bit key."; 300 reference 301 "RFC 8017: 302 PKCS #1: RSA Cryptography Specifications Version 2.2."; 303 } 305 identity rsa3072 { 306 base asymmetric-key-algorithm; 307 description 308 "The RSA algorithm using a 3072-bit key."; 309 reference 310 "RFC 8017: 311 PKCS #1: RSA Cryptography Specifications Version 2.2."; 312 } 314 identity rsa4096 { 315 base asymmetric-key-algorithm; 316 description 317 "The RSA algorithm using a 4096-bit key."; 318 reference 319 "RFC 8017: 320 PKCS #1: RSA Cryptography Specifications Version 2.2."; 321 } 323 identity rsa7680 { 324 base asymmetric-key-algorithm; 325 description 326 "The RSA algorithm using a 7680-bit key."; 327 reference 328 "RFC 8017: 329 PKCS #1: RSA Cryptography Specifications Version 2.2."; 330 } 332 identity rsa15360 { 333 base asymmetric-key-algorithm; 334 description 335 "The RSA algorithm using a 15360-bit key."; 336 reference 337 "RFC 8017: 339 PKCS #1: RSA Cryptography Specifications Version 2.2."; 340 } 342 identity secp192r1 { 343 base asymmetric-key-algorithm; 344 description 345 "The ECDSA algorithm using a NIST P256 Curve."; 346 reference 347 "RFC 6090: 348 Fundamental Elliptic Curve Cryptography Algorithms."; 349 } 351 identity secp224r1 { 352 base asymmetric-key-algorithm; 353 description 354 "The ECDSA algorithm using a NIST P256 Curve."; 355 reference 356 "RFC 6090: 357 Fundamental Elliptic Curve Cryptography Algorithms."; 358 } 360 identity secp256r1 { 361 base asymmetric-key-algorithm; 362 description 363 "The ECDSA algorithm using a NIST P256 Curve."; 364 reference 365 "RFC 6090: 366 Fundamental Elliptic Curve Cryptography Algorithms."; 367 } 369 identity secp384r1 { 370 base asymmetric-key-algorithm; 371 description 372 "The ECDSA algorithm using a NIST P256 Curve."; 373 reference 374 "RFC 6090: 375 Fundamental Elliptic Curve Cryptography Algorithms."; 376 } 378 identity secp521r1 { 379 base asymmetric-key-algorithm; 380 description 381 "The ECDSA algorithm using a NIST P256 Curve."; 382 reference 383 "RFC 6090: 384 Fundamental Elliptic Curve Cryptography Algorithms."; 385 } 386 /*************************************/ 387 /* Identities for MAC Algorithms */ 388 /*************************************/ 390 identity mac-algorithm { 391 description 392 "A base identity for mac generation."; 393 } 395 identity hmac-sha1 { 396 base mac-algorithm; 397 description 398 "Generating MAC using SHA1 hash function"; 399 reference 400 "RFC 3174: US Secure Hash Algorithm 1 (SHA1)"; 401 } 403 identity hmac-sha1-96 { 404 base mac-algorithm; 405 description 406 "Generating MAC using SHA1 hash function"; 407 reference 408 "RFC 2404: The Use of HMAC-SHA-1-96 within ESP and AH"; 409 } 411 identity hmac-sha2-224 { 412 base mac-algorithm; 413 description 414 "Generating MAC using SHA2 hash function"; 415 reference 416 "RFC 6234: 417 US Secure Hash Algorithms (SHA and SHA-based HMAC and 418 HKDF)"; 419 } 421 identity hmac-sha2-256 { 422 base mac-algorithm; 423 description 424 "Generating MAC using SHA2 hash function"; 425 reference 426 "RFC 6234: 427 US Secure Hash Algorithms (SHA and SHA-based HMAC and 428 HKDF)"; 429 } 431 identity hmac-sha2-256-128 { 432 base mac-algorithm; 433 description 434 "Generating a 256 bits MAC using SHA2 hash function and 435 truncate it to 128 bits"; 436 reference 437 "RFC 4868: 438 Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 439 with IPsec"; 440 } 442 identity hmac-sha2-384 { 443 base mac-algorithm; 444 description 445 "Generating MAC using SHA2 hash function"; 446 reference 447 "RFC 6234: 448 US Secure Hash Algorithms (SHA and SHA-based HMAC and 449 HKDF)"; 450 } 452 identity hmac-sha2-384-192 { 453 base mac-algorithm; 454 description 455 "Generating a 384 bits MAC using SHA2 hash function and 456 truncate it to 192 bits"; 457 reference 458 "RFC 4868: 459 Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with 460 IPsec"; 461 } 463 identity hmac-sha2-512 { 464 base mac-algorithm; 465 description 466 "Generating MAC using SHA2 hash function"; 467 reference 468 "RFC 6234: 469 US Secure Hash Algorithms (SHA and SHA-based HMAC and 470 HKDF)"; 471 } 473 identity hmac-sha2-512-256 { 474 base mac-algorithm; 475 description 476 "Generating a 512 bits MAC using SHA2 hash function and 477 truncating it to 256 bits"; 478 reference 479 "RFC 4868: 480 Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with 481 IPsec"; 483 } 485 identity aes-128-gmac { 486 base mac-algorithm; 487 description 488 "Generating MAC using the Advanced Encryption Standard (AES) 489 Galois Message Authentication Code (GMAC) as a mechanism to 490 provide data origin authentication"; 491 reference 492 "RFC 4543: 493 The Use of Galois Message Authentication Code (GMAC) in 494 IPsec ESP and AH"; 495 } 497 identity aes-192-gmac { 498 base mac-algorithm; 499 description 500 "Generating MAC using the Advanced Encryption Standard (AES) 501 Galois Message Authentication Code (GMAC) as a mechanism to 502 provide data origin authentication"; 503 reference 504 "RFC 4543: 505 The Use of Galois Message Authentication Code (GMAC) in 506 IPsec ESP and AH"; 507 } 509 identity aes-256-gmac { 510 base mac-algorithm; 511 description 512 "Generating MAC using the Advanced Encryption Standard (AES) 513 Galois Message Authentication Code (GMAC) as a mechanism to 514 provide data origin authentication"; 515 reference 516 "RFC 4543: 517 The Use of Galois Message Authentication Code (GMAC) in 518 IPsec ESP and AH"; 519 } 521 identity aes-cmac-96 { 522 base mac-algorithm; 523 description 524 "Generating MAC using Advanced Encryption Standard (AES) 525 Cipher-based Message Authentication Code (CMAC)"; 526 reference 527 "RFC 4494: The AES-CMAC-96 Algorithm and its Use with IPsec"; 528 } 530 identity aes-cmac-128 { 531 base mac-algorithm; 532 description 533 "Generating MAC using Advanced Encryption Standard (AES) 534 Cipher-based Message Authentication Code (CMAC)"; 535 reference 536 "RFC 4493: The AES-CMAC Algorithm"; 537 } 539 /********************************************/ 540 /* Identities for Encryption Algorithms */ 541 /********************************************/ 543 identity encryption-algorithm { 544 description 545 "A base identity for encryption algorithm."; 546 } 548 identity aes-128-cbc { 549 base encryption-algorithm; 550 description 551 "Encrypt message with AES algorithm in CBC mode with a key 552 length of 128 bits"; 553 reference 554 "RFC 3565: 555 Use of the Advanced Encryption Standard (AES) Encryption 556 Algorithm in Cryptographic Message Syntax (CMS)"; 557 } 559 identity aes-192-cbc { 560 base encryption-algorithm; 561 description 562 "Encrypt message with AES algorithm in CBC mode with a key 563 length of 192 bits"; 564 reference 565 "RFC 3565: 566 Use of the Advanced Encryption Standard (AES) Encryption 567 Algorithm in Cryptographic Message Syntax (CMS)"; 568 } 570 identity aes-256-cbc { 571 base encryption-algorithm; 572 description 573 "Encrypt message with AES algorithm in CBC mode with a key 574 length of 256 bits"; 575 reference 576 "RFC 3565: 577 Use of the Advanced Encryption Standard (AES) Encryption 578 Algorithm in Cryptographic Message Syntax (CMS)"; 580 } 582 identity aes-128-ctr { 583 base encryption-algorithm; 584 description 585 "Encrypt message with AES algorithm in CTR mode with a key 586 length of 128 bits"; 587 reference 588 "RFC 3686: 589 Using Advanced Encryption Standard (AES) Counter Mode with 590 IPsec Encapsulating Security Payload (ESP)"; 591 } 593 identity aes-192-ctr { 594 base encryption-algorithm; 595 description 596 "Encrypt message with AES algorithm in CTR mode with a key 597 length of 192 bits"; 598 reference 599 "RFC 3686: 600 Using Advanced Encryption Standard (AES) Counter Mode with 601 IPsec Encapsulating Security Payload (ESP)"; 602 } 604 identity aes-256-ctr { 605 base encryption-algorithm; 606 description 607 "Encrypt message with AES algorithm in CTR mode with a key 608 length of 256 bits"; 609 reference 610 "RFC 3686: 611 Using Advanced Encryption Standard (AES) Counter Mode with 612 IPsec Encapsulating Security Payload (ESP)"; 613 } 615 /****************************************************/ 616 /* Identities for Encryption and MAC Algorithms */ 617 /****************************************************/ 619 identity encryption-and-mac-algorithm { 620 description 621 "A base identity for encryption and MAC algorithm."; 622 } 624 identity aes-128-ccm { 625 base encryption-and-mac-algorithm; 626 description 627 "Encrypt message with AES algorithm in CCM mode with a key 628 length of 128 bits; it can also be used for generating MAC"; 629 reference 630 "RFC 4309: 631 Using Advanced Encryption Standard (AES) CCM Mode with 632 IPsec Encapsulating Security Payload (ESP)"; 633 } 635 identity aes-192-ccm { 636 base encryption-and-mac-algorithm; 637 description 638 "Encrypt message with AES algorithm in CCM mode with a key 639 length of 192 bits; it can also be used for generating MAC"; 640 reference 641 "RFC 4309: 642 Using Advanced Encryption Standard (AES) CCM Mode with 643 IPsec Encapsulating Security Payload (ESP)"; 644 } 646 identity aes-256-ccm { 647 base encryption-and-mac-algorithm; 648 description 649 "Encrypt message with AES algorithm in CCM mode with a key 650 length of 256 bits; it can also be used for generating MAC"; 651 reference 652 "RFC 4309: 653 Using Advanced Encryption Standard (AES) CCM Mode with 654 IPsec Encapsulating Security Payload (ESP)"; 655 } 657 identity aes-128-gcm { 658 base encryption-and-mac-algorithm; 659 description 660 "Encrypt message with AES algorithm in GCM mode with a key 661 length of 128 bits; it can also be used for generating MAC"; 662 reference 663 "RFC 4106: 664 The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating 665 Security Payload (ESP)"; 666 } 668 identity aes-192-gcm { 669 base encryption-and-mac-algorithm; 670 description 671 "Encrypt message with AES algorithm in GCM mode with a key 672 length of 192 bits; it can also be used for generating MAC"; 673 reference 674 "RFC 4106: 675 The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating 676 Security Payload (ESP)"; 677 } 679 identity mac-aes-256-gcm { 680 base encryption-and-mac-algorithm; 681 description 682 "Encrypt message with AES algorithm in GCM mode with a key 683 length of 128 bits; it can also be used for generating MAC"; 684 reference 685 "RFC 4106: 686 The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating 687 Security Payload (ESP)"; 688 } 690 identity chacha20-poly1305 { 691 base encryption-and-mac-algorithm; 692 description 693 "Encrypt message with chacha20 algorithm and generate MAC with 694 POLY1305; it can also be used for generating MAC"; 695 reference 696 "RFC 8439: ChaCha20 and Poly1305 for IETF Protocols"; 697 } 699 /******************************************/ 700 /* Identities for signature algorithm */ 701 /******************************************/ 703 identity signature-algorithm { 704 description 705 "A base identity for asymmetric key encryption algorithm."; 706 } 708 identity dsa-sha1 { 709 base signature-algorithm; 710 description 711 "The signature algorithm using DSA algorithm with SHA1 hash 712 algorithm"; 713 reference 714 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; 715 } 717 identity rsassa-pkcs1-sha1 { 718 base signature-algorithm; 719 description 720 "The signature algorithm using RSASSA-PKCS1-v1_5 with the SHA1 721 hash algorithm."; 722 reference 723 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; 725 } 727 identity rsassa-pkcs1-sha256 { 728 base signature-algorithm; 729 description 730 "The signature algorithm using RSASSA-PKCS1-v1_5 with the 731 SHA256 hash algorithm."; 732 reference 733 "RFC 8332: 734 Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell 735 (SSH) Protocol 736 RFC 8446: 737 The Transport Layer Security (TLS) Protocol Version 1.3"; 738 } 740 identity rsassa-pkcs1-sha384 { 741 base signature-algorithm; 742 description 743 "The signature algorithm using RSASSA-PKCS1-v1_5 with the 744 SHA384 hash algorithm."; 745 reference 746 "RFC 8446: 747 The Transport Layer Security (TLS) Protocol Version 1.3"; 748 } 750 identity rsassa-pkcs1-sha512 { 751 base signature-algorithm; 752 description 753 "The signature algorithm using RSASSA-PKCS1-v1_5 with the 754 SHA512 hash algorithm."; 755 reference 756 "RFC 8332: 757 Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell 758 (SSH) Protocol 759 RFC 8446: 760 The Transport Layer Security (TLS) Protocol Version 1.3"; 761 } 763 identity rsassa-pss-rsae-sha256 { 764 base signature-algorithm; 765 description 766 "The signature algorithm using RSASSA-PSS with mask generation 767 function 1 and SHA256 hash algorithm. If the public key is 768 carried in an X.509 certificate, it MUST use the rsaEncryption 769 OID"; 770 reference 771 "RFC 8446: 772 The Transport Layer Security (TLS) Protocol Version 1.3"; 774 } 776 identity rsassa-pss-rsae-sha384 { 777 base signature-algorithm; 778 description 779 "The signature algorithm using RSASSA-PSS with mask generation 780 function 1 and SHA384 hash algorithm. If the public key is 781 carried in an X.509 certificate, it MUST use the rsaEncryption 782 OID"; 783 reference 784 "RFC 8446: 785 The Transport Layer Security (TLS) Protocol Version 1.3"; 786 } 788 identity rsassa-pss-rsae-sha512 { 789 base signature-algorithm; 790 description 791 "The signature algorithm using RSASSA-PSS with mask generation 792 function 1 and SHA512 hash algorithm. If the public key is 793 carried in an X.509 certificate, it MUST use the rsaEncryption 794 OID"; 795 reference 796 "RFC 8446: 797 The Transport Layer Security (TLS) Protocol Version 1.3"; 798 } 800 identity rsassa-pss-pss-sha256 { 801 base signature-algorithm; 802 description 803 "The signature algorithm using RSASSA-PSS with mask generation 804 function 1 and SHA256 hash algorithm. If the public key is 805 carried in an X.509 certificate, it MUST use the RSASSA-PSS 806 OID"; 807 reference 808 "RFC 8446: 809 The Transport Layer Security (TLS) Protocol Version 1.3"; 810 } 812 identity rsassa-pss-pss-sha384 { 813 base signature-algorithm; 814 description 815 "The signature algorithm using RSASSA-PSS with mask generation 816 function 1 and SHA256 hash algorithm. If the public key is 817 carried in an X.509 certificate, it MUST use the RSASSA-PSS 818 OID"; 819 reference 820 "RFC 8446: 821 The Transport Layer Security (TLS) Protocol Version 1.3"; 823 } 825 identity rsassa-pss-pss-sha512 { 826 base signature-algorithm; 827 description 828 "The signature algorithm using RSASSA-PSS with mask generation 829 function 1 and SHA256 hash algorithm. If the public key is 830 carried in an X.509 certificate, it MUST use the RSASSA-PSS 831 OID"; 832 reference 833 "RFC 8446: 834 The Transport Layer Security (TLS) Protocol Version 1.3"; 835 } 837 identity ecdsa-secp256r1-sha256 { 838 base signature-algorithm; 839 description 840 "The signature algorithm using ECDSA with curve name secp256r1 841 and SHA256 hash algorithm."; 842 reference 843 "RFC 5656: Elliptic Curve Algorithm Integration in the 844 Secure Shell Transport Layer 845 RFC 8446: 846 The Transport Layer Security (TLS) Protocol Version 1.3"; 847 } 849 identity ecdsa-secp384r1-sha384 { 850 base signature-algorithm; 851 description 852 "The signature algorithm using ECDSA with curve name secp384r1 853 and SHA384 hash algorithm."; 854 reference 855 "RFC 5656: Elliptic Curve Algorithm Integration in the 856 Secure Shell Transport Layer 857 RFC 8446: 858 The Transport Layer Security (TLS) Protocol Version 1.3"; 859 } 861 identity ecdsa-secp521r1-sha512 { 862 base signature-algorithm; 863 description 864 "The signature algorithm using ECDSA with curve name secp521r1 865 and SHA512 hash algorithm."; 866 reference 867 "RFC 5656: Elliptic Curve Algorithm Integration in the 868 Secure Shell Transport Layer 869 RFC 8446: 870 The Transport Layer Security (TLS) Protocol Version 1.3"; 872 } 874 identity ed25519 { 875 base signature-algorithm; 876 description 877 "The signature algorithm using EdDSA as defined in RFC 8032 or 878 its successors."; 879 reference 880 "RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA)"; 881 } 883 identity ed448 { 884 base signature-algorithm; 885 description 886 "The signature algorithm using EdDSA as defined in RFC 8032 or 887 its successors."; 888 reference 889 "RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA)"; 890 } 892 identity eccsi { 893 base signature-algorithm; 894 description 895 "The signature algorithm using ECCSI signature as defined in 896 RFC 6507."; 897 reference 898 "RFC 6507: 899 Elliptic Curve-Based Certificateless Signatures for 900 Identity-based Encryption (ECCSI)"; 901 } 903 /**********************************************/ 904 /* Identities for key exchange algorithms */ 905 /**********************************************/ 907 identity key-exchange-algorithm { 908 description 909 "A base identity for Diffie-Hellman based key exchange 910 algorithm."; 911 } 913 identity psk-only { 914 base key-exchange-algorithm; 915 description 916 "Using Pre-shared key for authentication and key exchange"; 917 reference 918 "RFC 4279: 919 Pre-Shared Key cipher suites for Transport Layer Security 921 (TLS)"; 922 } 924 identity dhe-ffdhe2048 { 925 base key-exchange-algorithm; 926 description 927 "Ephemeral Diffie Hellman key exchange with 2048 bit 928 finite field"; 929 reference 930 "RFC 7919: 931 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 932 for Transport Layer Security (TLS)"; 933 } 935 identity dhe-ffdhe3072 { 936 base key-exchange-algorithm; 937 description 938 "Ephemeral Diffie Hellman key exchange with 3072 bit finite 939 field"; 940 reference 941 "RFC 7919: 942 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 943 for Transport Layer Security (TLS)"; 944 } 946 identity dhe-ffdhe4096 { 947 base key-exchange-algorithm; 948 description 949 "Ephemeral Diffie Hellman key exchange with 4096 bit 950 finite field"; 951 reference 952 "RFC 7919: 953 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 954 for Transport Layer Security (TLS)"; 955 } 957 identity dhe-ffdhe6144 { 958 base key-exchange-algorithm; 959 description 960 "Ephemeral Diffie Hellman key exchange with 6144 bit 961 finite field"; 962 reference 963 "RFC 7919: 964 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 965 for Transport Layer Security (TLS)"; 966 } 968 identity dhe-ffdhe8192 { 969 base key-exchange-algorithm; 970 description 971 "Ephemeral Diffie Hellman key exchange with 8192 bit 972 finite field"; 973 reference 974 "RFC 7919: 975 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 976 for Transport Layer Security (TLS)"; 977 } 979 identity psk-dhe-ffdhe2048 { 980 base key-exchange-algorithm; 981 description 982 "Key exchange using pre-shared key with Diffie-Hellman key 983 generation mechanism, where the DH group is FFDHE2048"; 984 reference 985 "RFC 8446: 986 The Transport Layer Security (TLS) Protocol Version 1.3"; 987 } 989 identity psk-dhe-ffdhe3072 { 990 base key-exchange-algorithm; 991 description 992 "Key exchange using pre-shared key with Diffie-Hellman key 993 generation mechanism, where the DH group is FFDHE3072"; 994 reference 995 "RFC 8446: 996 The Transport Layer Security (TLS) Protocol Version 1.3"; 997 } 999 identity psk-dhe-ffdhe4096 { 1000 base key-exchange-algorithm; 1001 description 1002 "Key exchange using pre-shared key with Diffie-Hellman key 1003 generation mechanism, where the DH group is FFDHE4096"; 1004 reference 1005 "RFC 8446: 1006 The Transport Layer Security (TLS) Protocol Version 1.3"; 1007 } 1009 identity psk-dhe-ffdhe6144 { 1010 base key-exchange-algorithm; 1011 description 1012 "Key exchange using pre-shared key with Diffie-Hellman key 1013 generation mechanism, where the DH group is FFDHE6144"; 1014 reference 1015 "RFC 8446: 1016 The Transport Layer Security (TLS) Protocol Version 1.3"; 1018 } 1020 identity psk-dhe-ffdhe8192 { 1021 base key-exchange-algorithm; 1022 description 1023 "Key exchange using pre-shared key with Diffie-Hellman key 1024 generation mechanism, where the DH group is FFDHE8192"; 1025 reference 1026 "RFC 8446: 1027 The Transport Layer Security (TLS) Protocol Version 1.3"; 1028 } 1030 identity ecdhe-secp256r1 { 1031 base key-exchange-algorithm; 1032 description 1033 "Ephemeral Diffie Hellman key exchange with elliptic group 1034 over curve secp256r1"; 1035 reference 1036 "RFC 8422: 1037 Elliptic Curve Cryptography (ECC) Cipher Suites for 1038 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1039 } 1041 identity ecdhe-secp384r1 { 1042 base key-exchange-algorithm; 1043 description 1044 "Ephemeral Diffie Hellman key exchange with elliptic group 1045 over curve secp384r1"; 1046 reference 1047 "RFC 8422: 1048 Elliptic Curve Cryptography (ECC) Cipher Suites for 1049 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1050 } 1052 identity ecdhe-secp521r1 { 1053 base key-exchange-algorithm; 1054 description 1055 "Ephemeral Diffie Hellman key exchange with elliptic group 1056 over curve secp521r1"; 1057 reference 1058 "RFC 8422: 1059 Elliptic Curve Cryptography (ECC) Cipher Suites for 1060 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1061 } 1063 identity ecdhe-x25519 { 1064 base key-exchange-algorithm; 1065 description 1066 "Ephemeral Diffie Hellman key exchange with elliptic group 1067 over curve x25519"; 1068 reference 1069 "RFC 8422: 1070 Elliptic Curve Cryptography (ECC) Cipher Suites for 1071 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1072 } 1074 identity ecdhe-x448 { 1075 base key-exchange-algorithm; 1076 description 1077 "Ephemeral Diffie Hellman key exchange with elliptic group 1078 over curve x448"; 1079 reference 1080 "RFC 8422: 1081 Elliptic Curve Cryptography (ECC) Cipher Suites for 1082 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1083 } 1085 identity psk-ecdhe-secp256r1 { 1086 base key-exchange-algorithm; 1087 description 1088 "Key exchange using pre-shared key with elliptic group-based 1089 Ephemeral Diffie Hellman key exchange over curve secp256r1"; 1090 reference 1091 "RFC 8446: 1092 The Transport Layer Security (TLS) Protocol Version 1.3"; 1093 } 1095 identity psk-ecdhe-secp384r1 { 1096 base key-exchange-algorithm; 1097 description 1098 "Key exchange using pre-shared key with elliptic group-based 1099 Ephemeral Diffie Hellman key exchange over curve secp384r1"; 1100 reference 1101 "RFC 8446: 1102 The Transport Layer Security (TLS) Protocol Version 1.3"; 1103 } 1105 identity psk-ecdhe-secp521r1 { 1106 base key-exchange-algorithm; 1107 description 1108 "Key exchange using pre-shared key with elliptic group-based 1109 Ephemeral Diffie Hellman key exchange over curve secp521r1"; 1110 reference 1111 "RFC 8446: 1112 The Transport Layer Security (TLS) Protocol Version 1.3"; 1113 } 1114 identity psk-ecdhe-x25519 { 1115 base key-exchange-algorithm; 1116 description 1117 "Key exchange using pre-shared key with elliptic group-based 1118 Ephemeral Diffie Hellman key exchange over curve x25519"; 1119 reference 1120 "RFC 8446: 1121 The Transport Layer Security (TLS) Protocol Version 1.3"; 1122 } 1124 identity psk-ecdhe-x448 { 1125 base key-exchange-algorithm; 1126 description 1127 "Key exchange using pre-shared key with elliptic group-based 1128 Ephemeral Diffie Hellman key exchange over curve x448"; 1129 reference 1130 "RFC 8446: 1131 The Transport Layer Security (TLS) Protocol Version 1.3"; 1132 } 1134 identity diffie-hellman-group14-sha1 { 1135 base key-exchange-algorithm; 1136 description 1137 "Using DH group14 and SHA1 for key exchange"; 1138 reference 1139 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; 1140 } 1142 identity diffie-hellman-group14-sha256 { 1143 base key-exchange-algorithm; 1144 description 1145 "Using DH group14 and SHA256 for key exchange"; 1146 reference 1147 "RFC 8268: 1148 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1149 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1150 } 1152 identity diffie-hellman-group15-sha512 { 1153 base key-exchange-algorithm; 1154 description 1155 "Using DH group15 and SHA512 for key exchange"; 1156 reference 1157 "RFC 8268: 1158 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1159 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1160 } 1161 identity diffie-hellman-group16-sha512 { 1162 base key-exchange-algorithm; 1163 description 1164 "Using DH group16 and SHA512 for key exchange"; 1165 reference 1166 "RFC 8268: 1167 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1168 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1169 } 1171 identity diffie-hellman-group17-sha512 { 1172 base key-exchange-algorithm; 1173 description 1174 "Using DH group17 and SHA512 for key exchange"; 1175 reference 1176 "RFC 8268: 1177 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1178 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1179 } 1181 identity diffie-hellman-group18-sha512 { 1182 base key-exchange-algorithm; 1183 description 1184 "Using DH group18 and SHA512 for key exchange"; 1185 reference 1186 "RFC 8268: 1187 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1188 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1189 } 1191 identity ecdh-sha2-secp256r1 { 1192 base key-exchange-algorithm; 1193 description 1194 "Elliptic curve-based Diffie Hellman key exchange over curve 1195 secp256r1 and using SHA2 for MAC generation"; 1196 reference 1197 "RFC 6239: Suite B Cryptographic Suites for Secure Shell 1198 (SSH)"; 1199 } 1201 identity ecdh-sha2-secp384r1 { 1202 base key-exchange-algorithm; 1203 description 1204 "Elliptic curve-based Diffie Hellman key exchange over curve 1205 secp384r1 and using SHA2 for MAC generation"; 1206 reference 1207 "RFC 6239: Suite B Cryptographic Suites for Secure Shell 1208 (SSH)"; 1210 } 1212 identity rsaes-oaep { 1213 base key-exchange-algorithm; 1214 description 1215 "RSAES-OAEP combines the RSAEP and RSADP primitives with the 1216 EME-OAEP encoding method"; 1217 reference 1218 "RFC 8017: 1219 PKCS #1: RSA Cryptography Specifications Version 2.2."; 1220 } 1222 identity rsaes-pkcs1-v1_5 { 1223 base key-exchange-algorithm; 1224 description 1225 " RSAES-PKCS1-v1_5 combines the RSAEP and RSADP primitives 1226 with the EME-PKCS1-v1_5 encoding method"; 1227 reference 1228 "RFC 8017: 1229 PKCS #1: RSA Cryptography Specifications Version 2.2."; 1230 } 1232 /**********************************************************/ 1233 /* Typedefs for identityrefs to above base identities */ 1234 /**********************************************************/ 1236 typedef hash-algorithm-ref { 1237 type identityref { 1238 base hash-algorithm; 1239 } 1240 description 1241 "This typedef enables importing modules to easily define an 1242 identityref to the 'hash-algorithm' base identity."; 1243 } 1245 typedef signature-algorithm-ref { 1246 type identityref { 1247 base signature-algorithm; 1248 } 1249 description 1250 "This typedef enables importing modules to easily define an 1251 identityref to the 'signature-algorithm' base identity."; 1252 } 1254 typedef mac-algorithm-ref { 1255 type identityref { 1256 base mac-algorithm; 1257 } 1258 description 1259 "This typedef enables importing modules to easily define an 1260 identityref to the 'mac-algorithm' base identity."; 1261 } 1263 typedef encryption-algorithm-ref { 1264 type identityref { 1265 base encryption-algorithm; 1266 } 1267 description 1268 "This typedef enables importing modules to easily define an 1269 identityref to the 'encryption-algorithm' 1270 base identity."; 1271 } 1273 typedef encryption-and-mac-algorithm-ref { 1274 type identityref { 1275 base encryption-and-mac-algorithm; 1276 } 1277 description 1278 "This typedef enables importing modules to easily define an 1279 identityref to the 'encryption-and-mac-algorithm' 1280 base identity."; 1281 } 1283 typedef asymmetric-key-algorithm-ref { 1284 type identityref { 1285 base asymmetric-key-algorithm; 1286 } 1287 description 1288 "This typedef enables importing modules to easily define an 1289 identityref to the 'asymmetric-key-algorithm' 1290 base identity."; 1291 } 1293 typedef key-exchange-algorithm-ref { 1294 type identityref { 1295 base key-exchange-algorithm; 1296 } 1297 description 1298 "This typedef enables importing modules to easily define an 1299 identityref to the 'key-exchange-algorithm' base identity."; 1300 } 1302 /***************************************************/ 1303 /* Typedefs for ASN.1 structures from RFC 5280 */ 1304 /***************************************************/ 1305 typedef x509 { 1306 type binary; 1307 description 1308 "A Certificate structure, as specified in RFC 5280, 1309 encoded using ASN.1 distinguished encoding rules (DER), 1310 as specified in ITU-T X.690."; 1311 reference 1312 "RFC 5280: 1313 Internet X.509 Public Key Infrastructure Certificate 1314 and Certificate Revocation List (CRL) Profile 1315 ITU-T X.690: 1316 Information technology - ASN.1 encoding rules: 1317 Specification of Basic Encoding Rules (BER), 1318 Canonical Encoding Rules (CER) and Distinguished 1319 Encoding Rules (DER)."; 1320 } 1322 typedef crl { 1323 type binary; 1324 description 1325 "A CertificateList structure, as specified in RFC 5280, 1326 encoded using ASN.1 distinguished encoding rules (DER), 1327 as specified in ITU-T X.690."; 1328 reference 1329 "RFC 5280: 1330 Internet X.509 Public Key Infrastructure Certificate 1331 and Certificate Revocation List (CRL) Profile 1332 ITU-T X.690: 1333 Information technology - ASN.1 encoding rules: 1334 Specification of Basic Encoding Rules (BER), 1335 Canonical Encoding Rules (CER) and Distinguished 1336 Encoding Rules (DER)."; 1337 } 1339 /***********************************************/ 1340 /* Typedefs for ASN.1 structures from 5652 */ 1341 /***********************************************/ 1343 typedef cms { 1344 type binary; 1345 description 1346 "A ContentInfo structure, as specified in RFC 5652, 1347 encoded using ASN.1 distinguished encoding rules (DER), 1348 as specified in ITU-T X.690."; 1349 reference 1350 "RFC 5652: 1351 Cryptographic Message Syntax (CMS) 1352 ITU-T X.690: 1354 Information technology - ASN.1 encoding rules: 1355 Specification of Basic Encoding Rules (BER), 1356 Canonical Encoding Rules (CER) and Distinguished 1357 Encoding Rules (DER)."; 1358 } 1360 typedef data-content-cms { 1361 type cms; 1362 description 1363 "A CMS structure whose top-most content type MUST be the 1364 data content type, as described by Section 4 in RFC 5652."; 1365 reference 1366 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1367 } 1369 typedef signed-data-cms { 1370 type cms; 1371 description 1372 "A CMS structure whose top-most content type MUST be the 1373 signed-data content type, as described by Section 5 in 1374 RFC 5652."; 1375 reference 1376 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1377 } 1379 typedef enveloped-data-cms { 1380 type cms; 1381 description 1382 "A CMS structure whose top-most content type MUST be the 1383 enveloped-data content type, as described by Section 6 1384 in RFC 5652."; 1385 reference 1386 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1387 } 1389 typedef digested-data-cms { 1390 type cms; 1391 description 1392 "A CMS structure whose top-most content type MUST be the 1393 digested-data content type, as described by Section 7 1394 in RFC 5652."; 1395 reference 1396 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1397 } 1399 typedef encrypted-data-cms { 1400 type cms; 1401 description 1402 "A CMS structure whose top-most content type MUST be the 1403 encrypted-data content type, as described by Section 8 1404 in RFC 5652."; 1405 reference 1406 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1407 } 1409 typedef authenticated-data-cms { 1410 type cms; 1411 description 1412 "A CMS structure whose top-most content type MUST be the 1413 authenticated-data content type, as described by Section 9 1414 in RFC 5652."; 1415 reference 1416 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1417 } 1419 /***************************************************/ 1420 /* Typedefs for structures related to RFC 4253 */ 1421 /***************************************************/ 1423 typedef ssh-host-key { 1424 type binary; 1425 description 1426 "The binary public key data for this SSH key, as 1427 specified by RFC 4253, Section 6.6, i.e.: 1429 string certificate or public key format 1430 identifier 1431 byte[n] key/certificate data."; 1432 reference 1433 "RFC 4253: The Secure Shell (SSH) Transport Layer 1434 Protocol"; 1435 } 1437 /*********************************************************/ 1438 /* Typedefs for ASN.1 structures related to RFC 5280 */ 1439 /*********************************************************/ 1441 typedef trust-anchor-cert-x509 { 1442 type x509; 1443 description 1444 "A Certificate structure that MUST encode a self-signed 1445 root certificate."; 1446 } 1448 typedef end-entity-cert-x509 { 1449 type x509; 1450 description 1451 "A Certificate structure that MUST encode a certificate 1452 that is neither self-signed nor having Basic constraint 1453 CA true."; 1454 } 1456 /*********************************************************/ 1457 /* Typedefs for ASN.1 structures related to RFC 5652 */ 1458 /*********************************************************/ 1460 typedef trust-anchor-cert-cms { 1461 type signed-data-cms; 1462 description 1463 "A CMS SignedData structure that MUST contain the chain of 1464 X.509 certificates needed to authenticate the certificate 1465 presented by a client or end-entity. 1467 The CMS MUST contain only a single chain of certificates. 1468 The client or end-entity certificate MUST only authenticate 1469 to last intermediate CA certificate listed in the chain. 1471 In all cases, the chain MUST include a self-signed root 1472 certificate. In the case where the root certificate is 1473 itself the issuer of the client or end-entity certificate, 1474 only one certificate is present. 1476 This CMS structure MAY (as applicable where this type is 1477 used) also contain suitably fresh (as defined by local 1478 policy) revocation objects with which the device can 1479 verify the revocation status of the certificates. 1481 This CMS encodes the degenerate form of the SignedData 1482 structure that is commonly used to disseminate X.509 1483 certificates and revocation objects (RFC 5280)."; 1484 reference 1485 "RFC 5280: 1486 Internet X.509 Public Key Infrastructure Certificate 1487 and Certificate Revocation List (CRL) Profile."; 1488 } 1490 typedef end-entity-cert-cms { 1491 type signed-data-cms; 1492 description 1493 "A CMS SignedData structure that MUST contain the end 1494 entity certificate itself, and MAY contain any number 1495 of intermediate certificates leading up to a trust 1496 anchor certificate. The trust anchor certificate 1497 MAY be included as well. 1499 The CMS MUST contain a single end entity certificate. 1500 The CMS MUST NOT contain any spurious certificates. 1502 This CMS structure MAY (as applicable where this type is 1503 used) also contain suitably fresh (as defined by local 1504 policy) revocation objects with which the device can 1505 verify the revocation status of the certificates. 1507 This CMS encodes the degenerate form of the SignedData 1508 structure that is commonly used to disseminate X.509 1509 certificates and revocation objects (RFC 5280)."; 1510 reference 1511 "RFC 5280: 1512 Internet X.509 Public Key Infrastructure Certificate 1513 and Certificate Revocation List (CRL) Profile."; 1514 } 1516 /**********************************************/ 1517 /* Groupings for keys and/or certificates */ 1518 /**********************************************/ 1520 grouping public-key-grouping { 1521 description 1522 "A public key."; 1523 leaf algorithm { 1524 type asymmetric-key-algorithm-ref; 1525 description 1526 "Identifies the key's algorithm. More specifically, 1527 this leaf specifies how the 'public-key' binary leaf 1528 is encoded."; 1529 reference 1530 "RFC CCCC: Common YANG Data Types for Cryptography"; 1531 } 1532 leaf public-key { 1533 type binary; 1534 description 1535 "A binary that contains the value of the public key. The 1536 interpretation of the content is defined by the key 1537 algorithm. For example, a DSA key is an integer, an RSA 1538 key is represented as RSAPublicKey as defined in 1539 RFC 8017, and an Elliptic Curve Cryptography (ECC) key 1540 is represented using the 'publicKey' described in 1541 RFC 5915."; 1542 reference 1543 "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: 1544 RSA Cryptography Specifications Version 2.2. 1545 RFC 5915: Elliptic Curve Private Key Structure."; 1546 } 1548 } 1550 grouping asymmetric-key-pair-grouping { 1551 description 1552 "A private/public key pair."; 1553 uses public-key-grouping; 1555 leaf private-key { 1556 nacm:default-deny-all; 1557 type union { 1558 type binary; 1559 type enumeration { 1560 enum permanently-hidden { 1561 description 1562 "The private key is inaccessible due to being 1563 protected by the system (e.g., a cryptographic 1564 hardware module). It is not possible to 1565 configure a permanently hidden key, as a real 1566 private key value must be set. Permanently 1567 hidden keys cannot be archived or backed up."; 1568 } 1569 } 1570 } 1571 description 1572 "A binary that contains the value of the private key. The 1573 interpretation of the content is defined by the key 1574 algorithm. For example, a DSA key is an integer, an RSA 1575 key is represented as RSAPrivateKey as defined in 1576 RFC 8017, and an Elliptic Curve Cryptography (ECC) key 1577 is represented as ECPrivateKey as defined in RFC 5915."; 1578 reference 1579 "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: 1580 RSA Cryptography Specifications Version 2.2. 1581 RFC 5915: Elliptic Curve Private Key Structure."; 1582 } // private-key 1584 action generate-hidden-key { 1585 description 1586 "Requests the device to generate a hidden key using the 1587 specified asymmetric key algorithm. This action is 1588 used to request the system to generate a key that 1589 is 'permanently-hidden', perhaps protected by a 1590 cryptographic hardware module. The resulting 1591 asymmetric key values are considered operational 1592 state and hence present only in ."; 1593 input { 1594 leaf algorithm { 1595 type asymmetric-key-algorithm-ref; 1596 mandatory true; 1597 description 1598 "The algorithm to be used when generating the 1599 asymmetric key."; 1600 reference 1601 "RFC CCCC: Common YANG Data Types for Cryptography"; 1602 } 1603 } 1604 } // generate-hidden-key 1606 action install-hidden-key { 1607 description 1608 "Requests the device to load the specified values into 1609 a hidden key. The resulting asymmetric key values are 1610 considered operational state and hence present only in 1611 ."; 1612 input { 1613 leaf algorithm { 1614 type asymmetric-key-algorithm-ref; 1615 mandatory true; 1616 description 1617 "The algorithm to be used when generating the 1618 asymmetric key."; 1619 reference 1620 "RFC CCCC: Common YANG Data Types for Cryptography"; 1621 } 1622 leaf public-key { 1623 type binary; 1624 description 1625 "A binary that contains the value of the public key. 1626 The interpretation of the content is defined by the key 1627 algorithm. For example, a DSA key is an integer, an 1628 RSA key is represented as RSAPublicKey as defined in 1629 RFC 8017, and an Elliptic Curve Cryptography (ECC) key 1630 is represented using the 'publicKey' described in 1631 RFC 5915."; 1632 reference 1633 "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: 1634 RSA Cryptography Specifications Version 2.2. 1635 RFC 5915: Elliptic Curve Private Key Structure."; 1636 } 1637 leaf private-key { 1638 type binary; 1639 description 1640 "A binary that contains the value of the private key. 1641 The interpretation of the content is defined by the key 1642 algorithm. For example, a DSA key is an integer, an RSA 1643 key is represented as RSAPrivateKey as defined in 1644 RFC 8017, and an Elliptic Curve Cryptography (ECC) key 1645 is represented as ECPrivateKey as defined in RFC 5915."; 1646 reference 1647 "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: 1648 RSA Cryptography Specifications Version 2.2. 1649 RFC 5915: Elliptic Curve Private Key Structure."; 1650 } 1651 } 1652 } // install-hidden-key 1653 } // asymmetric-key-pair-grouping 1655 grouping trust-anchor-cert-grouping { 1656 description 1657 "A certificate, and a notification for when it might expire."; 1658 leaf cert { 1659 type trust-anchor-cert-cms; 1660 description 1661 "The binary certificate data for this certificate."; 1662 reference 1663 "RFC YYYY: Common YANG Data Types for Cryptography"; 1664 } 1665 notification certificate-expiration { 1666 description 1667 "A notification indicating that the configured certificate 1668 is either about to expire or has already expired. When to 1669 send notifications is an implementation specific decision, 1670 but it is RECOMMENDED that a notification be sent once a 1671 month for 3 months, then once a week for four weeks, and 1672 then once a day thereafter until the issue is resolved."; 1673 leaf expiration-date { 1674 type yang:date-and-time; 1675 mandatory true; 1676 description 1677 "Identifies the expiration date on the certificate."; 1678 } 1679 } 1680 } 1682 grouping end-entity-cert-grouping { 1683 description 1684 "A certificate, and a notification for when it might expire."; 1685 leaf cert { 1686 type end-entity-cert-cms; 1687 description 1688 "The binary certificate data for this certificate."; 1689 reference 1690 "RFC YYYY: Common YANG Data Types for Cryptography"; 1692 } 1693 notification certificate-expiration { 1694 description 1695 "A notification indicating that the configured certificate 1696 is either about to expire or has already expired. When to 1697 send notifications is an implementation specific decision, 1698 but it is RECOMMENDED that a notification be sent once a 1699 month for 3 months, then once a week for four weeks, and 1700 then once a day thereafter until the issue is resolved."; 1701 leaf expiration-date { 1702 type yang:date-and-time; 1703 mandatory true; 1704 description 1705 "Identifies the expiration date on the certificate."; 1706 } 1707 } 1708 } 1710 grouping asymmetric-key-pair-with-certs-grouping { 1711 description 1712 "A private/public key pair and associated certificates."; 1713 uses asymmetric-key-pair-grouping; 1714 container certificates { 1715 description 1716 "Certificates associated with this asymmetric key. 1717 More than one certificate supports, for instance, 1718 a TPM-protected asymmetric key that has both IDevID 1719 and LDevID certificates associated."; 1720 list certificate { 1721 key "name"; 1722 description 1723 "A certificate for this asymmetric key."; 1724 leaf name { 1725 type string; 1726 description 1727 "An arbitrary name for the certificate. If the name 1728 matches the name of a certificate that exists 1729 independently in (i.e., an IDevID), 1730 then the 'cert' node MUST NOT be configured."; 1731 } 1732 uses end-entity-cert-grouping; 1733 } 1734 } // certificates 1736 action generate-certificate-signing-request { 1737 description 1738 "Generates a certificate signing request structure for 1739 the associated asymmetric key using the passed subject 1740 and attribute values. The specified assertions need 1741 to be appropriate for the certificate's use. For 1742 example, an entity certificate for a TLS server 1743 SHOULD have values that enable clients to satisfy 1744 RFC 6125 processing."; 1745 input { 1746 leaf subject { 1747 type binary; 1748 mandatory true; 1749 description 1750 "The 'subject' field per the CertificationRequestInfo 1751 structure as specified by RFC 2986, Section 4.1 1752 encoded using the ASN.1 distinguished encoding 1753 rules (DER), as specified in ITU-T X.690."; 1754 reference 1755 "RFC 2986: 1756 PKCS #10: Certification Request Syntax 1757 Specification Version 1.7. 1758 ITU-T X.690: 1759 Information technology - ASN.1 encoding rules: 1760 Specification of Basic Encoding Rules (BER), 1761 Canonical Encoding Rules (CER) and Distinguished 1762 Encoding Rules (DER)."; 1763 } 1764 leaf attributes { 1765 type binary; 1766 description 1767 "The 'attributes' field from the structure 1768 CertificationRequestInfo as specified by RFC 2986, 1769 Section 4.1 encoded using the ASN.1 distinguished 1770 encoding rules (DER), as specified in ITU-T X.690."; 1771 reference 1772 "RFC 2986: 1773 PKCS #10: Certification Request Syntax 1774 Specification Version 1.7. 1775 ITU-T X.690: 1776 Information technology - ASN.1 encoding rules: 1777 Specification of Basic Encoding Rules (BER), 1778 Canonical Encoding Rules (CER) and Distinguished 1779 Encoding Rules (DER)."; 1780 } 1781 } 1782 output { 1783 leaf certificate-signing-request { 1784 type binary; 1785 mandatory true; 1786 description 1787 "A CertificationRequest structure as specified by 1788 RFC 2986, Section 4.2 encoded using the ASN.1 1789 distinguished encoding rules (DER), as specified 1790 in ITU-T X.690."; 1791 reference 1792 "RFC 2986: 1793 PKCS #10: Certification Request Syntax 1794 Specification Version 1.7. 1795 ITU-T X.690: 1796 Information technology - ASN.1 encoding rules: 1797 Specification of Basic Encoding Rules (BER), 1798 Canonical Encoding Rules (CER) and Distinguished 1799 Encoding Rules (DER)."; 1800 } 1801 } 1802 } // generate-certificate-signing-request 1803 } // asymmetric-key-pair-with-certs-grouping 1805 } 1807 1809 3. Security Considerations 1811 In order to use YANG identities for algorithm identifiers, only the 1812 most commonly used RSA key lengths are supported for the RSA 1813 algorithm. Additional key lengths can be defined in another module 1814 or added into a future version of this document. 1816 This document limits the number of elliptical curves supported. This 1817 was done to match industry trends and IETF best practice (e.g., 1818 matching work being done in TLS 1.3). If additional algorithms are 1819 needed, they can be defined by another module or added into a future 1820 version of this document. 1822 Some of the operations in this YANG module may be considered 1823 sensitive or vulnerable in some network environments. It is thus 1824 important to control access to these operations. These are the 1825 operations and their sensitivity/vulnerability: 1827 generate-certificate-signing-request: For this action, it is 1828 RECOMMENDED that implementations assert channel binding 1829 [RFC5056], so as to ensure that the application layer that sent 1830 the request is the same as the device authenticated when the 1831 secure transport layer was established. 1833 This document uses PKCS #10 [RFC2986] for the "generate-certificate- 1834 signing-request" action. The use of Certificate Request Message 1835 Format (CRMF) [RFC4211] was considered, but is was unclear if there 1836 was market demand for it. If it is desired to support CRMF in the 1837 future, placing a "choice" statement in both the input and output 1838 statements, along with an "if-feature" statement on the CRMF option, 1839 would enable a backwards compatible solution. 1841 NACM:default-deny-all is set on asymmetric-key-pair-grouping's 1842 "private-key" node, as private keys should never be revealed without 1843 explicit permission. 1845 4. IANA Considerations 1847 4.1. The IETF XML Registry 1849 This document registers one URI in the "ns" subregistry of the IETF 1850 XML Registry [RFC3688]. Following the format in [RFC3688], the 1851 following registration is requested: 1853 URI: urn:ietf:params:xml:ns:yang:ietf-crypto-types 1854 Registrant Contact: The NETCONF WG of the IETF. 1855 XML: N/A, the requested URI is an XML namespace. 1857 4.2. The YANG Module Names Registry 1859 This document registers one YANG module in the YANG Module Names 1860 registry [RFC6020]. Following the format in [RFC6020], the the 1861 following registration is requested: 1863 name: ietf-crypto-types 1864 namespace: urn:ietf:params:xml:ns:yang:ietf-crypto-types 1865 prefix: ct 1866 reference: RFC XXXX 1868 5. References 1870 5.1. Normative References 1872 [ITU.X690.2015] 1873 International Telecommunication Union, "Information 1874 Technology - ASN.1 encoding rules: Specification of Basic 1875 Encoding Rules (BER), Canonical Encoding Rules (CER) and 1876 Distinguished Encoding Rules (DER)", ITU-T Recommendation 1877 X.690, ISO/IEC 8825-1, August 2015, 1878 . 1880 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1881 Requirement Levels", BCP 14, RFC 2119, 1882 DOI 10.17487/RFC2119, March 1997, 1883 . 1885 [RFC2404] Madson, C. and R. Glenn, "The Use of HMAC-SHA-1-96 within 1886 ESP and AH", RFC 2404, DOI 10.17487/RFC2404, November 1887 1998, . 1889 [RFC3565] Schaad, J., "Use of the Advanced Encryption Standard (AES) 1890 Encryption Algorithm in Cryptographic Message Syntax 1891 (CMS)", RFC 3565, DOI 10.17487/RFC3565, July 2003, 1892 . 1894 [RFC3686] Housley, R., "Using Advanced Encryption Standard (AES) 1895 Counter Mode With IPsec Encapsulating Security Payload 1896 (ESP)", RFC 3686, DOI 10.17487/RFC3686, January 2004, 1897 . 1899 [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode 1900 (GCM) in IPsec Encapsulating Security Payload (ESP)", 1901 RFC 4106, DOI 10.17487/RFC4106, June 2005, 1902 . 1904 [RFC4253] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH) 1905 Transport Layer Protocol", RFC 4253, DOI 10.17487/RFC4253, 1906 January 2006, . 1908 [RFC4279] Eronen, P., Ed. and H. Tschofenig, Ed., "Pre-Shared Key 1909 Ciphersuites for Transport Layer Security (TLS)", 1910 RFC 4279, DOI 10.17487/RFC4279, December 2005, 1911 . 1913 [RFC4309] Housley, R., "Using Advanced Encryption Standard (AES) CCM 1914 Mode with IPsec Encapsulating Security Payload (ESP)", 1915 RFC 4309, DOI 10.17487/RFC4309, December 2005, 1916 . 1918 [RFC4494] Song, JH., Poovendran, R., and J. Lee, "The AES-CMAC-96 1919 Algorithm and Its Use with IPsec", RFC 4494, 1920 DOI 10.17487/RFC4494, June 2006, 1921 . 1923 [RFC4543] McGrew, D. and J. Viega, "The Use of Galois Message 1924 Authentication Code (GMAC) in IPsec ESP and AH", RFC 4543, 1925 DOI 10.17487/RFC4543, May 2006, 1926 . 1928 [RFC4868] Kelly, S. and S. Frankel, "Using HMAC-SHA-256, HMAC-SHA- 1929 384, and HMAC-SHA-512 with IPsec", RFC 4868, 1930 DOI 10.17487/RFC4868, May 2007, 1931 . 1933 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1934 Housley, R., and W. Polk, "Internet X.509 Public Key 1935 Infrastructure Certificate and Certificate Revocation List 1936 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 1937 . 1939 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 1940 RFC 5652, DOI 10.17487/RFC5652, September 2009, 1941 . 1943 [RFC5656] Stebila, D. and J. Green, "Elliptic Curve Algorithm 1944 Integration in the Secure Shell Transport Layer", 1945 RFC 5656, DOI 10.17487/RFC5656, December 2009, 1946 . 1948 [RFC6187] Igoe, K. and D. Stebila, "X.509v3 Certificates for Secure 1949 Shell Authentication", RFC 6187, DOI 10.17487/RFC6187, 1950 March 2011, . 1952 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1953 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1954 . 1956 [RFC7919] Gillmor, D., "Negotiated Finite Field Diffie-Hellman 1957 Ephemeral Parameters for Transport Layer Security (TLS)", 1958 RFC 7919, DOI 10.17487/RFC7919, August 2016, 1959 . 1961 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 1962 RFC 7950, DOI 10.17487/RFC7950, August 2016, 1963 . 1965 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1966 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1967 May 2017, . 1969 [RFC8268] Baushke, M., "More Modular Exponentiation (MODP) Diffie- 1970 Hellman (DH) Key Exchange (KEX) Groups for Secure Shell 1971 (SSH)", RFC 8268, DOI 10.17487/RFC8268, December 2017, 1972 . 1974 [RFC8332] Bider, D., "Use of RSA Keys with SHA-256 and SHA-512 in 1975 the Secure Shell (SSH) Protocol", RFC 8332, 1976 DOI 10.17487/RFC8332, March 2018, 1977 . 1979 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 1980 Access Control Model", STD 91, RFC 8341, 1981 DOI 10.17487/RFC8341, March 2018, 1982 . 1984 [RFC8422] Nir, Y., Josefsson, S., and M. Pegourie-Gonnard, "Elliptic 1985 Curve Cryptography (ECC) Cipher Suites for Transport Layer 1986 Security (TLS) Versions 1.2 and Earlier", RFC 8422, 1987 DOI 10.17487/RFC8422, August 2018, 1988 . 1990 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1991 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1992 . 1994 5.2. Informative References 1996 [RFC2986] Nystrom, M. and B. Kaliski, "PKCS #10: Certification 1997 Request Syntax Specification Version 1.7", RFC 2986, 1998 DOI 10.17487/RFC2986, November 2000, 1999 . 2001 [RFC3174] Eastlake 3rd, D. and P. Jones, "US Secure Hash Algorithm 1 2002 (SHA1)", RFC 3174, DOI 10.17487/RFC3174, September 2001, 2003 . 2005 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 2006 DOI 10.17487/RFC3688, January 2004, 2007 . 2009 [RFC4211] Schaad, J., "Internet X.509 Public Key Infrastructure 2010 Certificate Request Message Format (CRMF)", RFC 4211, 2011 DOI 10.17487/RFC4211, September 2005, 2012 . 2014 [RFC4493] Song, JH., Poovendran, R., Lee, J., and T. Iwata, "The 2015 AES-CMAC Algorithm", RFC 4493, DOI 10.17487/RFC4493, June 2016 2006, . 2018 [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure 2019 Channels", RFC 5056, DOI 10.17487/RFC5056, November 2007, 2020 . 2022 [RFC5915] Turner, S. and D. Brown, "Elliptic Curve Private Key 2023 Structure", RFC 5915, DOI 10.17487/RFC5915, June 2010, 2024 . 2026 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2027 the Network Configuration Protocol (NETCONF)", RFC 6020, 2028 DOI 10.17487/RFC6020, October 2010, 2029 . 2031 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 2032 Verification of Domain-Based Application Service Identity 2033 within Internet Public Key Infrastructure Using X.509 2034 (PKIX) Certificates in the Context of Transport Layer 2035 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 2036 2011, . 2038 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 2039 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 2040 DOI 10.17487/RFC6234, May 2011, 2041 . 2043 [RFC6239] Igoe, K., "Suite B Cryptographic Suites for Secure Shell 2044 (SSH)", RFC 6239, DOI 10.17487/RFC6239, May 2011, 2045 . 2047 [RFC6507] Groves, M., "Elliptic Curve-Based Certificateless 2048 Signatures for Identity-Based Encryption (ECCSI)", 2049 RFC 6507, DOI 10.17487/RFC6507, February 2012, 2050 . 2052 [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, 2053 "PKCS #1: RSA Cryptography Specifications Version 2.2", 2054 RFC 8017, DOI 10.17487/RFC8017, November 2016, 2055 . 2057 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 2058 Signature Algorithm (EdDSA)", RFC 8032, 2059 DOI 10.17487/RFC8032, January 2017, 2060 . 2062 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 2063 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 2064 . 2066 [RFC8439] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF 2067 Protocols", RFC 8439, DOI 10.17487/RFC8439, June 2018, 2068 . 2070 Appendix A. Examples 2072 A.1. The "asymmetric-key-pair-with-certs-grouping" Grouping 2074 The following example module has been constructed to illustrate use 2075 of the "asymmetric-key-pair-with-certs-grouping" grouping defined in 2076 the "ietf-crypto-types" module. 2078 Note that the "asymmetric-key-pair-with-certs-grouping" grouping uses 2079 both the "asymmetric-key-pair-grouping" and "end-entity-cert- 2080 grouping" groupings, and that the "asymmetric-key-pair-grouping" 2081 grouping uses the "public-key-grouping" grouping. Thus, a total of 2082 four of the five groupings defined in the "ietf-crypto-types" module 2083 are illustrated through the use of this one grouping. The only 2084 grouping not represented is the "trust-anchor-cert-grouping" 2085 grouping. 2087 module ex-crypto-types-usage { 2088 yang-version 1.1; 2090 namespace "http://example.com/ns/example-crypto-types-usage"; 2091 prefix "ectu"; 2093 import ietf-crypto-types { 2094 prefix ct; 2095 reference 2096 "RFC XXXX: Common YANG Data Types for Cryptography"; 2097 } 2099 organization 2100 "Example Corporation"; 2102 contact 2103 "Author: YANG Designer "; 2105 description 2106 "This module illustrates the grouping 2107 defined in the crypto-types draft called 2108 'asymmetric-key-pair-with-certs-grouping'."; 2110 revision "1001-01-01" { 2111 description 2112 "Initial version"; 2113 reference 2114 "RFC ????: Usage Example for RFC XXXX"; 2115 } 2117 container keys { 2118 description 2119 "A container of keys."; 2120 list key { 2121 key name; 2122 leaf name { 2123 type string; 2124 description 2125 "An arbitrary name for this key."; 2126 } 2127 uses ct:asymmetric-key-pair-with-certs-grouping; 2128 description 2129 "An asymmetric key pair with associated certificates."; 2130 } 2131 } 2132 } 2133 Given the above example usage module, the following example 2134 illustrates some configured keys. 2136 2137 2138 ex-key 2139 2141 ct:rsa2048 2142 2143 base64encodedvalue== 2144 base64encodedvalue== 2145 2146 2147 ex-cert 2148 base64encodedvalue== 2149 2150 2151 2152 2154 A.2. The "generate-hidden-key" Action 2156 The following example illustrates the "generate-hidden-key" action in 2157 use with the NETCONF protocol. 2159 REQUEST 2161 2163 2164 2165 2166 empty-key 2167 2168 2170 ct:rsa2048 2171 2172 2173 2174 2175 2176 2177 RESPONSE 2179 2181 2182 2184 A.3. The "install-hidden-key" Action 2186 The following example illustrates the "install-hidden-key" action in 2187 use with the NETCONF protocol. 2189 REQUEST 2191 2193 2194 2195 2196 empty-key 2197 2198 2200 ct:rsa2048 2201 2202 base64encodedvalue== 2203 base64encodedvalue== 2204 2205 2206 2207 2208 2210 RESPONSE 2212 2214 2215 2217 A.4. The "generate-certificate-signing-request" Action 2219 The following example illustrates the "generate-certificate-signing- 2220 request" action in use with the NETCONF protocol. 2222 REQUEST 2224 2226 2227 2228 2229 ex-key-sect571r1 2230 2231 base64encodedvalue== 2232 base64encodedvalue== 2233 2234 2235 2236 2237 2239 RESPONSE 2241 2243 2245 base64encodedvalue== 2246 2247 2249 A.5. The "certificate-expiration" Notification 2251 The following example illustrates the "certificate-expiration" 2252 notification in use with the NETCONF protocol. 2254 2256 2018-05-25T00:01:00Z 2257 2258 2259 locally-defined key 2260 2261 2262 my-cert 2263 2264 2265 2018-08-05T14:18:53-05:00 2266 2267 2268 2269 2270 2271 2272 2274 Appendix B. Change Log 2276 B.1. I-D to 00 2278 o Removed groupings and notifications. 2280 o Added typedefs for identityrefs. 2282 o Added typedefs for other RFC 5280 structures. 2284 o Added typedefs for other RFC 5652 structures. 2286 o Added convenience typedefs for RFC 4253, RFC 5280, and RFC 5652. 2288 B.2. 00 to 01 2290 o Moved groupings from the draft-ietf-netconf-keystore here. 2292 B.3. 01 to 02 2294 o Removed unwanted "mandatory" and "must" statements. 2296 o Added many new crypto algorithms (thanks Haiguang!) 2298 o Clarified in asymmetric-key-pair-with-certs-grouping, in 2299 certificates/certificate/name/description, that if the name MUST 2300 NOT match the name of a certificate that exists independently in 2301 , enabling certs installed by the manufacturer (e.g., 2302 an IDevID). 2304 B.4. 02 to 03 2306 o renamed base identity 'asymmetric-key-encryption-algorithm' to 2307 'asymmetric-key-algorithm'. 2309 o added new 'asymmetric-key-algorithm' identities for secp192r1, 2310 secp224r1, secp256r1, secp384r1, and secp521r1. 2312 o removed 'mac-algorithm' identities for mac-aes-128-ccm, mac-aes- 2313 192-ccm, mac-aes-256-ccm, mac-aes-128-gcm, mac-aes-192-gcm, mac- 2314 aes-256-gcm, and mac-chacha20-poly1305. 2316 o for all -cbc and -ctr identities, renamed base identity 2317 'symmetric-key-encryption-algorithm' to 'encryption-algorithm'. 2319 o for all -ccm and -gcm identities, renamed base identity 2320 'symmetric-key-encryption-algorithm' to 'encryption-and-mac- 2321 algorithm' and renamed the identity to remove the "enc-" prefix. 2323 o for all the 'signature-algorithm' based identities, renamed from 2324 'rsa-*' to 'rsassa-*'. 2326 o removed all of the "x509v3-" prefixed 'signature-algorithm' based 2327 identities. 2329 o added 'key-exchange-algorithm' based identities for 'rsaes-oaep' 2330 and 'rsaes-pkcs1-v1_5'. 2332 o renamed typedef 'symmetric-key-encryption-algorithm-ref' to 2333 'symmetric-key-algorithm-ref'. 2335 o renamed typedef 'asymmetric-key-encryption-algorithm-ref' to 2336 'asymmetric-key-algorithm-ref'. 2338 o added typedef 'encryption-and-mac-algorithm-ref'. 2340 o Updated copyright date, boilerplate template, affiliation, and 2341 folding algorithm. 2343 B.5. 03 to 04 2345 o ran YANG module through formatter. 2347 B.6. 04 to 05 2349 o fixed broken symlink causing reformatted YANG module to not show. 2351 Acknowledgements 2353 The authors would like to thank for following for lively discussions 2354 on list and in the halls (ordered by last name): Martin Bjorklund, 2355 Balazs Kovacs, Eric Voit, and Liang Xia. 2357 Authors' Addresses 2359 Kent Watsen 2360 Watsen Networks 2362 EMail: kent+ietf@watsen.net 2364 Wang Haiguang 2365 Huawei 2367 EMail: wang.haiguang.shieldlab@huawei.com