<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="bcp" consensus="true" docName="draft-ietf-dnsop-nsec3-guidance-10" indexInclude="true" ipr="trust200902" number="9276" prepTime="2022-08-11T06:42:23" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" updates="5155" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-dnsop-nsec3-guidance-10" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9276" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="NSEC3 Parameter Settings">Guidance for NSEC3 Parameter Settings</title>
    <seriesInfo name="RFC" value="9276" stream="IETF"/>
    <seriesInfo name="BCP" value="236" stream="IETF"/>
    <author initials="W." surname="Hardaker" fullname="Wes Hardaker">
      <organization showOnFrontPage="true">USC/ISI</organization>
      <address>
        <email>ietf@hardakers.net</email>
      </address>
    </author>
    <author initials="V." surname="Dukhovni" fullname="Viktor Dukhovni">
      <organization showOnFrontPage="true">Bloomberg, L.P.</organization>
      <address>
        <email>ietf-dane@dukhovni.org</email>
      </address>
    </author>
    <date month="08" year="2022"/>
    <area>ops</area>
    <workgroup>dnsop</workgroup>
    <keyword>DNSSEC</keyword>
    <keyword>DNS</keyword>
    <keyword>NSEC3</keyword>
    <keyword>NSEC</keyword>
    <keyword>Denial of Existence</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">NSEC3 is a DNSSEC mechanism providing proof of nonexistence by
asserting that there are no names that exist between two domain names
within a zone.  Unlike its counterpart NSEC, NSEC3 avoids directly
disclosing the bounding domain name pairs.  This document provides
guidance on setting NSEC3 parameters based on recent operational
deployment experience.  This document updates RFC 5155 with
guidance about selecting NSEC3 iteration and salt parameters.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This memo documents an Internet Best Current Practice.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further information
            on BCPs is available in Section 2 of RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9276" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2022 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) 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 Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requirements-notation">Requirements Notation</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-nsec3-parameter-value-discu">NSEC3 Parameter Value Discussions</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-algorithms">Algorithms</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-flags">Flags</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iterations">Iterations</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.4">
                <t indent="0" pn="section-toc.1-1.2.2.4.1"><xref derivedContent="2.4" format="counter" sectionFormat="of" target="section-2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-salt">Salt</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-recommendations-for-deployi">Recommendations for Deploying and Validating NSEC3 Records</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-best-practice-for-zone-publ">Best Practice for Zone Publishers</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-recommendation-for-validati">Recommendation for Validating Resolvers</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.3">
                <t indent="0" pn="section-toc.1-1.3.2.3.1"><xref derivedContent="3.3" format="counter" sectionFormat="of" target="section-3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-recommendation-for-primary-">Recommendation for Primary and Secondary Relationships</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-operational-considerations">Operational Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-deployment-measurements-at-">Deployment Measurements at Time of Publication</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="Appendix B" format="default" sectionFormat="of" target="section-appendix.b"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-computational-burdens-of-pr">Computational Burdens of Processing NSEC3 Iterations</xref></t>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.d"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">As with NSEC <xref target="RFC4035" format="default" sectionFormat="of" derivedContent="RFC4035"/>, NSEC3
<xref target="RFC5155" format="default" sectionFormat="of" derivedContent="RFC5155"/> provides proof of
nonexistence that consists of signed DNS records establishing the
nonexistence of a given name or associated Resource Record Type
(RRTYPE) in a DNSSEC-signed zone <xref target="RFC4035" format="default" sectionFormat="of" derivedContent="RFC4035"/>.  However, in the case of NSEC3, the names of valid nodes in the zone are obfuscated through
(possibly multiple iterations of) hashing (currently only
SHA-1 is in use on the Internet).</t>
      <t indent="0" pn="section-1-2">
  NSEC3 also provides "opt-out support", allowing for blocks of
  unsigned delegations to be covered by a single NSEC3 record.  Use of
  the opt-out feature allows large registries to only sign as many
  NSEC3 records as there are signed DS or other Resource Record sets
  (RRsets) in the zone; with opt-out, unsigned delegations don't
  require additional NSEC3 records.  This sacrifices the tamper-
  resistance of the proof of nonexistence offered by NSEC3 in order to
  reduce memory and CPU overheads.
