<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema
      validation and schema-aware editing --> 

<!DOCTYPE rfc [
  <!ENTITY filename "draft-eastlake-dnssd-rfc2931bis-sigzero-01">
  <!ENTITY nbsp     "&#160;">
  <!ENTITY zwsp     "&#8203;">
  <!ENTITY nbhy     "&#8209;">
  <!ENTITY wj       "&#8288;">
]>
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> --> 
<!-- This third-party XSLT can be enabled for direct transformations
in XML processors, including most browsers --> 
<!-- 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 strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="&filename;"
  ipr="trust200902"
  obsoletes="2931"
  submissionType="IETF"
  xml:lang="en"
  version="3">
<!-- 
    * docName should be the name of your draft * category should be
    one of std, bcp, info, exp, historic * ipr should be one of
    trust200902, noModificationTrust200902, noDerivativesTrust200902,
    pre5378Trust200902 * updates can be an RFC number as NNNN *
    obsoletes can be an RFC number as NNNN
-->


<!-- ____________________FRONT_MATTER____________________ -->

<front>
  <title abbrev="DNS SIG Zero RRs">Domain Name System (DNS) Public Key
  Based Request and Transaction Authentication (SIGZERO,
  SIG(0))</title>
  
<!-- An abbreviated title is required if the full title is longer
     than 39 characters -->

   <seriesInfo name="Internet-Draft"
               value="&filename;"/>

   <author fullname="Donald E. Eastlake 3rd" initials="D."
           surname="Eastlake">
     <organization>Independent</organization>
     <address>
       <postal>
         <street>2386 Panoramic Circle</street>
         <city>Apopka</city>
         <region>Florida</region>
         <code>32703</code>
         <country>USA</country>
       </postal>        
       <phone>+1-508-333-2270</phone>
       <email>d3e3e3@gmail.com</email>
     </address>
   </author>
   
   <author fullname="Johan Stenstam" initials="J."
           surname="Stenstam">
     <organization>Swedish Internet Foundation</organization>
     <address>
        <email>johan.stenstam@internetstiftelsen.se</email>
     </address>
   </author>
   
   <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>USA</country>
       </postal>
       <email>marka@isc.org</email>
     </address>
   </author>

   <date year="2026" month="3" day="2"/>

   <area>Internet</area>
   <workgroup>DNSSD</workgroup>

   <keyword></keyword>
   <!-- Multiple keywords are allowed.  Keywords are incorporated
        into HTML output files for use by search engines. --> 

   <abstract>
     <t>This document specifies use of the SIGZERO and SIG(0) Domain
     Name System (DNS) Resource Records (RRs) to provide public key
     based authentication of DNS requests and transactions. This
     document obsoletes RFC 2931.</t>
   </abstract>

</front>


<!-- ____________________MIDDLE_MATTER____________________ -->
<middle>
    
<section> <!-- 1. -->
  <name>Introduction</name>

  <t> [[[ META COMMENTS: Comments within triple square brackets like
  this are discussion points or alternatives/options for the content
  of this draft. They are NOT text to be included in the final
  document. ]]] </t>

  <t>This document specifies use of the Domain Name System (DNS)
  SIGZERO and SIG(0) Resource Records (RRs) to provide public key
  based authenticate of DNS requests and transactions. SIGZERO
  is patterned after the TSIG <xref target="RFC8945"/> and RRSIG <xref
  target="RFC4034"/> RRs. Use of SIGZERO is RECOMMENDED for this
  purpose.</t>

  <t>As discussed below, use of the SIG RR for this purpose is NOT
  RECOMMENDED. When a SIG RR is so used, it has a "type covered" field
  value of zero, and is called a "SIG(0)" RR.</t>

  <t>This document obsoletes <xref target="RFC2931"/>.</t>

</section>

<section>  <!-- 2. -->
  <name>Terminology</name>

<t>The term "SIG Zero" is used in this document to refer to both the
SIGZERO RR and the SIG(0) RR.</t>

<t>General familiarity with DNS terminology <xref target="RFC9499"/>
is assumed.</t>
    
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
when, they appear in all capitals, as shown here.</t>

</section>

<section>  <!-- 3. -->
  <name>SIG Zero RR Design Rationale and Use</name>

<t>The SIGZERO and SIG(0) (SIG Zero) Meta-RRs provide authentication
and integrity protection for DNS transactions and requests that is not
provided by the DNSSEC security specified in <xref target="RFC4034"/>
and <xref target="RFC4035"/>.  The authenticated data origin services
of DNSSEC security provide either protected data resource records
(RRs) or authenticatable denial of their existence.  Those services
provide no protection for the following:</t>

