<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="no"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc strict="yes"?>
<rfc ipr="full3978" category="std" docName="draft-crocker-dnssec-algo-signal-01" 
updates="4035">
<front>
<title abbrev="Algorithm-Signal">Signaling Cryptographic Algorithm Understanding in DNSSEC</title>
	<author fullname="Steve Crocker" initials="S." surname="Crocker">
			<organization>Shinkuro Inc.</organization>
			<address>
				<postal>
					<street>5110 Edgemoor Lane</street>
					<city>Bethesda</city>
					<code>20814</code>
					<region>MD</region>
					<country>USA</country>
				</postal>
				<email>steve@shinkuro.com</email>
			</address>
	</author>
	<author fullname="Scott Rose" initials="S." surname="Rose">
			<organization> NIST </organization>
			<address>
				<postal>
					<street>100 Bureau Dr.</street>
					<city>Gaithersburg</city>
					<code>20899</code>
					<region>MD</region>
					<country>USA</country>
				</postal>
				<phone>+1-301-975-8439</phone>
				<email> scott.rose@nist.gov </email>
			</address>
		</author>
	
<date month="June" year="2008"/>
<area> Internet Area </area>
<workgroup> DNS Extensions Working Group </workgroup>
<keyword>DNS</keyword>
<keyword>DNSSEC</keyword>
<abstract>
	<t>
	The DNS Security Extensions (DNSSEC) was developed to provide origin 
	authentication and integrity protection for DNS data by using digital 
	signatures.  These digital signatures can be generated 
	using different algorithms.  Each digital signature added to a response
	increases the size of the response, which could result in the response
	message being truncated.  This draft sets out to specify a way for  
	validating end-system resolvers 
    to signal to a server which cryptographic algorithms they prefer in a 
    DNSSEC response by defining an EDNS option to list a client's preferred
    algorithms.
	</t>
</abstract>
	<note title="Requirements Language">
	<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;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be
interpreted as described in <xref target="RFC2119">RFC 2119</xref>.
	</t>
	</note>
</front>
<middle>
<section title="Introduction">
	<t>
	The DNS Security Extensions (DNSSEC) was developed to provide origin 
	authentication and integrity protection for DNS data by using digital 
	signatures <xref target="RFC4033" />, <xref target="RFC4034" /> and
	<xref target="RFC4035" />.  Each digital signature RR (RRSIG) contains an 
    algorithm code
	number.  These algorithm codes help validators identify which 
    cryptographic algorithm was used to generate the digital signature.  
	</t>
	<t>
	RRSIG RRs can be fairly large, and increase the size of a response.  If 
	multiple algorithms are used, then multiple RRSIGs are returned for each 
	RRset in a response.  If the response is too large, it may be truncated, 
	and the client forced to resend the query using TCP.  It would be in 
	the client and server's interests if there was a way to limit the number 
	of RRSIGs in a response to only those algorithms the client was interested
	in (if present).  
	</t>
	<t>
	This draft sets out to specify a way for validating end-system resolvers
	to signal to a server which
	cryptographic algorithms they prefer in a DNSSEC response.  This is done 
	using the EDNS attribute values in the OPT meta-RR <xref target="RFC2671" />.  
    This option could also be used by servers to advertise which cryptographic 
    algorithms  are used in signing a particular zone.  
	</t>	
	<t>
	An additional reason for having the end-system resolver signal 
which algorithms it
	understands is to speed the transition to a new algorithm. A server will
	be able to determine when to start serving a new algorithm when it sees a 
	sufficient number of its clients are able to accept the new algorithm 
	and it will be able to determine when to stop serving the old algorithm when
	it sees that all or almost all of its clients are able to accept the new
	algorithm. Information about clients can also be used to communicate to 
	the operators of those clients and/or the providers of their software that
	it's time to upgrade.
	</t>
</section>
<section title="Signaling Algorithm Understood (AU) Using EDNS">
	<t>
	The ENDS0 specification outlined in <xref target="RFC2671" /> defines a 
    way to include new options using a standardized mechanism.  These options are 
    contained in the RDATA of the OPT meta-RR.  This document seeks to define 
    a new EDNS0 option for a client to signal which algorithms the client 
    prefers, and the server to advertise which algorithms are used to sign a 
    particular zone. 
	</t>
	<figure><preamble>Below shows how the signaling attribute is defined in 
the RDATA of the OPT
	RR as specified in <xref target="RFC2671" />:
	</preamble>
<artwork>
    0                       8                      16
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                 OPTION-CODE (TBD)             |					
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                 OPTION-LENGTH                 |					
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |       ALG-CODE1       |       ALG-CODE2       |   				
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |       ALG-CODE3       |        ...            \					
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  
</artwork><postamble></postamble>
	</figure>
	<t>
	OPTION-CODE is the code for the Algorithm Understood (AU) option.  Its value
	is fixed at TBD.
	</t>
	<t>
	OPTION-LENGTH is the length of the data of the attribute in octets.
DNSSEC algorithm codes are 1 octet long. The value in this field is the number of 
algorithm codes the client wishes to signal as
understood.
	</t>
	<t>
	ALG-CODE is the assigned DNSSEC algorithm code(s) that the client indicates as 
	understood.  These values SHOULD be in the order of preference.  For example, if
	a validating client understands RSA/SHA-1 and RSA/SHA-256 but prefers to 
	trust RSA/SHA-256 signatures due to local policy, the order of the ALG-CODE
	would be: 8 (RSA/SHA-256), 5 (RSA/SHA-1).
	</t>