</t>
      <t indent="0" pn="section-1-3">NSEC3 records have a number of tunable parameters that are specified
via an NSEC3PARAM record at the zone apex.  These parameters are the
hash algorithm, the processing flags, the number of hash iterations, and
the salt.  Each of these has security and operational considerations
that impact both zone owners and validating resolvers.  This document
provides some best-practice recommendations for setting the NSEC3
parameters.</t>
      <section anchor="requirements-notation" numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-requirements-notation">Requirements Notation</name>
        <t indent="0" pn="section-1.1-1">
   The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
   "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
   described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> 
   when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>
    </section>
    <section anchor="nsec3-parameter-value-discussions" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-nsec3-parameter-value-discu">NSEC3 Parameter Value Discussions</name>
      <t indent="0" pn="section-2-1">The following sections describe the background of the parameters for
the NSEC3 and NSEC3PARAM RRTYPEs.</t>
      <section anchor="algorithms" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-algorithms">Algorithms</name>
        <t indent="0" pn="section-2.1-1">The algorithm field is not discussed by this document.  Readers are
encouraged to read <xref target="RFC8624" format="default" sectionFormat="of" derivedContent="RFC8624"/> for guidance about DNSSEC algorithm
usage.</t>
      </section>
      <section anchor="flags" numbered="true" removeInRFC="false" toc="include" pn="section-2.2">
        <name slugifiedName="name-flags">Flags</name>
        <t indent="0" pn="section-2.2-1">The NSEC3PARAM flags field currently contains only reserved and
unassigned flags.  However, individual NSEC3 records contain the
"Opt-Out" flag <xref target="RFC5155" format="default" sectionFormat="of" derivedContent="RFC5155"/> that specifies whether that NSEC3 record
provides proof of nonexistence.  In general, NSEC3 with the Opt-Out
flag enabled should only be used in large, highly dynamic zones with a
small percentage of signed delegations.  Operationally, this allows
for fewer signature creations when new delegations are inserted into a
zone.  This is typically only necessary for extremely large
registration points providing zone updates faster than real-time
signing allows or when using memory-constrained hardware.

  Operators considering the use of NSEC3 are advised to carefully
  weigh the costs and benefits of choosing NSEC3 over NSEC.  Smaller
  zones, or large but relatively static zones, are encouraged to not
  use the opt-opt flag and to take advantage of DNSSEC's
  authenticated denial of existence.
</t>
      </section>
      <section anchor="iterations" numbered="true" removeInRFC="false" toc="include" pn="section-2.3">
        <name slugifiedName="name-iterations">Iterations</name>
        <t indent="0" pn="section-2.3-1">NSEC3 records are created by first hashing the input domain and then
repeating that hashing using the same algorithm a number of times based on the
iteration parameter in the NSEC3PARAM and NSEC3 records.


The first hash with NSEC3 is typically sufficient to discourage zone
enumeration performed by "zone walking" an unhashed NSEC chain.</t>
        <t indent="0" pn="section-2.3-2">Note that <xref target="RFC5155" format="default" sectionFormat="of" derivedContent="RFC5155"/> describes the Iterations field as follows</t>
        <blockquote pn="section-2.3-3">The
Iterations field defines the number of additional times the hash
function has been performed.</blockquote>
        <t indent="0" pn="section-2.3-4">This means that an NSEC3 record with an
Iterations field of 0 actually requires one hash iteration.</t>
        <t indent="0" pn="section-2.3-5">Only determined parties
with significant resources are likely to try and uncover hashed
values, regardless of the number of additional iterations performed.
If an adversary really wants to expend significant CPU resources to
mount an offline dictionary attack on a zone's NSEC3 chain, they'll
likely be able to find most of the "guessable" names despite any
level of additional hashing iterations.</t>
        <t indent="0" pn="section-2.3-6">Most names published in the DNS are rarely secret or unpredictable.