<ul spacing="compact">
  <li>glue records,</li>
  <li>DNS requests,</li>
  <li>the DNS message headers on requests or responses, and</li>
  <li>the overall integrity of a transaction, that is to say, that the
  response was issued in response to the request sent and neither was
  tampered with in transit.</li>
</ul>

<t>As Meta-RRs, SIGZERO and SIG(0) are not stored in zones. They
accompany DNS messages in the Additional Information section of the
message. (See <xref target="recursive"/> for a discussion of forwarding
them in the case of a recursive server.)</t>

<t>Transaction authentication can provide cryptographic assurance to a
resolver that it is at least getting the DNS response message from the
server and that the received message is in response to the request it
sent.  This is accomplished by adding either a TSIG RR <xref
target="RFC8945"/> or, as specified herein, a SIG Zero RR, at the end
of the additional information section of the response which
authenticates the concatenation of the corresponding resolver request
and the server's response.</t>

<t>Requests can also be authenticated by including a SIG Zero RR at
the end of the request's additional information section.  The method
of signing requests as specified herein is primarily intended for
authenticating dynamic update requests <xref target="RFC3007"/>, use
in the Service Registration Protocol (SRP) for DNS-Based Service Discovery
<xref target="RFC9665"/>, TKEY requests <xref target="rfc2930bis"/>,
or other requests specified in the future that require
authentication.</t>

<t>The private keys used in public key based request security belong
to the host composing the DNS request message or other entity
composing the request or to a zone to be affected by the request. The
corresponding public key(s) can be stored in and retrieved from the
DNS for verification as KEY RRs with a protocol byte of 3 or 255
(ANY).</t>

</section>

<section>  <!-- 4. -->
  <name>Differences Between TSIG, SIGZERO, and SIG(0)</name>

<t>A TSIG <xref target="RFC8945"/> RR can also be used for request and
transaction authentication. There are significant differences between
TSIG and SIG Zero.</t>

<t>Because TSIG involves secret keys available at both the requester
and server the presence of such a key can imply that it is likely that
the other party understands TSIG and has the same key installed.
Furthermore, TSIG uses keyed hash authentication codes which are
relatively inexpensive to compute.  Thus, it is common to authenticate
DNS requests with TSIG and to authenticate DNS transactaions with TSIG
if the corresponding request is authenticated.</t>

<t>SIGZERO and SIG(0) on the other hand, uses public key
authentication, where the public keys can be stored in DNS as KEY RRs
and a private key is held by the signer.  Existence of such a KEY RR
does not necessarily imply that SIGZERO or SIG(0) is implemented or
enabled.  In addition, they involve relatively expensive public key
cryptographic operations and their verification involves obtaining and
verifying the corresponding KEY which can itself be an expensive
operation.  Indeed, a policy of using SIGZERO or SIG(0) on all
requests and verifying it before responding would, for some
configurations, lead to a deadly embrace with the attempt to obtain
and verify the KEY needed to authenticate the request resulting in
additional requests accompanied by a SIGZERO or SIG(0) leading to
further requests accompanied by a SIGZERO or SIG(0), etc.
Furthermore, omitting these RRs when not required on requests halves
the number of public key operations required by the transaction.</t>

<t>For these reasons, SIG Zero RRs SHOULD only be used on requests
when necessary to authenticate that the requester has some required
privilege or identity.  SIG Zero on transactions is defined in such a
way as to not require a SIG Zero on the corresponding request and
still provide transaction protection.</t>

<t>Which SIG Zeros are required to be authenticated by a server or
requester should be a local configuration option.</t>

<section>
  <name>Why SIGZERO Is Prefered Over SIG(0)</name>
 
<t>The SIGZERO RR was designed for this application and its use is
RECOMMENDED. SIG(0) is an alternative use of the older SIG RR
originally specified in <xref target="RFC2535"/> and is NOT
RECOMMENDED. Four reasons for this preference are given below.</t>

<ol>
  
  <li>SIG(0) does not provide a convenient way to include an extended
  error code in a response reporting on the SIG Zero
  operation. SIGZERO has an Error field for this purpose.</li>
  
  <li>There is no convenient way to extend SIG(0) while SIGZERO has an
  Other Data field for this purpose.</li>

  <li>SIG(0) does not provide a convenient way to forward the original
  DNS request message ID through a recursive server but this value is
  needed to validate a SIG(0) or SIGZERO signature. SIGZERO has a
  reserved field for this value (as does the TSIG RR). See <xref
  target="recursive"/>.</li>

  <li>The SIG RR was used as a data RR for signatures and its RRTYPE
  is in the range normally used for data RRs. That, if and only if a
  SIG RR's Type Covered field is zero, it is actually a Meta-RR, might
  confuse a defective DNS implemenetation .</li>
  
