<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->

<!DOCTYPE rfc [
<!ENTITY nbsp    "&#160;">
<!ENTITY zwsp   "&#8203;">
<!ENTITY nbhy   "&#8209;">
<!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
    Use of an external entity file is not recommended. -->
    
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-fregly-dnsop-slh-dsa-mtl-dnssec-01" ipr="trust200902" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3" consensus="true">
    
    <front>
        <title abbrev="SLH-DSA-MTL-DNSSEC">Stateless Hash-Based Signatures in Merkle Tree Ladder Mode (SLH-DSA-MTL) for DNSSEC</title>
        
        <author initials="A.M." surname="Fregly" fullname="A. Fregly">
            <organization>Verisign Labs</organization>
            <address>
                <postal>
                    <street>12061 Bluemont Way</street>
                    <city>Reston</city>
                    <region>VA</region>
                    <code>20190</code>
                    <country>USA</country>
                </postal>
                <email>afregly@verisign.com</email>
                <uri>http://www.verisignlabs.com/</uri>
            </address>
        </author>
        
        <author initials="J." surname="Harvey" fullname="J. Harvey">
            <organization>Verisign Labs</organization>
            <address>
                <postal>
                    <street>12061 Bluemont Way</street>
                    <city>Reston</city>
                    <region>VA</region>
                    <code>20190</code>
                    <country>United States of America</country>
                </postal>
                <email>jsharvey@verisign.com</email>
                <uri>https://www.verisignlabs.com/</uri>
            </address>
        </author>
        
        <author initials="B." surname="Kaliski" fullname="B. Kaliski">
            <organization>Verisign Labs</organization>
            <address>
                <postal>
                    <street>12061 Bluemont Way</street>
                    <city>Reston</city>
                    <region>VA</region>
                    <code>20190</code>
                    <country>United States of America</country>
                </postal>
                <email>bkaliski@verisign.com</email>
                <uri>https://www.verisignlabs.com/</uri>
            </address>
        </author>
        <author initials="D." surname="Wessels" fullname="D. Wessels">
            <organization>Verisign Labs</organization>
            <address>
                <postal>
                    <street>12061 Bluemont Way</street>
                    <city>Reston</city>
                    <region>VA</region>
                    <code>20190</code>
                    <country>United States of America</country>
                </postal>
                <email>dwessels@verisign.com</email>
                <uri>https://www.verisignlabs.com/</uri>
            </address>
        </author>
        
        <date year="2024"/>
        
        <area>Applications</area>
        <workgroup>DNSOP Working Group</workgroup>
        <keyword>DNSSEC</keyword>
        <keyword>Signature</keyword>
        <keyword>Algorithm</keyword>
        
        <abstract>
            <t>
                This document describes how to apply the Stateless Hash-Based Digital Signature Algorithm in Merkle Tree Ladder mode to the DNS Security Extensions.  This combination is referred to as the SLH-DSA-MTL Signature scheme.  This document describes how to specify SLH-DSA-MTL keys and signatures in DNSSEC.  It uses both the SHA2 and SHAKE family of hash functions.  This document also provides guidance for use of EDNS(0) in signature retrieval.
            </t>
        </abstract>
    </front>
    
    <middle>
        <section title="Introduction">
            <t>
                The Domain Name System Security Extensions (DNSSEC), which are broadly defined in <xref target="RFC4033"/>, <xref target="RFC4034"/> and <xref target="RFC4035"/>, use cryptographic keys and digital signatures to provide data origin authentication and data integrity in the DNS.  This document describes the application of Merkle Tree Ladder (MTL) Mode to the Stateless Hash-Based Digital Signature Algorithm (SLH-DSA) as the SLH-DSA-MTL signature scheme for DNSSEC.  SLH-DSA is described in the FIPS 205 draft standard <xref target="FIPS205"/> and MTL mode is described in <xref target="MTL"/>.  As described herein, a DNSKEY resource record (RR) for an SLH-DSA-MTL key contains a SLH-DSA key. The SLH-DSA key is used for verifying signatures on Merkle tree ladders (MTLs).  An RRSIG resource record for an SLH-DSA-MTL Signature contains a Merkle proof (authentication path) that is verifiable using a MTL, and optionally also contains the signed MTL.
            </t>
            <t>
                The anticipation of quantum computers that can break the current signature algorithms led to NIST selecting post-quantum cryptographic (PQC)  algorithms for standardization and developing specifications for the algorithms as NIST standards. These new algorithms are expected to replace classical digital signature algorithms (e.g., RSA and ECDSA)  in IETF standards and to be widely implemented and deployed after that.  NIST's proposed PQC algorithms have significantly larger signature sizes than RSA and ECDSA.  The larger sizes may have a significant operational impact on DNSSEC.  For example, the size of signed NSEC and NSEC3 responses may exceed UDP MTUs with this degrading the use of UDP as the prevalent DNSSEC transport. Larger signature sizes could also substantially increase memory requirements for in-memory zone databases used by authoritative name servers and for in-memory caches used by resolvers.
            </t>
            <t>
                As described in <xref target="MTL"/>, MTL mode is designed to reduce the size impact of PQC signature algorithms.  For DNSSEC, the size impact reduction is achieved when signatures provided in RRSIG RRs are primarily comprised of "condensed signatures" (Merkle proofs / authentication paths) and are only occasionally comprised of "full signatures" that contain both a condensed signature and a signed MTL, where the signed ladder includes a signature using the underlying PQC signature algorithm.  MTL mode reduces the memory requirements for PQC signatures as the signature data in the zone database or cache is primarily comprised of Merkle proofs and only occasionally of signed MTLs <xref target="CTRSAMTL"/>. 
            </t>
            <t>
                SLH-DSA is a stateless hash-based PQC signature scheme selected by NIST for standardization <xref target="NISTSELECTIONS"/> in July 2022.  This document specifies SLH-DSA for the initial application of MTL mode to DNSSEC based on three considerations: (1) SLH-DSA is also based on Merkle trees, and thus already has internal functions for computing leaf nodes and internal nodes; and (2) SLH-DSA has relatively large signature sizes    and computational costs, and therefore can benefit significantly from the reductions offered by MTL mode; and (3) hash-based techniques are well understood and offer a conservative choice for long-term security relative to newer NIST selected signature schemes based on lattice-based cryptography.  SLH-DSA is based on SPHINCS+ <xref target="SPHINCSPLUS"/>, one of the submissions to NIST's PQC evaluation project, and the algorithms are substantially the same.  <xref target="MTL"/> describes the combination of MTL mode with SPHINCS+. The authors intend to update both <xref target="MTL"/> and this I-D as needed to be consistent with FIPS 205 once it is published as a NIST FIPS standard.
            </t>
            <t>
                This initial version of the draft focuses on the code-points applicable to DNSKEY and RRSIG formulation and a proposed DNSSEC protocol change to support retrieval of MTL mode condensed signatures and MTL mode full signatures as described in 3., 9.4., and 9.5. of <xref target="MTL"/>. Later versions may describe  DNSSEC protocol and/or operational changes related to zone signing, zone composition, zone updates, zone transfer, name server processing, resolver signature processing, and resolver caching.
            </t>
        </section>
            
        <section title="Conventions Used in This Document">
            <t>
                The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.
            </t>
            <t>
                Double pipe characters, "||" are used in this document to indicate concatenation of the elements preceding and following the double pipe characters.
            </t>
            <t>
                All numeric DNSKEY elements and RRSIG elements specified in this document are unsigned integers in network byte order (big endian order).
            </t>

        </section>
            
            
        <section anchor="DNSKEYRRS" title="DNSKEY Resource Records">
            <t>
                An SLHDSAMTLSHA2128S key consists of a 32-octet value, which is encoded into the Public Key field of a DNSKEY resource record as a simple bit string.  SLHDSAMTLSHA2128S keys are generated as SLH-DSA keys using the SLH-DSA-SHA2-128s parameter set, as defined in 9.1 and 10 of <xref target="FIPS205"/>.
            </t>
            <t>
                An SLHDSAMTLSHAKE128S key consists of a 32-octet value, which is encoded into the Public Key field of a DNSKEY resource record as a simple bit string.  SLHDSAMTLSHAKE128S keys are generated as SLH-DSA keys using the SLH-DSA-SHAKE-128s parameter set, as defined in 9.1 and 10 of <xref target="FIPS205"/>.
            </t>
        </section>
            
        <section anchor="RRSIGRRS" title="RRSIG Resource Records">
            <t>
                MTL mode signatures are either full or condensed as described in <xref target="MTL"/>. SLHDSAMTLSHA2128S and SLHDSAMTLSHAKE128S signatures utilize a one-octet prefixed MTL-Type field to indicate whether the signature is condensed (0) or full (1).
            </t>
            <t>
                An SLHDSAMTLSHA2128S signature consists of a variable-length value, which is encoded into the Signature field of an RRSIG resource record as a simple bit string as the concatenation of the MTL-Type and a SLH-DSA-MTL-SHA2-128s signature as described in <xref target="MTL"/>:
            </t>
            <artwork align="left"><![CDATA[
                     1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   MTL-Type    |                                               |
+-+-+-+-+-+-+-+-+                                               |
|                  SLH-DSA-MTL-SHA2-128s signature              |
/                                                               /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]></artwork>
            <t>
                An SLHDSAMTLSHAKE128S signature consists of a variable-length value, which is encoded into the Signature field of an RRSIG resource record as a simple bit string as the concatenation of the MTL-Type and a SLH-DSA-MTL-SHAKE-128s signature as described in <xref target="MTL"/>:
            </t>
            <artwork align="left"><![CDATA[
                     1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   MTL-Type    |                                               |
+-+-+-+-+-+-+-+-+                                               |
|                  SLH-DSA-MTL-SHAKE-128s signature             |
/                                                               /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]></artwork>
            <t>
                The signature and verification algorithms for both SLH-DSA-MTL-SHA2-128s and SLH-DSA-MTL-SHAKE-128s are described in 9.1. and 9.2. of <xref target="MTL"/>. The signature and verification algorithms for the underlying signature algorithms used for signed ladders elements of SLH-DSA-MTL-SHA2-128s and SLH-DSA-MTL-SHAKE-128s full signatures, SLH-DSA-SHA2-128s and SLH-DSA-SHAKE-128s respectively, are described in 9.2 and 9.3 of <xref target="FIPS205" />. 
            </t>
        </section>

        <section title="Algorithm Numbers for DS, DNSKEY, and RRSIG Resource Records">
            <t>
                The algorithm number associated with the use of SLHDSAMTLSHA2128S in DS, DNSKEY, and RRSIG resource records is TBD.  The algorithm number associated with the use of SLHDSAMTLSHAKE128S in DS, DNSKEY, and RRSIG resource records is TBD.  This registration is fully defined in the IANA Considerations section.
            </t>
        </section>

        <section anchor="RQSTFULLCNDNSD" title="The mtl-mode-full EDNS(0) Option">
            <t>
                MTL mode signatures are either full or condensed.  An MTL mode-aware client MAY request that signatures be returned in the full format by providing the mtl-mode-full EDNS(0) option in the OPT meta-RR of its query <xref target="RFC6891"/>.
            </t>
            <section title="Option Format">
                <t>The mtl-mode-full option is encoded as follows:</t>
                <figure><artwork align="left"><![CDATA[
0                       8                      16
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                  OPTION-CODE                  |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                 OPTION-LENGTH                 |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
                ]]></artwork></figure>
                <t>where:</t>
                <dl>
                    <dt>OPTION-CODE</dt>
                    <dd>The EDNS0 option code assigned to mtl-mode-full, TBD.</dd>
                    <dt>OPTION-LENGTH</dt>
                    <dd>Always zero.</dd>
                </dl>
            </section>

            <section title="Use By Responders">
                <t>
                    When a query includes the mtl-mode-full option, the response requirement depends on the number of RRSIG records in the response that were produced in MTL mode:
                </t>
                <ul>
                    <li>If exactly one RRSIG record in the response was produced in MTL mode, then that RRSIG record MUST be returned in the full signature format.</li>
                    <li>If more than one RRSIG record in the response was produced in MTL mode, then enough of these RRSIG records MUST be returned in the full signature format to ensure that every other RRSIG in the response that was produced in MTL mode can be verified.</li>
                </ul>
                <t>
                    When the mtl-mode-full option is not included, every signature in the response that was produced in MTL mode MUST be returned in the condensed signature format.
                </t>
                <t>
                    As described in 9.2. of <xref target="MTL"/>, when a verifier receives a condensed signature, the verifier determines whether any of the MTLs it has previously verified includes a rung that is compatible with the authentication path in the condensed signature.  If not, then the verifier requests a new signed ladder.  Accordingly, a resolver SHOULD first query a name server without the mtl-mode-full option, and then, if needed, re-issue the query with the mtl-mode-full option. Since responses to queries with the mtl-mode-full option are expected to be large, it is RECOMMENDED that queries with the mtl-mode-full option be issued over transports (e.g., TCP, TLS, QUIC) that support large responses without truncation and/or fragmentation.
                </t>
            </section>
        </section>

        <section anchor="IMPLCONSIDERATIONS" title="Implementation Considerations">
            <t>TBD</t>
        </section>

        <section anchor="EXAMPLES" title="Examples">
            <t>TBD</t>
        </section>
        
        <section anchor="IANA" title="IANA Considerations">
            <t>
                This document updates the IANA registry for DNSSEC "Domain Name System Security (DNSSEC) Algorithm Numbers" located at https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml. The following entries are requested to be added to the registry subject to the Number update:
            </t>
            <artwork name="" type="" align="left" alt="">
                <![CDATA[
SLH-DSA-MTL-SHA2-128s
+--------------+--------------------------------+
| Number       | TBD                            |
| Description  | SLH-DSA-MTL-SHA2-128s          |
| Mnemonic     | SLHDSAMTLSHA2128S              |
| Zone Signing | Y                              |
| Trans. Sec.  | *                              |
| Reference    | This specification             |
+--------------+--------------------------------+

SLH-DSA-MTL-SHAKE-128s
+--------------+--------------------------------+
| Number       | TBD                            |
| Description  | SLH-DSA-MTL-SHAKE-128s         |
| Mnemonic     | SLHDSAMTLSHAKE128S             |
| Zone Signing | Y                              |
| Trans. Sec.  | *                              |
| Reference    | This specification             |
+--------------+--------------------------------+
                ]]>
            </artwork>
            <t>
                *  There has been no determination of standardization of the use of these algorithms with Transaction Security.
            </t>
        </section>
        
        <section anchor="IMPL-STATUS" title="Implementation Status">
            <t>
                NOTE: Please remove this section and the reference to RFC 7942 prior to publication as an RFC.
            </t>
            <t>
                This section records the status of known implementations of the protocol defined by this specification at the time of posting of
                this Internet-Draft, and is based on a proposal described in RFC 7942.  The description of implementations in this section is
                intended to assist the IETF in its decision processes in progressing drafts to RFCs.  Please note that the listing of any individual implementation here does not imply endorsement by the IETF.  Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features.  Readers are advised to note that other implementations may exist.
            </t>
            <t>
                According to RFC 7942, "this will allow reviewers and working groups to assign due consideration to documents that have the
                benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented
                protocols more mature.  It is up to the individual working groups to use this information as they see fit".
            </t>
            <t>
                Implementation details are TBD.
            </t>
        </section>
        
        <section anchor="SECURITY" title="Security Considerations">
            <t>
                The security considerations of <xref target="FIPS205"/> and <xref target="MTL"/> are inherited in the usage of SLH-DSA-MTL in DNSSEC.
            </t>
            <t>
                SLH-DSA-MTL-SHA2-128s and SLH-DSA-MTL-SHAKE-128s are intended to operate at around the 128-bit security level against classical attacks and the 64-bit level against quantum attacks, consistent with NIST's security level I.
            </t>
            <t>
                A private key used for a DNSSEC zone MUST NOT be used for any other purpose than for that zone.  Otherwise, cross-protocol or cross-application attacks are possible.
            </t>
        </section>
        
        <section anchor="ACKNOWLEDGEMENTS" title="Acknowledgements">
            <t>
                The authors would like to acknowledge the following individuals for their contributions to the development of this document: Scott Hollenbeck, Swapneel Sheth.  This I-D has drawn from helpful examples of document structure and specification text from various DNSSEC algorithm RFCs. The authors express their gratitude to the authors of those RFCs for their contributions.
            </t>
        </section>
        
    </middle>
                
    <back>
        <references>
            <name>Normative References</name>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4033.xml"/>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4034.xml"/>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4035.xml"/>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6891.xml"/>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
            
            <reference anchor="FIPS205" target="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.205.ipd.pdf">
                <front>
                    <title>Stateless Hash-Based Digital Signature Standards</title>
                    <author initials="" surname="">
                        <organization>National Institute of Standards and Technology (NIST)</organization>
                    </author>
                    <date month="August" year="2023" />
                </front>
                <annotation>
                    The target document is a draft NIST Standard intended for finalization in 2024. Some caution should be used since it may be less stable than this document. This reference is appropriate as the NIST standard is expected to be used in IETF standards.
                </annotation>
            </reference>
        </references>

        <references>
            <name>Informative References</name>

            <reference anchor="MTL" target="https://datatracker.ietf.org/doc/draft-harvey-cfrg-mtl-mode/">
                <front>
                    <title>Merkle Tree Ladder Mode (MTL) Signatures</title>
                    <seriesInfo name="Internet-Draft" value="draft-harvey-cfrg-mtl-mode"/>
                    <author initials="J." surname="Harvey">
                        <organization>Verisign</organization>
                    </author>
                    <author initials="B." surname="Kaliski">
                        <organization>Verisign</organization>
                    </author>
                    <author initials="A.M." surname="Fregly">
                        <organization>Verisign</organization>
                    </author>
                    <author initials="S." surname="Sheth">
                        <organization>Verisign</organization>
                    </author>
                    <date month="June" year="2023" />
                </front>               
            </reference>

            <reference anchor="NISTSELECTIONS" target="https://nvlpubs.nist.gov/nistpubs/ir/2022/NIST.IR.8413-upd1.pdf">
                <front>
                    <title>Status Report on the Third Round of the NIST Post-Quantum Cryptography Standardization Process</title>
                    <seriesInfo name="NISTIR" value="NIST.IR"/>
                    <author>
                        <organization>National Institute of Standards and Technology (NIST)</organization>
                    </author>
                    <date month="June" year="2022"/>
                </front>
            </reference>

            <reference anchor="SPHINCSPLUS" target="https://eprint.iacr.org/2019/1086.pdf">
                <front>
                  <title>The SPHINCS+ Signature Framework</title>
                  <author initials="D." surname="Bernstein">
                    <organization></organization>
                  </author>
                  <author initials="A." surname="Huelsing">
                    <organization></organization>
                  </author>
                  <author initials="S." surname="Koelbl">
                    <organization></organization>
                  </author>
                  <author initials="R." surname="Niederhagen">
                    <organization></organization>
                  </author>
                  <author initials="J." surname="Rijneveld">
                    <organization></organization>
                  </author>
                  <author initials="P." surname="Schwabe">
                    <organization></organization>
                  </author>
                  <date month="" year="2019" />
                </front>
                <refcontent>Cryptology ePrint Archive, Report 2019/1086</refcontent>
            </reference>

                    
            <reference anchor="CTRSAMTL" target="">
                <front>
                    <title>Merkle Tree Ladder Mode: Reducing the Size Impact of NIST PQC Signature Algorithms in Practice</title>
                    <author initials="B" surname="Kaliski">
                        <organization>Verisign</organization>
                    </author>
                    <author initials="A.M." surname="Fregly">
                        <organization>Verisign</organization>
                    </author>
                    <author initials="J." surname="Harvey">
                        <organization>Verisign</organization>
                    </author>
                    <author initials="S." surname="Sheth">
                        <organization>Verisign</organization>
                    </author>
                    <date year="2023"/>
                </front>          
            </reference>
        </references>

        <section title="Change Log">
            <t hangText="00:">
                Initial draft
            </t>
        </section>
    </back>
</rfc>
                        