</section>
<section title="Client Considerations">
	<t>
	A validating end-system resolver sets the AU option in the OPT meta-RR when sending a 
	query.  The validating end-system resolver SHOULD set the order of the
	algorithms in 
the
	AU option to the preferred order; i.e., most preferred first, followed by 
the 
	least preferred.
	</t>
	<t>
	A validating end-system resolver SHOULD only list algorithm codes that the 
	client has 
	implemented or has a trust anchor for.  Conversely, a validating end-system resolver 
SHOULD NOT include 
	the algorithm code for cryptographic algorithms for which they have 
	not implemented and do not have 	an associated trust anchor.
	</t>
	<t>
	The end-system resolver MUST also set the DNSSEC-OK bit <xref target="RFC4035" /> to 
indicate 
	that it wishes to receive DNSSEC RRs in the response.
	</t>
  <section title="Recommendations for Stub Clients">
	<t>
	Stub resolvers rely on an upstream recursive server (or cache) to provide
	a response, any algorithm preference on the stub resolver's side can be
	overruled by the upstream recursive server.  The AU EDNS option is NOT 
	RECOMMENDED for non-validating stub clients.  
	</t>
	<t>
	The only exception is for validating sub resolvers, which set the CD
	bit in queries.  In this scenario, the validating stub indicates that it 
	wishes to perform its own validation and may wish to indicate which 
	cryptographic algorithm it prefers.
	</t>
  </section>	
</section>
<section title="Server Considerations">
	<t>
	When an authoritative server sees the AU option in the OPT meta-RR in a
	request the normal algorithm for servicing requests is followed.  The only 
	difference is what DNSSEC RRs are included in the final response.
	</t>
	<t>
	If the AU option is present but the DNSSEC-OK bit is not set, then the 
	authoritative server does not include any additional DNSSEC RRs in the 
	response.  If the DNSSEC-OK bit is set, the authoritative server looks at
	the list of algorithms in the OPT meta-RR, selects the most preferred by 
the client and adds the appropriate RRSIGs 
	(as per the rules in <xref target="RFC4035" />)of the algorithms listed in 
the ALG-CODE list.  
	</t>
	<t>
	If the zone containing the QNAME is not signed, the authoritative server 
	sends a traditional non-DNSSEC response.  If the zone containing the QNAME 
	is signed with a cryptographic algorithm that does not appear in the 
	ALG-CODE list in the client query the authoritative server SHOULD include
	any or all RRSIGs in the response regardless of algorithm used to 
	generate them.
	</t>
</section>
<section title="Cache and Forwarder Considerations">
	<t>
	Caches MUST NOT set the AU option on any outgoing query from the cache 
when
	performing recursion on behalf of a stub client.  A cache MUST follow the 
	guidelines in the DNSSEC specification (<xref target="RFC4033" />, <xref 
target="RFC4034" />,
	<xref target="RFC4035" /> and any updating documents).  
	</t>
	<t>
	If a cache receives a query with the AU option set and the response can be 
answered 
	by data out of the cache, the cache SHOULD follow the AU option request 
and
	only include the RRSIGs generated using the algorithms found in the query
	AU list.  
	</t>
	<t>
	Forwarders that do not do validation or caching MAY copy the AU option 
seen
	in received queries as they represent the wishes of the validating 	downstream resolver that 	issued the original query.
	</t>
  <section title="Intermediate Resolvers">
	<t>
	Intermediate resolvers SHOULD copy the AU option seen in queries from end-
	system resolvers.  If the intermediate resolver is validating, it SHOULD 
	also check for the presence of the CD bit in the query.  If present, the 
	intermediate resolvers SHOULD copy the AU option as seen in the query.  If
	not or if the DNSSEC-OK bit is not set, then the validating intermediate
	resolver MAY chose to ignore the AU option in the query and MAY include 
	its own preference as the AU option.
	</t>
  </section>
</section>
<section anchor="IANA" title="IANA Considerations">
	<t>
	The algorithm codes used to identify DNSSEC algorithms has already been 
	established by IANA.  This document does not seek to alter that registry
	in any way.
	</t>
	<t>
	This draft seeks to update the "DNS EDNS0 Options" registry by adding the 
	AU option and referencing this document.  The code for the option should
	be TBD.
	</t>
</section>

<section anchor="Security" title="Security Considerations">
	<t>
	This document specifies a way for a client to signal its digital signature 
	algorithm preference to a cache or server.  It is not meant to be a 
discussion
	on algorithm superiority.  The signal is an optional code contained in
	the OPT meta-RR used with EDNS0.  The goal of this option is to reduce
	response size by having the client signal with digital signature 
	algorithms it prefers and that it may not care about other algorithms used
	to sign zone data.  
	</t>
	<t>
	It is possible that an attacker can attempt to conduct a downgrade attack 
	by intercepting the query and altering the AU option code.  An attacker 
	could alter the algorithm list to force the client to rely on a 
	weaker digital signature algorithm even though the zone is signed using a 
	stronger algorithm the client prefers.  In these cases a client might
	be able to detect an attack if the target zone has a DS RR in its delegating
	parent with the desired algorithm.  The DS cannot be deleted without making the 
	parent's RRSIG over that RRset invalid.
	</t>
</section>

</middle>

<back>
	<references title="Normative References">
		<?rfc include="reference.RFC.2119" ?>
		<?rfc include="reference.RFC.2671" ?>
		<?rfc include="reference.RFC.4033" ?>
		<?rfc include="reference.RFC.4034" ?>
		<?rfc include="reference.RFC.4035" ?>
	</references>
</back>
</rfc>

