<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc linkmailto="no" ?>
<?rfc editing="no" ?>
<?rfc comments="yes" ?>
<?rfc inline="yes"?>
<?rfc rfcedstyle="yes"?>
<!-- <?rfc-ext allow-markup-in-artwork="yes" ?> what does this do? -->
<?rfc-ext include-index="no" ?>
<!--<?rfc strict="no"?> -->
<!--<rfc xmlns:xiax="https://watsen.net/xiax" category="std" ipr="trust200902" docName="draft-ietf-netconf-crypto-types-24">-->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" consensus="true" ipr="trust200902" docName="draft-ietf-netconf-crypto-types-24" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 2.45.3 -->
  <front>
    <title abbrev="YANG Data Types and Groupings for Crypto">YANG Data Types and Groupings for Cryptography</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-netconf-crypto-types-24"/>
    <author initials="K." surname="Watsen" fullname="Kent Watsen">
      <organization>Watsen Networks</organization>
      <address>
        <email>kent+ietf@watsen.net</email>
      </address>
    </author>
    <date/>
    <area>Operations</area>
    <workgroup>NETCONF Working Group</workgroup>
    <abstract>
      <t>This document presents a YANG 1.1 (RFC 7950) module defining identities,
          typedefs, and groupings useful to cryptographic applications.</t>
    </abstract>
    <note>
      <name>Editorial Note (To be removed by RFC Editor)</name>
      <t>This draft contains placeholder values that need to be replaced
        with finalized values at the time of publication.  This note summarizes
        all of the substitutions that are needed.  No other RFC Editor
        instructions are specified elsewhere in this document.</t>
      <t>Artwork in this document contains shorthand references to drafts in
        progress.  Please apply the following replacements:
      </t>
      <ul spacing="normal">
        <li>
          <tt>AAAA</tt> --&gt; the assigned RFC value for this draft</li>
      </ul>
      <t>Artwork in this document contains placeholder values for the date
        of publication of this draft.  Please apply the following replacement:
      </t>
      <ul spacing="normal">
        <li>
          <tt>2022-07-07</tt> --&gt; the publication date of this draft</li>
      </ul>
      <t>The following Appendix section is to be removed prior to publication:
      </t>
      <ul spacing="normal">
        <li>
          <xref target="change-log" format="default"/>.  Change Log</li>
      </ul>
    </note>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>This document presents a YANG 1.1 <xref target="RFC7950" format="default"/>
          module defining identities, typedefs, and groupings useful to
          cryptographic applications.</t>
      <section anchor="collective-effort" numbered="true" toc="default">
        <name>Relation to other RFCs</name>
        <t>This document presents one or more YANG modules <xref target="RFC7950" format="default"/>
            that are part of a collection of RFCs that work together to,
            ultimately, enable the configuration of the clients and
            servers of both the NETCONF <xref target="RFC6241" format="default"/> and RESTCONF
            <xref target="RFC8040" format="default"/> protocols.</t>
        <t>The modules have been defined in a modular fashion to enable
            their use by other efforts, some of which are known to be in
            progress at the time of this writing, with many more expected
            to be defined in time.</t>
        <t>The normative dependency relationship between the various RFCs in the collection
            is presented in the below diagram. The labels in the diagram
            represent the primary purpose provided by each RFC.  Hyperlinks to
            each RFC are provided below the diagram.</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                               crypto-types
                                 ^      ^
                                /        \
                               /          \
                      truststore         keystore
                       ^     ^             ^  ^
                       |     +---------+   |  |
                       |               |   |  |
                       |      +------------+  |
tcp-client-server      |     /         |      |
   ^    ^        ssh-client-server     |      |
   |    |           ^            tls-client-server
   |    |           |              ^     ^        http-client-server
   |    |           |              |     |                 ^
   |    |           |        +-----+     +---------+       |
   |    |           |        |                     |       |
   |    +-----------|--------|--------------+      |       |
   |                |        |              |      |       |
   +-----------+    |        |              |      |       |
               |    |        |              |      |       |
               |    |        |              |      |       |
            netconf-client-server       restconf-client-server

]]></artwork>
        <!-- RFC Editor: is there anyway to flush-left the table in PDF/HTML views? -->
          <table>
          <name>Label to RFC Mapping</name>
          <tbody>
            <tr>
              <th>Label in Diagram</th>
              <th>Originating RFC</th>
            </tr>
            <tr>
              <td>crypto-types</td>
              <td>
                <xref target="I-D.ietf-netconf-crypto-types" format="default"/></td>
            </tr>
            <tr>
              <td>truststore</td>
              <td>
                <xref target="I-D.ietf-netconf-trust-anchors" format="default"/></td>
            </tr>
            <tr>
              <td>keystore</td>
              <td>
                <xref target="I-D.ietf-netconf-keystore" format="default"/></td>
            </tr>
            <tr>
              <td>tcp-client-server</td>
              <td>
                <xref target="I-D.ietf-netconf-tcp-client-server" format="default"/></td>
            </tr>
            <tr>
              <td>ssh-client-server</td>
              <td>
                <xref target="I-D.ietf-netconf-ssh-client-server" format="default"/></td>
            </tr>
            <tr>
              <td>tls-client-server</td>
              <td>
                <xref target="I-D.ietf-netconf-tls-client-server" format="default"/></td>
            </tr>
            <tr>
              <td>http-client-server</td>
              <td>
                <xref target="I-D.ietf-netconf-http-client-server" format="default"/></td>
            </tr>
            <tr>
              <td>netconf-client-server</td>
              <td>
                <xref target="I-D.ietf-netconf-netconf-client-server" format="default"/></td>
            </tr>
            <tr>
              <td>restconf-client-server</td>
              <td>
                <xref target="I-D.ietf-netconf-restconf-client-server" format="default"/></td>
            </tr>
          </tbody>
        </table>
      </section>
      <section numbered="true" toc="default">
        <name>Specification Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
            NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
            "MAY", and "OPTIONAL" in this document are to be interpreted as
            described in BCP 14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/>
            when, and only when, they appear in all capitals, as shown here.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Adherence to the NMDA</name>
        <t>This document is compliant with the Network Management Datastore
            Architecture (NMDA) <xref target="RFC8342" format="default"/>. It does not define
            any protocol accessible nodes that are "config false".</t>
      </section>
      <section numbered="true" toc="default">
        <name>Conventions</name>
        <t>Various examples used in this document use a placeholder
            value for binary data that has been base64 encoded (e.g.,
            "BASE64VALUE=").  This placeholder value is used as real
            base64 encoded structures are often many lines long and
            hence distracting to the example being presented.</t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>The "ietf-crypto-types" Module</name>
      <t>This section defines a YANG 1.1 <xref target="RFC7950" format="default"/> module called
          "ietf-crypto-types".  A high-level overview of the module is provided in
          <xref target="crypto-types-overview" format="default"/>. Examples illustrating the module's use
          are provided in <xref target="crypto-types-examples" format="default">Examples</xref>. The YANG
          module itself is defined in <xref target="crypto-types-yang-module" format="default"/>.</t>
      <section anchor="crypto-types-overview" numbered="true" toc="default">
        <name>Data Model Overview</name>
        <t>This section provides an overview of the "ietf-crypto-types" module
              in terms of its features, identities, typedefs, and groupings.</t>
        <section anchor="features" toc="exclude" numbered="true">
          <name>Features</name>
          <t>The following diagram lists all the "feature" statements
              defined in the "ietf-crypto-types" module:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
Features:
  +-- hidden-keys
  +-- password-encryption
  +-- private-key-encryption
  +-- symmetric-key-encryption
  +-- one-symmetric-key-format
  +-- one-asymmetric-key-format
  +-- cms-encrypted-data-format
  +-- cms-enveloped-data-format
  +-- certificate-expiration-notification
  +-- symmetrically-encrypted-value-format
  +-- asymmetrically-encrypted-value-format
  +-- certificate-signing-request-generation
]]></artwork>
          <aside>
            <t>The diagram above uses syntax that is similar to but not
                defined in <xref target="RFC8340" format="default"/>.</t>
          </aside>
        </section>
        <section anchor="identities" toc="exclude" numbered="true">
          <name>Identities</name>
          <t>The following diagram illustrates the relationship amongst the
              "identity" statements defined in the "ietf-crypto-types" module:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
Identities:
  +-- public-key-format
  |  +-- subject-public-key-info-format
  |  +-- ssh-public-key-format
  +-- private-key-format
  |  +-- rsa-private-key-format
  |  +-- ec-private-key-format
  |  +-- one-asymmetric-key-format
  |            {one-asymmetric-key-format}?
  +-- symmetric-key-format
  |  +-- octet-string-key-format
  |  +-- one-symmetric-key-format
  |            {one-symmetric-key-format}?
  +-- encrypted-value-format
     +-- symmetrically-encrypted-value-format
     |  |      {symmetrically-encrypted-value-format}?
     |  +-- cms-encrypted-data-format
     |         {cms-encrypted-data-format}?
     +-- asymmetrically-encrypted-value-format
        |      {asymmetrically-encrypted-value-format}?
        +-- cms-enveloped-data-format
               {cms-enveloped-data-format}?
]]></artwork>
          <aside>
            <t>The diagram above uses syntax that is similar to but not
                defined in <xref target="RFC8340" format="default"/>.</t>
          </aside>
          <t>Comments:</t>
          <ul>
            <li>The diagram shows that there are four base identities.  The
                first three identities are used to indicate the format that key
                data, while the fourth identity is used to indicate the format
                for encrypted values.  The base identities are "abstract",
                in the object oriented programming sense, in that they only
                define a "class" of formats, rather than a specific format.</li>
            <li>The various "leaf" identities define specific encoding
                formats.  The derived identities defined in this document are
                sufficient for the effort described in <xref target="collective-effort" format="default"/>
                but, by nature of them being identities, additional derived
                identities MAY be defined by future efforts.</li>
            <li>Identities used to specify uncommon formats are enabled by
                "feature" statements, allowing applications to support them
                when needed.</li>
          </ul>
        </section>
        <section anchor="typedefs" toc="exclude" numbered="true">
          <name>Typedefs</name>
          <t>The following diagram illustrates the relationship amongst the
              "typedef" statements defined in the "ietf-crypto-types" module:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