They are published to be memorable, used and consumed by humans.  They
are often recorded in many other network logs such as email logs,
certificate transparency logs, web page links, intrusion-detection
systems, malware scanners, email archives, etc.  Many times a simple
dictionary of commonly used domain names prefixes (www, mail,
imap, login, database, etc.) can be used to quickly reveal a large
number of labels within a zone.  Because of this, there are increasing
performance costs yet diminishing returns associated with applying
additional hash iterations beyond the first.</t>
        <t indent="0" pn="section-2.3-7">Although <xref target="RFC5155" sectionFormat="of" section="10.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5155#section-10.3" derivedContent="RFC5155"/> specifies the upper bounds for the
number of hash iterations to use, there is no published guidance for
zone owners about good values to select.  Recent academic studies
have shown that NSEC3 hashing provides only moderate
protection <xref target="GPUNSEC3" format="default" sectionFormat="of" derivedContent="GPUNSEC3"/> <xref target="ZONEENUM" format="default" sectionFormat="of" derivedContent="ZONEENUM"/>.</t>
      </section>
      <section anchor="salt" numbered="true" removeInRFC="false" toc="include" pn="section-2.4">
        <name slugifiedName="name-salt">Salt</name>
        <t indent="0" pn="section-2.4-1">NSEC3 records provide an additional salt value, which can be
combined with a Fully Qualified Domain Name (FQDN) to influence the resulting hash, but properties
of this extra salt are complicated.</t>
        <t indent="0" pn="section-2.4-2">In cryptography, salts generally add a layer of protection against
offline, stored dictionary attacks by combining the value to be hashed
with a unique "salt" value. This prevents adversaries from building up
and remembering a single dictionary of values that can translate a
hash output back to the value that it was derived from.</t>
        <t indent="0" pn="section-2.4-3">In the case of DNS, the situation is different because the hashed
names placed in NSEC3 records are always implicitly "salted" by
hashing the FQDN from each zone. Thus, no
single pre-computed table works to speed up dictionary attacks
against multiple target zones. An attacker is always required to
compute a complete dictionary per zone, which is expensive in both
storage and CPU time.</t>
        <t indent="0" pn="section-2.4-4">To understand the role of the additional NSEC3 salt field, we have to
consider how a typical zone walking attack works. Typically, the attack
has two phases: online and offline. In the online phase, an attacker
"walks the zone" by enumerating (almost) all hashes listed in NSEC3
records and storing them for the offline phase. Then, in the offline
cracking phase, the attacker attempts to crack the underlying hash. In
this phase, the additional salt value raises the cost of the attack
only if the salt value changes during the online phase of the
attack. In other words, an additional, constant salt value does not
change the cost of the attack.</t>
        <t indent="0" pn="section-2.4-5">Changing a zone's salt value requires the construction of a complete
new NSEC3 chain.  This is true both when re-signing the entire zone at
once and when incrementally signing it in the background where the new
salt is only activated once every name in the chain has been
completed. As a result, re-salting is a very complex operation, with
significant CPU time, memory, and bandwidth consumption. This makes
very frequent re-salting impractical and renders the additional salt
field functionally useless.</t>
      </section>
    </section>
    <section anchor="recommendations-for-deploying-and-validating-nsec3-records" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-recommendations-for-deployi">Recommendations for Deploying and Validating NSEC3 Records</name>
      <t indent="0" pn="section-3-1">The following subsections describe recommendations for the different
operating realms within the DNS.</t>
      <section anchor="best-practice-for-zone-publishers" numbered="true" removeInRFC="false" toc="include" pn="section-3.1">
        <name slugifiedName="name-best-practice-for-zone-publ">Best Practice for Zone Publishers</name>
        <t indent="0" pn="section-3.1-1">First, if the operational or security features of NSEC3 are not