</ol>

</section>
<section>
  <name>Multiple TSIGs, SIGZEROs, and/or SIG(0)s</name>

<t>A request or response may contain any one of the following:</t>

<ul>
  <li>one TSIG or</li>
  <li>one SIG(0) or</li>
  <li>one or more SIGZERO RRs.</li>
</ul>

<t>It MUST NOT have both a TSIG and a SIG(0) and MUST NOT have more
than one TSIG or more than one SIG(0). It MUST NOT have a TSIG or
SIG(0) along with a SIGZERO. A request with these prohibited
combinations MUST be rejected with FORMERR and a response with such a
combination is ignored.</t>

<t>[[[ This section preserves the current restrictions on multiple
TSIGs and/or SIG(0)s. Should this be further liberalized? ]]]</t>

</section>
</section>

<section>  <!-- 5. -->
  <name>The SIG Zero Resource Records</name>

  <t>The format of the SIGZERO and SIG(0) RRs are specified in the
  subsections below. All multi-octet integers in these RRs are sent in
  network byte order (see Section 2.3.2 of <xref
  target="RFC1035"/>).</t>

  <section>
    <name>SIGZERO RR Format</name>

<t>The fields of the SIGZERO Meta-RR are described below. </t>

<figure anchor="SIGZformat">
  <name>SIGZERO RR Format</name>
  <artwork align="center">
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                  Owner Name = Signer's Name                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          TYPE = TBD           |     CLASS = 0x00FF (ALL)      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       TTL (MUST be zero)                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           RDLENGTH            |                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+          RDATA                /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  </artwork>
</figure>

<dl>

  <dt>NAME:</dt><dd>The owner name of the KEY RR holding the public
  key that should verify the signature. If there is no such KEY RR
  owner name then, to avoid wasting bytes, this should be the name of
  the root, that is, a single zero byte.</dd>

  <dt>TYPE:</dt><dd>This MUST be TBD [248 suggested] for SIGZERO</dd>

  <dt>CLASS:</dt><dd>This MUST be 255 (ANY, 0x00FF).</dd>

  <dt>TTL:</dt><dd>The TTL field MUST be zero and is ignored on
  receipt. The zero value minimizes the risk that a DNS implementation
  that does not understand SIGZERO will cache the RR.</dd>

  <dt>RDLENGTH:</dt><dd>An unsigned integer giving the length of the
  RDATA.</dd>
  
  <dt>RDATA</dt><dd>The RDATA for a SIGZERO RR consists of a number of
  fields as described below and shown in <xref
  target="SIGZrdata"/>.</dd>
  
</dl>

<t>(Most of these fields are similar or identical to the 
field in the TSIG <xref target="RFC8945"/> or RRSIG <xref
target="RFC4034"/> RR with same field name.)</t>

<figure anchor="SIGZrdata">
  <name>SIGZERO RR Format</name>
  <artwork align="center">
                     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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Algorithm    |     State     |          Original ID          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Error             |             Fudge             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|          Time Signed          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |        Signature Size         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Key Tag            |                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+           Signature           /
/                                                               /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Other Length          |                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+           Other Data          /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  </artwork>
</figure>

