<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
	<!ENTITY rfc4234 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4234.xml'>
	<!ENTITY rfc3986 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml'>
	<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
	<!ENTITY rfc2560 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2560.xml'>
	<!ENTITY rfc5019 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5019.xml'>
]>

<rfc category="std" docName="draft-pala-rea-ocsp-over-dns-00" ipr="trust200902">
    
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc tocdepth="5"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

  <front>
  <title abbrev="OOD">OCSP over DNS</title>
  <author initials="M.P." surname="Pala" fullname="Massimiliano Pala">
    <organization>Polythecnic Institute of NYU</organization>
    <address>
      <postal>
        <street>2 Metrotech Center</street>
        <city>Brooklyn</city>
        <region>NY</region>
        <code>10211</code>
        <country>US</country>
      </postal>
      <email>pala@nyu.edu</email>
      <uri>http://www.poly.edu/user/pala</uri>
    </address>
  </author>
  <author initials="S.R." surname="Rea" fullname="Scott A. Rea">
     <organization>DigiCert, Inc</organization>
     <address>
       <postal>
         <street>355 South 520 West</street>
         <city>Lindon</city>
         <region>UT</region>
         <code>84042</code>
         <country>US</country>
       </postal>
       <email>scott@DigiCert.com</email>
       <uri>http://www.digicert.com/news/bios-scott-rea.htm</uri>
     </address>
  </author>
  <date month="July" year="2012" />
  <area>Security</area>
  <workgroup>PKIX Working Group</workgroup>
  <keyword>PKI</keyword>
  <keyword>Revocation</keyword>
  <keyword>OCSP</keyword>
  <abstract>
    <t>One of the most strategic problems for Internet Certification Authorities (ICAs)
    is the provisioning of revocation information in an efficient way. Current approaches
    for the distribution of OCSP responses over HTTP do not provide efficient solutions
    for the high volume of traffic that Internet CAs face when providing services for highly
    utilized websites.
    This document describes a new transport protocol for OCSP responses to efficiently
    provide revocation information about digital certificates.
    
   <vspace blankLines="1" />

   In particular, this specification defines how to distribute OCSP responses over DNS
   and how to define OCSP-over-DNS URLs in certificates.
   The use of the DNS system to distribute such information is meant to lower the costs of
   providing revocation services and increase the availability of revocation information by
   using the distributed nature of the DNS infrastructure. 
   </t>
  </abstract>
</front>

<middle>

	<section title="Requirements notation">
		<t>
			The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
			"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
			and "OPTIONAL" in this document are to be interpreted as
			described in <xref target="RFC2119"/>.
		</t>
	</section>

	<section anchor="intro" title="Introduction"> 
		<t>
			With the increasing number of highly available and highly utilized websites that 
			require secure communications to protect the flow of information from the server 
			to the client, the need for a low-cost efficient approach to revocation information 
			availability is	crucial.

			The OCSP-over-DNS approach allows clients to determine the status of digital
			certificates specifically for high-traffic Internet secure servers (i.e., SSL/TLS)
			by optimizing the delivery mechanism for revocation information distribution to
			the client.
			This transport protocol can be used in lieu of or in addition to other PKIX endorsed
			transport mechanisms such as HTTP.

			This specification addresses the problem of providing a low-latency highly-available
			distributed system for OCSP responses availability. In particular, OCSP-over-DNS is
			meant to be used in conjunction with pre-computed OCSP responses.
			
			<vspace blankLines="1" />

			This document defines the DNS records to be used for OCSP data publication and the
			definition of additional URLs for the AuthorityInfoAccess (AIA) extension in certificates.