Typedefs:
  binary
    +-- csr-info
    +-- csr
    +-- x509
    |  +-- trust-anchor-cert-x509
    |  +-- end-entity-cert-x509
    +-- crl
    +-- ocsp-request
    +-- ocsp-response
    +-- cms
       +-- data-content-cms
       +-- signed-data-cms
       |  +-- trust-anchor-cert-cms
       |  +-- end-entity-cert-cms
       +-- enveloped-data-cms
       +-- digested-data-cms
       +-- encrypted-data-cms
       +-- authenticated-data-cms
]]></artwork>
          <aside>
            <t>The diagram above uses syntax that is similar to but not
                defined in <xref target="RFC8340" format="default"/>.</t>
          </aside>
          <t>Comments:</t>
          <ul>
            <li>All the typedefs defined in the "ietf-crypto-types" module
                extend the "binary" type defined in <xref target="RFC7950" format="default"/>.</li>
            <li>Additionally, all the typedefs define a type for encoding an ASN.1
                <xref target="ITU.X680.2015" format="default"/> structure using DER <xref target="ITU.X690.2015" format="default"/>.</li>
            <li>The "trust-anchor-*" and "end-entity-*" typedefs are syntactically
                identical to their base typedefs and only distinguish themselves
                by the expected nature of their content.  These typedefs are
                defined to facilitate common modeling needs.</li>
          </ul>
        </section>
        <section toc="exclude" numbered="true">
          <name>Groupings</name>
          <t>The "ietf-crypto-types" module defines the following "grouping" statements:</t>
          <ul spacing="compact">
            <li>encrypted-value-grouping</li>
            <li>password-grouping</li>
            <li>symmetric-key-grouping</li>
            <li>public-key-grouping</li>
            <li>asymmetric-key-pair-grouping</li>
            <li>trust-anchor-cert-grouping</li>
            <li>end-entity-cert-grouping</li>
            <li>generate-csr-grouping</li>
            <li>asymmetric-key-pair-with-cert-grouping</li>
            <li>asymmetric-key-pair-with-certs-grouping</li>
          </ul>
          <t>Each of these groupings are presented in the following subsections.</t>
          <section anchor="encrypted-value-grouping" numbered="true" toc="default">
            <name>The "encrypted-value-grouping" Grouping</name>
            <t>The following tree diagram <xref target="RFC8340" format="default"/> illustrates the
                "encrypted-value-grouping" grouping:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping encrypted-value-grouping:
    +-- encrypted-by
    +-- encrypted-value-format    identityref
    +-- encrypted-value           binary
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>The "encrypted-by" node is an empty container (difficult to
                  see in the diagram) that a consuming module MUST augment key
                  references into.  The "ietf-crypto-types" module is unable to
                  populate this container as the module only defines groupings.
                  <xref target="ct-usage" format="default"/> presents an example illustrating
                  a consuming module populating the "encrypted-by" container.</li>
              <li>
                <t>The "encrypted-value" node is the value, encrypted by the
                    key referenced by the "encrypted-by" node, and encoded in
                    the format appropriate for the kind of key it was encrypted
                    by.</t>
                <ul>
                  <li>If the value is encrypted by a symmetric key, then the
                      encrypted value is encoded using the format associated with
                      the "symmetrically-encrypted-value-format" identity.</li>
                  <li>If the value is encrypted by an asymmetric key, then the
                      encrypted value is encoded using the format associated with 
                      the "asymmetrically-encrypted-value-format" identity.</li>
                </ul>
                <t>See <xref target="identities" format="default"/> for information about
                    the "format" identities.</t>
              </li>
            </ul>
          </section>
          <section anchor="password-grouping" numbered="true" toc="default">
            <name>The "password-grouping" Grouping</name>
            <t>This section presents two tree diagrams <xref target="RFC8340" format="default"/> illustrating the
                "password-grouping" grouping.  The first tree diagram does
                not expand the internally used grouping statement(s):</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping password-grouping:
    +-- (password-type)
       +--:(cleartext-password)
       |  +-- cleartext-password?   string
       +--:(encrypted-password) {password-encryption}?
          +-- encrypted-password
             +---u encrypted-value-grouping
]]></artwork>
            <t>The following tree diagram expands the internally used grouping statement(s),
                enabling the grouping's full structure to be seen:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping password-grouping:
    +-- (password-type)
       +--:(cleartext-password)
       |  +-- cleartext-password?   string
       +--:(encrypted-password) {password-encryption}?
          +-- encrypted-password
             +-- encrypted-by
             +-- encrypted-value-format    identityref
             +-- encrypted-value           binary
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>
                <t>For the referenced grouping statement(s):
                </t>
                <ul spacing="compact">
                  <li>The "encrypted-value-grouping" grouping is discussed in
                      <xref target="encrypted-value-grouping" format="default"/>.</li>
                </ul>
              </li>
              <li>
                <t>The "choice" statement enables the password data to be cleartext or
                  encrypted, as follows:
                </t>
                <ul spacing="compact">
                  <li>The "cleartext-password" node can encode any cleartext value.</li>
                  <li>The "encrypted-password" node's structure is discussed in
                      <xref target="encrypted-value-grouping" format="default"/>.</li>
                </ul>
              </li>
            </ul>
          </section>
          <section anchor="symmetric-key-grouping" numbered="true" toc="default">
            <name>The "symmetric-key-grouping" Grouping</name>
            <t>This section presents two tree diagrams <xref target="RFC8340" format="default"/> illustrating the
                "symmetric-key-grouping" grouping.  The first tree diagram does
                not expand the internally used grouping statement(s):</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping symmetric-key-grouping:
    +-- key-format?            identityref
    +-- (key-type)
       +--:(cleartext-key)
       |  +-- cleartext-key?   binary
       +--:(hidden-key) {hidden-keys}?
       |  +-- hidden-key?      empty
       +--:(encrypted-key) {symmetric-key-encryption}?
          +-- encrypted-key
             +---u encrypted-value-grouping
]]></artwork>
            <t>The following tree diagram expands the internally used grouping statement(s),
                enabling the grouping's full structure to be seen:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping symmetric-key-grouping:
    +-- key-format?            identityref
    +-- (key-type)
       +--:(cleartext-key)
       |  +-- cleartext-key?   binary
       +--:(hidden-key) {hidden-keys}?
       |  +-- hidden-key?      empty
       +--:(encrypted-key) {symmetric-key-encryption}?
          +-- encrypted-key
             +-- encrypted-by
             +-- encrypted-value-format    identityref
             +-- encrypted-value           binary
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>
                <t>For the referenced grouping statement(s):
                </t>
                <ul spacing="compact">
                  <li>The "encrypted-value-grouping" grouping is discussed in
                      <xref target="encrypted-value-grouping" format="default"/>.</li>
                </ul>
              </li>
              <li>The "key-format" node is an identity-reference to the "symmetric-key-format"
                  abstract base identity discussed in <xref target="identities" format="default"/>,
                  enabling the symmetric key to be encoded using the format defined
                  by any of the derived identities.</li>
              <li>
                <t>The "choice" statement enables the private key data to be cleartext,
                  encrypted, or hidden, as follows:
                </t>
                <ul spacing="compact">
                  <li>The "cleartext-key" node can encode any cleartext key value.</li>
                  <li>The "hidden-key" node is of type "empty" as the real
                      value cannot be presented via the management interface.</li>
                  <li>The "encrypted-key" node's structure is discussed in
                      <xref target="encrypted-value-grouping" format="default"/>.</li>
                </ul>
              </li>
            </ul>
          </section>
          <section anchor="public-key-grouping" numbered="true" toc="default">
            <name>The "public-key-grouping" Grouping</name>
            <t>The following tree diagram <xref target="RFC8340" format="default"/> illustrates the
                "public-key-grouping" grouping:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping public-key-grouping:
    +-- public-key-format    identityref
    +-- public-key           binary
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>The "public-key-format" node is an identity-reference to the "public-key-format"
                  abstract base identity discussed in <xref target="identities" format="default"/>,
                  enabling the public key to be encoded using the format defined by any of
                  the derived identities.</li>
              <li>The "public-key" node is the public key data in the selected format.
                  No "choice" statement is used to hide or encrypt the public key data
                  because it is unnecessary to do so for public keys.</li>
            </ul>
          </section>
          <section anchor="asymmetric-key-pair-grouping" numbered="true" toc="default">
            <name>The "asymmetric-key-pair-grouping" Grouping</name>
            <t>This section presents two tree diagrams <xref target="RFC8340" format="default"/> illustrating the
                "asymmetric-key-pair-grouping" grouping. The first tree diagram does
                not expand the internally used grouping statement(s):</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping asymmetric-key-pair-grouping:
    +---u public-key-grouping
    +-- private-key-format?            identityref
    +-- (private-key-type)
       +--:(cleartext-private-key)
       |  +-- cleartext-private-key?   binary
       +--:(hidden-private-key) {hidden-keys}?
       |  +-- hidden-private-key?      empty
       +--:(encrypted-private-key) {private-key-encryption}?
          +-- encrypted-private-key
             +---u encrypted-value-grouping
]]></artwork>
            <t>The following tree diagram expands the internally used grouping statement(s),
                enabling the grouping's full structure to be seen:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping asymmetric-key-pair-grouping:
    +-- public-key-format              identityref
    +-- public-key                     binary
    +-- private-key-format?            identityref
    +-- (private-key-type)
       +--:(cleartext-private-key)
       |  +-- cleartext-private-key?   binary
       +--:(hidden-private-key) {hidden-keys}?
       |  +-- hidden-private-key?      empty
       +--:(encrypted-private-key) {private-key-encryption}?
          +-- encrypted-private-key
             +-- encrypted-by
             +-- encrypted-value-format    identityref
             +-- encrypted-value           binary
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>
                <t>For the referenced grouping statement(s):
                </t>
                <ul spacing="compact">
                  <li>The "public-key-grouping" grouping is discussed in
                      <xref target="public-key-grouping" format="default"/>.</li>
                  <li>The "encrypted-value-grouping" grouping is discussed in
                      <xref target="encrypted-value-grouping" format="default"/>.</li>
                </ul>
              </li>
              <li>The "private-key-format" node is an identity-reference to the "private-key-format"
                  abstract base identity discussed in <xref target="identities" format="default"/>,
                  enabling the private key to be encoded using the format defined by
                  any of the derived identities.</li>
              <li>
                <t>The "choice" statement enables the private key data to be cleartext,
                  encrypted, or hidden, as follows:
                </t>
                <ul spacing="compact">
                  <li>The "cleartext-private-key" node can encode any cleartext key value.</li>
                  <li>The "hidden-private-key" node is of type "empty" as the real
                      value cannot be presented via the management interface.</li>
                  <li>The "encrypted-private-key" node's structure is discussed in
                      <xref target="encrypted-value-grouping" format="default"/>.</li>
                </ul>
              </li>
            </ul>
          </section>
          <section anchor="certificate-expiration-grouping" numbered="true" toc="default">
            <name>The "certificate-expiration-grouping" Grouping</name>
            <t>The following tree diagram <xref target="RFC8340" format="default"/> illustrates the
                "certificate-expiration-grouping" grouping:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping certificate-expiration-grouping:
    +---n certificate-expiration
            {certificate-expiration-notification}?
       +-- expiration-date    yang:date-and-time
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>This grouping's only purpose is to define the "certificate-expiration"
                  notification statement, used by the groupings defined in
                  <xref target="trust-anchor-cert-grouping" format="default"/> and
                  <xref target="end-entity-cert-grouping" format="default"/>.</li>
              <li>The "certificate-expiration" notification enables servers to
                  notify clients when certificates are nearing expiration.</li>
              <li>The "expiration-date" node indicates when the designated
                  certificate will (or did) expire.</li>
              <li>Identification of the certificate that is expiring is built
                  into the notification itself.  For an example, please see
                  <xref target="cert-exp-notif-ex" format="default"/>.</li>
            </ul>
          </section>
          <section anchor="trust-anchor-cert-grouping" numbered="true" toc="default">
            <name>The "trust-anchor-cert-grouping" Grouping</name>
            <t>This section presents two tree diagrams <xref target="RFC8340" format="default"/> illustrating the
                "trust-anchor-cert-grouping" grouping.  The first tree diagram does
                not expand the internally used grouping statement(s):</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping trust-anchor-cert-grouping:
    +-- cert-data?                         trust-anchor-cert-cms
    +---u certificate-expiration-grouping
]]></artwork>
            <t>The following tree diagram expands the internally used grouping statement(s),
                enabling the grouping's full structure to be seen:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping trust-anchor-cert-grouping:
    +-- cert-data?                trust-anchor-cert-cms
    +---n certificate-expiration
            {certificate-expiration-notification}?
       +-- expiration-date    yang:date-and-time
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>
                <t>For the referenced grouping statement(s):
                </t>
                <ul spacing="compact">
                  <li>The "certificate-expiration-grouping" grouping is discussed in
                      <xref target="certificate-expiration-grouping" format="default"/>.</li>
                </ul>
              </li>
              <li>The "cert-data" node contains a chain of one or more certificates encoded
                  using a "signed-data-cms" typedef discussed in <xref target="typedefs" format="default"/>.</li>
            </ul>
          </section>
          <section anchor="end-entity-cert-grouping" numbered="true" toc="default">
            <name>The "end-entity-cert-grouping" Grouping</name>
            <t>This section presents two tree diagrams <xref target="RFC8340" format="default"/> illustrating the
                "end-entity-cert-grouping" grouping.  The first tree diagram does
                not expand the internally used grouping statement(s):</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping end-entity-cert-grouping:
    +-- cert-data?                         end-entity-cert-cms
    +---u certificate-expiration-grouping
]]></artwork>
            <t>The following tree diagram expands the internally used grouping statement(s),
                enabling the grouping's full structure to be seen:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping end-entity-cert-grouping:
    +-- cert-data?                end-entity-cert-cms
    +---n certificate-expiration
            {certificate-expiration-notification}?
       +-- expiration-date    yang:date-and-time
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>
                <t>For the referenced grouping statement(s):
                </t>
                <ul spacing="compact">
                  <li>The "certificate-expiration-grouping" grouping is discussed in
                      <xref target="certificate-expiration-grouping" format="default"/>.</li>
                </ul>
              </li>
              <li>The "cert-data" node contains a chain of one or more certificates encoded
                  using a "signed-data-cms" typedef discussed in <xref target="typedefs" format="default"/>.</li>
            </ul>
          </section>
          <section anchor="generate-csr-grouping" numbered="true" toc="default">
            <name>The "generate-csr-grouping" Grouping</name>
            <t>The following tree diagram <xref target="RFC8340" format="default"/> illustrates the
                "generate-csr-grouping" grouping:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping generate-csr-grouping:
    +---x generate-csr {csr-generation}?
       +---w input
       |  +---w csr-format    identityref
       |  +---w csr-info      csr-info
       +--ro output
          +--ro (csr-type)
             +--:(p10-csr)
                +--ro p10-csr?   p10-csr
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>This grouping's only purpose is to define the "generate-certificate-signing-request"
                  action statement, used by the groupings defined in <xref target="asymmetric-key-pair-with-cert-grouping" format="default"/>
                  and <xref target="asymmetric-key-pair-with-certs-grouping" format="default"/>.</li>
              <li>This action takes as input a "csr-info" type and returns a
                  "csr" type, both of which are discussed in <xref target="typedefs" format="default"/>.</li>
              <li>For an example, please see <xref target="gcsr-action" format="default"/>.</li>
            </ul>
          </section>
          <section anchor="asymmetric-key-pair-with-cert-grouping" numbered="true" toc="default">
            <name>The "asymmetric-key-pair-with-cert-grouping" Grouping</name>
            <t>This section presents two tree diagrams <xref target="RFC8340" format="default"/> illustrating the
                "asymmetric-key-pair-with-cert-grouping" grouping.  The first tree diagram does
                not expand the internally used grouping statement(s):</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping asymmetric-key-pair-with-cert-grouping:
    +---u asymmetric-key-pair-grouping
    +---u end-entity-cert-grouping
    +---u generate-csr-grouping
]]></artwork>
            <t>The following tree diagram expands the internally used grouping statement(s),
                enabling the grouping's full structure to be seen:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping asymmetric-key-pair-with-cert-grouping:
    +-- public-key-format              identityref
    +-- public-key                     binary
    +-- private-key-format?            identityref
    +-- (private-key-type)
    |  +--:(cleartext-private-key)
    |  |  +-- cleartext-private-key?   binary
    |  +--:(hidden-private-key) {hidden-keys}?
    |  |  +-- hidden-private-key?      empty
    |  +--:(encrypted-private-key) {private-key-encryption}?
    |     +-- encrypted-private-key
    |        +-- encrypted-by
    |        +-- encrypted-value-format    identityref
    |        +-- encrypted-value           binary
    +-- cert-data?                     end-entity-cert-cms
    +---n certificate-expiration
    |       {certificate-expiration-notification}?
    |  +-- expiration-date    yang:date-and-time
    +---x generate-csr {csr-generation}?
       +---w input
       |  +---w csr-format    identityref
       |  +---w csr-info      csr-info
       +--ro output
          +--ro (csr-type)
             +--:(p10-csr)
                +--ro p10-csr?   p10-csr
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>This grouping defines an asymmetric key with at most one associated
                  certificate, a commonly needed combination in protocol models.</li>
              <li>
                <t>For the referenced grouping statement(s):
                </t>
                <ul spacing="compact">
                  <li>The "asymmetric-key-pair-grouping" grouping is discussed in
                      <xref target="asymmetric-key-pair-grouping" format="default"/>.</li>
                  <li>The "end-entity-cert-grouping" grouping is discussed in
                      <xref target="end-entity-cert-grouping" format="default"/>.</li>
                  <li>The "generate-csr-grouping" grouping is discussed in
                      <xref target="generate-csr-grouping" format="default"/>.</li>
                </ul>
              </li>
            </ul>
          </section>
          <section anchor="asymmetric-key-pair-with-certs-grouping" numbered="true" toc="default">
            <name>The "asymmetric-key-pair-with-certs-grouping" Grouping</name>
            <t>This section presents two tree diagrams <xref target="RFC8340" format="default"/> illustrating the
                "asymmetric-key-pair-with-certs-grouping" grouping. The first tree diagram does
                not expand the internally used grouping statement(s):</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping asymmetric-key-pair-with-certs-grouping:
    +---u asymmetric-key-pair-grouping
    +-- certificates
    |  +-- certificate* [name]
    |     +-- name?                       string
    |     +---u end-entity-cert-grouping
    +---u generate-csr-grouping
]]></artwork>
            <t>The following tree diagram expands the internally used grouping statement(s),
                enabling the grouping's full structure to be seen:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
  grouping asymmetric-key-pair-with-certs-grouping:
    +-- public-key-format              identityref
    +-- public-key                     binary
    +-- private-key-format?            identityref
    +-- (private-key-type)
    |  +--:(cleartext-private-key)
    |  |  +-- cleartext-private-key?   binary
    |  +--:(hidden-private-key) {hidden-keys}?
    |  |  +-- hidden-private-key?      empty
    |  +--:(encrypted-private-key) {private-key-encryption}?
    |     +-- encrypted-private-key
    |        +-- encrypted-by
    |        +-- encrypted-value-format    identityref
    |        +-- encrypted-value           binary
    +-- certificates
    |  +-- certificate* [name]
    |     +-- name?                     string
    |     +-- cert-data                 end-entity-cert-cms
    |     +---n certificate-expiration
    |             {certificate-expiration-notification}?
    |        +-- expiration-date    yang:date-and-time
    +---x generate-csr {csr-generation}?
       +---w input
       |  +---w csr-format    identityref
       |  +---w csr-info      csr-info
       +--ro output
          +--ro (csr-type)
             +--:(p10-csr)
                +--ro p10-csr?   p10-csr
]]></artwork>
            <t>Comments:</t>
            <ul>
              <li>This grouping defines an asymmetric key with one or more
                  associated certificates, a commonly needed combination in
                  configuration models.</li>
              <li>
                <t>For the referenced grouping statement(s):
                </t>
                <ul spacing="compact">
                  <li>The "asymmetric-key-pair-grouping" grouping is discussed in
                      <xref target="asymmetric-key-pair-grouping" format="default"/>.</li>
                  <li>The "end-entity-cert-grouping" grouping is discussed in
                      <xref target="end-entity-cert-grouping" format="default"/>.</li>
                  <li>The "generate-csr-grouping" grouping is discussed in
                      <xref target="generate-csr-grouping" format="default"/>.</li>
                </ul>
              </li>
            </ul>
          </section>
        </section>
        <section toc="exclude" numbered="true">
          <name>Protocol-accessible Nodes</name>
          <t>The "ietf-crypto-types" module does not contain any protocol-accessible nodes,
              but the module needs to be "implemented", as described in <relref section="5.6.5" target="RFC7950"/>, in order for the identities in
              <xref target="identities" format="default"/> to be defined.</t>
        </section>
      </section>
      <section anchor="crypto-types-examples" numbered="true" toc="default">
        <name>Example Usage</name>
        <section anchor="ct-usage" toc="exclude" numbered="true">
          <name>The "symmetric-key-grouping" and             "asymmetric-key-pair-with-certs-grouping" Grouping</name>
          <t>The following non-normative module is constructed in order to illustrate the
              use of the "symmetric-key-grouping" (<xref target="symmetric-key-grouping" format="default"/>), the
              "asymmetric-key-pair-with-certs-grouping" (<xref target="asymmetric-key-pair-with-certs-grouping" format="default"/>),
              and the "password-grouping" (<xref target="password-grouping" format="default"/>) grouping statements.</t>
          <t>Notably, this example illustrates a hidden asymmetric key (ex-hidden-asymmetric-key)
              has been used to encrypt a symmetric key (ex-encrypted-one-symmetric-based-symmetric-key)
              that has been used to encrypt another asymmetric key (ex-encrypted-rsa-based-asymmetric-key).
              Additionally, the symmetric key is also used to encrypt a password (ex-encrypted-password).</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