<dl>
  <dt>Algorithm:</dt><dd>The signature algorithm used. Values in this
  field have the same meaning as they do in the RRSIG RR <xref
  target="RFC4034"/> and use the same IANA registry <xref
  target="IANAalg"/></dd>

  <dt>State:</dt><dd>[[[ Intended as a possible location for the "key
  state" suggest in draft-berra-dnsop-keystate <xref
  target="keystate"/>. If not used for that then this field would be
  specified as "MUST be sent as zero and ignored on receipt." It could
  be called "Z" or "Flags". ]]]</dd>

  <dt>Original ID:</dt><dd>An unsigned 16-bit integer holding the DNS
  message ID of the original request message. For a SIGZERO RR added
  to a DNS message being originated, it is set equal to the DNS
  message ID unless that SIGZERO RR is being forwarded as discussed in
  <xref target="recursive"/> in which case the Original ID field is
  forwarded as received.</dd>

  <dt>Error:</dt><dd>In responses, an unsigned 16-bit integer
  containing the extended RCODE covering SIGZERO processing. In
  requests, this MUST be zero and is ignored on receipt.</dd>

  <dt>Fudge:</dt><dd>An unsigned 16-bit integer specifying the allowed
  time difference in seconds permitted from the Time Signed
  field.</dd>

  <dt>Time Signed:</dt><dd>An unsigned 48-bit integer containing the
  time the message was signed as seconds since 00:00 on 1970-01-01
  UTC, ignoring leap seconds.</dd>

  <dt>Signature Size:</dt><dd>An unsigned integer giving the size of
  the Signature field in bytes.</dd>

  <dt>Key Tag:</dt><dd>The Key Tag field contains the key tag value of
  the public key that is to be used to validate this signature. In the
  case of multiple possible KEY RRs, the Key Tag usually allows a
  heuristic reduction the number of KEY RRs to try. Appendix B of
  <xref target="RFC4034"/> specifies how to calculate Key Tag
  values.</dd>

  <dt>Signature:</dt><dd>The Signature field contains the cryptographic
  signature that covers the DNS request or transaction.  The format of
  this field depends on the algorithm in use, and these formats are
  described in separate companion documents referenced from the IANA
  registry <xref target="IANAalg"/>.</dd>

  <dt>Other Length:</dt><dd>An unsigned 16-bit integer specifying the
  length of the Other Data field in octets.</dd>

  <dt>Other Data:</dt><dd>Additional data relevant to the TSIG record
  to be specified in later extentions.</dd>
 
</dl>

<t>The Time Signed and the Fudge form a time bracket, that is, the
Time Signed plus/minus the Fudge, for the purpose of limiting replay
attacks.  Signatures received outside that bracket are considered
invalid.  In IP networks, the value of Fudge should normally not be
more than 5 minutes.</t>

<t>[[[ Should it be permissible to omit Other Length if it is zero?
Should the Other Length / Other Data construct copied from TSIG and
TKEY be replaced by TLVs, which would be more flexible? ]]]</t>

  </section>
  <section>
    <name>The SIG(0) RR Format</name>
    
<t>The structure of the SIG(0) resource record (RR) is the same as the
structure of the RRSIG RR in <xref target="RFC4034"/> Section 4 except
as provided below.</t>

<figure anchor="SIG0format">
  <name>SIG(0) RR Format</name>
  <artwork align="center">
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                     Owner Name (not used)                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           TYPE = 24           |     CLASS = 0x00FF (ALL)      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       TTL (MUST be zero)                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           RDLENGTH            |                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+          RDATA                /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  </artwork>
</figure>

<t>The type of the SIG RR is 24. The structure of a SIG(0) RDATA is
shown in <xref target="SIG0rdata"/>.</t>

<t>For SIG(0) RRs, the owner name, CLASS, TTL, and original TTL, and
Labels fields are meaningless. To conserve space, the owner name
SHOULD be root (a single zero octet). The TTL field MUST be zero. The
Labels field MUST be zero. The CLASS field MUST be 255 (ANY), These
fields are ignored on receipt. A TTL of zero decreases the risk that a
DNS implementation that does not understand SIG(0) will cache such an
RR. The RDATA for a SIG(0) RR consists of a number of fields as
described below.</t>

<t></t>

<figure anchor="SIG0rdata">
  <name>SIG(0) RDATA Format from <xref target="RFC4034"/></name>
  <artwork align="center">
                     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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Type Covered           |  Algorithm    |     Labels    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Original TTL                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Signature Expiration                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Signature Inception                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Key Tag            |                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+         Signer's Name         /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                                                               /
/                            Signature                          /
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  </artwork>
</figure>

<t>The Inception and Expiration times in SIG(0)s are for the purpose
of limiting replay attacks.  They form a time bracket and messages
received outside that bracket are ignored.  In IP networks, this time
bracket SHOULD NOT normally extend further than 5 minutes into the
past and 5 minutes into the future.</t>

<t>For transaction SIG(0)s, there MUST be a KEY RR associated with the
signer name with the public key corresponding to the private key used
to calculate the signature.  For general transaction authentication
and integrity, the signer field is a name of the originating host; for
example, the host domain name used may be the inverse IP address
mapping name for an IP address of the host if the relevant KEY is
stored there. For SIG(0)s on requests requiring authentication, the
signer relates to the authority being requested such as authority to
update a zone.</t>

