idnits 2.17.1 draft-ietf-netconf-crypto-types-04.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 127 has weird spacing: '...gorithm asy...' == Line 136 has weird spacing: '...on-date iet...' == Line 140 has weird spacing: '...on-date iet...' == Line 148 has weird spacing: '...gorithm asy...' == Line 159 has weird spacing: '...on-date iet...' == (2 more instances...) -- The document date (March 9, 2019) is 1876 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-04 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 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 51 95 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51 97 1. Introduction 99 This document defines a YANG 1.1 [RFC7950] module specifying 100 identities, typedefs, and groupings useful for cryptography. 102 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 103 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 104 "OPTIONAL" in this document are to be interpreted as described in BCP 105 14 [RFC2119] [RFC8174] when, and only when, they appear in all 106 capitals, as shown here. 108 2. The Crypto Types Module 110 2.1. Tree Diagram 112 This section provides a tree diagram [RFC8340] for the "ietf-crypto- 113 types" module. Only the groupings as represented, as tree diagrams 114 have no means to represent identities or typedefs. 116 module: ietf-crypto-types 118 grouping public-key-grouping: 119 +---- algorithm? asymmetric-key-algorithm-ref 120 +---- public-key? binary 121 grouping asymmetric-key-pair-grouping: 122 +---- algorithm? asymmetric-key-algorithm-ref 123 +---- public-key? binary 124 +---- private-key? union 125 +---x generate-hidden-key 126 | +---- input 127 | +---w algorithm asymmetric-key-algorithm-ref 128 +---x install-hidden-key 129 +---- input 130 +---w algorithm asymmetric-key-algorithm-ref 131 +---w public-key? binary 132 +---w private-key? binary 133 grouping trust-anchor-cert-grouping: 134 +---- cert? trust-anchor-cert-cms 135 +---n certificate-expiration 136 +--ro expiration-date ietf-yang-types:date-and-time 137 grouping end-entity-cert-grouping: 138 +---- cert? end-entity-cert-cms 139 +---n certificate-expiration 140 +--ro expiration-date ietf-yang-types:date-and-time 141 grouping asymmetric-key-pair-with-certs-grouping: 142 +---- algorithm? 143 | asymmetric-key-algorithm-ref 144 +---- public-key? binary 145 +---- private-key? union 146 +---x generate-hidden-key 147 | +---- input 148 | +---w algorithm asymmetric-key-algorithm-ref 149 +---x install-hidden-key 150 | +---- input 151 | +---w algorithm asymmetric-key-algorithm-ref 152 | +---w public-key? binary 153 | +---w private-key? binary 154 +---- certificates 155 | +---- certificate* [name] 156 | +---- name string 157 | +---- cert? end-entity-cert-cms 158 | +---n certificate-expiration 159 | +--ro expiration-date ietf-yang-types:date-and-time 160 +---x generate-certificate-signing-request 161 +---- input 162 | +---w subject binary 163 | +---w attributes? binary 164 +---- output 165 +--ro certificate-signing-request binary 167 2.2. YANG Module 169 This module has normative references to [RFC2404], [RFC3565], 170 [RFC3686], [RFC4106], [RFC4253], [RFC4279], [RFC4309], [RFC4494], 171 [RFC4543], [RFC4868], [RFC5280], [RFC5652], [RFC5656], [RFC6187], 172 [RFC6991], [RFC7919], [RFC8268], [RFC8332], [RFC8341], [RFC8422], 173 [RFC8446], and [ITU.X690.2015]. 175 This module has an informational reference to [RFC2986], [RFC3174], 176 [RFC4493], [RFC5915], [RFC6125], [RFC6234], [RFC6239], [RFC6507], 177 [RFC8017], [RFC8032], [RFC8439]. 179 file "ietf-crypto-types@2019-03-09.yang" 181 module ietf-crypto-types { 182 yang-version 1.1; 183 namespace "urn:ietf:params:xml:ns:yang:ietf-crypto-types"; 184 prefix "ct"; 186 import ietf-yang-types { 187 prefix yang; 188 reference 189 "RFC 6991: Common YANG Data Types"; 190 } 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"; 201 contact 202 "WG Web: 203 WG List: 204 Author: Kent Watsen 205 Author: Wang Haiguang "; 207 description 208 "This module defines common YANG types for cryptographic 209 applications. 211 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 212 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 213 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 214 are to be interpreted as described in BCP 14 [RFC2119] 215 [RFC8174] when, and only when, they appear in all 216 capitals, as shown here. 218 Copyright (c) 2019 IETF Trust and the persons identified 219 as authors of the code. All rights reserved. 221 Redistribution and use in source and binary forms, with 222 or without modification, is permitted pursuant to, and 223 subject to the license terms contained in, the Simplified 224 BSD License set forth in Section 4.c of the IETF Trust's 225 Legal Provisions Relating to IETF Documents 226 (http://trustee.ietf.org/license-info). 228 This version of this YANG module is part of RFC XXXX; see 229 the RFC itself for full legal notices."; 231 revision "2019-03-09" { 232 description 233 "Initial version"; 234 reference 235 "RFC XXXX: Common YANG Data Types for Cryptography"; 236 } 238 /**************************************/ 239 /* Identities for Hash Algorithms */ 240 /**************************************/ 241 identity hash-algorithm { 242 description 243 "A base identity for hash algorithm verification."; 244 } 246 identity sha-224 { 247 base "hash-algorithm"; 248 description "The SHA-224 algorithm."; 249 reference "RFC 6234: US Secure Hash Algorithms."; 250 } 252 identity sha-256 { 253 base "hash-algorithm"; 254 description "The SHA-256 algorithm."; 255 reference "RFC 6234: US Secure Hash Algorithms."; 256 } 258 identity sha-384 { 259 base "hash-algorithm"; 260 description "The SHA-384 algorithm."; 261 reference "RFC 6234: US Secure Hash Algorithms."; 262 } 264 identity sha-512 { 265 base "hash-algorithm"; 266 description "The SHA-512 algorithm."; 267 reference "RFC 6234: US Secure Hash Algorithms."; 268 } 270 /***********************************************/ 271 /* Identities for Asymmetric Key Algorithms */ 272 /***********************************************/ 274 identity asymmetric-key-algorithm { 275 description 276 "Base identity from which all asymmetric key 277 encryption Algorithm."; 278 } 280 identity rsa1024 { 281 base asymmetric-key-algorithm; 282 description 283 "The RSA algorithm using a 1024-bit key."; 284 reference 285 "RFC 8017: 286 PKCS #1: RSA Cryptography Specifications Version 2.2."; 287 } 288 identity rsa2048 { 289 base asymmetric-key-algorithm; 290 description 291 "The RSA algorithm using a 2048-bit key."; 292 reference 293 "RFC 8017: 294 PKCS #1: RSA Cryptography Specifications Version 2.2."; 295 } 297 identity rsa3072 { 298 base asymmetric-key-algorithm; 299 description 300 "The RSA algorithm using a 3072-bit key."; 301 reference 302 "RFC 8017: 303 PKCS #1: RSA Cryptography Specifications Version 2.2."; 304 } 306 identity rsa4096 { 307 base asymmetric-key-algorithm; 308 description 309 "The RSA algorithm using a 4096-bit key."; 310 reference 311 "RFC 8017: 312 PKCS #1: RSA Cryptography Specifications Version 2.2."; 313 } 315 identity rsa7680 { 316 base asymmetric-key-algorithm; 317 description 318 "The RSA algorithm using a 7680-bit key."; 319 reference 320 "RFC 8017: 321 PKCS #1: RSA Cryptography Specifications Version 2.2."; 322 } 324 identity rsa15360 { 325 base asymmetric-key-algorithm; 326 description 327 "The RSA algorithm using a 15360-bit key."; 328 reference 329 "RFC 8017: 330 PKCS #1: RSA Cryptography Specifications Version 2.2."; 331 } 333 identity secp192r1 { 334 base asymmetric-key-algorithm; 335 description 337 "The ECDSA algorithm using a NIST P256 Curve."; 338 reference 339 "RFC 6090: 340 Fundamental Elliptic Curve Cryptography Algorithms."; 341 } 343 identity secp224r1 { 344 base asymmetric-key-algorithm; 345 description 346 "The ECDSA algorithm using a NIST P256 Curve."; 347 reference 348 "RFC 6090: 349 Fundamental Elliptic Curve Cryptography Algorithms."; 350 } 352 identity secp256r1 { 353 base asymmetric-key-algorithm; 354 description 355 "The ECDSA algorithm using a NIST P256 Curve."; 356 reference 357 "RFC 6090: 358 Fundamental Elliptic Curve Cryptography Algorithms."; 359 } 361 identity secp384r1 { 362 base asymmetric-key-algorithm; 363 description 364 "The ECDSA algorithm using a NIST P256 Curve."; 365 reference 366 "RFC 6090: 367 Fundamental Elliptic Curve Cryptography Algorithms."; 368 } 370 identity secp521r1 { 371 base asymmetric-key-algorithm; 372 description 373 "The ECDSA algorithm using a NIST P256 Curve."; 374 reference 375 "RFC 6090: 376 Fundamental Elliptic Curve Cryptography Algorithms."; 377 } 379 /*************************************/ 380 /* Identities for MAC Algorithms */ 381 /*************************************/ 383 identity mac-algorithm { 384 description 385 "A base identity for mac generation."; 386 } 388 identity hmac-sha1 { 389 base "mac-algorithm"; 390 description "Generating MAC using SHA1 hash function"; 391 reference "RFC 3174: US Secure Hash Algorithm 1 (SHA1)"; 392 } 394 identity hmac-sha1-96 { 395 base "mac-algorithm"; 396 description "Generating MAC using SHA1 hash function"; 397 reference "RFC 2404: The Use of HMAC-SHA-1-96 within ESP and AH"; 398 } 400 identity hmac-sha2-224 { 401 base "mac-algorithm"; 402 description 403 "Generating MAC using SHA2 hash function"; 404 reference 405 "RFC 6234: 406 US Secure Hash Algorithms (SHA and SHA-based HMAC and 407 HKDF)"; 408 } 410 identity hmac-sha2-256 { 411 base "mac-algorithm"; 412 description 413 "Generating MAC using SHA2 hash function"; 414 reference 415 "RFC 6234: 416 US Secure Hash Algorithms (SHA and SHA-based HMAC and 417 HKDF)"; 418 } 420 identity hmac-sha2-256-128 { 421 base "mac-algorithm"; 422 description 423 "Generating a 256 bits MAC using SHA2 hash function and 424 truncate it to 128 bits"; 425 reference 426 "RFC 4868: 427 Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 428 with IPsec"; 429 } 431 identity hmac-sha2-384 { 432 base "mac-algorithm"; 433 description 434 "Generating MAC using SHA2 hash function"; 435 reference 436 "RFC 6234: 437 US Secure Hash Algorithms (SHA and SHA-based HMAC and 438 HKDF)"; 439 } 441 identity hmac-sha2-384-192 { 442 base "mac-algorithm"; 443 description 444 "Generating a 384 bits MAC using SHA2 hash function and 445 truncate it to 192 bits"; 446 reference 447 "RFC 4868: 448 Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with 449 IPsec"; 450 } 452 identity hmac-sha2-512 { 453 base "mac-algorithm"; 454 description "Generating MAC using SHA2 hash function"; 455 reference 456 "RFC 6234: 457 US Secure Hash Algorithms (SHA and SHA-based HMAC and 458 HKDF)"; 459 } 461 identity hmac-sha2-512-256 { 462 base "mac-algorithm"; 463 description 464 "Generating a 512 bits MAC using SHA2 hash function and 465 truncating it to 256 bits"; 466 reference 467 "RFC 4868: 468 Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with 469 IPsec"; 470 } 472 identity aes-128-gmac { 473 base "mac-algorithm"; 474 description 475 "Generating MAC using the Advanced Encryption Standard (AES) 476 Galois Message Authentication Code (GMAC) as a mechanism to 477 provide data origin authentication"; 478 reference 479 "RFC 4543: 480 The Use of Galois Message Authentication Code (GMAC) in 481 IPsec ESP and AH"; 482 } 484 identity aes-192-gmac { 485 base "mac-algorithm"; 486 description 487 "Generating MAC using the Advanced Encryption Standard (AES) 488 Galois Message Authentication Code (GMAC) as a mechanism to 489 provide data origin authentication"; 490 reference 491 "RFC 4543: 492 The Use of Galois Message Authentication Code (GMAC) in 493 IPsec ESP and AH"; 495 } 497 identity aes-256-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-cmac-96 { 510 base "mac-algorithm"; 511 description 512 "Generating MAC using Advanced Encryption Standard (AES) 513 Cipher-based Message Authentication Code (CMAC)"; 514 reference 515 "RFC 4494: The AES-CMAC-96 Algorithm and its Use with IPsec"; 516 } 518 identity aes-cmac-128 { 519 base "mac-algorithm"; 520 description 521 "Generating MAC using Advanced Encryption Standard (AES) 522 Cipher-based Message Authentication Code (CMAC)"; 523 reference 524 "RFC 4493: The AES-CMAC Algorithm"; 525 } 527 /********************************************/ 528 /* Identities for Encryption Algorithms */ 529 /********************************************/ 531 identity encryption-algorithm { 532 description 533 "A base identity for encryption algorithm."; 534 } 536 identity aes-128-cbc { 537 base "encryption-algorithm"; 538 description 539 "Encrypt message with AES algorithm in CBC mode with a key 540 length of 128 bits"; 541 reference 542 "RFC 3565: 543 Use of the Advanced Encryption Standard (AES) Encryption 544 Algorithm in Cryptographic Message Syntax (CMS)"; 545 } 547 identity aes-192-cbc { 548 base "encryption-algorithm"; 549 description 550 "Encrypt message with AES algorithm in CBC mode with a key 551 length of 192 bits"; 552 reference 553 "RFC 3565: 554 Use of the Advanced Encryption Standard (AES) Encryption 555 Algorithm in Cryptographic Message Syntax (CMS)"; 556 } 558 identity aes-256-cbc { 559 base "encryption-algorithm"; 560 description 561 "Encrypt message with AES algorithm in CBC mode with a key 562 length of 256 bits"; 563 reference 564 "RFC 3565: 565 Use of the Advanced Encryption Standard (AES) Encryption 566 Algorithm in Cryptographic Message Syntax (CMS)"; 567 } 569 identity aes-128-ctr { 570 base "encryption-algorithm"; 571 description 572 "Encrypt message with AES algorithm in CTR mode with a key 573 length of 128 bits"; 574 reference 575 "RFC 3686: 576 Using Advanced Encryption Standard (AES) Counter Mode with 577 IPsec Encapsulating Security Payload (ESP)"; 578 } 580 identity aes-192-ctr { 581 base "encryption-algorithm"; 582 description 583 "Encrypt message with AES algorithm in CTR mode with a key 584 length of 192 bits"; 585 reference 586 "RFC 3686: 587 Using Advanced Encryption Standard (AES) Counter Mode with 588 IPsec Encapsulating Security Payload (ESP)"; 589 } 591 identity aes-256-ctr { 592 base "encryption-algorithm"; 593 description 594 "Encrypt message with AES algorithm in CTR mode with a key 595 length of 256 bits"; 596 reference 597 "RFC 3686: 598 Using Advanced Encryption Standard (AES) Counter Mode with 599 IPsec Encapsulating Security Payload (ESP)"; 600 } 602 /****************************************************/ 603 /* Identities for Encryption and MAC Algorithms */ 604 /****************************************************/ 606 identity encryption-and-mac-algorithm { 607 description 608 "A base identity for encryption and MAC algorithm."; 609 } 611 identity aes-128-ccm { 612 base "encryption-and-mac-algorithm"; 613 description 614 "Encrypt message with AES algorithm in CCM mode with a key 615 length of 128 bits; it can also be used for generating MAC"; 616 reference 617 "RFC 4309: 618 Using Advanced Encryption Standard (AES) CCM Mode with 619 IPsec Encapsulating Security Payload (ESP)"; 620 } 622 identity aes-192-ccm { 623 base "encryption-and-mac-algorithm"; 624 description 625 "Encrypt message with AES algorithm in CCM mode with a key 626 length of 192 bits; it can also be used for generating MAC"; 627 reference 628 "RFC 4309: 629 Using Advanced Encryption Standard (AES) CCM Mode with 630 IPsec Encapsulating Security Payload (ESP)"; 631 } 633 identity aes-256-ccm { 634 base "encryption-and-mac-algorithm"; 635 description 636 "Encrypt message with AES algorithm in CCM mode with a key 637 length of 256 bits; it can also be used for generating MAC"; 638 reference 639 "RFC 4309: 640 Using Advanced Encryption Standard (AES) CCM Mode with 641 IPsec Encapsulating Security Payload (ESP)"; 642 } 644 identity aes-128-gcm { 645 base "encryption-and-mac-algorithm"; 646 description 647 "Encrypt message with AES algorithm in GCM mode with a key 648 length of 128 bits; it can also be used for generating MAC"; 649 reference 650 "RFC 4106: 651 The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating 652 Security Payload (ESP)"; 653 } 655 identity aes-192-gcm { 656 base "encryption-and-mac-algorithm"; 657 description 658 "Encrypt message with AES algorithm in GCM mode with a key 659 length of 192 bits; it can also be used for generating MAC"; 660 reference 661 "RFC 4106: 662 The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating 663 Security Payload (ESP)"; 664 } 666 identity mac-aes-256-gcm { 667 base "encryption-and-mac-algorithm"; 668 description 669 "Encrypt message with AES algorithm in GCM mode with a key 670 length of 128 bits; it can also be used for generating MAC"; 671 reference 672 "RFC 4106: 673 The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating 674 Security Payload (ESP)"; 675 } 677 identity chacha20-poly1305 { 678 base "encryption-and-mac-algorithm"; 679 description 680 "Encrypt message with chacha20 algorithm and generate MAC with 681 POLY1305; it can also be used for generating MAC"; 682 reference 683 "RFC 8439: ChaCha20 and Poly1305 for IETF Protocols"; 684 } 686 /******************************************/ 687 /* Identities for signature algorithm */ 688 /******************************************/ 690 identity signature-algorithm { 691 description 692 "A base identity for asymmetric key encryption algorithm."; 693 } 695 identity dsa-sha1 { 696 base "signature-algorithm"; 697 description 698 "The signature algorithm using DSA algorithm with SHA1 hash 699 algorithm"; 700 reference 701 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; 702 } 704 identity rsassa-pkcs1-sha1 { 705 base "signature-algorithm"; 706 description 707 "The signature algorithm using RSASSA-PKCS1-v1_5 with the SHA1 708 hash algorithm."; 709 reference 710 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; 711 } 713 identity rsassa-pkcs1-sha256 { 714 base "signature-algorithm"; 715 description 716 "The signature algorithm using RSASSA-PKCS1-v1_5 with the 717 SHA256 hash algorithm."; 718 reference 719 "RFC 8332: 720 Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell 721 (SSH) Protocol 722 RFC 8446: 723 The Transport Layer Security (TLS) Protocol Version 1.3"; 724 } 726 identity rsassa-pkcs1-sha384 { 727 base "signature-algorithm"; 728 description 729 "The signature algorithm using RSASSA-PKCS1-v1_5 with the 730 SHA384 hash algorithm."; 731 reference 732 "RFC 8446: 733 The Transport Layer Security (TLS) Protocol Version 1.3"; 734 } 736 identity rsassa-pkcs1-sha512 { 737 base "signature-algorithm"; 738 description 739 "The signature algorithm using RSASSA-PKCS1-v1_5 with the 740 SHA512 hash algorithm."; 741 reference 742 "RFC 8332: 743 Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell 744 (SSH) Protocol 745 RFC 8446: 746 The Transport Layer Security (TLS) Protocol Version 1.3"; 747 } 749 identity rsassa-pss-rsae-sha256 { 750 base "signature-algorithm"; 751 description 752 "The signature algorithm using RSASSA-PSS with mask generation 753 function 1 and SHA256 hash algorithm. If the public key is 754 carried in an X.509 certificate, it MUST use the rsaEncryption 755 OID"; 756 reference 757 "RFC 8446: 758 The Transport Layer Security (TLS) Protocol Version 1.3"; 759 } 761 identity rsassa-pss-rsae-sha384 { 762 base "signature-algorithm"; 763 description 764 "The signature algorithm using RSASSA-PSS with mask generation 765 function 1 and SHA384 hash algorithm. If the public key is 766 carried in an X.509 certificate, it MUST use the rsaEncryption 767 OID"; 768 reference 769 "RFC 8446: 770 The Transport Layer Security (TLS) Protocol Version 1.3"; 771 } 773 identity rsassa-pss-rsae-sha512 { 774 base "signature-algorithm"; 775 description 776 "The signature algorithm using RSASSA-PSS with mask generation 777 function 1 and SHA512 hash algorithm. If the public key is 778 carried in an X.509 certificate, it MUST use the rsaEncryption 779 OID"; 780 reference 781 "RFC 8446: 782 The Transport Layer Security (TLS) Protocol Version 1.3"; 783 } 785 identity rsassa-pss-pss-sha256 { 786 base "signature-algorithm"; 787 description 788 "The signature algorithm using RSASSA-PSS with mask generation 789 function 1 and SHA256 hash algorithm. If the public key is 790 carried in an X.509 certificate, it MUST use the RSASSA-PSS 791 OID"; 792 reference 793 "RFC 8446: 794 The Transport Layer Security (TLS) Protocol Version 1.3"; 795 } 797 identity rsassa-pss-pss-sha384 { 798 base "signature-algorithm"; 799 description 800 "The signature algorithm using RSASSA-PSS with mask generation 801 function 1 and SHA256 hash algorithm. If the public key is 802 carried in an X.509 certificate, it MUST use the RSASSA-PSS 803 OID"; 804 reference 805 "RFC 8446: 806 The Transport Layer Security (TLS) Protocol Version 1.3"; 807 } 809 identity rsassa-pss-pss-sha512 { 810 base "signature-algorithm"; 811 description 812 "The signature algorithm using RSASSA-PSS with mask generation 813 function 1 and SHA256 hash algorithm. If the public key is 814 carried in an X.509 certificate, it MUST use the RSASSA-PSS 815 OID"; 816 reference 817 "RFC 8446: 818 The Transport Layer Security (TLS) Protocol Version 1.3"; 819 } 821 identity ecdsa-secp256r1-sha256 { 822 base "signature-algorithm"; 823 description 824 "The signature algorithm using ECDSA with curve name secp256r1 825 and SHA256 hash algorithm."; 826 reference 827 "RFC 5656: Elliptic Curve Algorithm Integration in the 828 Secure Shell Transport Layer 829 RFC 8446: 830 The Transport Layer Security (TLS) Protocol Version 1.3"; 831 } 833 identity ecdsa-secp384r1-sha384 { 834 base "signature-algorithm"; 835 description 836 "The signature algorithm using ECDSA with curve name secp384r1 837 and SHA384 hash algorithm."; 838 reference 839 "RFC 5656: Elliptic Curve Algorithm Integration in the 840 Secure Shell Transport Layer 841 RFC 8446: 842 The Transport Layer Security (TLS) Protocol Version 1.3"; 843 } 845 identity ecdsa-secp521r1-sha512 { 846 base "signature-algorithm"; 847 description 848 "The signature algorithm using ECDSA with curve name secp521r1 849 and SHA512 hash algorithm."; 850 reference 851 "RFC 5656: Elliptic Curve Algorithm Integration in the 852 Secure Shell Transport Layer 853 RFC 8446: 854 The Transport Layer Security (TLS) Protocol Version 1.3"; 855 } 857 identity ed25519 { 858 base "signature-algorithm"; 859 description 860 "The signature algorithm using EdDSA as defined in RFC 8032 or 861 its successors."; 862 reference 863 "RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA)"; 864 } 866 identity ed448 { 867 base "signature-algorithm"; 868 description 869 "The signature algorithm using EdDSA as defined in RFC 8032 or 870 its successors."; 871 reference 872 "RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA)"; 873 } 875 identity eccsi { 876 base "signature-algorithm"; 877 description 878 "The signature algorithm using ECCSI signature as defined in 879 RFC 6507."; 880 reference 881 "RFC 6507: 882 Elliptic Curve-Based Certificateless Signatures for 883 Identity-based Encryption (ECCSI)"; 884 } 886 /**********************************************/ 887 /* Identities for key exchange algorithms */ 888 /**********************************************/ 890 identity key-exchange-algorithm { 891 description 892 "A base identity for Diffie-Hellman based key exchange 893 algorithm."; 894 } 896 identity psk-only { 897 base "key-exchange-algorithm"; 898 description 899 "Using Pre-shared key for authentication and key exchange"; 900 reference 901 "RFC 4279: 902 Pre-Shared Key cipher suites for Transport Layer Security 903 (TLS)"; 904 } 906 identity dhe-ffdhe2048 { 907 base "key-exchange-algorithm"; 908 description 909 "Ephemeral Diffie Hellman key exchange with 2048 bit 910 finite field"; 912 reference 913 "RFC 7919: 914 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 915 for Transport Layer Security (TLS)"; 916 } 918 identity dhe-ffdhe3072 { 919 base "key-exchange-algorithm"; 920 description 921 "Ephemeral Diffie Hellman key exchange with 3072 bit finite 922 field"; 923 reference 924 "RFC 7919: 925 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 926 for Transport Layer Security (TLS)"; 927 } 929 identity dhe-ffdhe4096 { 930 base "key-exchange-algorithm"; 931 description 932 "Ephemeral Diffie Hellman key exchange with 4096 bit 933 finite field"; 934 reference 935 "RFC 7919: 936 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 937 for Transport Layer Security (TLS)"; 938 } 940 identity dhe-ffdhe6144 { 941 base "key-exchange-algorithm"; 942 description 943 "Ephemeral Diffie Hellman key exchange with 6144 bit 944 finite field"; 945 reference 946 "RFC 7919: 947 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 948 for Transport Layer Security (TLS)"; 949 } 951 identity dhe-ffdhe8192 { 952 base "key-exchange-algorithm"; 953 description 954 "Ephemeral Diffie Hellman key exchange with 8192 bit 955 finite field"; 956 reference 957 "RFC 7919: 958 Negotiated Finite Field Diffie-Hellman Ephemeral Parameters 959 for Transport Layer Security (TLS)"; 961 } 963 identity psk-dhe-ffdhe2048 { 964 base "key-exchange-algorithm"; 965 description 966 "Key exchange using pre-shared key with Diffie-Hellman key 967 generation mechanism, where the DH group is FFDHE2048"; 968 reference 969 "RFC 8446: 970 The Transport Layer Security (TLS) Protocol Version 1.3"; 971 } 973 identity psk-dhe-ffdhe3072 { 974 base "key-exchange-algorithm"; 975 description 976 "Key exchange using pre-shared key with Diffie-Hellman key 977 generation mechanism, where the DH group is FFDHE3072"; 978 reference 979 "RFC 8446: 980 The Transport Layer Security (TLS) Protocol Version 1.3"; 981 } 983 identity psk-dhe-ffdhe4096 { 984 base "key-exchange-algorithm"; 985 description 986 "Key exchange using pre-shared key with Diffie-Hellman key 987 generation mechanism, where the DH group is FFDHE4096"; 988 reference 989 "RFC 8446: 990 The Transport Layer Security (TLS) Protocol Version 1.3"; 991 } 993 identity psk-dhe-ffdhe6144 { 994 base "key-exchange-algorithm"; 995 description 996 "Key exchange using pre-shared key with Diffie-Hellman key 997 generation mechanism, where the DH group is FFDHE6144"; 998 reference 999 "RFC 8446: 1000 The Transport Layer Security (TLS) Protocol Version 1.3"; 1001 } 1003 identity psk-dhe-ffdhe8192 { 1004 base "key-exchange-algorithm"; 1005 description 1006 "Key exchange using pre-shared key with Diffie-Hellman key 1007 generation mechanism, where the DH group is FFDHE8192"; 1008 reference 1009 "RFC 8446: 1010 The Transport Layer Security (TLS) Protocol Version 1.3"; 1011 } 1013 identity ecdhe-secp256r1 { 1014 base "key-exchange-algorithm"; 1015 description 1016 "Ephemeral Diffie Hellman key exchange with elliptic group 1017 over curve secp256r1"; 1018 reference 1019 "RFC 8422: 1020 Elliptic Curve Cryptography (ECC) Cipher Suites for 1021 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1022 } 1024 identity ecdhe-secp384r1 { 1025 base "key-exchange-algorithm"; 1026 description 1027 "Ephemeral Diffie Hellman key exchange with elliptic group 1028 over curve secp384r1"; 1029 reference 1030 "RFC 8422: 1031 Elliptic Curve Cryptography (ECC) Cipher Suites for 1032 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1033 } 1035 identity ecdhe-secp521r1 { 1036 base "key-exchange-algorithm"; 1037 description 1038 "Ephemeral Diffie Hellman key exchange with elliptic group 1039 over curve secp521r1"; 1040 reference 1041 "RFC 8422: 1042 Elliptic Curve Cryptography (ECC) Cipher Suites for 1043 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1044 } 1046 identity ecdhe-x25519 { 1047 base "key-exchange-algorithm"; 1048 description 1049 "Ephemeral Diffie Hellman key exchange with elliptic group 1050 over curve x25519"; 1051 reference 1052 "RFC 8422: 1053 Elliptic Curve Cryptography (ECC) Cipher Suites for 1054 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1055 } 1056 identity ecdhe-x448 { 1057 base "key-exchange-algorithm"; 1058 description 1059 "Ephemeral Diffie Hellman key exchange with elliptic group 1060 over curve x448"; 1061 reference 1062 "RFC 8422: 1063 Elliptic Curve Cryptography (ECC) Cipher Suites for 1064 Transport Layer Security (TLS) Versions 1.2 and Earlier"; 1065 } 1067 identity psk-ecdhe-secp256r1 { 1068 base "key-exchange-algorithm"; 1069 description 1070 "Key exchange using pre-shared key with elliptic group-based 1071 Ephemeral Diffie Hellman key exchange over curve secp256r1"; 1072 reference 1073 "RFC 8446: 1074 The Transport Layer Security (TLS) Protocol Version 1.3"; 1075 } 1077 identity psk-ecdhe-secp384r1 { 1078 base "key-exchange-algorithm"; 1079 description 1080 "Key exchange using pre-shared key with elliptic group-based 1081 Ephemeral Diffie Hellman key exchange over curve secp384r1"; 1082 reference 1083 "RFC 8446: 1084 The Transport Layer Security (TLS) Protocol Version 1.3"; 1085 } 1087 identity psk-ecdhe-secp521r1 { 1088 base "key-exchange-algorithm"; 1089 description 1090 "Key exchange using pre-shared key with elliptic group-based 1091 Ephemeral Diffie Hellman key exchange over curve secp521r1"; 1092 reference 1093 "RFC 8446: 1094 The Transport Layer Security (TLS) Protocol Version 1.3"; 1095 } 1097 identity psk-ecdhe-x25519 { 1098 base "key-exchange-algorithm"; 1099 description 1100 "Key exchange using pre-shared key with elliptic group-based 1101 Ephemeral Diffie Hellman key exchange over curve x25519"; 1102 reference 1103 "RFC 8446: 1105 The Transport Layer Security (TLS) Protocol Version 1.3"; 1106 } 1108 identity psk-ecdhe-x448 { 1109 base "key-exchange-algorithm"; 1110 description 1111 "Key exchange using pre-shared key with elliptic group-based 1112 Ephemeral Diffie Hellman key exchange over curve x448"; 1113 reference 1114 "RFC 8446: 1115 The Transport Layer Security (TLS) Protocol Version 1.3"; 1116 } 1118 identity diffie-hellman-group14-sha1 { 1119 base "key-exchange-algorithm"; 1120 description 1121 "Using DH group14 and SHA1 for key exchange"; 1122 reference 1123 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol"; 1124 } 1126 identity diffie-hellman-group14-sha256 { 1127 base "key-exchange-algorithm"; 1128 description 1129 "Using DH group14 and SHA256 for key exchange"; 1130 reference 1131 "RFC 8268: 1132 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1133 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1134 } 1136 identity diffie-hellman-group15-sha512 { 1137 base "key-exchange-algorithm"; 1138 description 1139 "Using DH group15 and SHA512 for key exchange"; 1140 reference 1141 "RFC 8268: 1142 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1143 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1144 } 1146 identity diffie-hellman-group16-sha512 { 1147 base "key-exchange-algorithm"; 1148 description 1149 "Using DH group16 and SHA512 for key exchange"; 1150 reference 1151 "RFC 8268: 1152 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1153 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1154 } 1156 identity diffie-hellman-group17-sha512 { 1157 base "key-exchange-algorithm"; 1158 description 1159 "Using DH group17 and SHA512 for key exchange"; 1160 reference 1161 "RFC 8268: 1162 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1163 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1164 } 1166 identity diffie-hellman-group18-sha512 { 1167 base "key-exchange-algorithm"; 1168 description 1169 "Using DH group18 and SHA512 for key exchange"; 1170 reference 1171 "RFC 8268: 1172 More Modular Exponentiation (MODP) Diffie-Hellman (DH) 1173 Key Exchange (KEX) Groups for Secure Shell (SSH)"; 1174 } 1176 identity ecdh-sha2-secp256r1 { 1177 base "key-exchange-algorithm"; 1178 description 1179 "Elliptic curve-based Diffie Hellman key exchange over curve 1180 secp256r1 and using SHA2 for MAC generation"; 1181 reference 1182 "RFC 6239: Suite B Cryptographic Suites for Secure Shell 1183 (SSH)"; 1184 } 1186 identity ecdh-sha2-secp384r1 { 1187 base "key-exchange-algorithm"; 1188 description 1189 "Elliptic curve-based Diffie Hellman key exchange over curve 1190 secp384r1 and using SHA2 for MAC generation"; 1191 reference 1192 "RFC 6239: Suite B Cryptographic Suites for Secure Shell 1193 (SSH)"; 1194 } 1196 identity rsaes-oaep { 1197 base "key-exchange-algorithm"; 1198 description 1199 "RSAES-OAEP combines the RSAEP and RSADP primitives with the 1200 EME-OAEP encoding method"; 1202 reference 1203 "RFC 8017: 1204 PKCS #1: RSA Cryptography Specifications Version 2.2."; 1205 } 1207 identity rsaes-pkcs1-v1_5 { 1208 base "key-exchange-algorithm"; 1209 description 1210 " RSAES-PKCS1-v1_5 combines the RSAEP and RSADP primitives 1211 with the EME-PKCS1-v1_5 encoding method"; 1212 reference 1213 "RFC 8017: 1214 PKCS #1: RSA Cryptography Specifications Version 2.2."; 1215 } 1217 /**********************************************************/ 1218 /* Typedefs for identityrefs to above base identities */ 1219 /**********************************************************/ 1221 typedef hash-algorithm-ref { 1222 type identityref { 1223 base "hash-algorithm"; 1224 } 1225 description 1226 "This typedef enables importing modules to easily define an 1227 identityref to the 'hash-algorithm' base identity."; 1228 } 1230 typedef signature-algorithm-ref { 1231 type identityref { 1232 base "signature-algorithm"; 1233 } 1234 description 1235 "This typedef enables importing modules to easily define an 1236 identityref to the 'signature-algorithm' base identity."; 1237 } 1239 typedef mac-algorithm-ref { 1240 type identityref { 1241 base "mac-algorithm"; 1242 } 1243 description 1244 "This typedef enables importing modules to easily define an 1245 identityref to the 'mac-algorithm' base identity."; 1246 } 1248 typedef encryption-algorithm-ref { 1249 type identityref { 1250 base "encryption-algorithm"; 1251 } 1252 description 1253 "This typedef enables importing modules to easily define an 1254 identityref to the 'encryption-algorithm' 1255 base identity."; 1256 } 1258 typedef encryption-and-mac-algorithm-ref { 1259 type identityref { 1260 base "encryption-and-mac-algorithm"; 1261 } 1262 description 1263 "This typedef enables importing modules to easily define an 1264 identityref to the 'encryption-and-mac-algorithm' 1265 base identity."; 1266 } 1268 typedef asymmetric-key-algorithm-ref { 1269 type identityref { 1270 base "asymmetric-key-algorithm"; 1271 } 1272 description 1273 "This typedef enables importing modules to easily define an 1274 identityref to the 'asymmetric-key-algorithm' 1275 base identity."; 1276 } 1278 typedef key-exchange-algorithm-ref { 1279 type identityref { 1280 base "key-exchange-algorithm"; 1281 } 1282 description 1283 "This typedef enables importing modules to easily define an 1284 identityref to the 'key-exchange-algorithm' base identity."; 1285 } 1287 /***************************************************/ 1288 /* Typedefs for ASN.1 structures from RFC 5280 */ 1289 /***************************************************/ 1291 typedef x509 { 1292 type binary; 1293 description 1294 "A Certificate structure, as specified in RFC 5280, 1295 encoded using ASN.1 distinguished encoding rules (DER), 1296 as specified in ITU-T X.690."; 1298 reference 1299 "RFC 5280: 1300 Internet X.509 Public Key Infrastructure Certificate 1301 and Certificate Revocation List (CRL) Profile 1302 ITU-T X.690: 1303 Information technology - ASN.1 encoding rules: 1304 Specification of Basic Encoding Rules (BER), 1305 Canonical Encoding Rules (CER) and Distinguished 1306 Encoding Rules (DER)."; 1307 } 1309 typedef crl { 1310 type binary; 1311 description 1312 "A CertificateList structure, as specified in RFC 5280, 1313 encoded using ASN.1 distinguished encoding rules (DER), 1314 as specified in ITU-T X.690."; 1315 reference 1316 "RFC 5280: 1317 Internet X.509 Public Key Infrastructure Certificate 1318 and Certificate Revocation List (CRL) Profile 1319 ITU-T X.690: 1320 Information technology - ASN.1 encoding rules: 1321 Specification of Basic Encoding Rules (BER), 1322 Canonical Encoding Rules (CER) and Distinguished 1323 Encoding Rules (DER)."; 1324 } 1326 /***********************************************/ 1327 /* Typedefs for ASN.1 structures from 5652 */ 1328 /***********************************************/ 1330 typedef cms { 1331 type binary; 1332 description 1333 "A ContentInfo structure, as specified in RFC 5652, 1334 encoded using ASN.1 distinguished encoding rules (DER), 1335 as specified in ITU-T X.690."; 1336 reference 1337 "RFC 5652: 1338 Cryptographic Message Syntax (CMS) 1339 ITU-T X.690: 1340 Information technology - ASN.1 encoding rules: 1341 Specification of Basic Encoding Rules (BER), 1342 Canonical Encoding Rules (CER) and Distinguished 1343 Encoding Rules (DER)."; 1344 } 1345 typedef data-content-cms { 1346 type cms; 1347 description 1348 "A CMS structure whose top-most content type MUST be the 1349 data content type, as described by Section 4 in RFC 5652."; 1350 reference 1351 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1352 } 1354 typedef signed-data-cms { 1355 type cms; 1356 description 1357 "A CMS structure whose top-most content type MUST be the 1358 signed-data content type, as described by Section 5 in 1359 RFC 5652."; 1360 reference 1361 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1362 } 1364 typedef enveloped-data-cms { 1365 type cms; 1366 description 1367 "A CMS structure whose top-most content type MUST be the 1368 enveloped-data content type, as described by Section 6 1369 in RFC 5652."; 1370 reference 1371 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1372 } 1374 typedef digested-data-cms { 1375 type cms; 1376 description 1377 "A CMS structure whose top-most content type MUST be the 1378 digested-data content type, as described by Section 7 1379 in RFC 5652."; 1380 reference 1381 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1382 } 1384 typedef encrypted-data-cms { 1385 type cms; 1386 description 1387 "A CMS structure whose top-most content type MUST be the 1388 encrypted-data content type, as described by Section 8 1389 in RFC 5652."; 1390 reference 1391 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1392 } 1393 typedef authenticated-data-cms { 1394 type cms; 1395 description 1396 "A CMS structure whose top-most content type MUST be the 1397 authenticated-data content type, as described by Section 9 1398 in RFC 5652."; 1399 reference 1400 "RFC 5652: Cryptographic Message Syntax (CMS)"; 1401 } 1403 /***************************************************/ 1404 /* Typedefs for structures related to RFC 4253 */ 1405 /***************************************************/ 1407 typedef ssh-host-key { 1408 type binary; 1409 description 1410 "The binary public key data for this SSH key, as 1411 specified by RFC 4253, Section 6.6, i.e.: 1413 string certificate or public key format 1414 identifier 1415 byte[n] key/certificate data."; 1416 reference 1417 "RFC 4253: The Secure Shell (SSH) Transport Layer 1418 Protocol"; 1419 } 1421 /*********************************************************/ 1422 /* Typedefs for ASN.1 structures related to RFC 5280 */ 1423 /*********************************************************/ 1425 typedef trust-anchor-cert-x509 { 1426 type x509; 1427 description 1428 "A Certificate structure that MUST encode a self-signed 1429 root certificate."; 1430 } 1432 typedef end-entity-cert-x509 { 1433 type x509; 1434 description 1435 "A Certificate structure that MUST encode a certificate 1436 that is neither self-signed nor having Basic constraint 1437 CA true."; 1438 } 1440 /*********************************************************/ 1441 /* Typedefs for ASN.1 structures related to RFC 5652 */ 1442 /*********************************************************/ 1444 typedef trust-anchor-cert-cms { 1445 type signed-data-cms; 1446 description 1447 "A CMS SignedData structure that MUST contain the chain of 1448 X.509 certificates needed to authenticate the certificate 1449 presented by a client or end-entity. 1451 The CMS MUST contain only a single chain of certificates. 1452 The client or end-entity certificate MUST only authenticate 1453 to last intermediate CA certificate listed in the chain. 1455 In all cases, the chain MUST include a self-signed root 1456 certificate. In the case where the root certificate is 1457 itself the issuer of the client or end-entity certificate, 1458 only one certificate is present. 1460 This CMS structure MAY (as applicable where this type is 1461 used) also contain suitably fresh (as defined by local 1462 policy) revocation objects with which the device can 1463 verify the revocation status of the certificates. 1465 This CMS encodes the degenerate form of the SignedData 1466 structure that is commonly used to disseminate X.509 1467 certificates and revocation objects (RFC 5280)."; 1468 reference 1469 "RFC 5280: 1470 Internet X.509 Public Key Infrastructure Certificate 1471 and Certificate Revocation List (CRL) Profile."; 1472 } 1474 typedef end-entity-cert-cms { 1475 type signed-data-cms; 1476 description 1477 "A CMS SignedData structure that MUST contain the end 1478 entity certificate itself, and MAY contain any number 1479 of intermediate certificates leading up to a trust 1480 anchor certificate. The trust anchor certificate 1481 MAY be included as well. 1483 The CMS MUST contain a single end entity certificate. 1484 The CMS MUST NOT contain any spurious certificates. 1486 This CMS structure MAY (as applicable where this type is 1487 used) also contain suitably fresh (as defined by local 1488 policy) revocation objects with which the device can 1489 verify the revocation status of the certificates. 1491 This CMS encodes the degenerate form of the SignedData 1492 structure that is commonly used to disseminate X.509 1493 certificates and revocation objects (RFC 5280)."; 1494 reference 1495 "RFC 5280: 1496 Internet X.509 Public Key Infrastructure Certificate 1497 and Certificate Revocation List (CRL) Profile."; 1498 } 1500 /**********************************************/ 1501 /* Groupings for keys and/or certificates */ 1502 /**********************************************/ 1504 grouping public-key-grouping { 1505 description 1506 "A public key."; 1507 leaf algorithm { 1508 type asymmetric-key-algorithm-ref; 1509 description 1510 "Identifies the key's algorithm. More specifically, 1511 this leaf specifies how the 'public-key' binary leaf 1512 is encoded."; 1513 reference 1514 "RFC CCCC: Common YANG Data Types for Cryptography"; 1515 } 1516 leaf public-key { 1517 type binary; 1518 description 1519 "A binary that contains the value of the public key. The 1520 interpretation of the content is defined by the key 1521 algorithm. For example, a DSA key is an integer, an RSA 1522 key is represented as RSAPublicKey as defined in 1523 RFC 8017, and an Elliptic Curve Cryptography (ECC) key 1524 is represented using the 'publicKey' described in 1525 RFC 5915."; 1526 reference 1527 "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: 1528 RSA Cryptography Specifications Version 2.2. 1529 RFC 5915: Elliptic Curve Private Key Structure."; 1530 } 1531 } 1533 grouping asymmetric-key-pair-grouping { 1534 description 1535 "A private/public key pair."; 1536 uses public-key-grouping; 1537 leaf private-key { 1538 nacm:default-deny-all; 1539 type union { 1540 type binary; 1541 type enumeration { 1542 enum "permanently-hidden" { 1543 description 1544 "The private key is inaccessible due to being 1545 protected by the system (e.g., a cryptographic 1546 hardware module). It is not possible to 1547 configure a permanently hidden key, as a real 1548 private key value must be set. Permanently 1549 hidden keys cannot be archived or backed up."; 1550 } 1551 } 1552 } 1553 description 1554 "A binary that contains the value of the private key. The 1555 interpretation of the content is defined by the key 1556 algorithm. For example, a DSA key is an integer, an RSA 1557 key is represented as RSAPrivateKey as defined in 1558 RFC 8017, and an Elliptic Curve Cryptography (ECC) key 1559 is represented as ECPrivateKey as defined in RFC 5915."; 1560 reference 1561 "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: 1562 RSA Cryptography Specifications Version 2.2. 1563 RFC 5915: Elliptic Curve Private Key Structure."; 1564 } // private-key 1566 action generate-hidden-key { 1567 description 1568 "Requests the device to generate a hidden key using the 1569 specified asymmetric key algorithm. This action is 1570 used to request the system to generate a key that 1571 is 'permanently-hidden', perhaps protected by a 1572 cryptographic hardware module. The resulting 1573 asymmetric key values are considered operational 1574 state and hence present only in ."; 1575 input { 1576 leaf algorithm { 1577 type asymmetric-key-algorithm-ref; 1578 mandatory true; 1579 description 1580 "The algorithm to be used when generating the 1581 asymmetric key."; 1582 reference 1583 "RFC CCCC: Common YANG Data Types for Cryptography"; 1584 } 1586 } 1587 } // generate-hidden-key 1589 action install-hidden-key { 1590 description 1591 "Requests the device to load the specified values into 1592 a hidden key. The resulting asymmetric key values are 1593 considered operational state and hence present only in 1594 ."; 1595 input { 1596 leaf algorithm { 1597 type asymmetric-key-algorithm-ref; 1598 mandatory true; 1599 description 1600 "The algorithm to be used when generating the 1601 asymmetric key."; 1602 reference 1603 "RFC CCCC: Common YANG Data Types for Cryptography"; 1604 } 1605 leaf public-key { 1606 type binary; 1607 description 1608 "A binary that contains the value of the public key. 1609 The interpretation of the content is defined by the key 1610 algorithm. For example, a DSA key is an integer, an 1611 RSA key is represented as RSAPublicKey as defined in 1612 RFC 8017, and an Elliptic Curve Cryptography (ECC) key 1613 is represented using the 'publicKey' described in 1614 RFC 5915."; 1615 reference 1616 "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: 1617 RSA Cryptography Specifications Version 2.2. 1618 RFC 5915: Elliptic Curve Private Key Structure."; 1619 } 1620 leaf private-key { 1621 type binary; 1622 description 1623 "A binary that contains the value of the private key. 1624 The interpretation of the content is defined by the key 1625 algorithm. For example, a DSA key is an integer, an RSA 1626 key is represented as RSAPrivateKey as defined in 1627 RFC 8017, and an Elliptic Curve Cryptography (ECC) key 1628 is represented as ECPrivateKey as defined in RFC 5915."; 1629 reference 1630 "RFC 8017: Public-Key Cryptography Standards (PKCS) #1: 1631 RSA Cryptography Specifications Version 2.2. 1632 RFC 5915: Elliptic Curve Private Key Structure."; 1633 } 1635 } 1636 } // install-hidden-key 1637 } // asymmetric-key-pair-grouping 1639 grouping trust-anchor-cert-grouping { 1640 description 1641 "A certificate, and a notification for when it might expire."; 1642 leaf cert { 1643 type trust-anchor-cert-cms; 1644 description 1645 "The binary certificate data for this certificate."; 1646 reference 1647 "RFC YYYY: Common YANG Data Types for Cryptography"; 1648 } 1649 notification certificate-expiration { 1650 description 1651 "A notification indicating that the configured certificate 1652 is either about to expire or has already expired. When to 1653 send notifications is an implementation specific decision, 1654 but it is RECOMMENDED that a notification be sent once a 1655 month for 3 months, then once a week for four weeks, and 1656 then once a day thereafter until the issue is resolved."; 1657 leaf expiration-date { 1658 type yang:date-and-time; 1659 mandatory true; 1660 description 1661 "Identifies the expiration date on the certificate."; 1662 } 1663 } 1664 } 1666 grouping end-entity-cert-grouping { 1667 description 1668 "A certificate, and a notification for when it might expire."; 1669 leaf cert { 1670 type end-entity-cert-cms; 1671 description 1672 "The binary certificate data for this certificate."; 1673 reference 1674 "RFC YYYY: Common YANG Data Types for Cryptography"; 1675 } 1676 notification certificate-expiration { 1677 description 1678 "A notification indicating that the configured certificate 1679 is either about to expire or has already expired. When to 1680 send notifications is an implementation specific decision, 1681 but it is RECOMMENDED that a notification be sent once a 1682 month for 3 months, then once a week for four weeks, and 1683 then once a day thereafter until the issue is resolved."; 1684 leaf expiration-date { 1685 type yang:date-and-time; 1686 mandatory true; 1687 description 1688 "Identifies the expiration date on the certificate."; 1689 } 1690 } 1691 } 1693 grouping asymmetric-key-pair-with-certs-grouping { 1694 description 1695 "A private/public key pair and associated certificates."; 1696 uses asymmetric-key-pair-grouping; 1698 container certificates { 1699 description 1700 "Certificates associated with this asymmetric key. 1701 More than one certificate supports, for instance, 1702 a TPM-protected asymmetric key that has both IDevID 1703 and LDevID certificates associated."; 1704 list certificate { 1705 key name; 1706 description 1707 "A certificate for this asymmetric key."; 1708 leaf name { 1709 type string; 1710 description 1711 "An arbitrary name for the certificate. If the name 1712 matches the name of a certificate that exists 1713 independently in (i.e., an IDevID), 1714 then the 'cert' node MUST NOT be configured."; 1716 } 1717 uses end-entity-cert-grouping; 1718 } 1719 } // certificates 1721 action generate-certificate-signing-request { 1722 description 1723 "Generates a certificate signing request structure for 1724 the associated asymmetric key using the passed subject 1725 and attribute values. The specified assertions need 1726 to be appropriate for the certificate's use. For 1727 example, an entity certificate for a TLS server 1728 SHOULD have values that enable clients to satisfy 1729 RFC 6125 processing."; 1730 input { 1731 leaf subject { 1732 type binary; 1733 mandatory true; 1734 description 1735 "The 'subject' field per the CertificationRequestInfo 1736 structure as specified by RFC 2986, Section 4.1 1737 encoded using the ASN.1 distinguished encoding 1738 rules (DER), as specified in ITU-T X.690."; 1739 reference 1740 "RFC 2986: 1741 PKCS #10: Certification Request Syntax 1742 Specification Version 1.7. 1743 ITU-T X.690: 1744 Information technology - ASN.1 encoding rules: 1745 Specification of Basic Encoding Rules (BER), 1746 Canonical Encoding Rules (CER) and Distinguished 1747 Encoding Rules (DER)."; 1748 } 1749 leaf attributes { 1750 type binary; 1751 description 1752 "The 'attributes' field from the structure 1753 CertificationRequestInfo as specified by RFC 2986, 1754 Section 4.1 encoded using the ASN.1 distinguished 1755 encoding rules (DER), as specified in ITU-T X.690."; 1756 reference 1757 "RFC 2986: 1758 PKCS #10: Certification Request Syntax 1759 Specification Version 1.7. 1760 ITU-T X.690: 1761 Information technology - ASN.1 encoding rules: 1762 Specification of Basic Encoding Rules (BER), 1763 Canonical Encoding Rules (CER) and Distinguished 1764 Encoding Rules (DER)."; 1765 } 1766 } 1767 output { 1768 leaf certificate-signing-request { 1769 type binary; 1770 mandatory true; 1771 description 1772 "A CertificationRequest structure as specified by 1773 RFC 2986, Section 4.2 encoded using the ASN.1 1774 distinguished encoding rules (DER), as specified 1775 in ITU-T X.690."; 1777 reference 1778 "RFC 2986: 1779 PKCS #10: Certification Request Syntax 1780 Specification Version 1.7. 1781 ITU-T X.690: 1782 Information technology - ASN.1 encoding rules: 1783 Specification of Basic Encoding Rules (BER), 1784 Canonical Encoding Rules (CER) and Distinguished 1785 Encoding Rules (DER)."; 1787 } 1788 } 1789 } // generate-certificate-signing-request 1790 } // asymmetric-key-pair-with-certs-grouping 1792 } 1794 1796 3. Security Considerations 1798 In order to use YANG identities for algorithm identifiers, only the 1799 most commonly used RSA key lengths are supported for the RSA 1800 algorithm. Additional key lengths can be defined in another module 1801 or added into a future version of this document. 1803 This document limits the number of elliptical curves supported. This 1804 was done to match industry trends and IETF best practice (e.g., 1805 matching work being done in TLS 1.3). If additional algorithms are 1806 needed, they can be defined by another module or added into a future 1807 version of this document. 1809 Some of the operations in this YANG module may be considered 1810 sensitive or vulnerable in some network environments. It is thus 1811 important to control access to these operations. These are the 1812 operations and their sensitivity/vulnerability: 1814 generate-certificate-signing-request: For this action, it is 1815 RECOMMENDED that implementations assert channel binding 1816 [RFC5056], so as to ensure that the application layer that sent 1817 the request is the same as the device authenticated when the 1818 secure transport layer was established. 1820 This document uses PKCS #10 [RFC2986] for the "generate-certificate- 1821 signing-request" action. The use of Certificate Request Message 1822 Format (CRMF) [RFC4211] was considered, but is was unclear if there 1823 was market demand for it. If it is desired to support CRMF in the 1824 future, placing a "choice" statement in both the input and output 1825 statements, along with an "if-feature" statement on the CRMF option, 1826 would enable a backwards compatible solution. 1828 NACM:default-deny-all is set on asymmetric-key-pair-grouping's 1829 "private-key" node, as private keys should never be revealed without 1830 explicit permission. 1832 4. IANA Considerations 1834 4.1. The IETF XML Registry 1836 This document registers one URI in the "ns" subregistry of the IETF 1837 XML Registry [RFC3688]. Following the format in [RFC3688], the 1838 following registration is requested: 1840 URI: urn:ietf:params:xml:ns:yang:ietf-crypto-types 1841 Registrant Contact: The NETCONF WG of the IETF. 1842 XML: N/A, the requested URI is an XML namespace. 1844 4.2. The YANG Module Names Registry 1846 This document registers one YANG module in the YANG Module Names 1847 registry [RFC6020]. Following the format in [RFC6020], the the 1848 following registration is requested: 1850 name: ietf-crypto-types 1851 namespace: urn:ietf:params:xml:ns:yang:ietf-crypto-types 1852 prefix: ct 1853 reference: RFC XXXX 1855 5. References 1857 5.1. Normative References 1859 [ITU.X690.2015] 1860 International Telecommunication Union, "Information 1861 Technology - ASN.1 encoding rules: Specification of Basic 1862 Encoding Rules (BER), Canonical Encoding Rules (CER) and 1863 Distinguished Encoding Rules (DER)", ITU-T Recommendation 1864 X.690, ISO/IEC 8825-1, August 2015, 1865 . 1867 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1868 Requirement Levels", BCP 14, RFC 2119, 1869 DOI 10.17487/RFC2119, March 1997, 1870 . 1872 [RFC2404] Madson, C. and R. Glenn, "The Use of HMAC-SHA-1-96 within 1873 ESP and AH", RFC 2404, DOI 10.17487/RFC2404, November 1874 1998, . 1876 [RFC3565] Schaad, J., "Use of the Advanced Encryption Standard (AES) 1877 Encryption Algorithm in Cryptographic Message Syntax 1878 (CMS)", RFC 3565, DOI 10.17487/RFC3565, July 2003, 1879 . 1881 [RFC3686] Housley, R., "Using Advanced Encryption Standard (AES) 1882 Counter Mode With IPsec Encapsulating Security Payload 1883 (ESP)", RFC 3686, DOI 10.17487/RFC3686, January 2004, 1884 . 1886 [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode 1887 (GCM) in IPsec Encapsulating Security Payload (ESP)", 1888 RFC 4106, DOI 10.17487/RFC4106, June 2005, 1889 . 1891 [RFC4253] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH) 1892 Transport Layer Protocol", RFC 4253, DOI 10.17487/RFC4253, 1893 January 2006, . 1895 [RFC4279] Eronen, P., Ed. and H. Tschofenig, Ed., "Pre-Shared Key 1896 Ciphersuites for Transport Layer Security (TLS)", 1897 RFC 4279, DOI 10.17487/RFC4279, December 2005, 1898 . 1900 [RFC4309] Housley, R., "Using Advanced Encryption Standard (AES) CCM 1901 Mode with IPsec Encapsulating Security Payload (ESP)", 1902 RFC 4309, DOI 10.17487/RFC4309, December 2005, 1903 . 1905 [RFC4494] Song, JH., Poovendran, R., and J. Lee, "The AES-CMAC-96 1906 Algorithm and Its Use with IPsec", RFC 4494, 1907 DOI 10.17487/RFC4494, June 2006, 1908 . 1910 [RFC4543] McGrew, D. and J. Viega, "The Use of Galois Message 1911 Authentication Code (GMAC) in IPsec ESP and AH", RFC 4543, 1912 DOI 10.17487/RFC4543, May 2006, 1913 . 1915 [RFC4868] Kelly, S. and S. Frankel, "Using HMAC-SHA-256, HMAC-SHA- 1916 384, and HMAC-SHA-512 with IPsec", RFC 4868, 1917 DOI 10.17487/RFC4868, May 2007, 1918 . 1920 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1921 Housley, R., and W. Polk, "Internet X.509 Public Key 1922 Infrastructure Certificate and Certificate Revocation List 1923 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 1924 . 1926 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 1927 RFC 5652, DOI 10.17487/RFC5652, September 2009, 1928 . 1930 [RFC5656] Stebila, D. and J. Green, "Elliptic Curve Algorithm 1931 Integration in the Secure Shell Transport Layer", 1932 RFC 5656, DOI 10.17487/RFC5656, December 2009, 1933 . 1935 [RFC6187] Igoe, K. and D. Stebila, "X.509v3 Certificates for Secure 1936 Shell Authentication", RFC 6187, DOI 10.17487/RFC6187, 1937 March 2011, . 1939 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1940 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1941 . 1943 [RFC7919] Gillmor, D., "Negotiated Finite Field Diffie-Hellman 1944 Ephemeral Parameters for Transport Layer Security (TLS)", 1945 RFC 7919, DOI 10.17487/RFC7919, August 2016, 1946 . 1948 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 1949 RFC 7950, DOI 10.17487/RFC7950, August 2016, 1950 . 1952 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1953 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1954 May 2017, . 1956 [RFC8268] Baushke, M., "More Modular Exponentiation (MODP) Diffie- 1957 Hellman (DH) Key Exchange (KEX) Groups for Secure Shell 1958 (SSH)", RFC 8268, DOI 10.17487/RFC8268, December 2017, 1959 . 1961 [RFC8332] Bider, D., "Use of RSA Keys with SHA-256 and SHA-512 in 1962 the Secure Shell (SSH) Protocol", RFC 8332, 1963 DOI 10.17487/RFC8332, March 2018, 1964 . 1966 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 1967 Access Control Model", STD 91, RFC 8341, 1968 DOI 10.17487/RFC8341, March 2018, 1969 . 1971 [RFC8422] Nir, Y., Josefsson, S., and M. Pegourie-Gonnard, "Elliptic 1972 Curve Cryptography (ECC) Cipher Suites for Transport Layer 1973 Security (TLS) Versions 1.2 and Earlier", RFC 8422, 1974 DOI 10.17487/RFC8422, August 2018, 1975 . 1977 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1978 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1979 . 1981 5.2. Informative References 1983 [RFC2986] Nystrom, M. and B. Kaliski, "PKCS #10: Certification 1984 Request Syntax Specification Version 1.7", RFC 2986, 1985 DOI 10.17487/RFC2986, November 2000, 1986 . 1988 [RFC3174] Eastlake 3rd, D. and P. Jones, "US Secure Hash Algorithm 1 1989 (SHA1)", RFC 3174, DOI 10.17487/RFC3174, September 2001, 1990 . 1992 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1993 DOI 10.17487/RFC3688, January 2004, 1994 . 1996 [RFC4211] Schaad, J., "Internet X.509 Public Key Infrastructure 1997 Certificate Request Message Format (CRMF)", RFC 4211, 1998 DOI 10.17487/RFC4211, September 2005, 1999 . 2001 [RFC4493] Song, JH., Poovendran, R., Lee, J., and T. Iwata, "The 2002 AES-CMAC Algorithm", RFC 4493, DOI 10.17487/RFC4493, June 2003 2006, . 2005 [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure 2006 Channels", RFC 5056, DOI 10.17487/RFC5056, November 2007, 2007 . 2009 [RFC5915] Turner, S. and D. Brown, "Elliptic Curve Private Key 2010 Structure", RFC 5915, DOI 10.17487/RFC5915, June 2010, 2011 . 2013 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2014 the Network Configuration Protocol (NETCONF)", RFC 6020, 2015 DOI 10.17487/RFC6020, October 2010, 2016 . 2018 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 2019 Verification of Domain-Based Application Service Identity 2020 within Internet Public Key Infrastructure Using X.509 2021 (PKIX) Certificates in the Context of Transport Layer 2022 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 2023 2011, . 2025 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 2026 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 2027 DOI 10.17487/RFC6234, May 2011, 2028 . 2030 [RFC6239] Igoe, K., "Suite B Cryptographic Suites for Secure Shell 2031 (SSH)", RFC 6239, DOI 10.17487/RFC6239, May 2011, 2032 . 2034 [RFC6507] Groves, M., "Elliptic Curve-Based Certificateless 2035 Signatures for Identity-Based Encryption (ECCSI)", 2036 RFC 6507, DOI 10.17487/RFC6507, February 2012, 2037 . 2039 [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, 2040 "PKCS #1: RSA Cryptography Specifications Version 2.2", 2041 RFC 8017, DOI 10.17487/RFC8017, November 2016, 2042 . 2044 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 2045 Signature Algorithm (EdDSA)", RFC 8032, 2046 DOI 10.17487/RFC8032, January 2017, 2047 . 2049 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 2050 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 2051 . 2053 [RFC8439] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF 2054 Protocols", RFC 8439, DOI 10.17487/RFC8439, June 2018, 2055 . 2057 Appendix A. Examples 2059 A.1. The "asymmetric-key-pair-with-certs-grouping" Grouping 2061 The following example module has been constructed to illustrate use 2062 of the "asymmetric-key-pair-with-certs-grouping" grouping defined in 2063 the "ietf-crypto-types" module. 2065 Note that the "asymmetric-key-pair-with-certs-grouping" grouping uses 2066 both the "asymmetric-key-pair-grouping" and "end-entity-cert- 2067 grouping" groupings, and that the "asymmetric-key-pair-grouping" 2068 grouping uses the "public-key-grouping" grouping. Thus, a total of 2069 four of the five groupings defined in the "ietf-crypto-types" module 2070 are illustrated through the use of this one grouping. The only 2071 grouping not represented is the "trust-anchor-cert-grouping" 2072 grouping. 2074 module ex-crypto-types-usage { 2075 yang-version 1.1; 2077 namespace "http://example.com/ns/example-crypto-types-usage"; 2078 prefix "ectu"; 2080 import ietf-crypto-types { 2081 prefix ct; 2082 reference 2083 "RFC XXXX: Common YANG Data Types for Cryptography"; 2084 } 2086 organization 2087 "Example Corporation"; 2089 contact 2090 "Author: YANG Designer "; 2092 description 2093 "This module illustrates the grouping 2094 defined in the crypto-types draft called 2095 'asymmetric-key-pair-with-certs-grouping'."; 2097 revision "1001-01-01" { 2098 description 2099 "Initial version"; 2100 reference 2101 "RFC ????: Usage Example for RFC XXXX"; 2102 } 2104 container keys { 2105 description 2106 "A container of keys."; 2107 list key { 2108 key name; 2109 leaf name { 2110 type string; 2111 description 2112 "An arbitrary name for this key."; 2113 } 2114 uses ct:asymmetric-key-pair-with-certs-grouping; 2115 description 2116 "An asymmetric key pair with associated certificates."; 2117 } 2118 } 2119 } 2120 Given the above example usage module, the following example 2121 illustrates some configured keys. 2123 2124 2125 ex-key 2126 2128 ct:rsa2048 2129 2130 base64encodedvalue== 2131 base64encodedvalue== 2132 2133 2134 ex-cert 2135 base64encodedvalue== 2136 2137 2138 2139 2141 A.2. The "generate-hidden-key" Action 2143 The following example illustrates the "generate-hidden-key" action in 2144 use with the NETCONF protocol. 2146 REQUEST 2148 2150 2151 2152 2153 empty-key 2154 2155 2157 ct:rsa2048 2158 2159 2160 2161 2162 2163 2164 RESPONSE 2166 2168 2169 2171 A.3. The "install-hidden-key" Action 2173 The following example illustrates the "install-hidden-key" action in 2174 use with the NETCONF protocol. 2176 REQUEST 2178 2180 2181 2182 2183 empty-key 2184 2185 2187 ct:rsa2048 2188 2189 base64encodedvalue== 2190 base64encodedvalue== 2191 2192 2193 2194 2195 2197 RESPONSE 2199 2201 2202 2204 A.4. The "generate-certificate-signing-request" Action 2206 The following example illustrates the "generate-certificate-signing- 2207 request" action in use with the NETCONF protocol. 2209 REQUEST 2211 2213 2214 2215 2216 ex-key-sect571r1 2217 2218 base64encodedvalue== 2219 base64encodedvalue== 2220 2221 2222 2223 2224 2226 RESPONSE 2228 2230 2232 base64encodedvalue== 2233 2234 2236 A.5. The "certificate-expiration" Notification 2238 The following example illustrates the "certificate-expiration" 2239 notification in use with the NETCONF protocol. 2241 2243 2018-05-25T00:01:00Z 2244 2245 2246 locally-defined key 2247 2248 2249 my-cert 2250 2251 2252 2018-08-05T14:18:53-05:00 2253 2254 2255 2256 2257 2258 2259 2261 Appendix B. Change Log 2263 B.1. I-D to 00 2265 o Removed groupings and notifications. 2267 o Added typedefs for identityrefs. 2269 o Added typedefs for other RFC 5280 structures. 2271 o Added typedefs for other RFC 5652 structures. 2273 o Added convenience typedefs for RFC 4253, RFC 5280, and RFC 5652. 2275 B.2. 00 to 01 2277 o Moved groupings from the draft-ietf-netconf-keystore here. 2279 B.3. 01 to 02 2281 o Removed unwanted "mandatory" and "must" statements. 2283 o Added many new crypto algorithms (thanks Haiguang!) 2285 o Clarified in asymmetric-key-pair-with-certs-grouping, in 2286 certificates/certificate/name/description, that if the name MUST 2287 NOT match the name of a certificate that exists independently in 2288 , enabling certs installed by the manufacturer (e.g., 2289 an IDevID). 2291 B.4. 02 to 03 2293 o renamed base identity 'asymmetric-key-encryption-algorithm' to 2294 'asymmetric-key-algorithm'. 2296 o added new 'asymmetric-key-algorithm' identities for secp192r1, 2297 secp224r1, secp256r1, secp384r1, and secp521r1. 2299 o removed 'mac-algorithm' identities for mac-aes-128-ccm, mac-aes- 2300 192-ccm, mac-aes-256-ccm, mac-aes-128-gcm, mac-aes-192-gcm, mac- 2301 aes-256-gcm, and mac-chacha20-poly1305. 2303 o for all -cbc and -ctr identities, renamed base identity 2304 'symmetric-key-encryption-algorithm' to 'encryption-algorithm'. 2306 o for all -ccm and -gcm identities, renamed base identity 2307 'symmetric-key-encryption-algorithm' to 'encryption-and-mac- 2308 algorithm' and renamed the identity to remove the "enc-" prefix. 2310 o for all the 'signature-algorithm' based identities, renamed from 2311 'rsa-*' to 'rsassa-*'. 2313 o removed all of the "x509v3-" prefixed 'signature-algorithm' based 2314 identities. 2316 o added 'key-exchange-algorithm' based identities for 'rsaes-oaep' 2317 and 'rsaes-pkcs1-v1_5'. 2319 o renamed typedef 'symmetric-key-encryption-algorithm-ref' to 2320 'symmetric-key-algorithm-ref'. 2322 o renamed typedef 'asymmetric-key-encryption-algorithm-ref' to 2323 'asymmetric-key-algorithm-ref'. 2325 o added typedef 'encryption-and-mac-algorithm-ref'. 2327 o Updated copyright date, boilerplate template, affiliation, and 2328 folding algorithm. 2330 B.5. 03 to 04 2332 o ran YANG module through formatter. 2334 Acknowledgements 2336 The authors would like to thank for following for lively discussions 2337 on list and in the halls (ordered by last name): Martin Bjorklund, 2338 Balazs Kovacs, Eric Voit, and Liang Xia. 2340 Authors' Addresses 2342 Kent Watsen 2343 Watsen Networks 2345 EMail: kent+ietf@watsen.net 2347 Wang Haiguang 2348 Huawei 2350 EMail: wang.haiguang.shieldlab@huawei.com