module ex-crypto-types-usage {
  yang-version 1.1;
  namespace "http://example.com/ns/example-crypto-types-usage";
  prefix ectu;

  import ietf-crypto-types {
    prefix ct;
    reference
      "RFC AAAA: YANG Data Types and Groupings for Cryptography";
  }

  organization
    "Example Corporation";
  contact
    "YANG Designer <mailto:yang.designer@example.com>";

  description
    "This module illustrates the 'symmetric-key-grouping'
     and 'asymmetric-key-grouping' groupings defined in
     the 'ietf-crypto-types' module defined in RFC AAAA.";

  revision 2022-07-07 {
    description
      "Initial version";
    reference
      "RFC AAAA: Common YANG Data Types for Cryptography";
  }

  container symmetric-keys {
    description
      "A container of symmetric keys.";
    list symmetric-key {
      key "name";
      description
        "A symmetric key";
      leaf name {
        type string;
        description
          "An arbitrary name for this key.";
      }
      uses ct:symmetric-key-grouping {
        augment "key-type/encrypted-key/encrypted-key/"
              + "encrypted-by" {
          description
            "Augments in a choice statement enabling the
             encrypting key to be any other symmetric or
             asymmetric key.";
          uses encrypted-by-choice-grouping;
        }
      }
    }
  }
  container asymmetric-keys {
    description
      "A container of asymmetric keys.";
    list asymmetric-key {
      key "name";
      leaf name {
        type string;
        description
          "An arbitrary name for this key.";
      }
      uses ct:asymmetric-key-pair-with-certs-grouping {
        augment "private-key-type/encrypted-private-key/"
              + "encrypted-private-key/encrypted-by" {
          description
            "Augments in a choice statement enabling the
             encrypting key to be any other symmetric or
             asymmetric key.";
          uses encrypted-by-choice-grouping;
        }
      }
      description
        "An asymmetric key pair with associated certificates.";
    }
  }
  container passwords {
    description
      "A container of passwords.";
    list password {
      key "name";
      leaf name {
        type string;
        description
          "An arbitrary name for this password.";
      }
      uses ct:password-grouping {
        augment "password-type/encrypted-password/"
              + "encrypted-password/encrypted-by" {
          description
            "Augments in a choice statement enabling the
             encrypting key to be any symmetric or
             asymmetric key.";
          uses encrypted-by-choice-grouping;
        }
      }
      description
        "A password.";
    }
  }

  grouping encrypted-by-choice-grouping {
    description
      "A grouping that defines a choice enabling references
       to other keys.";
    choice encrypted-by-choice {
      mandatory true;
      description
        "A choice amongst other symmetric or asymmetric keys.";
      case symmetric-key-ref {
        leaf symmetric-key-ref {
          type leafref {
            path "/ectu:symmetric-keys/ectu:symmetric-key/"
               + "ectu:name";
          }
          description
            "Identifies the symmetric key that encrypts this key.";
        }
      }
      case asymmetric-key-ref {
        leaf asymmetric-key-ref {
          type leafref {
            path "/ectu:asymmetric-keys/ectu:asymmetric-key/"
               + "ectu:name";
          }
          description
            "Identifies the asymmetric key that encrypts this key.";
        }
      }
    }
  }
}
]]></artwork>
          <t>The tree diagram <xref target="RFC8340" format="default"/> for this example module follows:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
module: ex-crypto-types-usage
  +--rw symmetric-keys
  |  +--rw symmetric-key* [name]
  |     +--rw name                   string
  |     +--rw key-format?            identityref
  |     +--rw (key-type)
  |        +--:(cleartext-key)
  |        |  +--rw cleartext-key?   binary
  |        +--:(hidden-key) {hidden-keys}?
  |        |  +--rw hidden-key?      empty
  |        +--:(encrypted-key) {symmetric-key-encryption}?
  |           +--rw encrypted-key
  |              +--rw encrypted-by
  |              |  +--rw (encrypted-by-choice)
  |              |     +--:(symmetric-key-ref)
  |              |     |  +--rw symmetric-key-ref?    leafref
  |              |     +--:(asymmetric-key-ref)
  |              |        +--rw asymmetric-key-ref?   leafref
  |              +--rw encrypted-value-format    identityref
  |              +--rw encrypted-value           binary
  +--rw asymmetric-keys
  |  +--rw asymmetric-key* [name]
  |     +--rw name                           string
  |     +--rw public-key-format              identityref
  |     +--rw public-key                     binary
  |     +--rw private-key-format?            identityref
  |     +--rw (private-key-type)
  |     |  +--:(cleartext-private-key)
  |     |  |  +--rw cleartext-private-key?   binary
  |     |  +--:(hidden-private-key) {hidden-keys}?
  |     |  |  +--rw hidden-private-key?      empty
  |     |  +--:(encrypted-private-key) {private-key-encryption}?
  |     |     +--rw encrypted-private-key
  |     |        +--rw encrypted-by
  |     |        |  +--rw (encrypted-by-choice)
  |     |        |     +--:(symmetric-key-ref)
  |     |        |     |  +--rw symmetric-key-ref?    leafref
  |     |        |     +--:(asymmetric-key-ref)
  |     |        |        +--rw asymmetric-key-ref?   leafref
  |     |        +--rw encrypted-value-format    identityref
  |     |        +--rw encrypted-value           binary
  |     +--rw certificates
  |     |  +--rw certificate* [name]
  |     |     +--rw name                      string
  |     |     +--rw cert-data                 end-entity-cert-cms
  |     |     +---n certificate-expiration
  |     |             {certificate-expiration-notification}?
  |     |        +-- expiration-date    yang:date-and-time
  |     +---x generate-csr {csr-generation}?
  |        +---w input
  |        |  +---w csr-format    identityref
  |        |  +---w csr-info      csr-info
  |        +--ro output
  |           +--ro (csr-type)
  |              +--:(p10-csr)
  |                 +--ro p10-csr?   p10-csr
  +--rw passwords
     +--rw password* [name]
        +--rw name                        string
        +--rw (password-type)
           +--:(cleartext-password)
           |  +--rw cleartext-password?   string
           +--:(encrypted-password) {password-encryption}?
              +--rw encrypted-password
                 +--rw encrypted-by
                 |  +--rw (encrypted-by-choice)
                 |     +--:(symmetric-key-ref)
                 |     |  +--rw symmetric-key-ref?    leafref
                 |     +--:(asymmetric-key-ref)
                 |        +--rw asymmetric-key-ref?   leafref
                 +--rw encrypted-value-format    identityref
                 +--rw encrypted-value           binary
]]></artwork>
          <t>Finally, the following example illustrates various symmetric and asymmetric keys
              as they might appear in configuration:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<symmetric-keys
  xmlns="http://example.com/ns/example-crypto-types-usage"
  xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
  <symmetric-key>
    <name>ex-hidden-symmetric-key</name>
    <hidden-key/>
  </symmetric-key>
  <symmetric-key>
    <name>ex-octet-string-based-symmetric-key</name>
    <key-format>ct:octet-string-key-format</key-format>
    <cleartext-key>BASE64VALUE=</cleartext-key>
  </symmetric-key>
  <symmetric-key>
    <name>ex-one-symmetric-based-symmetric-key</name>
    <key-format>ct:one-symmetric-key-format</key-format>
    <cleartext-key>BASE64VALUE=</cleartext-key>
  </symmetric-key>
  <symmetric-key>
    <name>ex-encrypted-one-symmetric-based-symmetric-key</name>
    <key-format>ct:one-symmetric-key-format</key-format>
    <encrypted-key>
      <encrypted-by>
        <asymmetric-key-ref>ex-hidden-asymmetric-key</asymmetric-key\
-ref>
      </encrypted-by>
      <encrypted-value-format>ct:cms-enveloped-data-format</encrypte\
d-value-format>
      <encrypted-value>BASE64VALUE=</encrypted-value>
    </encrypted-key>
  </symmetric-key>
</symmetric-keys>

<asymmetric-keys
  xmlns="http://example.com/ns/example-crypto-types-usage"
  xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
  <asymmetric-key>
    <name>ex-hidden-asymmetric-key</name>
    <public-key-format>ct:subject-public-key-info-format</public-key\
-format>
    <public-key>BASE64VALUE=</public-key>
    <hidden-private-key/>
    <certificates>
      <certificate>
        <name>ex-hidden-asymmetric-key-cert</name>
        <cert-data>BASE64VALUE=</cert-data>
      </certificate>
    </certificates>
  </asymmetric-key>
  <asymmetric-key>
    <name>ex-rsa-based-asymmetric-key</name>
    <public-key-format>ct:subject-public-key-info-format</public-key\
-format>
    <public-key>BASE64VALUE=</public-key>
    <private-key-format>ct:rsa-private-key-format</private-key-forma\
t>
    <cleartext-private-key>BASE64VALUE=</cleartext-private-key>
    <certificates>
      <certificate>
        <name>ex-cert</name>
        <cert-data>BASE64VALUE=</cert-data>
      </certificate>
    </certificates>
  </asymmetric-key>
  <asymmetric-key>
    <name>ex-one-asymmetric-based-asymmetric-key</name>
    <public-key-format>ct:subject-public-key-info-format</public-key\