<t>When SIG(0) authentication on a response is desired, the SIG(0)
MUST be considered the highest priority of any additional information
for inclusion in the response. If the SIG(0) RR cannot be added
without causing the message to be truncated, the server MUST alter the
response so that a SIG(0) can be included, set the TC bit, and return
RCODE 0 (NOERROR).  The client should at this point retry the request
using an available transport that does not have UDP packet size
restrictions.</t>

<aside><t>Both SIG(0) DNS transaction security and DNSSEC data
security originally used the SIG (type = 24) and KEY (type = 25) RRs.
DNSSEC was changed to use the RRSIG (type = 46) and DNSKEY (type = 48)
RRs <xref target="RFC4034"/>; however, SIG(0), continues to use the
SIG and KEY RRs and SIGZERO makes use of the KEY RR.</t></aside>

</section>
</section>

<section>  <!-- . -->
  <name>Calculating Request and Transaction SIG Zero RRs</name>

<t>This section specifies the data over which request and transaction
SIG Zeros are calculated. In the case of more than one SIGZERO RR,
there is no significance to their order and a SIGZERO RR does not sign
any other SIGZERO RR in that DNS message.</t>

<section>
  <name>Calculating Request SIGZERO RRs</name>

<t>A DNS request may be optionally signed by including one or more
SIGZERO RRs at the end of the request additional information section.
These RRs are calculated for and sign the "data" consisting of the
following:</t>

<ol spacing="compact">

  <li>The SIGZERO RR with the signature field set to zero.</li>
  
  <li>The DNS request message, including the DNS header with the
  Message ID replaced by the Original ID field of the SIGZERO, but not
  any earlier headers such as UDP/IP headers, and before any SIG Zero
  RRs have been added so that, for example, the request RR counts have
  not yet been adjusted for SIG Zero inclusion.</li>
</ol>

<t>That is</t>

<artwork align="center">
  data = (SIGZERO RR) |
         (message with Message ID replaced and without SIG Zero RRs)
  
</artwork>
 
<t>where "|" is concatenation and RR is a SIGZERO RR with the
signature field set to zero.</t>

</section>

<section>
  <name>Calculating Request SIG(0) RRs</name>

<t>A DNS request may be optionally signed by including a single SIG(0)
RR) at the end of the request additional information section.  This RR
is calculated for and signs the "data" consisting of the
following:</t>

<ol spacing="compact">
  
  <li>For the SIG(0), its RDATA section omitting the signature
  subfield itself, not just zeroing its value.</li>
  
  <li>The DNS request message, including DNS header, but not any
  earlier headers such as UDP/IP headers and before the SIG(0) RR has
  been added so that, for example, the request RR counts have not yet
  been adjusted for SIG(0) inclusion.</li>
</ol>

<t>That is</t>

<artwork align="center">
data = (SIG(0) RDATA) | (request without SIG(0))
  
</artwork>
 
<t>where "|" is concatenation and RDATA is the RDATA of a SIG(0) being
calculated omitting the signature itself.</t>

</section>

<section>
  <name>Calculating Transaction SIGZERO RRs</name>

<t>A SIGZERO can be used to secure a transacation consisting of a
response and the request that produced it.  Such a transaction
signature, to be included in the response, is calculated over data
consisting of</t>

<ol spacing="compact">
  <li>That SIGZERO RR with the signature field set zero.</li>
  <li>The DNS request message that produced this response, omitting
  any SIG Zeros that were present in the request and including the
  request's DNS header with the Message ID replaced by the Original ID
  field of the SIGZERO but not any preceding headers such as UDP or
  IP. (Request SIG Zeros are omitted to avoid possible confusion if,
  for example, a forwarder adds a SIGZERO to a request.)</li>
  <li>The DNS response message, including DNS header but not
  any preceding headers such as TCP or IP and before any SIGZEROs
  have been added so that, for example, the response RR counts have
  not yet been adjusted for such inclusion.</li>
</ol>

<artwork align="center">
data = (SIGZERO RR) | (request message without SIG Zeros) |
  (response message without SIG Zeros)
  
</artwork>

<t>where "|" is concatenation.</t>

<t>Successful verification of a response SIGZERO by the requesting
resolver increases confidence that the query and response were not
tampered with in transit, that the response corresponds to the
intended query, and that the response comes from the queried
server.</t>

</section>

<section>
  <name>Calculating a Transaction SIG(0) RR</name>

<t>A SIG(0) can be used to secure a transacation consisting of a
response and the request that produced it.  Such a transaction
signature is calculated by using a "data" consisting of</t>