needed, then NSEC <bcp14>SHOULD</bcp14> be used in preference to NSEC3. NSEC3
requires greater computational power (see <xref target="computationalburdens" format="default" sectionFormat="of" derivedContent="Appendix B"/>)
for both authoritative servers and validating clients.  Specifically,
there is a nontrivial complexity in finding matching NSEC3 records to
randomly generated prefixes within a DNS zone.  NSEC mitigates this
concern.  If NSEC3 must be used, then an iterations count of 0 <bcp14>MUST</bcp14> be
used to alleviate computational burdens.  Note that extra iteration
counts other than 0 increase the impact of CPU-exhausting DoS attacks,
and also increase the risk of interoperability problems.</t>
        <t indent="0" pn="section-3.1-2">Note that deploying NSEC with minimally covering NSEC records
<xref target="RFC4470" format="default" sectionFormat="of" derivedContent="RFC4470"/> also incurs a cost, and zone owners should measure the
computational difference in deploying either <xref target="RFC4470" format="default" sectionFormat="of" derivedContent="RFC4470"/> or NSEC3.</t>
        <t indent="0" pn="section-3.1-3">In short, for all zones, the recommended NSEC3 parameters are as shown
below:</t>
        <artwork align="left" pn="section-3.1-4">
; SHA-1, no extra iterations, empty salt:
;
bcp.example. IN NSEC3PARAM 1 0 0 -
</artwork>
        <t indent="0" pn="section-3.1-5">For small zones, the use of opt-out-based NSEC3 records is <bcp14>NOT RECOMMENDED</bcp14>.</t>
        <t indent="0" pn="section-3.1-6">For very large and sparsely signed zones, where the majority of the
records are insecure delegations, opt-out <bcp14>MAY</bcp14> be used.</t>
        <t indent="0" pn="section-3.1-7">Operators <bcp14>SHOULD NOT</bcp14> use a salt by indicating a zero-length salt value
instead (represented as a "-" in the presentation format).</t>
        <t indent="0" pn="section-3.1-8">If salts are used, note that since the NSEC3PARAM RR is not used by