-format>
    <public-key>BASE64VALUE=</public-key>
    <private-key-format>ct:one-asymmetric-key-format</private-key-fo\
rmat>
    <cleartext-private-key>BASE64VALUE=</cleartext-private-key>
  </asymmetric-key>
  <asymmetric-key>
    <name>ex-encrypted-rsa-based-asymmetric-key</name>
    <public-key-format>ct:subject-public-key-info-format</public-key\
-format>
    <public-key>BASE64VALUE=</public-key>
    <private-key-format>ct:rsa-private-key-format</private-key-forma\
t>
    <encrypted-private-key>
      <encrypted-by>
        <symmetric-key-ref>ex-encrypted-one-symmetric-based-symmetri\
c-key</symmetric-key-ref>
      </encrypted-by>
      <encrypted-value-format>ct:cms-encrypted-data-format</encrypte\
d-value-format>
      <encrypted-value>BASE64VALUE=</encrypted-value>
    </encrypted-private-key>
  </asymmetric-key>
</asymmetric-keys>

<passwords
  xmlns="http://example.com/ns/example-crypto-types-usage"
  xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
  <password>
    <name>ex-cleartext-password</name>
    <cleartext-password>super-secret</cleartext-password>
  </password>
  <password>
    <name>ex-encrypted-password</name>
    <encrypted-password>
      <encrypted-by>
        <symmetric-key-ref>ex-encrypted-one-symmetric-based-symmetri\
c-key</symmetric-key-ref>
      </encrypted-by>
      <encrypted-value-format>ct:cms-encrypted-data-format</encrypte\
d-value-format>
      <encrypted-value>BASE64VALUE=</encrypted-value>
    </encrypted-password>
  </password>
</passwords>
]]></artwork>
        </section>
        <section anchor="gcsr-action" toc="exclude" numbered="true">
          <name>The "generate-certificate-signing-request" Action</name>
          <t>The following example illustrates the "generate-certificate-signing-request"
              action, discussed in <xref target="generate-csr-grouping" format="default"/>, with the NETCONF protocol.</t>
          <t keepWithNext="true">REQUEST</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
<rpc message-id="101"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
  xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
  <action xmlns="urn:ietf:params:xml:ns:yang:1">
    <asymmetric-keys
      xmlns="http://example.com/ns/example-crypto-types-usage">
      <asymmetric-key>
        <name>ex-hidden-asymmetric-key</name>
        <generate-csr>
          <csr-format>ct:p10-csr</csr-format>
          <csr-info>BASE64VALUE=</csr-info>
        </generate-csr>
      </asymmetric-key>
    </asymmetric-keys>
  </action>
</rpc>
]]></artwork>
          <t keepWithNext="true">RESPONSE</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<rpc-reply message-id="101"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <p10-csr xmlns="http://example.com/ns/example-crypto-types-usage">\
BASE64VALUE=</p10-csr>
</rpc-reply>
]]></artwork>
        </section>
        <section anchor="cert-exp-notif-ex" toc="exclude" numbered="true">
          <name>The "certificate-expiration" Notification</name>
          <t>The following example illustrates the "certificate-expiration"
              notification, discussed in <xref target="certificate-expiration-grouping" format="default"/>,
              with the NETCONF protocol.</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<notification
  xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
  <eventTime>2018-05-25T00:01:00Z</eventTime>
  <asymmetric-keys xmlns="http://example.com/ns/example-crypto-types\
-usage">
    <asymmetric-key>
      <name>ex-hidden-asymmetric-key</name>
      <certificates>
        <certificate>
          <name>ex-hidden-asymmetric-key-cert</name>
          <certificate-expiration>
            <expiration-date>2018-08-05T14:18:53-05:00</expiration-d\
ate>
          </certificate-expiration>
        </certificate>
      </certificates>
    </asymmetric-key>
  </asymmetric-keys>
</notification>
]]></artwork>
        </section>
      </section>
      <section anchor="crypto-types-yang-module" numbered="true" toc="default">
        <name>YANG Module</name>
        <t>This module has normative references to <xref target="RFC2119" format="default"/>,
          <xref target="RFC2986" format="default"/>, <xref target="RFC3447" format="default"/>, <xref target="RFC4253" format="default"/>,
          <xref target="RFC5280" format="default"/>, <xref target="RFC5652" format="default"/>, <xref target="RFC5915" format="default"/>,
          <xref target="RFC5958" format="default"/>, <xref target="RFC6031" format="default"/>, <xref target="RFC6125" format="default"/>,
          <xref target="RFC6991" format="default"/>, <xref target="RFC7093" format="default"/>, <xref target="RFC8174" format="default"/>,
          <xref target="RFC8341" format="default"/>, and <xref target="ITU.X690.2015" format="default"/>.</t>
        <t keepWithNext="true">&lt;CODE BEGINS&gt; file "ietf-crypto-types@2022-07-07.yang"</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
