<?xml version="1.0"?>
<!DOCTYPE rfc [
<!ENTITY rfc2119 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc4034 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4034.xml">
]>
<rfc ipr="trust200902" submissionType="IETF" category="std" docName="draft-andrews-ds-support-for-private-algorithms-01">
  <front>
    <title abbrev="">DS support for private DNSSEC algorithms</title>
    <author initials="M." surname="Andrews" fullname="M. Andrews">
      <organization abbrev="ISC">Internet Systems Consortium</organization>
      <address>
        <postal>
          <street>PO Box 360</street>
          <city>Newmarket</city>
          <region>NH</region>
          <code>03857</code>
          <country>US</country>
        </postal>
        <email>marka@isc.org</email>
      </address>
    </author>
    <date day="31" month="May" year="2025"/>
    <abstract>
      <t>
        Extend the DS digest field of the DS record to identify the
        private DNSSEC algorithm of the DNSKEY matching the DS
        record.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" title="Introduction">
      <t>
        When the DNSSEC algorithm is PRIVATEDNS (233) or PRIVATEOID
        (254) the private algorithm identifier is embedded at the
        start of the key data in KEY, CDNSKEY, and DNSKEY records
        and at the start of the signature data in the RRSIG and SIG
        records <xref target="RFC4034"/>.  This allows the private
        algorithm to be fully identified.
      </t>
      <t>
        DS records, however, do not embed this identifier at
        the start of the digest field.  This results in PRIVATEDNS
        and PRIVATEOID keys not being able to be used in all the
        scenarios where non private key algorithms can be. i.e.
        publishing of DS records for yet to be published DNSKEYs,
        determining if a DS based trust anchor represents a supported
        algorithm.
      </t>
      <t>
        This document adds DS digest types which embed the private
        algorithm identifiers to the start of the digest field to
        provide equivalent functionality to PRIVATE key types as
        described in <xref target="RFC4034"/>, Appendix A.1.1.
      </t>
      <t>
        This document was inspired by the work done to add private
        DNSSEC algorithm support to BIND 9.
      </t>
      <section anchor="reserved" title="Reserved Words">
        <t>
          The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
          and "OPTIONAL" in this document are to be interpreted as
          described in <xref target="RFC2119" />.
        </t>
      </section>
    </section>
    <section anchor="structure" title="Updated DS digest field structure">
      <t>
        The digest field of CDS and DS records with digest types
        other than SHA-1 (1), SHA-256 (2), GOST R 34.11-94 (3),
        SHA-384 (4), GOST R 34.11-2012 (5) and SM3 (6) MUST now
        embed the private algorithm identifier before the digest
        data if the DS algorithm field is PRIVATEDNS or PRIVATEOID
        in the same manner as is done for the matching DNSKEY record.
      </t>
      <t>
        It is RECOMMENDED that only DS records with DS digest types
        that embed the private DNSSEC algorithm are used with private
        DNSSEC algorithms as allows for publishing of DS records
        without the corresponding DNSKEY record being published.
      </t>
    </section>
    <section anchor="algorithms" title="New DS Types">
      <t>
        New DS type identifiers which support embedding the private
        DNSSEC algorithm identifier are needed for SHA-256, SHA-384,
        GOST R 34.11-2012 and SM3 are needed along with identifing
        names.  The new names and types are SHA-256-PRIVATE (TBA),
        SHA-384-PRIVATE (TBA), GOST R 34.11-2012 PRIVATE (TBA) and
        SM3-PRIVATE (TBA) respectively.
      </t>
    </section>
    <section anchor="iana" title="IANA Considerations">
      <t>
        IANA is requested to assign DS types for SHA-256-PRIVATE,
        SHA-384-PRIVATE, GOST R 34.11-2012 PRIVATE and SM3-PRIVATE.
      </t>
    </section>
    <section anchor="security" title="Security Considerations">
      <t>
        This adds no known security issues.
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
     &rfc2119; &rfc4034;
    </references>
    <section title="Example">
      <t>
        Below we generate a example key using a PRIVATEOID DNSSEC
        algorithm and generate DS records from it using the SHA-256
        digest and the proposed SHA-256-PRIVATE digest types.  We
        also generate DS records for a RSASHA256 key using the same
        digests for comparison.  The records have been converted
        to multi-line form for display purposes.
      </t>
      <figure>
        <artwork>
% dnssec-keygen -a RSASHA256OID example
Kexample.+256+40597
% dnssec-dsfromkey -a SHA-256 -a SHA-256-PRIVATE Kexample.+256+40597
example. IN DS 40597 254 2 ( D34C1ED54CC310D4DDECD935626B83A21E9462A
                             41519DCE3C7B88346B88E667D )
example. IN DS 40597 254 7 ( 0B06092A864886F70D01010BD34C1ED54CC310D
                             4DDECD935626B83A21E9462A41519DCE3C7B883
                             46B88E667D )
% cat Kexample.+256+40597.key
; This is a zone-signing key, keyid 40597, for example.
; Created: 20250530054504 (Fri May 30 15:45:04 2025)
; Publish: 20250530054504 (Fri May 30 15:45:04 2025)
; Activate: 20250530054504 (Fri May 30 15:45:04 2025)
example. IN DNSKEY 256 3 254 ( CwYJKoZIhvcNAQELAwEAAd3K9HIqJL+AiOb19
                               TPx/tgDbVVigJELn+LB6PqVD7U5tNPEYqVVK8
                               aRokyCd/Id/0l9xTVXDiDOCNVnTEZc6P20nhl
                               c1+alJF4S419APxE0EL8DAiiEAU4zwzLU41/4
                               1raFqN/sRZRLElvtEswtOXxvx5IGdAqnN0Np4
                               OiXMCmm4AoJ8RwCxWP2BNNp8CjRza3QaEk61/
                               ACc0U23Ol7wYefDudUoWJLKQFK6XM7pxuG5Zn
                               T4Hc0/Mbd3X/7Vi3zcxxef55v4jQEFxgXEIin
                               VlDtDVSSOGM+unPZeviedPqpCabVuUVPHOVyY
                               q/9OdCsHNZORdpo1nJuYVdwSs0t8AM= )
% dnssec-dsfromkey -a SHA-256 -a SHA-256-PRIVATE Kexample.+008+00163
example. IN DS 163 8 2 ( CAD5B47A4EA7D8F51926202CE4F89250C367D6EF2E0
                         8D8D26367056E7F76DE9A )
example. IN DS 163 8 7 ( CAD5B47A4EA7D8F51926202CE4F89250C367D6EF2E0
                         8D8D26367056E7F76DE9A )
%
        </artwork>
      </figure>
    </section>
  </back>
</rfc>