<ol spacing="compact">
  <li>For the SIG(0), the RDATA section omitting (not just zeroing)
  the signature itself.</li>
  <li>The DNS request message that produced this response,
  including the request's DNS header and any SIG(0) that was
  present but not any preceding headers such as UDP or IP.</li>
  <li>The DNS response message, including DNS header but not
  any preceding headers such as TCP or IP and before any SIG(0)
  has been added so that, for example, the response RR counts have
  not yet been adjusted for such inclusion.</li>
</ol>

<artwork align="center">
data =
  (SIG(0) RDATA) | request message |
  (response message without SIG Zeros)
  
</artwork>

<t>where "|" is concatenation and RDATA is the RDATA of a SIG(0)
being calculated omitting the signature itself.</t>

<t>Successful verification of a response SIG Zero by the requesting
resolver increases confidence that the query and response were not
tampered with in transit, that the response corresponds to the
intended query, and that the response comes from the queried
server.</t>

</section>

<section>
  <name>Handling Multipacket DNS Messages</name>

<t>In the case of a DNS message split into multiple packets via a
stream transport (e.g. TCP, DoT, etc.), a SIG Zero on the first data
packet is calculated with "data" as above but using data only from the
first packet. For each subsequent packet, it is calculated as
follows:</t>

<artwork align="center">
data =  ( (SIG(0) RDATA) or (SIGZERO RR) ) |
        (DNS payload without SIG Zeros) | previous packet
  
</artwork>

<t>where "|" is concatenations, RDATA and SIGZERO RR are as above, and
previous packet is the previous DNS payload including DNS header but
not any preceding headers such as TCP or IP and including a SIG(0) RR
if one was present but not any SIGZERO RRs.</t>

<t>This does not apply to fragmented UDP where the message is just
signed once at the end and then fragmented.</t>

<t>Except where needed to authenticate an update, TKEY, or similar
privileged request, servers are not required to check a request
SIG Zero.</t>

</section>
</section>

<section>
  <name>Processing SIG Zero RRs and Responses</name>

<t>If the time when a SIG Zero on a request is received is outside the
interval indicated (by the Inception and Expiration Times for a SIG(0)
or the Time Signed and Fudge for a SIGZERO), the BADTIME error is
returned. If this applies to a response, the response is ignored.</t>

<t>If one or more SIG Zero RRs are at the end of the additional
information section of a response, they are transaction signatures
covering the response and the request that produced that response.</t>

<t>If a response's SIG Zero check succeeds, such a transaction
authentication does NOT directly authenticate the validity of any data
RRs in the message.  However, it can increase confidence that they
were sent by the queried server and have not been altered in transit.
(Only an RRSIG RR <xref target="RFC4034"/> signed by the zone or a key
tracing its authority to the zone or to resolver configuration can
directly authenticate data RRs, depending on resolver policy.) If a
resolver or server does not implement transaction and/or request SIG
Zeros, it MUST ignore them without error where they are optional and
treat them as failing where they are required.</t>

<t>If a response has multiple SIGZERO RRs and verification of some
succeeds and other fail, the appropriate acion is dependent on local
policy and configuration.</t>

<section anchor="recursive">
  <name>Considerations for Forwarding Servers</name>
  
  <t>A server acting as a forwarding (recursive) server of a DNS
  message SHOULD check for the existence of SIG Zero RRs. If it
  implements SIG Zero RRs but cannot verify a SIG Zero RR, the server
  MUST include that RR when forwarding the message. If a SIG Zero
  passes all checks and verifies, the forwarding server SHOULD remove
  it and MUST, if possible, add a SIG Zero of its own to the
  destination or the next forwarder. If no transaction security is
  available to the destination and the message is a request, and if
  the corresponding response has the AD flag (see <xref
  target="RFC4035"/>) set, the forwarder MUST clear the AD flag before
  adding a SIG Zero to the response and returning the result to the
  host from which it received the request.</t>

  <t>The transit of a DNS request between the originating client and
  final server through one or more forwarding servers and the similar
  handling of its response introduces additional potential failure
  and/or compromise points. Thus, when practical, requests with a SIG
  Zero RR should be sent directly to the final server that will verify
  that SIG Zero.</t>
  
</section>
</section>

<section>
  <name>Security Considerations</name>

  <t>Private keys used to create SIG Zero RRs are very sensitive
  information and all available steps should be taken to protect them
  on every host on which they are stored. Such hosts may need to be
  physically protected. If they are multi-user machines, great care
  should be taken so that unprivileged users have no access to private
  keying material.</t>
  
  <t>The inclusion of the SIG Zero Inception and Expiration Time and
  the SIGZERO Time Signed and Fudge under the signature improves
  resistance to replay attacks.</t>