module ietf-crypto-types {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-crypto-types";
  prefix ct;

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 6991: Common YANG Data Types";
  }

  import ietf-netconf-acm {
    prefix nacm;
    reference
      "RFC 8341: Network Configuration Access Control Model";
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";

  contact
    "WG Web:   https://datatracker.ietf.org/wg/netconf
     WG List:  NETCONF WG list <mailto:netconf@ietf.org>
     Author:   Kent Watsen <mailto:kent+ietf@watsen.net>";

  description
    "This module defines common YANG types for cryptographic
     applications.

     Copyright (c) 2022 IETF Trust and the persons identified
     as authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with
     or without modification, is permitted pursuant to, and
     subject to the license terms contained in, the Revised
     BSD License set forth in Section 4.c of the IETF Trust's
     Legal Provisions Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC AAAA
     (https://www.rfc-editor.org/info/rfcAAAA); see the RFC
     itself for full legal notices.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
     'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
     'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
     are to be interpreted as described in BCP 14 (RFC 2119)
     (RFC 8174) when, and only when, they appear in all
     capitals, as shown here.";

  revision 2022-07-07 {
    description
      "Initial version";
    reference
      "RFC AAAA: YANG Data Types and Groupings for Cryptography";
  }

  /****************/
  /*   Features   */
  /****************/

  feature one-symmetric-key-format {
    description
      "Indicates that the server supports the
       'one-symmetric-key-format' identity.";
  }

  feature one-asymmetric-key-format {
    description
      "Indicates that the server supports the
       'one-asymmetric-key-format' identity.";
  }

  feature symmetrically-encrypted-value-format {
    description
      "Indicates that the server supports the
       'symmetrically-encrypted-value-format' identity.";
  }

  feature asymmetrically-encrypted-value-format {
    description
      "Indicates that the server supports the
       'asymmetrically-encrypted-value-format' identity.";
  }

  feature cms-enveloped-data-format {
    description
      "Indicates that the server supports the
       'cms-enveloped-data-format' identity.";
  }

  feature cms-encrypted-data-format {
    description
      "Indicates that the server supports the
       'cms-encrypted-data-format' identity.";
  }

  feature csr-generation {
    description
      "Indicates that the server implements the
       'generate-csr' action.";
  }

  feature p10-based-csrs {
    description
      "Indicates that the erver implements support
       for generating P10-based CSRs, as defined
       in RFC 2986.";
    reference
      "RFC 2986: PKCS #10: Certification Request Syntax
                 Specification Version 1.7";
  }

  feature certificate-expiration-notification {
    description
      "Indicates that the server implements the
       'certificate-expiration' notification.";
  }

  feature hidden-keys {
    description
      "Indicates that the server supports hidden keys.";
  }

  feature password-encryption {
    description
      "Indicates that the server supports password
       encryption.";
  }

  feature symmetric-key-encryption {
    description
      "Indicates that the server supports encryption
       of symmetric keys.";
  }

  feature private-key-encryption {
    description
      "Indicates that the server supports encryption
       of private keys.";
  }

  /*************************************************/
  /*   Base Identities for Key Format Structures   */
  /*************************************************/

  identity symmetric-key-format {
    description
      "Base key-format identity for symmetric keys.";
  }

  identity public-key-format {
    description
      "Base key-format identity for public keys.";
  }

  identity private-key-format {
    description
      "Base key-format identity for private keys.";
  }

  /****************************************************/
  /*   Identities for Private Key Format Structures   */
  /****************************************************/

  identity rsa-private-key-format {
    base private-key-format;
    description
      "Indicates that the private key value is encoded
       as an RSAPrivateKey (from RFC 3447).";
    reference
      "RFC 3447: PKCS #1: RSA Cryptography
                 Specifications Version 2.2";
  }

  identity ec-private-key-format {
    base private-key-format;
    description
      "Indicates that the private key value is encoded
       as an ECPrivateKey (from RFC 5915)";
    reference
      "RFC 5915: Elliptic Curve Private Key Structure";
  }

  identity one-asymmetric-key-format {
    if-feature "one-asymmetric-key-format";
    base private-key-format;
    description
      "Indicates that the private key value is a CMS
       OneAsymmetricKey structure, as defined in RFC 5958,
       encoded using ASN.1 distinguished encoding rules
       (DER), as specified in ITU-T X.690.";
    reference
      "RFC 5958: Asymmetric Key Packages
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  /***************************************************/
  /*   Identities for Public Key Format Structures   */
  /***************************************************/

  identity ssh-public-key-format {
    base public-key-format;
    description
      "Indicates that the public key value is an SSH public key,
       as specified by RFC 4253, Section 6.6, i.e.:

         string    certificate or public key format
                   identifier
         byte[n]   key/certificate data.";
    reference
      "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
  }

  identity subject-public-key-info-format {
    base public-key-format;
    description
      "Indicates that the public key value is a SubjectPublicKeyInfo
       structure, as described in RFC 5280 encoded using ASN.1
       distinguished encoding rules (DER), as specified in
       ITU-T X.690.";
    reference
      "RFC 5280:
         Internet X.509 Public Key Infrastructure Certificate
         and Certificate Revocation List (CRL) Profile
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  /******************************************************/
  /*   Identities for Symmetric Key Format Structures   */
  /******************************************************/

  identity octet-string-key-format {
    base symmetric-key-format;
    description
      "Indicates that the key is encoded as a raw octet string.
       The length of the octet string MUST be appropriate for
       the associated algorithm's block size.

       How the associated algorithm is known is outside the
       scope of this module.  This statement also applies when
       the octet string has been encrypted.";
  }

  identity one-symmetric-key-format {
    if-feature "one-symmetric-key-format";
    base symmetric-key-format;
    description
      "Indicates that the private key value is a CMS
       OneSymmetricKey structure, as defined in RFC 6031,
       encoded using ASN.1 distinguished encoding rules
       (DER), as specified in ITU-T X.690.";
    reference
      "RFC 6031: Cryptographic Message Syntax (CMS)
                 Symmetric Key Package Content Type
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  /*************************************************/
  /*   Identities for Encrypted Value Structures   */
  /*************************************************/

  identity encrypted-value-format {
    description
      "Base format identity for encrypted values.";
  }

  identity symmetrically-encrypted-value-format {
    if-feature "symmetrically-encrypted-value-format";
    base encrypted-value-format;
    description
      "Base format identity for symmetrically encrypted
       values.";
  }

  identity asymmetrically-encrypted-value-format {
    if-feature "asymmetrically-encrypted-value-format";
    base encrypted-value-format;
    description
      "Base format identity for asymmetrically encrypted
       values.";
  }

  identity cms-encrypted-data-format {
    if-feature "cms-encrypted-data-format";
    base symmetrically-encrypted-value-format;
    description
      "Indicates that the encrypted value conforms to
       the 'encrypted-data-cms' type with the constraint
       that the 'unprotectedAttrs' value is not set.";
    reference
      "RFC 5652: Cryptographic Message Syntax (CMS)
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  identity cms-enveloped-data-format {
    if-feature "cms-enveloped-data-format";
    base asymmetrically-encrypted-value-format;
    description
      "Indicates that the encrypted value conforms to the
       'enveloped-data-cms' type with the following constraints:

       The EnvelopedData structure MUST have exactly one
       'RecipientInfo'.

       If the asymmetric key supports public key cryptography
       (e.g., RSA), then the 'RecipientInfo' must be a
       'KeyTransRecipientInfo' with the 'RecipientIdentifier'
       using a 'subjectKeyIdentifier' with the value set using
       'method 1' in RFC 7093 over the recipient's public key.

       Otherwise, if the asymmetric key supports key agreement
       (e.g., ECC), then the 'RecipientInfo' must be a
       'KeyAgreeRecipientInfo'.  The 'OriginatorIdentifierOrKey'
       value must use the 'OriginatorPublicKey' alternative.
       The 'UserKeyingMaterial' value must not be present.
       There must be exactly one 'RecipientEncryptedKeys' value
       having the 'KeyAgreeRecipientIdentifier' set to 'rKeyId'
       with the value set using 'method 1' in RFC 7093 over the
       recipient's public key.";
    reference
      "RFC 5652: Cryptographic Message Syntax (CMS)
       RFC 7093:
         Additional Methods for Generating Key
         Identifiers Values
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  /*********************************************************/
  /*   Identities for Certificate Signing Request Formats  */
  /*********************************************************/

  identity csr-format {
    description
      "A base identity for the certificate signing request
       formats.  Additional derived identities MAY be defined
       by future efforts.";
  }

  identity p10-csr {
    if-feature "p10-based-csrs";
    base csr-format;
    description
      "Indicates the 'CertificationRequest' structure
       defined in RFC 2986.";
    reference
      "RFC 2986: PKCS #10: Certification Request Syntax
                 Specification Version 1.7";
  }


  /***************************************************/
  /*   Typedefs for ASN.1 structures from RFC 2986   */
  /***************************************************/

  typedef csr-info {
    type binary;
    description
      "A CertificationRequestInfo structure, as defined in
       RFC 2986, encoded using ASN.1 distinguished encoding
       rules (DER), as specified in ITU-T X.690.";
    reference
      "RFC 2986: PKCS #10: Certification Request Syntax
                 Specification Version 1.7
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  typedef p10-csr {
    type binary;
    description
      "A CertificationRequest structure, as specified in
       RFC 2986, encoded using ASN.1 distinguished encoding
       rules (DER), as specified in ITU-T X.690.";
    reference
      "RFC 2986:
         PKCS #10: Certification Request Syntax Specification
         Version 1.7
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  /***************************************************/
  /*   Typedefs for ASN.1 structures from RFC 5280   */
  /***************************************************/

  typedef x509 {
    type binary;
    description
      "A Certificate structure, as specified in RFC 5280,
       encoded using ASN.1 distinguished encoding rules (DER),
       as specified in ITU-T X.690.";
    reference
      "RFC 5280:
         Internet X.509 Public Key Infrastructure Certificate
         and Certificate Revocation List (CRL) Profile
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  typedef crl {
    type binary;
    description
      "A CertificateList structure, as specified in RFC 5280,
       encoded using ASN.1 distinguished encoding rules (DER),
       as specified in ITU-T X.690.";
    reference
      "RFC 5280:
         Internet X.509 Public Key Infrastructure Certificate
         and Certificate Revocation List (CRL) Profile
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  /***************************************************/
  /*   Typedefs for ASN.1 structures from RFC 6960   */
  /***************************************************/

  typedef oscp-request {
    type binary;
    description
      "A OCSPRequest structure, as specified in RFC 6960,
       encoded using ASN.1 distinguished encoding rules
       (DER), as specified in ITU-T X.690.";
    reference
      "RFC 6960:
         X.509 Internet Public Key Infrastructure Online
         Certificate Status Protocol - OCSP
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  typedef oscp-response {
    type binary;
    description
      "A OCSPResponse structure, as specified in RFC 6960,
       encoded using ASN.1 distinguished encoding rules
       (DER), as specified in ITU-T X.690.";
    reference
      "RFC 6960:
         X.509 Internet Public Key Infrastructure Online
         Certificate Status Protocol - OCSP
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  /***********************************************/
  /*   Typedefs for ASN.1 structures from 5652   */
  /***********************************************/

  typedef cms {
    type binary;
    description
      "A ContentInfo structure, as specified in RFC 5652,
       encoded using ASN.1 distinguished encoding rules (DER),
       as specified in ITU-T X.690.";
    reference
      "RFC 5652:
         Cryptographic Message Syntax (CMS)
       ITU-T X.690:
         Information technology - ASN.1 encoding rules:
         Specification of Basic Encoding Rules (BER),
         Canonical Encoding Rules (CER) and Distinguished
         Encoding Rules (DER).";
  }

  typedef data-content-cms {
    type cms;
    description
      "A CMS structure whose top-most content type MUST be the
       data content type, as described by Section 4 in RFC 5652.";
    reference
      "RFC 5652: Cryptographic Message Syntax (CMS)";
  }

  typedef signed-data-cms {
    type cms;
    description
      "A CMS structure whose top-most content type MUST be the
       signed-data content type, as described by Section 5 in
       RFC 5652.";
    reference
      "RFC 5652: Cryptographic Message Syntax (CMS)";
  }

  typedef enveloped-data-cms {
    type cms;
    description
      "A CMS structure whose top-most content type MUST be the
       enveloped-data content type, as described by Section 6
       in RFC 5652.";
    reference
      "RFC 5652: Cryptographic Message Syntax (CMS)";
  }

  typedef digested-data-cms {
    type cms;
    description
      "A CMS structure whose top-most content type MUST be the
       digested-data content type, as described by Section 7
       in RFC 5652.";
    reference
      "RFC 5652: Cryptographic Message Syntax (CMS)";
  }

  typedef encrypted-data-cms {
    type cms;
    description
      "A CMS structure whose top-most content type MUST be the
       encrypted-data content type, as described by Section 8
       in RFC 5652.";
    reference
      "RFC 5652: Cryptographic Message Syntax (CMS)";
  }

  typedef authenticated-data-cms {
    type cms;
    description
      "A CMS structure whose top-most content type MUST be the
       authenticated-data content type, as described by Section 9
       in RFC 5652.";
    reference
      "RFC 5652: Cryptographic Message Syntax (CMS)";
  }

  /*********************************************************/
  /*   Typedefs for ASN.1 structures related to RFC 5280   */
  /*********************************************************/

  typedef trust-anchor-cert-x509 {
    type x509;
    description
      "A Certificate structure that MUST encode a self-signed
       root certificate.";
  }

  typedef end-entity-cert-x509 {
    type x509;
    description
      "A Certificate structure that MUST encode a certificate
       that is neither self-signed nor having Basic constraint
       CA true.";
  }

  /*********************************************************/
  /*   Typedefs for ASN.1 structures related to RFC 5652   */
  /*********************************************************/

  typedef trust-anchor-cert-cms {
    type signed-data-cms;
    description
      "A CMS SignedData structure that MUST contain the chain of
       X.509 certificates needed to authenticate the certificate
       presented by a client or end-entity.

       The CMS MUST contain only a single chain of certificates.
       The client or end-entity certificate MUST only authenticate
       to last intermediate CA certificate listed in the chain.

       In all cases, the chain MUST include a self-signed root
       certificate.  In the case where the root certificate is
       itself the issuer of the client or end-entity certificate,
       only one certificate is present.

       This CMS structure MAY (as applicable where this type is
       used) also contain suitably fresh (as defined by local
       policy) revocation objects with which the device can
       verify the revocation status of the certificates.

       This CMS encodes the degenerate form of the SignedData
       structure that is commonly used to disseminate X.509
       certificates and revocation objects (RFC 5280).";
    reference
      "RFC 5280:
         Internet X.509 Public Key Infrastructure Certificate
         and Certificate Revocation List (CRL) Profile.";
  }

  typedef end-entity-cert-cms {
    type signed-data-cms;
    description
      "A CMS SignedData structure that MUST contain the end
       entity certificate itself, and MAY contain any number
       of intermediate certificates leading up to a trust
       anchor certificate.  The trust anchor certificate
       MAY be included as well.

       The CMS MUST contain a single end entity certificate.
       The CMS MUST NOT contain any spurious certificates.

       This CMS structure MAY (as applicable where this type is
       used) also contain suitably fresh (as defined by local
       policy) revocation objects with which the device can
       verify the revocation status of the certificates.

       This CMS encodes the degenerate form of the SignedData
       structure that is commonly used to disseminate X.509
       certificates and revocation objects (RFC 5280).";
    reference
      "RFC 5280:
         Internet X.509 Public Key Infrastructure Certificate
         and Certificate Revocation List (CRL) Profile.";
  }

  /*****************/
  /*   Groupings   */
  /*****************/

  grouping encrypted-value-grouping {
    description
      "A reusable grouping for a value that has been encrypted by
       a referenced symmetric or asymmetric key.";
    container encrypted-by {
      nacm:default-deny-write;
      description
        "An empty container enabling a reference to the key that
         encrypted the value to be augmented in.  The referenced
         key MUST be a symmetric key or an asymmetric key.

         A symmetric key MUST be referenced via a leaf node called
         'symmetric-key-ref'.  An asymmetric key MUST be referenced
         via a leaf node called 'asymmetric-key-ref'.

         The leaf nodes MUST be direct descendants in the data tree,
         and MAY be direct descendants in the schema tree.";
    }
    leaf encrypted-value-format {
      type identityref {
        base encrypted-value-format;
      }
      mandatory true;
      description
        "Identifies the format of the 'encrypted-value' leaf.

         If 'encrypted-by' points to a symmetric key, then a
         'symmetrically-encrypted-value-format' based identity
         MUST by set (e.g., cms-encrypted-data-format).

         If 'encrypted-by' points to an asymmetric key, then an
         'asymmetrically-encrypted-value-format' based identity
         MUST by set (e.g., cms-enveloped-data-format).";
    }
    leaf encrypted-value {
      nacm:default-deny-write;
      type binary;
      must '../encrypted-by';
      mandatory true;
      description
        "The value, encrypted using the referenced symmetric
         or asymmetric key.  The value MUST be encoded using
         the format associated with the 'encrypted-value-format'
         leaf.";
    }
  }

  grouping password-grouping {
    description
      "A password that MAY be encrypted.";
    choice password-type {
      nacm:default-deny-write;
      mandatory true;
      description
        "Choice between password types.";
      case cleartext-password {
        leaf cleartext-password {
          nacm:default-deny-all;
          type string;
          description
            "The cleartext value of the password.";
        }
      }
      case encrypted-password {
        if-feature "password-encryption";
        container encrypted-password {
          description
            "A container for the encrypted password value.";
          uses encrypted-value-grouping;
        }
      }
    }
  }

  grouping symmetric-key-grouping {
    description
      "A symmetric key.";
    leaf key-format {
      nacm:default-deny-write;
      type identityref {
        base symmetric-key-format;
      }
      description
        "Identifies the symmetric key's format.  Implementations
         SHOULD ensure that the incoming symmetric key value is
         encoded in the specified format.

         For encrypted keys, the value is the same as it would
         have been if the key were not encrypted.";
    }
    choice key-type {
      nacm:default-deny-write;
      mandatory true;
      description
        "Choice between key types.";
      case cleartext-key {
        leaf cleartext-key {
          nacm:default-deny-all;
          type binary;
          must '../key-format';
          description
            "The binary value of the key.  The interpretation of
             the value is defined by the 'key-format' field.";
        }
      }
      case hidden-key {
        if-feature "hidden-keys";
        leaf hidden-key {
          type empty;
          must 'not(../key-format)';
          description
            "A hidden key.  How such keys are created is outside
             the scope of this module.";
        }
      }
      case encrypted-key {
        if-feature "symmetric-key-encryption";
        container encrypted-key {
          must '../key-format';
          description
            "A container for the encrypted symmetric key value.
             The interpretation of the 'encrypted-value' node
             is via the 'key-format' node";
          uses encrypted-value-grouping;
        }
      }
    }
  }

  grouping public-key-grouping {
    description
      "A public key.";
    leaf public-key-format {
      nacm:default-deny-write;
      type identityref {
        base public-key-format;
      }
      mandatory true;
      description
        "Identifies the public key's format. Implementations SHOULD
         ensure that the incoming public key value is encoded in the
         specified format.";
    }
    leaf public-key {
      nacm:default-deny-write;
      type binary;
      mandatory true;
      description
        "The binary value of the public key.  The interpretation
         of the value is defined by 'public-key-format' field.";
    }
  }

  grouping asymmetric-key-pair-grouping {
    description
      "A private key and its associated public key.  Implementations
       SHOULD ensure that the two keys are a matching pair.";
    uses public-key-grouping;
    leaf private-key-format {
      nacm:default-deny-write;
      type identityref {
        base private-key-format;
      }
      description
        "Identifies the private key's format.  Implementations SHOULD
         ensure that the incoming private key value is encoded in the
         specified format.

         For encrypted keys, the value is the same as it would have
         been if the key were not encrypted.";
    }
    choice private-key-type {
      nacm:default-deny-write;
      mandatory true;
      description
        "Choice between key types.";
      case cleartext-private-key {
        leaf cleartext-private-key {
          nacm:default-deny-all;
          type binary;
          must '../private-key-format';
          description
            "The value of the binary key  The key's value is
             interpreted by the 'private-key-format' field.";
        }
      }
      case hidden-private-key {
        if-feature "hidden-keys";
        leaf hidden-private-key {
          type empty;
          must 'not(../private-key-format)';
          description
            "A hidden key.  How such keys are created is
             outside the scope of this module.";
        }
      }
      case encrypted-private-key {
        if-feature "private-key-encryption";
        container encrypted-private-key {
          must '../private-key-format';
          description
            "A container for the encrypted asymmetric private key
             value.  The interpretation of the 'encrypted-value'
             node is via the 'private-key-format' node";
          uses encrypted-value-grouping;
        }
      }
    }
  }

  grouping certificate-expiration-grouping {
    description
      "A notification for when a certificate is about to, or
       already has, expired.";
    notification certificate-expiration {
      if-feature "certificate-expiration-notification";
      description
        "A notification indicating that the configured certificate
         is either about to expire or has already expired.  When to
         send notifications is an implementation specific decision,
         but it is RECOMMENDED that a notification be sent once a
         month for 3 months, then once a week for four weeks, and
         then once a day thereafter until the issue is resolved.";
      leaf expiration-date {
        type yang:date-and-time;
        mandatory true;
        description
          "Identifies the expiration date on the certificate.";
      }
    }
  }

  grouping trust-anchor-cert-grouping {
    description
      "A trust anchor certificate, and a notification for when
       it is about to (or already has) expire.";
    leaf cert-data {
      nacm:default-deny-write;
      type trust-anchor-cert-cms;
      description
        "The binary certificate data for this certificate.";
    }
    uses certificate-expiration-grouping;
  }

  grouping end-entity-cert-grouping {
    description
      "An end entity certificate, and a notification for when
       it is about to (or already has) expire.  Implementations
       SHOULD assert that, where used, the end entity certificate
       contains the expected public key.";
    leaf cert-data {
      nacm:default-deny-write;
      type end-entity-cert-cms;
      description
        "The binary certificate data for this certificate.";
    }
    uses certificate-expiration-grouping;
  }



  grouping generate-csr-grouping {
    description
      "Defines the 'generate-csr' action.";
    action generate-csr {
      if-feature "csr-generation";
      nacm:default-deny-all;
      description
        "Generates a certificate signing request structure for
         the associated asymmetric key using the passed subject
         and attribute values.

         This action statement is only available when the
         associated 'public-key-format' node's value is
         'subject-public-key-info-format'.";
      reference
        "RFC 6125:
          Representation and Verification of Domain-Based
          Application Service Identity within Internet Public Key
          Infrastructure Using X.509 (PKIX) Certificates in the
          Context of Transport Layer Security (TLS)";
      input {
        leaf csr-format {
          type identityref {
            base csr-format;
          }
          mandatory true;
          description
            "Specifies the format for the returned certifiacte.";
        }
        leaf csr-info {
          type csr-info;
          mandatory true;
          description
            "A CertificationRequestInfo structure, as defined in
             RFC 2986.

             Enables the client to provide a fully-populated
             CertificationRequestInfo structure that the server
             only needs to sign in order to generate the complete
             'CertificationRequest' structure to return in the
             'output'.

             The 'AlgorithmIdentifier' field contained inside
             the 'SubjectPublicKeyInfo' field MUST be one known
             to be supported by the device.";
          reference
            "RFC 2986:
               PKCS #10: Certification Request Syntax Specification
             RFC AAAA:
               YANG Data Types and Groupings for Cryptography";
        }
      }
      output {
        choice csr-type {
          mandatory true;
          description
            "A choice amongst certificate signing request formats.
             Additional formats MAY be augmented into this 'choice'
             statement by future efforts.";
          case p10-csr {
            leaf p10-csr {
              type p10-csr;
              description
                "A CertificationRequest, as defined in RFC 2986.";
            }
            description
              "A CertificationRequest, as defined in RFC 2986.";
            reference
              "RFC 2986:
                 PKCS #10: Certification Request Syntax Specification
               RFC AAAA:
                 YANG Data Types and Groupings for Cryptography";
          }
        }
      }
    }
  } // generate-csr-grouping

  grouping asymmetric-key-pair-with-cert-grouping {
    description
      "A private/public key pair and an associated certificate.
       Implementations SHOULD assert that certificates contain
       the matching public key.";
    uses asymmetric-key-pair-grouping;
    uses end-entity-cert-grouping;
    uses generate-csr-grouping;
  } // asymmetric-key-pair-with-cert-grouping

  grouping asymmetric-key-pair-with-certs-grouping {
    description
      "A private/public key pair and associated certificates.
       Implementations SHOULD assert that certificates contain
       the matching public key.";
    uses asymmetric-key-pair-grouping;
    container certificates {
      nacm:default-deny-write;
      description
        "Certificates associated with this asymmetric key.";
      list certificate {
        key "name";
        description
          "A certificate for this asymmetric key.";
        leaf name {
          type string;
          description
            "An arbitrary name for the certificate.";
        }
        uses end-entity-cert-grouping {
          refine "cert-data" {
            mandatory true;
          }
        }
      }
    }
    uses generate-csr-grouping;
  } // asymmetric-key-pair-with-certs-grouping

}
]]></artwork>
        <t keepWithPrevious="true">&lt;CODE ENDS&gt;</t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Security Considerations</name>
      <section numbered="true" toc="default">
        <name>No Support for CRMF</name>
        <t>This document uses PKCS #10 <xref target="RFC2986" format="default"/> for the
          "generate-certificate-signing-request" action.  The use of Certificate
          Request Message Format (CRMF) <xref target="RFC4211" format="default"/> was considered,
          but it was unclear if there was market demand for it.  If it is desired
          to support CRMF in the future, a backwards compatible solution can be
          defined at that time.</t>
      </section>
      <section numbered="true" toc="default">
        <name>No Support for Key Generation</name>
        <t>Early revisions of this document included "rpc" statements for
            generating symmetric and asymmetric keys.  These statements were
            removed due to an inability to obtain consensus for how to
            identify the key-algorithm to use.  Thusly, the solution presented
            in this document only supports keys to be configured via an external
            client, which does not support Security best practice.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Unconstrained Public Key Usage</name>
        <t>This module defines the "public-key-grouping" grouping, which
            enables the configuration of public keys without constraints on
            their usage, e.g., what operations the key is allowed to be used
            for (encryption, verification, both).</t>
        <t>The "asymmetric-key-pair-grouping" grouping uses the aforementioned
            "public-key-grouping" grouping, and carries the same traits.</t>
        <t>The "asymmetric-key-pair-with-cert-grouping" grouping uses the
            aforementioned "asymmetric-key-pair-grouping" grouping, whereby
            each certificate may constrain the usage of the public key
            according to local policy.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Unconstrained Private Key Usage</name>
        <t>This module defines the "asymmetric-key-pair-grouping" grouping,
            which enables the configuration of private keys without
            constraints on their usage, e.g., what operations the key is
            allowed to be used for (e.g., signature, decryption, both).</t>
        <t>The "asymmetric-key-pair-with-cert-grouping" uses the aforementioned
            "asymmetric-key-pair-grouping" grouping, whereby configured certificates
            (e.g., identity certificates) may constrain the use of the public
            key according to local policy.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Strength of Keys Conveyed</name>
        <t>When accessing key values, it is desireable that implementations
            ensure that the strength of the keys being accessed is not greater
            than the strength of the underlying secure transport connection
            over which the keys are conveyed.  However, comparing key strengths
            can be complicated and difficult to implement in practice.</t>
        <t>That said, expert Security opinion suggests that already it is
            infeasible to break a 128-bit symmetric key using a classical computer,
            and thus the concern for conveying higher-strength keys begins to lose
            its allure.</t>
        <t>Implementations SHOULD only use secure transport protocols
            meeting local policy.  A reasonable policy may, e.g., state that
            only ciphersuites listed as "recommended" by the IETF be used
            (e.g., <xref target="RFC7525" format="default"/> for TLS).</t>
      </section>
      <section numbered="true" toc="default">
        <name>Encrypting Passwords</name>
        <t>The module contained within this document enables passwords to be
            encrypted.  Passwords may be encrypted via a symmetric key using
            the "cms-encrypted-data-format" format.  This format uses the CMS
            EncryptedData structure, which allows any encryption algorithm
            to be used.</t>
        <t>In order to thwart rainbow attacks, algorithms that result
            in a unique output for the same input SHOULD NOT be used.  For
            instance, AES using "ECB" SHOULD NOT be used to encrypt passwords,
            whereas "CBC" mode is permissible since an unpredictable
            initialization vector (IV) MUST be used for each use.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Deletion of Cleartext Key Values</name>
        <t>This module defines storage for cleartext key values that SHOULD
            be zeroized when deleted, so as to prevent the remnants of their
            persisted storage locations from being analyzed in any meaningful
            way.</t>
        <t>The cleartext key values are the "cleartext-key" node defined in the
            "symmetric-key-grouping" grouping (<xref target="symmetric-key-grouping" format="default"/>)
              and the "cleartext-private-key" node defined in the "asymmetric-key-pair-grouping"
              grouping ("<xref target="asymmetric-key-pair-grouping" format="default"/>).</t>
      </section>
      <section numbered="true" toc="default">
        <name>The "ietf-crypto-types" YANG Module</name>
        <t>The YANG module in this document defines "grouping" statements
            that are designed to be accessed via YANG based management
            protocols, such as NETCONF <xref target="RFC6241" format="default"/> and RESTCONF
            <xref target="RFC8040" format="default"/>.  Both of these protocols have
            mandatory-to-implement secure transport layers (e.g., SSH, TLS)
            with mutual authentication.</t>
        <t>The NETCONF access control model (NACM) <xref target="RFC8341" format="default"/>
            provides the means to restrict access for particular users to a
            pre-configured subset of all available protocol operations and
            content.</t>
        <t>Since the module in this document only defines groupings,
            these considerations are primarily for the designers of other
            modules that use these groupings.</t>
        <t>Some of the readable data nodes defined in this YANG module
            may be considered sensitive or vulnerable in some network
            environments. It is thus important to control read access
            (e.g., via get, get-config, or notification) to these
            data nodes. These are the subtrees and data nodes and
            their sensitivity/vulnerability:
        </t>
        <ul spacing="normal">
          <li>
            <t>The "cleartext-key" node:
            </t>
            <ul empty="true">
              <li>The "cleartext-key" node defined in the "symmetric-key-grouping"
                    grouping is additionally sensitive to read operations such that,
                    in normal use cases, it should never be returned to a client.
                    For this reason, the NACM extension "default-deny-all" has been
                    applied to it.</li>
            </ul>
          </li>
          <li>
            <t>The "cleartext-private-key" node:
            </t>
            <ul empty="true">
              <li>The "cleartext-private-key" node defined in the "asymmetric-key-pair-grouping"
                    grouping is additionally sensitive to read operations such that, in
                    normal use cases, it should never be returned to a client.  For this
                    reason, the NACM extension "default-deny-all" has been applied.</li>
            </ul>
          </li>
          <li>
            <t>The "cert-data" node:
            </t>
            <ul empty="true">
              <li>The "cert-data" node, defined in both the "trust-anchor-cert-grouping"
                    and "end-entity-cert-grouping" groupings, is additionally sensitive to
                    read operations, as certificates sometimes convey personally identifying
                    information (especially end-entity certificates).  However, as it is
                    commonly understood that certificates are "public", the NACM extension 
                    "nacm:default-deny-write" (not "default-deny-all") has been applied. It
                    is RECOMMENDED that implementations adjust read-access to certificates
                    to comply with local policy.</li>
            </ul>
          </li>
        </ul>
        <t>All the writable data nodes defined by all the groupings defined
            in this module may be considered sensitive or vulnerable in
            some network environments.  For instance, even the modification
            of a public key or a certificate can dramatically alter the
            implemented security policy.  For this reason, the NACM extension
            "default-deny-write" has been applied to all the data nodes
            defined in the module.</t>
        <t>Some of the operations in this YANG module may be considered
            sensitive or vulnerable in some network environments. It is
            thus important to control access to these operations. These
            are the operations and their sensitivity/vulnerability:
        </t>
        <ul spacing="normal">
          <li>
            <t>generate-certificate-signing-request:
            </t>
            <ul empty="true">
              <li>This "action" statement SHOULD only be executed by authorized
                    users.  For this reason, the NACM extension "default-deny-all"
                    has been applied.  Note that NACM uses "default-deny-all"
                    to protect "RPC" and "action" statements; it does not define,
                    e.g., an extension called "default-deny-execute".</li>
              <li>For this action, it is RECOMMENDED that implementations assert
                    channel binding <xref target="RFC5056" format="default"/>, so as to ensure
                    that the application layer that sent the request is the same
                    as the device authenticated when the secure transport layer
                    was established.</li>
            </ul>
          </li>
        </ul>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section numbered="true" toc="default">
        <name>The "IETF XML" Registry</name>
        <t>This document registers one URI in the "ns" subregistry
          of the "IETF XML" registry <xref target="RFC3688" format="default"/>.  Following
          the format in <xref target="RFC3688" format="default"/>, the following
          registration is requested:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   URI: urn:ietf:params:xml:ns:yang:ietf-crypto-types
   Registrant Contact: The IESG
   XML: N/A, the requested URI is an XML namespace.
]]></artwork>
      </section>
      <section numbered="true" toc="default">
        <name>The "YANG Module Names" Registry</name>
        <t>This document registers one YANG module in the
          "YANG Module Names" registry <xref target="RFC6020" format="default"/>.
          Following the format in <xref target="RFC6020" format="default"/>, the
          following registration is requested:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   name:         ietf-crypto-types
   namespace:    urn:ietf:params:xml:ns:yang:ietf-crypto-types
   prefix:       ct
   reference:    RFC AAAA
]]></artwork>
      </section>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="BCP" value="14"/>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.2404.xml"?>-->
        <reference anchor="RFC3447" target="https://www.rfc-editor.org/info/rfc3447" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3447.xml">
          <front>
            <title>Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1</title>
            <seriesInfo name="DOI" value="10.17487/RFC3447"/>
            <seriesInfo name="RFC" value="3447"/>
            <author initials="J." surname="Jonsson" fullname="J. Jonsson">
              <organization/>
            </author>
            <author initials="B." surname="Kaliski" fullname="B. Kaliski">
              <organization/>
            </author>
            <date year="2003" month="February"/>
            <abstract>
              <t>This memo represents a republication of PKCS #1 v2.1 from RSA Laboratories' Public-Key Cryptography Standards (PKCS) series, and change control is retained within the PKCS process.  The body of this document is taken directly from the PKCS #1 v2.1 document, with certain corrections made during the publication process.  This memo provides information for the Internet community.</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.3565.xml"?>
        <?rfc include="reference.RFC.3686.xml"?>
        <?rfc include="reference.RFC.4106.xml"?>-->
        <reference anchor="RFC4253" target="https://www.rfc-editor.org/info/rfc4253" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4253.xml">
          <front>
            <title>The Secure Shell (SSH) Transport Layer Protocol</title>
            <seriesInfo name="DOI" value="10.17487/RFC4253"/>
            <seriesInfo name="RFC" value="4253"/>
            <author initials="T." surname="Ylonen" fullname="T. Ylonen">
              <organization/>
            </author>
            <author initials="C." surname="Lonvick" fullname="C. Lonvick" role="editor">
              <organization/>
            </author>
            <date year="2006" month="January"/>
            <abstract>
              <t>The Secure Shell (SSH) is a protocol for secure remote login and other secure network services over an insecure network.</t>
              <t>This document describes the SSH transport layer protocol, which typically runs on top of TCP/IP.  The protocol can be used as a basis for a number of secure network services.  It provides strong encryption, server authentication, and integrity protection.  It may also provide compression.</t>
              <t>Key exchange method, public key algorithm, symmetric encryption algorithm, message authentication algorithm, and hash algorithm are all negotiated.</t>
              <t>This document also describes the Diffie-Hellman key exchange method and the minimal set of algorithms that are needed to implement the SSH transport layer protocol.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.4279.xml"?>
        <?rfc include="reference.RFC.4309.xml"?>
        <?rfc include="reference.RFC.4494.xml"?>
        <?rfc include="reference.RFC.4543.xml"?>
        <?rfc include="reference.RFC.4868.xml"?>-->
        <reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <seriesInfo name="DOI" value="10.17487/RFC5280"/>
            <seriesInfo name="RFC" value="5280"/>
            <author initials="D." surname="Cooper" fullname="D. Cooper">
              <organization/>
            </author>
            <author initials="S." surname="Santesson" fullname="S. Santesson">
              <organization/>
            </author>
            <author initials="S." surname="Farrell" fullname="S. Farrell">
              <organization/>
            </author>
            <author initials="S." surname="Boeyen" fullname="S. Boeyen">
              <organization/>
            </author>
            <author initials="R." surname="Housley" fullname="R. Housley">
              <organization/>
            </author>
            <author initials="W." surname="Polk" fullname="W. Polk">
              <organization/>
            </author>
            <date year="2008" month="May"/>
            <abstract>
              <t>This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet.  An overview of this approach and model is provided as an introduction.  The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms.  Standard certificate extensions are described and two Internet-specific extensions are defined.  A set of required certificate extensions is specified.  The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions.  An algorithm for X.509 certification path validation is described.  An ASN.1 module and examples are provided in the appendices.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC5652" target="https://www.rfc-editor.org/info/rfc5652" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5652.xml">
          <front>
            <title>Cryptographic Message Syntax (CMS)</title>
            <seriesInfo name="DOI" value="10.17487/RFC5652"/>
            <seriesInfo name="RFC" value="5652"/>
            <seriesInfo name="STD" value="70"/>
            <author initials="R." surname="Housley" fullname="R. Housley">
              <organization/>
            </author>
            <date year="2009" month="September"/>
            <abstract>
              <t>This document describes the Cryptographic Message Syntax (CMS).  This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary message content.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.5656.xml"?>-->
        <reference anchor="RFC5958" target="https://www.rfc-editor.org/info/rfc5958" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5958.xml">
          <front>
            <title>Asymmetric Key Packages</title>
            <seriesInfo name="DOI" value="10.17487/RFC5958"/>
            <seriesInfo name="RFC" value="5958"/>
            <author initials="S." surname="Turner" fullname="S. Turner">
              <organization/>
            </author>
            <date year="2010" month="August"/>
            <abstract>
              <t>This document defines the syntax for private-key information and a content type for it.  Private-key information includes a private key for a specified public-key algorithm and a set of attributes.  The Cryptographic Message Syntax (CMS), as defined in RFC 5652, can be used to digitally sign, digest, authenticate, or encrypt the asymmetric key format content type.  This document obsoletes RFC 5208.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6031" target="https://www.rfc-editor.org/info/rfc6031" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6031.xml">
          <front>
            <title>Cryptographic Message Syntax (CMS) Symmetric Key Package Content Type</title>
            <seriesInfo name="DOI" value="10.17487/RFC6031"/>
            <seriesInfo name="RFC" value="6031"/>
            <author initials="S." surname="Turner" fullname="S. Turner">
              <organization/>
            </author>
            <author initials="R." surname="Housley" fullname="R. Housley">
              <organization/>
            </author>
            <date year="2010" month="December"/>
            <abstract>
              <t>This document defines the symmetric key format content type.  It is transport independent.  The Cryptographic Message Syntax (CMS) can be used to digitally sign, digest, authenticate, or encrypt this content type.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.6187.xml"?>-->
        <reference anchor="RFC6991" target="https://www.rfc-editor.org/info/rfc6991" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6991.xml">
          <front>
            <title>Common YANG Data Types</title>
            <seriesInfo name="DOI" value="10.17487/RFC6991"/>
            <seriesInfo name="RFC" value="6991"/>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
              <organization/>
            </author>
            <date year="2013" month="July"/>
            <abstract>
              <t>This document introduces a collection of common data types to be used with the YANG data modeling language.  This document obsoletes RFC 6021.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC7093" target="https://www.rfc-editor.org/info/rfc7093" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7093.xml">
          <front>
            <title>Additional Methods for Generating Key Identifiers Values</title>
            <seriesInfo name="DOI" value="10.17487/RFC7093"/>
            <seriesInfo name="RFC" value="7093"/>
            <author initials="S." surname="Turner" fullname="S. Turner">
              <organization/>
            </author>
            <author initials="S." surname="Kent" fullname="S. Kent">
              <organization/>
            </author>
            <author initials="J." surname="Manger" fullname="J. Manger">
              <organization/>
            </author>
            <date year="2013" month="December"/>
            <abstract>
              <t>This document specifies additional example methods for generating Key Identifier values for use in the AKI (Authority Key Identifier) and SKI (Subject Key Identifier) certificate extensions.</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.7919.xml"?>-->
        <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <seriesInfo name="DOI" value="10.17487/RFC7950"/>
            <seriesInfo name="RFC" value="7950"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols.  This document describes the syntax and semantics of version 1.1 of the YANG language.  YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification.  There are a small number of backward incompatibilities from YANG version 1.  This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="BCP" value="14"/>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.8268.xml"?>
        <?rfc include="reference.RFC.8332.xml"?>-->
        <reference anchor="RFC8341" target="https://www.rfc-editor.org/info/rfc8341" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml">
          <front>
            <title>Network Configuration Access Control Model</title>
            <seriesInfo name="DOI" value="10.17487/RFC8341"/>
            <seriesInfo name="RFC" value="8341"/>
            <seriesInfo name="STD" value="91"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>The standardization of network configuration interfaces for use with the Network Configuration Protocol (NETCONF) or the RESTCONF protocol requires a structured and secure operating environment that promotes human usability and multi-vendor interoperability.  There is a need for standard mechanisms to restrict NETCONF or RESTCONF protocol access for particular users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content.  This document defines such an access control model.</t>
              <t>This document obsoletes RFC 6536.</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.8422.xml"?>
        <?rfc include="reference.RFC.8446.xml"?>-->

        <reference anchor="ITU.X680.2015" target="https://www.itu.int/rec/T-REC-X.680/">
          <front>
            <title>Information technology - Abstract Syntax Notation One (ASN.1):
              Specification of basic notation
            </title>
            <seriesInfo name="ITU-T Recommendation X.680," value="ISO/IEC 8824-1:2015"/>
            <author>
              <organization>International Telecommunication Union</organization>
            </author>
            <date month="August" year="2015"/>
          </front>
        </reference>
        <reference anchor="ITU.X690.2015" target="https://www.itu.int/rec/T-REC-X.690/">
          <front>
            <title>Information Technology - ASN.1 encoding rules: Specification of Basic
            Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished
            Encoding Rules (DER)</title>
            <seriesInfo name="ITU-T Recommendation X.690," value="ISO/IEC 8825-1:2015"/>
            <author>
              <organization>International Telecommunication Union</organization>
            </author>
            <date month="August" year="2015"/>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC2986" target="https://www.rfc-editor.org/info/rfc2986" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2986.xml">
          <front>
            <title>PKCS #10: Certification Request Syntax Specification Version 1.7</title>
            <seriesInfo name="DOI" value="10.17487/RFC2986"/>
            <seriesInfo name="RFC" value="2986"/>
            <author initials="M." surname="Nystrom" fullname="M. Nystrom">
              <organization/>
            </author>
            <author initials="B." surname="Kaliski" fullname="B. Kaliski">
              <organization/>
            </author>
            <date year="2000" month="November"/>
            <abstract>
              <t>This memo represents a republication of PKCS #10 v1.7 from RSA Laboratories' Public-Key Cryptography Standards (PKCS) series, and change control is retained within the PKCS process.  The body of this document, except for the security considerations section, is taken directly from the PKCS #9 v2.0 or the PKCS #10 v1.7 document.  This memo provides information for the Internet community.</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.3174.xml"?>-->
        <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml">
          <front>
            <title>The IETF XML Registry</title>
            <seriesInfo name="DOI" value="10.17487/RFC3688"/>
            <seriesInfo name="RFC" value="3688"/>
            <seriesInfo name="BCP" value="81"/>
            <author initials="M." surname="Mealling" fullname="M. Mealling">
              <organization/>
            </author>
            <date year="2004" month="January"/>
            <abstract>
              <t>This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC4211" target="https://www.rfc-editor.org/info/rfc4211" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4211.xml">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate Request Message Format (CRMF)</title>
            <seriesInfo name="DOI" value="10.17487/RFC4211"/>
            <seriesInfo name="RFC" value="4211"/>
            <author initials="J." surname="Schaad" fullname="J. Schaad">
              <organization/>
            </author>
            <date year="2005" month="September"/>
            <abstract>
              <t>This document describes the Certificate Request Message Format (CRMF) syntax and semantics.  This syntax is used to convey a request for a certificate to a Certification Authority (CA), possibly via a Registration Authority (RA), for the purposes of X.509 certificate production.  The request will typically include a public key and the associated registration information.  This document does not define a certificate request protocol.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.4493.xml"?>-->
        <reference anchor="RFC5056" target="https://www.rfc-editor.org/info/rfc5056" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5056.xml">
          <front>
            <title>On the Use of Channel Bindings to Secure Channels</title>
            <seriesInfo name="DOI" value="10.17487/RFC5056"/>
            <seriesInfo name="RFC" value="5056"/>
            <author initials="N." surname="Williams" fullname="N. Williams">
              <organization/>
            </author>
            <date year="2007" month="November"/>
            <abstract>
              <t>The concept of channel binding allows applications to establish that the two end-points of a secure channel at one network layer are the same as at a higher layer by binding authentication at the higher layer to the channel at the lower layer.  This allows applications to delegate session protection to lower layers, which has various performance benefits.</t>
              <t>This document discusses and formalizes the concept of channel binding to secure channels.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC5915" target="https://www.rfc-editor.org/info/rfc5915" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5915.xml">
          <front>
            <title>Elliptic Curve Private Key Structure</title>
            <seriesInfo name="DOI" value="10.17487/RFC5915"/>
            <seriesInfo name="RFC" value="5915"/>
            <author initials="S." surname="Turner" fullname="S. Turner">
              <organization/>
            </author>
            <author initials="D." surname="Brown" fullname="D. Brown">
              <organization/>
            </author>
            <date year="2010" month="June"/>
            <abstract>
              <t>This document specifies the syntax and semantics for conveying Elliptic Curve (EC) private key information.  The syntax and semantics defined herein are based on similar syntax and semantics defined by the Standards for Efficient Cryptography Group (SECG). This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6020" target="https://www.rfc-editor.org/info/rfc6020" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml">
          <front>
            <title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6020"/>
            <seriesInfo name="RFC" value="6020"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <date year="2010" month="October"/>
            <abstract>
              <t>YANG is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF), NETCONF remote procedure calls, and NETCONF notifications. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC6125" target="https://www.rfc-editor.org/info/rfc6125" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6125.xml">
          <front>
            <title>Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6125"/>
            <seriesInfo name="RFC" value="6125"/>
            <author initials="P." surname="Saint-Andre" fullname="P. Saint-Andre">
              <organization/>
            </author>
            <author initials="J." surname="Hodges" fullname="J. Hodges">
              <organization/>
            </author>
            <date year="2011" month="March"/>
            <abstract>
              <t>Many application technologies enable secure communication between two entities by means of Internet Public Key Infrastructure Using X.509 (PKIX) certificates in the context of Transport Layer Security (TLS). This document specifies procedures for representing and verifying the identity of application services in such interactions.   [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.6234.xml"?>-->
        <reference anchor="RFC6241" target="https://www.rfc-editor.org/info/rfc6241" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml">
          <front>
            <title>Network Configuration Protocol (NETCONF)</title>
            <seriesInfo name="DOI" value="10.17487/RFC6241"/>
            <seriesInfo name="RFC" value="6241"/>
            <author initials="R." surname="Enns" fullname="R. Enns" role="editor">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization/>
            </author>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder" role="editor">
              <organization/>
            </author>
            <author initials="A." surname="Bierman" fullname="A. Bierman" role="editor">
              <organization/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t>The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices.  It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages.  The NETCONF protocol operations are realized as remote procedure calls (RPCs).  This document obsoletes RFC 4741.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.6239.xml"?>
        <?rfc include="reference.RFC.6507.xml"?>
        <?rfc include="reference.RFC.8017.xml"?>
        <?rfc include="reference.RFC.8032.xml"?>-->
        <reference anchor="RFC7525" target="https://www.rfc-editor.org/info/rfc7525" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7525.xml">
          <front>
            <title>Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)</title>
            <seriesInfo name="DOI" value="10.17487/RFC7525"/>
            <seriesInfo name="RFC" value="7525"/>
            <seriesInfo name="BCP" value="195"/>
            <author initials="Y." surname="Sheffer" fullname="Y. Sheffer">
              <organization/>
            </author>
            <author initials="R." surname="Holz" fullname="R. Holz">
              <organization/>
            </author>
            <author initials="P." surname="Saint-Andre" fullname="P. Saint-Andre">
              <organization/>
            </author>
            <date year="2015" month="May"/>
            <abstract>
              <t>Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) are widely used to protect data exchanged over application protocols such as HTTP, SMTP, IMAP, POP, SIP, and XMPP.  Over the last few years, several serious attacks on TLS have emerged, including attacks on its most commonly used cipher suites and their modes of operation.  This document provides recommendations for improving the security of deployed services that use TLS and DTLS. The recommendations are applicable to the majority of use cases.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8040" target="https://www.rfc-editor.org/info/rfc8040" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml">
          <front>
            <title>RESTCONF Protocol</title>
            <seriesInfo name="DOI" value="10.17487/RFC8040"/>
            <seriesInfo name="RFC" value="8040"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization/>
            </author>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <date year="2017" month="January"/>
            <abstract>
              <t>This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8340" target="https://www.rfc-editor.org/info/rfc8340" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml">
          <front>
            <title>YANG Tree Diagrams</title>
            <seriesInfo name="DOI" value="10.17487/RFC8340"/>
            <seriesInfo name="RFC" value="8340"/>
            <seriesInfo name="BCP" value="215"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="L." surname="Berger" fullname="L. Berger" role="editor">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>This document captures the current syntax used in YANG module tree diagrams.  The purpose of this document is to provide a single location for this definition.  This syntax may be updated from time to time based on the evolution of the YANG language.</t>
            </abstract>
          </front>
        </reference>
        <!--<?rfc include="reference.RFC.8439.xml"?>-->
        <reference anchor="RFC8342" target="https://www.rfc-editor.org/info/rfc8342" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml">
          <front>
            <title>Network Management Datastore Architecture (NMDA)</title>
            <seriesInfo name="DOI" value="10.17487/RFC8342"/>
            <seriesInfo name="RFC" value="8342"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization/>
            </author>
            <author initials="J." surname="Schoenwaelder" fullname="J. Schoenwaelder">
              <organization/>
            </author>
            <author initials="P." surname="Shafer" fullname="P. Shafer">
              <organization/>
            </author>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization/>
            </author>
            <author initials="R." surname="Wilton" fullname="R. Wilton">
              <organization/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as the Network Configuration Protocol (NETCONF) and RESTCONF. This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model.  This document updates RFC 7950.</t>
            </abstract>
          </front>
        </reference>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-crypto-types.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-trust-anchors.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-keystore.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-tcp-client-server.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-ssh-client-server.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-tls-client-server.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-http-client-server.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-netconf-client-server.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-netconf-restconf-client-server.xml"/>
      </references>
    </references>
    <section removeInRFC="true" anchor="change-log" numbered="true" toc="default">
      <name>Change Log</name>
      <section numbered="true" toc="default">
        <name>I-D to 00</name>
        <ul spacing="normal">
          <li>Removed groupings and notifications.</li>
          <li>Added typedefs for identityrefs.</li>
          <li>Added typedefs for other RFC 5280 structures.</li>
          <li>Added typedefs for other RFC 5652 structures.</li>
          <li>Added convenience typedefs for RFC 4253, RFC 5280, and RFC 5652.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>00 to 01</name>
        <ul spacing="normal">
          <li>Moved groupings from the draft-ietf-netconf-keystore here.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>01 to 02</name>
        <ul spacing="normal">
          <li>Removed unwanted "mandatory" and "must" statements.</li>
          <li>Added many new crypto algorithms (thanks Haiguang!)</li>
          <li>Clarified in asymmetric-key-pair-with-certs-grouping,
                 in certificates/certificate/name/description, that
                 if the name MUST NOT match the name of a certificate
                 that exists independently in &lt;operational&gt;, enabling
                 certs installed by the manufacturer (e.g., an IDevID).</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>02 to 03</name>
        <ul spacing="normal">
          <li>renamed base identity 'asymmetric-key-encryption-algorithm' to 'asymmetric-key-algorithm'.</li>
          <li>added new 'asymmetric-key-algorithm' identities for secp192r1, secp224r1, secp256r1,
                 secp384r1, and secp521r1.</li>
          <li>removed 'mac-algorithm' identities for mac-aes-128-ccm, mac-aes-192-ccm, mac-aes-256-ccm,
                 mac-aes-128-gcm, mac-aes-192-gcm, mac-aes-256-gcm, and mac-chacha20-poly1305.</li>
          <li>for all -cbc and -ctr identities, renamed base identity 'symmetric-key-encryption-algorithm'
                 to 'encryption-algorithm'.</li>
          <li>for all -ccm and -gcm identities, renamed base identity 'symmetric-key-encryption-algorithm'
                 to 'encryption-and-mac-algorithm' and renamed the identity to remove the "enc-" prefix.</li>
          <li>for all the 'signature-algorithm' based identities, renamed from 'rsa-*' to 'rsassa-*'.</li>
          <li>removed all of the "x509v3-" prefixed 'signature-algorithm' based identities.</li>
          <li>added 'key-exchange-algorithm' based identities for 'rsaes-oaep' and 'rsaes-pkcs1-v1_5'.</li>
          <li>renamed typedef 'symmetric-key-encryption-algorithm-ref' to 'symmetric-key-algorithm-ref'.</li>
          <li>renamed typedef 'asymmetric-key-encryption-algorithm-ref' to 'asymmetric-key-algorithm-ref'.</li>
          <li>added typedef 'encryption-and-mac-algorithm-ref'.</li>
          <li>Updated copyright date, boilerplate template, affiliation, and folding algorithm.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>03 to 04</name>
        <ul spacing="normal">
          <li>ran YANG module through formatter.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>04 to 05</name>
        <ul spacing="normal">
          <li>fixed broken symlink causing reformatted YANG module to not show.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>05 to 06</name>
        <ul spacing="normal">
          <li>Added NACM annotations.</li>
          <li>Updated Security Considerations section.</li>
          <li>Added 'asymmetric-key-pair-with-cert-grouping' grouping.</li>
          <li>Removed text from 'permanently-hidden' enum regarding
                such keys not being backed up or restored.</li>
          <li>Updated the boilerplate text in module-level "description"
                statement to match copyeditor convention.</li>
          <li>Added an explanation to the 'public-key-grouping' and
                'asymmetric-key-pair-grouping' statements as for why the
                nodes are not mandatory (e.g., because they may exist only
                in &lt;operational&gt;.</li>
          <li>Added 'must' expressions to the 'public-key-grouping' and
                'asymmetric-key-pair-grouping' statements ensuring sibling
                nodes are either all exist or do not all exist.</li>
          <li>Added an explanation to the 'permanently-hidden' that the
                value cannot be configured directly by clients and servers
                MUST fail any attempt to do so.</li>
          <li>Added 'trust-anchor-certs-grouping' and 'end-entity-certs-grouping'
                (the plural form of existing groupings).</li>
          <li>Now states that keys created in &lt;operational&gt; by the
                *-hidden-key actions are bound to the lifetime of the parent
                'config true' node, and that subsequent invocations of either
                action results in a failure.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>06 to 07</name>
        <ul spacing="normal">
          <li>Added clarifications that implementations SHOULD assert that
                configured certificates contain the matching public key.</li>
          <li>Replaced the 'generate-hidden-key' and 'install-hidden-key' actions
                with special 'crypt-hash' -like input/output values.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>07 to 08</name>
        <ul spacing="normal">
          <li>Removed the 'generate-key and 'hidden-key' features.</li>
          <li>Added grouping symmetric-key-grouping</li>
          <li>Modified 'asymmetric-key-pair-grouping' to have a 'choice'
                 statement for the keystone module to augment into, as well
                 as replacing the 'union' with leafs (having different NACM
                 settings.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>08 to 09</name>
        <ul spacing="normal">
          <li>Converting algorithm from identities to enumerations.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>09 to 10</name>
        <ul spacing="normal">
          <li>All the below changes are to the algorithm enumerations defined in ietf-crypto-types.</li>
          <li>Add in support for key exchange over x.25519 and x.448 based on RFC 8418.</li>
          <li>Add in SHAKE-128, SHAKE-224, SHAKE-256, SHAKE-384 and SHAKE 512</li>
          <li>Revise/add in enum of signature algorithm for x25519 and x448</li>
          <li>Add in des3-cbc-sha1 for IPSec</li>
          <li>Add in sha1-des3-kd for IPSec</li>
          <li>Add in  definit for rc4-hmac and rc4-hmac-exp. These two algorithms have been deprecated in RFC 8429. But some existing draft in i2nsf may still want to use them.</li>
          <li>Add x25519 and x448 curve for asymmetric algorithms</li>
          <li>Add signature algorithms ed25519, ed25519-cts, ed25519ph</li>
          <li>add signature algorithms ed448, ed448ph</li>
          <li>Add in rsa-sha2-256 and rsa-sha2-512 for SSH protocols (rfc8332)</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>10 to 11</name>
        <ul spacing="normal">
          <li>Added a "key-format" identity.</li>
          <li>Added symmetric keys to the example in <xref target="crypto-types-examples" format="default"/>.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>11 to 12</name>
        <ul spacing="normal">
          <li>Removed all non-essential (to NC/RC) algorithm types.</li>
          <li>Moved remaining algorithm types each into its own module.</li>
          <li>Added a 'config false' "algorithms-supported" list to each of the algorithm-type modules.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>12 to 13</name>
        <ul spacing="normal">
          <li>Added the four features: "[encrypted-]one-[a]symmetric-key-format", each protecting a 'key-format' identity of the same name.</li>
          <li>Added 'must' expressions asserting that the 'key-format' leaf exists whenever a non-hidden key is specified.</li>
          <li>Improved the 'description' statements and added 'reference' statements for the 'key-format' identities.</li>
          <li>Added a questionable forward reference to "encrypted-*" leafs in a couple 'when' expressions.</li>
          <li>Did NOT move "config false" alg-supported lists to SSH/TLS drafts.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>13 to 14</name>
        <ul spacing="normal">
          <li>Resolved the "FIXME: forward ref" issue by modulating 'must', 'when', and 'mandatory' expressions.</li>
          <li>Moved the 'generatesymmetric-key' and 'generate-asymmetric-key' actions from ietf-keystore to
                ietf-crypto-types, now as RPCs.</li>
          <li>Cleaned up various description statements and removed lingering FIXMEs.</li>
          <li>Converted the "iana-&lt;alg-type&gt;-algs" YANG modules to IANA registries with
                instructions for how to generate modules from the registries, whenever they may
                be updated.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>14 to 15</name>
        <ul spacing="normal">
          <li>Removed the IANA-maintained registries for symmetric, asymmetric, and hash algorithms.</li>
          <li>Removed the "generate-symmetric-key" and "generate-asymmetric-key" RPCs.</li>
          <li>Removed the "algorithm" node in the various symmetric and asymmetric key groupings.</li>
          <li>Added 'typedef csr' and 'feature certificate-signing-request-generation'.</li>
          <li>Refined a usage of "end-entity-cert-grouping" to make the "cert" node mandatory true.</li>
          <li>Added a "Note to Reviewers" note to first page.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>15 to 16</name>
        <ul spacing="normal">
          <li>Updated draft title (refer to "Groupings" too).</li>
          <li>Removed 'end-entity-certs-grouping' as it wasn't being used anywhere.</li>
          <li>Removed 'trust-anchor-certs-grouping' as it was no longer being used
                after modifying 'local-or-truststore-certs-grouping' to use lists (not
                leaf-lists).</li>
          <li>Renamed "cert" to "cert-data" in trust-anchor-cert-grouping.</li>
          <li>Added "csr-info" typedef, to complement the existing "csr" typedef.</li>
          <li>Added "ocsp-request" and "ocsp-response" typedefs, to complement
                the existing "crl" typedef.</li>
          <li>Added "encrypted" cases to both symmetric-key-grouping and
                asymmetric-key-pair-grouping (Moved from Keystore draft).</li>
          <li>Expanded "Data Model Overview section(s) [remove "wall" of tree diagrams].</li>
          <li>Updated the Security Considerations section.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>16 to 17</name>
        <ul spacing="normal">
          <li>[Re]-added a "Strength of Keys Configured" Security Consideration</li>
          <li>Prefixed "cleartext-" in the "key" and "private-key" node names.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>17 to 18</name>
        <ul spacing="normal">
          <li>Fixed issues found by the SecDir review of the "keystore" draft.</li>
          <li>Added "password-grouping", discussed during the IETF 108 session.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>18 to 19</name>
        <ul spacing="normal">
          <li>Added a "Unconstrained Public Key Usage" Security Consideration to address
                 concern raised by SecDir of the 'truststore' draft.</li>
          <li>Added a "Unconstrained Private Key Usage" Security Consideration to address
                concern raised by SecDir of the 'truststore' draft.</li>
          <li>Changed the encryption strategy, after conferring with Russ Housley.</li>
          <li>Added a "password-grouping" example to the "crypto-types-usage" example.</li>
          <li>Added an "Encrypting Passwords" section to Security Consideration.</li>
          <li>Addressed other comments raised by YANG Doctor.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>19 to 20</name>
        <ul spacing="normal">
          <li>Nits found via YANG Doctors reviews.</li>
          <li>Aligned modules with `pyang -f` formatting.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>20 to 21</name>
        <ul spacing="normal">
          <li>Replaced "base64encodedvalue==" with "BASE64VALUE=".</li>
          <li>Accommodated SecDir review by Valery Smyslov.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>21 to 22</name>
        <ul spacing="normal">
          <li>fixup the 'WG Web' and 'WG List' lines in YANG module(s)</li>
          <li>fixup copyright (i.e., s/Simplified/Revised/) in YANG module(s)</li>
          <li>added 'hidden-keys' feature.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>22 to 23</name>
        <ul spacing="normal">
          <li>Fixed an example to reference correct key.</li>
          <li>Fixed an example to not have line-returns around the encoding for a binary value.</li>
        </ul>
      </section>
      <section numbered="true" toc="default">
        <name>23 to 24</name>
        <ul spacing="normal">
          <li>Added mandatory leaf "csr-format" to action "generate-csr".</li>
          <li>s/certificate-signing-request/csr/g in the YANG module.</li>
        </ul>
      </section>
    </section>
    <section numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors would like to thank for following for
        lively discussions on list and in the halls (ordered
          by first name):
          Balazs Kovacs,
          Eric Voit,
          Juergen Schoenwaelder,
          Liang Xia,
          Martin Bjoerklund,
          Nick Hancock,
          Rich Salz,
          Rob Wilton,
          Russ Housley,
          Sandra Murphy,
          Tom Petch,
          Valery Smyslov,
          and Wang Haiguang.
      </t>
    </section>
  </back>
</rfc>