<!--
One solution is to provide a small response that can fit into a single UDP datagram.    Data signed (chain needs to be short.)    While the theoretical limit of a UDP datagram is 65,535 bytes (8 byte header + 65527 bytes of data), the generally accepted payload size for a UDP packet is 512 bytes.  (If a packet is broken up then you get problems associated with fragmentation, etc.)  For example, DNS is provided via UDP with a packet size of 512 bytes, and many applications set 512 bytes as the limit.  
Sign data that the client can provide, using the same approach you don’t have to include the chain 
-->
		</t>
	</section>

	<section title="Protocol Overview">
		<t>
			In order to validate a certificate using OCSP-over-DNS, the client should
			check the certificate for a DNS-based OCSP base URI, construct the URI for
			the specific certificate, and then retrieve the OCSP response from the DNS.
			After this point, all procedures are to be performed according to the OCSP
			protocol as defined in <xref target="RFC5019"/>.
   
			In particular, clients using OCSP-over-DNS, SHOULD:
			<list style="numbers">
				<t> 
					Lookup the OCSP URI provided in the AIA of the certificate to be checked.
					The format of the URI comprises the id-ad-ocsp identifier and a base URL
					where the scheme is dns://. The format of the full URI is discussed in
					the next section.
				</t>

				<t>
					Build the OCSP query for the certificate to be checked. This is done
					by pre-pending the hex representation of the digest of the certificate
					to the base domain provided in the OCSP DNS URI.
				</t>
				<t>
					Retrieve the DNS record carrying the required OCSP response. The Client
					SHOULD retrieve the revocation information directly through the DNS system.
					The distributed nature of DNS will allow for automatic load distribution.
				</t>
			</list>
 
			References to the suggested configurations for the transport and distribution
			protocols and servers is provided in the Appendix of this document.
		</t>
	</section>

	<section anchor="uri" title="OCSP-Related DNS URLs in Certificates">
		<t>
			As described in <xref target="RFC2560"/>, in order to convey to OCSP clients a well-known point
			of information access, CAs SHALL provide the capability to include the
			AuthorityInfoAccess extension in certificates that can be checked using OCSP.

			<vspace blankLines="1" />
			
			In addition to the HTTP transport protocol defined in <xref target="RFC2560"/>, this document
			defines an additional transport protocol for OCSP Responses, i.e. DNS records.
			This transport mechanism is useful only in environments where OCSP responses are
			pre-computed (common in Internet CAs).
			The accessMethod in the AccessDescription SEQUENCE of the URI should use id-ad-ocsp
			as its value as usual.
			However, if DNS records are used for distributing pre-computed OCSP responses <xref target="RFC5019" />,
			the value of the accessLocation field in the subject certificate SHOULD define 'dns' or 'dnssec' as
			the transport used to access the OCSP response data. 
			
			<vspace blankLines="1" />
			
			Additionally the URL can optionally contain parameters
			to specify the digest algorithms to be used by clients to calculate the DNS query.
			The default digest algoritm is "SHA256".

			</t>
						
			<section anchor="uridef" title="URL Definition">
				<t>
					A DNS URL begins with the protocol prefix "dns" or "dnssec" and is defined by the
					following grammar, following the ABNF notation defined in <xref target="RFC4234"/>.
					<figure>
						<artwork>
  dnsurl = scheme COLON SLASH SLASH [base]
          [QUESTION [ algorithm / oid]
          ; base: is the base hostname for
          ; the lookup operation.
          ; algorithm: is the text representation
          ; of the algorithm to be used to calculate
          ; the hash of the certificate

  scheme  = "dns" / "dnssec"

  algorithm = "SHA1" / "SHA256" / "SHA384" / "SHA512"
  
  oid = "OID" COLON oidvalue
          ; oidvalue is the string representation of
          ; the oid for the hash algorithm to be used
          ; to calculate the hash of the certificate
              
  SLASH       = %x2F              ; forward slash ("/")
  COLON       = %x3A              ; colon (":")
  QUESTION    = %x3F              ; question mark ("?")
						</artwork>
					</figure>
					
					The "dns" prefix indicates an entry or entries accessible from the
					configured DNS server. The "dnssec" prefix indicates, instead, an entry or
					entries accessible via the DNSSEC protocol and verification of the returned
					data SHOULD be performed. Note that the &lt;base&gt; may contain literal IPv6
					addresses as specified in Section 3.2.2 of <xref target="RFC3986"/>.

					<vspace blankLines="1" />

					The &lt;algorithm&gt; construct is used to specify the digest algorithm that
					MUST be used to construct the final DNS query. The allowable values are "SHA1",
					"SHA256", "SHA384", or "SHA512".

					<vspace blankLines="1" />

					Alternatively, if a different hash algorithm is specified in the URL that is
					not covered by &lt;algorithm&gt;, the use of the string representation of the
					algorithm's OID SHOULD be used. For example, if MD5 is specified the resulting
					URL will look like the following:
					<figure>
						<artwork>
  dns://somedomain?OID:1.2.840.113549.2.5
						</artwork>
					</figure>
					On the other hand, if one of the listed hash algorithm is to be used in the URL,
					the resulting value will look like the following:
					<figure>
						<artwork>
    dns://somedomain?SHA256
						</artwork>
					</figure>
					
					At minimum, a conforming client SHOULD support SHA1 and SHA256 algorithms and MAY support
					additional ones.
				</t>
			</section>
			
			<section anchor="uriproc" title="URL Processing">
				<t>
					In order to process the OCSP DNS URLs in a certificate, clients have to extract the &lt;base&gt;
					from the URL and pre-pend it with the hex representation of the digest value calculated over the
					DER representation of the certificate to be validated. The digest and the &lt;base&gt; values
					SHOULD be separated by the dot "." character. The hash algorithm to be used is to be
					extracted from the AIA extension. If no value is specified, the SHA256 algorithm SHOULD be used
					to calculate the hash value.

					<vspace blankLines="1" />
	
					The client then constructs the query for the DNS as follows:
				
					<figure>
						<artwork>
  4088439518ed222e9abf7555b954bd549b78325b.somedomain&lt;base&gt;
						</artwork>
					</figure>
					
					At this point, the client has all the information to query the DNS for the OCSP response
					it is searching for. The client proceeds by querying the DNS for TXT records from the
					constructed query.
					
					The returned value SHOULD contain the value of the base64 encoded value of the OCSP response
					related to the certificate that needs to be validated.
				</t>
			</section>

	</section>

	<section anchor="iana" title="IANA Considerations">
		<t>
			No special considerations are required for IANA.
		</t>
	</section>


	<section anchor="security" title="Security Considerations">
		<t>
			It is only possible to provide pre-computed responses in the case where the NONCE is
			not provided by the client. This allows the Validation Authority (VA) or CA to generate off-line
			signatures for responses, an optimization used in OCSP.
			
			<vspace blankLines="1" />

			Moreover if an authenticated secure channel is used at the transport level
			between the client and the VA (e.g. HTTPS or SFTP) signatures in requests
			and responses can be safely omitted.
		</t>
	</section>

	<section anchor="time" title="Time Validity">
		<t>
			The time validity should reflect the frequency of updates in revocation
			information. An interesting aspect to be considered is how often would users
			execute the protocol for a given set of data.
		</t>
	</section>

</middle>

<back>
<references title='Normative References'>

&rfc4234;
&rfc3986;
&rfc2119;
&rfc2560;
&rfc5019;

</references>

</back>
</rfc>