</section>
<section>
  <name>IANA Considerations</name>

  <t>IANA is requested to assign a SIGZERO RRTYPE number in the
  "Resource Record (RR) TYPEs" registry <xref target="DNSparams"/> in
  the range for meta-RRs as requested in <xref
  target="SIGZEROtype"/>. [Value 248 is suggested] The resulting entry
  would be as follows:</t>

  <table>
    <thead>
      <tr><th>TYPE</th><th>Value</th><th>Meaning</th><th>Reference</th></tr>
    </thead>
    <tbody>
      <tr><td>SIGZERO</td><td>TBD</td><td>Public key request or
      transaction signature.</td><td>[this document]</td></tr>
    </tbody>
  </table>

</section>
            
</middle>


<!-- ____________________BACK_MATTER____________________ -->
<back>

<references>
  <name>Normative References</name>

<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.1035.xml"/>
<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4034.xml"/>
<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4035.xml"/>
<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>

</references>

<references>
  <name>Informative References</name>

  <reference anchor="keystate"
	     target="https://datatracker.ietf.org/doc/draft-berra-dnsop-keystate/">
    <front>
      <title>Signalling Key State Via DNS EDNS(0) OPT</title>
      <author fullname="Erik" initials="E."
	      surname="Bergstrom"/>
      <author fullname="Leon Fernandez" initials="L."
	      surname="Fernandez"/>
      <author fullname="Johan Stenstam" initials="J."
	      surname="Stenstam"/>
    </front>
    <seriesInfo name="work in" value="progress"/>
  </reference>

  <reference anchor="IANAalg"
target="https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml">
    <front>
      <title>DNS Security Algorithm Numbers</title>
      <author fullname="IANA"/>
    </front>
  </reference>

  <reference anchor="DNSparams"
target="https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml">
    <front>
      <title>Domain Name System (DNS) Parameters</title>
      <author fullname="IANA"/>
    </front>
  </reference>

<reference anchor="rfc2930bis"
           target="https://datatracker.ietf.org/doc/draft-eastlake-dnsop-rfc2930bis-tkey/">
  <front>
    <title>Secret Key Agreement for DNS (TKEY Resource
    Record)</title>
    <author fullname="Donald E. Eastlake 3rd" initials="D."
            surname="Eastlake"/>
    <author fullname="Mark Andrews" initials="M."
            surname="Andrews"/>
  </front>
  <seriesInfo name="work in" value="process"/>
</reference>

<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2535.xml"/>
<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2931.xml"/>
<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.3007.xml"/>
<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8945.xml"/>
<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9499.xml"/>
<xi:include
  href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9665.xml"/>

</references>

<section anchor="SIGZEROtype">
  <name>SIGZERO RRTYPE Assignment Application</name>
<artwork>
   A. Submission Date: tbd

   B.1 Submission Type:  [X] New RRTYPE  [ ] Modification to RRTYPE
   B.2 Kind of RR:  [ ] Data RR  [X] Meta-RR

   C. Contact Information for submitter (will be publicly posted):
      Name: Donald Eastlake            Email Address: d3e3e3@gmail.com
      International telephone number: +1-508-333-2270
      Other contact handles:

   D. Motivation for the new RRTYPE application.
      SIG(0) has been found to have a number of deficiencies which are
      fixed in the specification for this new RRTYPE.

   E. Description of the proposed RR type.
      See draft-eastlake-dnssd-rfc2931bis-sigzero

   F. What existing RRTYPE or RRTYPEs come closest to filling that need
      and why are they unsatisfactory?
      The SIG RR (RFC 2536) with type covered of zero. Deficincies
      are list in draft-eastlake-dnssd-rfc2931bis-sigzero
   
   G. What mnemonic is requested for the new RRTYPE (optional)?
      SIGZERO

   H. Does the requested RRTYPE make use of any existing IANA registry
      or require the creation of a new IANA subregistry in DNS
      Parameters?
      Does not create any new registries and does not add entries to
      existing registries other than the allocation of the RRTYPE.

   I. Does the proposal require/expect any changes in DNS
      servers/resolvers that prevent the new type from being processed
      as an unknown RRTYPE (see RFC 3597)?
      It can be ignored but then you do not get its security benefits.

      J. Comments: See draft-eastlake-dnssd-rfc2931bis-sigzero
</artwork>
</section>

