NETCONF Working Group | K. Watsen |
Internet-Draft | Juniper Networks |
Intended status: Standards Track | June 4, 2018 |
Expires: December 6, 2018 |
Common YANG Data Types for Cryptography
draft-ietf-netconf-crypto-types-00
This document defines YANG identities and typedefs useful for cryptographic applications.
This draft contains many 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.
Artwork in this document contains shorthand references to drafts in progress. Please apply the following replacements:
Artwork in this document contains placeholder values for the date of publication of this draft. Please apply the following replacement:
The following Appendix section is to be removed prior to publication:
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 6, 2018.
Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document defines a YANG 1.1 [RFC7950] module specifying identities and typedefs useful for cryptography.
As the YANG module only defines identities and typedefs, this draft does not present a YANG tree diagram [RFC8340] or any examples illustrating usage of the module.
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
This module has normartive references for [RFC4253], [RFC5280], [RFC5480], [RFC5652], and [ITU.X690.2015] and has informational references to [RFC6234] and [RFC8017]
<CODE BEGINS> file "ietf-crypto-types@2018-06-04.yang" module ietf-crypto-types { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-crypto-types"; prefix "ct"; organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: <http://datatracker.ietf.org/wg/netconf/> WG List: <mailto:netconf@ietf.org> Author: Kent Watsen <mailto:kwatsen@juniper.net>"; description "This module defines common YANG types for cryptographic applications. Copyright (c) 2018 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 Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision "2018-06-04" { description "Initial version"; reference "RFC XXXX: Common YANG Data Types for Cryptography"; } /*****************************************/ /* Identities for Hashing Algorithms */ /*****************************************/ identity hash-algorithm { description "A base identity for hash algorithm verification."; } identity sha-256 { base "hash-algorithm"; description "The SHA-256 algorithm."; reference "RFC 6234: US Secure Hash Algorithms."; } /*************************************/ /* Identities for Key Algorithms */ /*************************************/ identity key-algorithm { description "Base identity from which all key-algorithms are derived."; } identity rsa1024 { base key-algorithm; description "The RSA algorithm using a 1024-bit key."; reference "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; } identity rsa2048 { base key-algorithm; description "The RSA algorithm using a 2048-bit key."; reference "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; } identity rsa3072 { base key-algorithm; description "The RSA algorithm using a 3072-bit key."; reference "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; } identity rsa4096 { base key-algorithm; description "The RSA algorithm using a 4096-bit key."; reference "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; } identity rsa7680 { base key-algorithm; description "The RSA algorithm using a 7680-bit key."; reference "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; } identity rsa15360 { base key-algorithm; description "The RSA algorithm using a 15360-bit key."; reference "RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; } identity secp192r1 { base key-algorithm; description "The secp192r1 algorithm."; reference "RFC 5480: Elliptic Curve Cryptography Subject Public Key Information."; } identity secp256r1 { base key-algorithm; description "The secp256r1 algorithm."; reference "RFC 5480: Elliptic Curve Cryptography Subject Public Key Information."; } identity secp384r1 { base key-algorithm; description "The secp384r1 algorithm."; reference "RFC 5480: Elliptic Curve Cryptography Subject Public Key Information."; } identity secp521r1 { base key-algorithm; description "The secp521r1 algorithm."; reference "RFC 5480: Elliptic Curve Cryptography Subject Public Key Information."; } /*********************************************************/ /* Typedefs for identityrefs to above base identites */ /*********************************************************/ typedef hash-algorithm-ref { type identityref { base "hash-algorithm"; } description "This typedef enables importing modules to easily define an identityref to the 'hash-algorithm' base identity."; } typedef key-algorithm-ref { type identityref { base "key-algorithm"; } description "This typedef enables importing modules to easily define an identityref to the 'key-algorithm' base identity."; } /***************************************************/ /* 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 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 structures related to RFC 4253 */ /***************************************************/ typedef ssh-host-key { type binary; description "The binary public key data for this SSH 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"; } /*********************************************************/ /* 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."; } } <CODE ENDS>
In order to use YANG identities for algorithm identifiers, only the most commonly used RSA key lengths are supported for the RSA algorithm. Additional key lengths can be defined in another module or added into a future version of this document.
This document limits the number of elliptical curves supported. This was done to match industry trends and IETF best practice (e.g., matching work being done in TLS 1.3). If additional algorithms are needed, they can be defined by another module or added into a future version of this document.
The YANG module defined in this document specifies only typedefs and identities, and hence there are no YANG-specific security considerations that need to be addressed.
This document registers one URI in the "ns" subregistry of the IETF XML Registry [RFC3688]. Following the format in [RFC3688], the following registration is requested:
URI: urn:ietf:params:xml:ns:yang:ietf-crypto-types Registrant Contact: The NETCONF WG of the IETF. XML: N/A, the requested URI is an XML namespace.
This document registers one YANG module in the YANG Module Names registry [RFC6020]. Following the format in [RFC6020], the the following registration is requested:
name: ietf-crypto-types namespace: urn:ietf:params:xml:ns:yang:ietf-crypto-types prefix: ct reference: RFC XXXX
[RFC3688] | Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004. |
[RFC6020] | Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010. |
[RFC6234] | Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)", RFC 6234, DOI 10.17487/RFC6234, May 2011. |
[RFC8017] | Moriarty, K., Kaliski, B., Jonsson, J. and A. Rusch, "PKCS #1: RSA Cryptography Specifications Version 2.2", RFC 8017, DOI 10.17487/RFC8017, November 2016. |
[RFC8340] | Bjorklund, M. and L. Berger, "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018. |
The authors would like to thank for following for lively discussions on list and in the halls (ordered by last name): Martin Bjorklund, Balázs Kovács, Eric Voit, and Liang Xia.