validating resolvers (see <xref target="RFC5155" sectionFormat="of" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5155#section-4" derivedContent="RFC5155"/>), the iterations and
salt parameters can be changed without the need to wait for RRsets to
expire from caches.  A complete new NSEC3 chain needs to be
constructed and the full zone needs to be re-signed.</t>
      </section>
      <section anchor="recommendation-for-validating-resolvers" numbered="true" removeInRFC="false" toc="include" pn="section-3.2">
        <name slugifiedName="name-recommendation-for-validati">Recommendation for Validating Resolvers</name>
        <t indent="0" pn="section-3.2-1">Because there has been a large growth of open (public) DNSSEC
validating resolvers that are subject to compute resource constraints
when handling requests from anonymous clients, this document
recommends that validating resolvers reduce their iteration count
limits over time.  

Specifically, validating
resolver operators and validating resolver software implementers are
encouraged to continue evaluating NSEC3 iteration count deployment
trends and lower their acceptable iteration limits over time.
Because
treating a high iterations count as insecure leaves zones subject to
attack, validating resolver operators and validating resolver software
implementers are further encouraged to lower their default 
limit for returning SERVFAIL when processing NSEC3 parameters
containing large iteration count values.  
See
<xref target="deploymentmeasurements" format="default" sectionFormat="of" derivedContent="Appendix A"/> for measurements taken near the time of
publication of this document and potential starting points.</t>
        <t indent="0" pn="section-3.2-2">Validating resolvers <bcp14>MAY</bcp14> return an insecure response to their clients
when processing NSEC3 records with iterations larger
than 0.
Note also that a validating resolver returning an insecure response
<bcp14>MUST</bcp14> still validate the signature over the NSEC3 record to ensure
the iteration count was not altered since record publication (see
<xref target="RFC5155" sectionFormat="of" section="10.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5155#section-10.3" derivedContent="RFC5155"/>).</t>
        <t indent="0" pn="section-3.2-3">Validating resolvers <bcp14>MAY</bcp14> also return a SERVFAIL response when
processing NSEC3 records with iterations larger than 0.  Validating
resolvers <bcp14>MAY</bcp14> choose to ignore authoritative server responses with
iteration counts greater than 0, which will likely result in
returning a SERVFAIL to the client when no acceptable responses are
received from authoritative servers.</t>
        <t indent="0" pn="section-3.2-4">Validating resolvers returning an insecure or SERVFAIL answer to their
client after receiving and validating an unsupported NSEC3 parameter
from the authoritative server(s) <bcp14>SHOULD</bcp14> return an Extended DNS
Error (EDE) <xref target="RFC8914" format="default" sectionFormat="of" derivedContent="RFC8914"/> EDNS0 option of value 27.
Validating resolvers that choose to ignore a response with an
unsupported iteration count (and that do not validate the signature) <bcp14>MUST NOT</bcp14> return this EDE option.</t>
        <t indent="0" pn="section-3.2-5">Note that this specification updates <xref target="RFC5155" format="default" sectionFormat="of" derivedContent="RFC5155"/> by significantly
decreasing the requirements originally specified in <xref target="RFC5155" sectionFormat="of" section="10.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5155#section-10.3" derivedContent="RFC5155"/>. See the Security
Considerations (<xref target="security-considerations" format="default" sectionFormat="of" derivedContent="Section 4"/>) for arguments on how to
handle responses with non-zero iteration count.</t>
      </section>
      <section anchor="recommendation-for-primary-secondary-relationships" numbered="true" removeInRFC="false" toc="include" pn="section-3.3">
        <name slugifiedName="name-recommendation-for-primary-">Recommendation for Primary and Secondary Relationships</name>
        <t indent="0" pn="section-3.3-1">Primary and secondary authoritative servers for a zone that are not
being run by the same operational staff and/or using the same software
and configuration must take into account the potential differences in
NSEC3 iteration support.</t>
        <t indent="0" pn="section-3.3-2">Operators of secondary services should advertise the parameter limits
that their servers support. Correspondingly, operators of primary
servers need to ensure that their secondaries support the NSEC3
parameters they expect to use in their zones.  To ensure reliability,
after primaries change their iteration counts, they should query their
secondaries with known nonexistent labels to verify the secondary
servers are responding as expected.</t>
      </section>
    </section>
    <section anchor="security-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-4-1">This entire document discusses security considerations with various
parameter selections of NSEC3 and NSEC3PARAM fields.</t>
      <t indent="0" pn="section-4-2">The point where a validating resolver returns insecure versus the point
where it returns SERVFAIL must be considered carefully.  Specifically,
when a validating resolver treats a zone as insecure above a
particular value (say 100) and returns SERVFAIL above a higher point
(say 500), it leaves the zone subject to attacker-in-the-middle
attacks as if it were unsigned between these values.



  Thus, validating resolver operators and software implementers
  <bcp14>SHOULD</bcp14> set the point above which a zone is treated as
  insecure for certain values of NSEC3 iterations to the same as the
  point where a validating resolver begins returning SERVFAIL.

      </t>
    </section>
    <section anchor="operational-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-operational-considerations">Operational Considerations</name>
      <t indent="0" pn="section-5-1">This entire document discusses operational considerations with various
parameter selections of NSEC3 and NSEC3PARAM fields.</t>
    </section>
    <section anchor="iana-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-6-1">IANA has allocated the following code in the First Come First Served
     range <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/> of the "Extended DNS Error Codes" registry within the "Domain Name System
(DNS) Parameters" registry:</t>
      <dl spacing="compact" indent="3" newline="false" pn="section-6-2">
        <dt pn="section-6-2.1">INFO-CODE:</dt>
        <dd pn="section-6-2.2">27</dd>
        <dt pn="section-6-2.3">Purpose:</dt>
        <dd pn="section-6-2.4">Unsupported NSEC3 iterations value</dd>
        <dt pn="section-6-2.5">Reference:</dt>
        <dd pn="section-6-2.6">RFC 9276</dd>
      </dl>
    </section>
  </middle>
  <back>
    <references pn="section-7">
      <name slugifiedName="name-references">References</name>
      <references pn="section-7.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S" surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t indent="0">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>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC4035" target="https://www.rfc-editor.org/info/rfc4035" quoteTitle="true" derivedAnchor="RFC4035">
          <front>
            <title>Protocol Modifications for the DNS Security Extensions</title>
            <author fullname="R. Arends" initials="R" surname="Arends"/>
            <author fullname="R. Austein" initials="R" surname="Austein"/>
            <author fullname="M. Larson" initials="M" surname="Larson"/>
            <author fullname="D. Massey" initials="D" surname="Massey"/>
            <author fullname="S. Rose" initials="S" surname="Rose"/>
            <date month="March" year="2005"/>
            <abstract>
              <t indent="0">This document is part of a family of documents that describe the DNS Security Extensions (DNSSEC). The DNS Security Extensions are a collection of new resource records and protocol modifications that add data origin authentication and data integrity to the DNS. This document describes the DNSSEC protocol modifications. This document defines the concept of a signed zone, along with the requirements for serving and resolving by using DNSSEC. These techniques allow a security-aware resolver to authenticate both DNS resource records and authoritative DNS error indications.</t>
              <t indent="0">This document obsoletes RFC 2535 and incorporates changes from all updates to RFC 2535. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4035"/>
          <seriesInfo name="DOI" value="10.17487/RFC4035"/>
        </reference>
        <reference anchor="RFC4470" target="https://www.rfc-editor.org/info/rfc4470" quoteTitle="true" derivedAnchor="RFC4470">
          <front>
            <title>Minimally Covering NSEC Records and DNSSEC On-line Signing</title>
            <author fullname="S. Weiler" initials="S" surname="Weiler"/>
            <author fullname="J. Ihren" initials="J" surname="Ihren"/>
            <date month="April" year="2006"/>
            <abstract>
              <t indent="0">This document describes how to construct DNSSEC NSEC resource records that cover a smaller range of names than called for by RFC 4034.  By generating and signing these records on demand, authoritative name servers can effectively stop the disclosure of zone contents otherwise made possible by walking the chain of NSEC records in a signed zone. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4470"/>
          <seriesInfo name="DOI" value="10.17487/RFC4470"/>
        </reference>
        <reference anchor="RFC5155" target="https://www.rfc-editor.org/info/rfc5155" quoteTitle="true" derivedAnchor="RFC5155">
          <front>
            <title>DNS Security (DNSSEC) Hashed Authenticated Denial of Existence</title>
            <author fullname="B. Laurie" initials="B" surname="Laurie"/>
            <author fullname="G. Sisson" initials="G" surname="Sisson"/>
            <author fullname="R. Arends" initials="R" surname="Arends"/>
            <author fullname="D. Blacka" initials="D" surname="Blacka"/>
            <date month="March" year="2008"/>
            <abstract>
              <t indent="0">The Domain Name System Security (DNSSEC) Extensions introduced the NSEC resource record (RR) for authenticated denial of existence.  This document introduces an alternative resource record, NSEC3, which similarly provides authenticated denial of existence.  However, it also provides measures against zone enumeration and permits gradual expansion of delegation-centric zones. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5155"/>
          <seriesInfo name="DOI" value="10.17487/RFC5155"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B" surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t indent="0">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>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8914" target="https://www.rfc-editor.org/info/rfc8914" quoteTitle="true" derivedAnchor="RFC8914">
          <front>
            <title>Extended DNS Errors</title>
            <author fullname="W. Kumari" initials="W" surname="Kumari"/>
            <author fullname="E. Hunt" initials="E" surname="Hunt"/>
            <author fullname="R. Arends" initials="R" surname="Arends"/>
            <author fullname="W. Hardaker" initials="W" surname="Hardaker"/>
            <author fullname="D. Lawrence" initials="D" surname="Lawrence"/>
            <date month="October" year="2020"/>
            <abstract>
              <t indent="0">This document defines an extensible method to return additional information about the cause of DNS errors.  Though created primarily to extend SERVFAIL to provide additional information about the cause of DNS and DNSSEC failures, the Extended DNS Errors option defined in this document allows all response types to contain extended error information.  Extended DNS Error information does not change the processing of RCODEs.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8914"/>
          <seriesInfo name="DOI" value="10.17487/RFC8914"/>
        </reference>
      </references>
      <references pn="section-7.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="GPUNSEC3" quoteTitle="true" target="https://doi.org/10.1109/NCA.2014.27" derivedAnchor="GPUNSEC3">
          <front>
            <title>GPU-Based NSEC3 Hash Breaking</title>
            <author initials="M." surname="Wander" fullname="Mätthaus Wander">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Schwittmann" fullname="Lorenz Schwittmann">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Boelmann" fullname="Christopher Boelmann">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Weis" fullname="Torben Weis">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="August" year="2014"/>
          </front>
          <seriesInfo name="DOI" value="10.1109/NCA.2014.27"/>
        </reference>
        <reference anchor="RFC8126" target="https://www.rfc-editor.org/info/rfc8126" quoteTitle="true" derivedAnchor="RFC8126">
          <front>
            <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
            <author fullname="M. Cotton" initials="M" surname="Cotton"/>
            <author fullname="B. Leiba" initials="B" surname="Leiba"/>
            <author fullname="T. Narten" initials="T" surname="Narten"/>
            <date month="June" year="2017"/>
            <abstract>
              <t indent="0">Many protocols make use of points of extensibility that use constants to identify various protocol parameters. To ensure that the values in these fields do not have conflicting uses and to promote interoperability, their allocations are often coordinated by a central record keeper. For IETF protocols, that role is filled by the Internet Assigned Numbers Authority (IANA).</t>
              <t indent="0">To make assignments in a given registry prudently, guidance describing the conditions under which new values should be assigned, as well as when and how modifications to existing values can be made, is needed. This document defines a framework for the documentation of these guidelines by specification authors, in order to assure that the provided guidance for the IANA Considerations is clear and addresses the various issues that are likely in the operation of a registry.</t>
              <t indent="0">This is the third edition of this document; it obsoletes RFC 5226.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="26"/>
          <seriesInfo name="RFC" value="8126"/>
          <seriesInfo name="DOI" value="10.17487/RFC8126"/>
        </reference>
        <reference anchor="RFC8624" target="https://www.rfc-editor.org/info/rfc8624" quoteTitle="true" derivedAnchor="RFC8624">
          <front>
            <title>Algorithm Implementation Requirements and Usage Guidance for DNSSEC</title>
            <author fullname="P. Wouters" initials="P" surname="Wouters"/>
            <author fullname="O. Sury" initials="O" surname="Sury"/>
            <date month="June" year="2019"/>
            <abstract>
              <t indent="0">The DNSSEC protocol makes use of various cryptographic algorithms in order to provide authentication of DNS data and proof of nonexistence.  To ensure interoperability between DNS resolvers and DNS authoritative servers, it is necessary to specify a set of algorithm implementation requirements and usage guidelines to ensure that there is at least one algorithm that all implementations support.  This document defines the current algorithm implementation requirements and usage guidance for DNSSEC.  This document obsoletes RFC 6944.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8624"/>
          <seriesInfo name="DOI" value="10.17487/RFC8624"/>
        </reference>
        <reference anchor="ZONEENUM" quoteTitle="true" target="https://doi.org/10.2495/MIIT130591" derivedAnchor="ZONEENUM">
          <front>
            <title>An efficient DNSSEC zone enumeration algorithm</title>
            <author initials="Z." surname="Wang" fullname="Zheng Wang">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Xiao" fullname="Liyuan Xiao">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Wang" fullname="Rui Wang">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="April" year="2014"/>
          </front>
          <seriesInfo name="DOI" value="10.2495/MIIT130591"/>
        </reference>
      </references>
    </references>
    <section anchor="deploymentmeasurements" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-deployment-measurements-at-">Deployment Measurements at Time of Publication</name>
      <t indent="0" pn="section-appendix.a-1">At the time of publication, setting an upper limit of 100 iterations
for treating a zone as insecure is interoperable without significant
problems, but at the same time still enables CPU-exhausting DoS
attacks.</t>
      <t indent="0" pn="section-appendix.a-2">At the time of publication, returning SERVFAIL beyond 500 iterations
appears to be interoperable without significant problems.</t>
    </section>
    <section anchor="computationalburdens" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-computational-burdens-of-pr">Computational Burdens of Processing NSEC3 Iterations</name>
      <t indent="0" pn="section-appendix.b-1">The queries per second (QPS) of authoritative servers will decrease due
to computational overhead when processing DNS requests for zones
containing higher NSEC3 iteration counts.  The table below
shows the drop in QPS for various iteration counts.</t>
      <table anchor="iteration-counts-table" align="center" pn="table-1">
        <name slugifiedName="name-drop-in-qps-for-various-ite">Drop in QPS for Various Iteration Counts</name>
        <thead>
          <tr>
            <th rowspan="1" colspan="1" align="left">Iterations</th>
            <th rowspan="1" colspan="1" align="left">QPS [% of 0 Iterations QPS]</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">0</td>
            <td align="left" colspan="1" rowspan="1">100%</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">10</td>
            <td align="left" colspan="1" rowspan="1">89%</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">20</td>
            <td align="left" colspan="1" rowspan="1">82%</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">50</td>
            <td align="left" colspan="1" rowspan="1">64%</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">100</td>
            <td align="left" colspan="1" rowspan="1">47%</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">150</td>
            <td align="left" colspan="1" rowspan="1">38%</td>
          </tr>
        </tbody>
      </table>
    </section>
    <section anchor="qps" numbered="false" toc="include" removeInRFC="false" pn="section-appendix.c">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t indent="0" pn="section-appendix.c-1">The authors would like to thank the participants in the dns-operations discussion, which took place on mattermost hosted by DNS-OARC.</t>
      <t indent="0" pn="section-appendix.c-2">Additionally, the following people contributed text or review comments
to this document:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-appendix.c-3">
        <li pn="section-appendix.c-3.1">
          <t indent="0" pn="section-appendix.c-3.1.1"><contact fullname="Vladimir Cunat"/></t>
        </li>
        <li pn="section-appendix.c-3.2">
          <t indent="0" pn="section-appendix.c-3.2.1"><contact fullname="Tony Finch"/></t>
        </li>
        <li pn="section-appendix.c-3.3">
          <t indent="0" pn="section-appendix.c-3.3.1"><contact fullname="Paul Hoffman"/></t>
        </li>
        <li pn="section-appendix.c-3.4">
          <t indent="0" pn="section-appendix.c-3.4.1"><contact fullname="Warren Kumari"/></t>
        </li>
        <li pn="section-appendix.c-3.5">
          <t indent="0" pn="section-appendix.c-3.5.1"><contact fullname="Alexander Mayrhofer"/></t>
        </li>
        <li pn="section-appendix.c-3.6">
          <t indent="0" pn="section-appendix.c-3.6.1"><contact fullname="Matthijs Mekking"/></t>
        </li>
        <li pn="section-appendix.c-3.7">
          <t indent="0" pn="section-appendix.c-3.7.1"><contact fullname="Florian Obser"/></t>
        </li>
        <li pn="section-appendix.c-3.8">
          <t indent="0" pn="section-appendix.c-3.8.1"><contact fullname="Petr Spacek"/></t>
        </li>
        <li pn="section-appendix.c-3.9">
          <t indent="0" pn="section-appendix.c-3.9.1"><contact fullname="Paul Vixie"/></t>
        </li>
        <li pn="section-appendix.c-3.10">
          <t indent="0" pn="section-appendix.c-3.10.1"><contact fullname="Tim Wicinski"/></t>
        </li>
      </ul>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.d">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="W." surname="Hardaker" fullname="Wes Hardaker">
        <organization showOnFrontPage="true">USC/ISI</organization>
        <address>
          <email>ietf@hardakers.net</email>
        </address>
      </author>
      <author initials="V." surname="Dukhovni" fullname="Viktor Dukhovni">
        <organization showOnFrontPage="true">Bloomberg, L.P.</organization>
        <address>
          <email>ietf-dane@dukhovni.org</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