<section>
  <name>Changes from <xref target="RFC2931"/></name>

  <ol spacing="compact">
    <li>Specify a new RR, SIGZERO, designed for the SIG Zero purpose
    which overcomes the deficiencies of SIG(0). RECOMMEND use of
    SIGZERO and make SIG(0) be NOT RECOMENDED. Add RRTYPE assigment
    template for SIGZERO.</li>
    <li>Add section on considerations for forwarding servers. Add
    paragraph suggesting the avoidance of forwarding servers where
    practical to eliminate a potential point of failure or
    compromise.</li>
    <li>Remove statement that TCP support for SIG(0) is OPTIONAL.</li>
    <li>Editorial changes including updates to meet current Internet
    draft format requirements. Update references. Convert source to
    XMLv3.</li>
  </ol>
  
</section>

<section>
  <name>Change History</name>

  <t>RFC Editor: Please delete this section before publication.</t>

  <section>
    <name>From <xref target="RFC2931"/> to dnsop-00</name>
    <ol spacing="compact">
      
    <li>Change to require KEY RRs used in connection with SIG(0) to
    have a protocol byte of 255 (ANY). (<xref target="RFC2931"/> also
    permits a protocol byte of 3.</li>
    <li>Change implementation requirement for the TTL and CLASS field
    of SIG(0) RRs from SHOULD be zero and 255, respectively, to MUST
    have those values and are ignored on receipt.</li>
    <li>Add section on considerations for forwarding servers.</li>
    <li>Remove statement that TCP support for SIG(0) is OPTIONAL.</li>
    <li>Specify an EDNS option to convey the original ID and return an
    extended error code.</li>
    <li>Editorial changes including updates to meet current Internet
    draft format requirements. Update references. Convert source to
    XMLv3.</li>
  
    </ol>
  </section>
  <section>
    <name>From dnsop-00 to dnsop-01</name>
    <ol spacing="compact">
      <li>Add section on error return via EDNS and add IANA request
      for an EDNS OPT number.</li>
      <li>Clarify that a SIG(0) public key can be associated with a
      zone or otherwise indicate authorization.</li>
      <li>Add author.</li>
      <li>Editorial Changes.</li>
    </ol>
  </section>
  <section>
    <name>From dnsop-01 to dnsop-02</name>
    <ol spacing="compact">
      <li>Permit multiple SIG(0)s.</li>
      <li>Back out change requiring protocol 255 in SIG(0)s and again
      permit protocol 3 or 255.</li>
      <li>Add reference to SIG(0) usage in SRP (Service Registration
      Protocol).</li>
      <li>Editorial changes.</li>
    </ol>
  </section>
  <section>
    <name>From dnsop-02 to dnsop-03</name>
    <ol>
      <li>Generalize TCP references to include mentions of other
      stream protocols.</li>
      <li>Update reference to DNSSD SRP from draft to <xref
      target="RFC9665"/>.</li>
      <li>Editorial changes.</li>
    </ol>
  </section>
  <section>
    <name>From dnsop-03 to dnssd-00</name>
    <ol>
      <li>Change to specify a new RR (SIGZERO) patterned more like
      TSIG. Drop EDNS(0) stuff.</li>
      <li>Add paragraph suggesting the avoidance of forwarding servers
      where practical to eliminate a potential point of failure.</li>
      <li>Add paragraph about Time Signed and Fudge for SIGZERO
      specifying a time interval similar to the Inception and
      Expiration times for SIG(0).</li>
      <li>Omit request SIGZEROs from data for response SIGZERO
      to avoid breaking transaction security if a forwarder, for
      example, adds a second SIGZERO.</li>
      <li>Numerous editorial changes.</li>
    </ol>
  </section>
    <section>
    <name>From dnssd-00 to dnssd-01</name>
    <ol>
      <li>Correct intended status to Standards Track from
      Informational.</li>
      <li>Note that passage through a forwarding server may also be a
      potential point of compromise.</li>
      <li>Soften assertions of "assurance" to "increase
      confidence".</li>
      <li>Minor editorial changes.</li>
    </ol>
  </section>

</section>

<section anchor="Acknowledgements" numbered="false">
  <name>Acknowledgements</name>

<t>The comments and suggestions of the following are gratefully
acknowledged:</t>

<t indent="4">Stuart Cheshire</t>

<t>The comments and suggestions of the following persons were
incorporated into <xref target="RFC2931"/>, which was the previous
version of this document, and are gratefully acknowledged:</t>

<t indent="4">Olafur Gudmundsson, Ed Lewis, Erik Nordmark, Brian
Wellington.</t>

</section>

</back>

</rfc>
