<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>

<rfc ipr="full2026" docName="draft-richardson-ipsec-rr-00.txt">

<front>
  <area>Internet</area>
  <workgroup>Independent submission</workgroup>
  <title abbrev="ipsecrr">
     A method for storing IPsec keying material in DNS.
  </title>

  <author initials="M." surname="Richardson" fullname="Michael C. Richardson">
    <organization abbrev="SSW">Sandelman Software Works</organization>
    <address>
      <postal>   
        <street>470 Dawson Avenue</street>
        <city>Ottawa</city>
        <region>ON</region>
        <code>K1Z 5V7</code>
        <country>CA</country>
      </postal>
      <email>mcr@sandelman.ottawa.on.ca</email>
      <uri>http://www.sandelman.ottawa.on.ca/</uri>
    </address>
  </author>

  <date month="August" year="2002" />

<abstract>
  <t>
This document describes a new resource record for DNS. This record may be
used to store public keys for use in IPsec systems. 
</t>

<t>
This record replaces the functionality of the sub-type #1 of the KEY Resource
Record, which has been proposed to be obsoleted by
<xref target="KEYRESTRICT" />.
</t>
</abstract>

</front>

<middle>

<section title="Introduction">

<section title="Overview">
<t>
	A 
</t>
</section>

</section>

<section title="Storage formats">

<t>
   The IPSECKEY resource record (RR) is used to document a key that is
   associated with a Domain Name System (DNS) name.  It will be a public
   key as only public keys are stored in the DNS.  This can be the
   public key of a host, network, or application (in the case of per-port
   keying).
</t>

<t>
   An IPSECKEY RR is, like any other RR, authenticated by a SIG RR. Security aware
   DNS implementations MUST be designed to handle at least two simultaneously
   valid keys of the same type associated with a name. 
</t>

<t>
   The type number for the IPSECKEY RR is TBD.
</t>

<section title="IPSECKEY RDATA format">

<t>
   The RDATA for an IPSECKEY RR consists of a series of type/length/value
   records. The canonical ordering of the fields is by
   increasing ordinal values of the type field. 
</t>

<t>
   A type may not occur more than once.
</t>

<t>
   Each field consistsa reserved field, a field type octet,
   and a length of that field.
</t>

<artwork><![CDATA[
                        1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  field type   |   reserved    |            length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               /
   /                              data                             /
   /                                                               /
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
]]></artwork>

<t>
  (XXX - Do we really need a 16-bit length? 8-bits will not suffice for 
public keys. Or should we for for 11 or 12 bits with a 4 or 5 bit field type?)
</t>

<t>
   The meaning of the IPSECKEY RR field type are described in the following
   sections. The length field is the number of the octets in this field type,
   and includes the size of the common header.
</t>
<t>
Definitions for field types:
  <list style="hanging">
  <t hangText="0">no more fields</t>
  <t hangText="1">priority of this entry</t> 
  <t hangText="2">IPv4 address of the gateway for this host</t>
  <t hangText="3">IPv6 address of the gateway for this host</t>
  <t hangText="4">FQDN of the gateway for this host</t> 
  <t hangText="5">RSA public key for the gateway</t>
  </list>
</t>	
</section>

<section title="priority of this entry">
<t>
This is a 16-bit preference for this record. This is interpreted in a similar
way to the PREFERENCE field described in section 3.3.9 of <xref target="RFC1035" />. 
</t>
</section>

<section title="IPv4 address of the gateway">
<t>
The data portion is an IPv4 address as described in section 3.4.1 of <xref
target="RFC1035" />.  This is a 32-bit number in network byte order.
</t>
<t>
The presence of this value indicates the end point for an IPsec tunnel. This
record is mutually exclusive with types 3 and 4.
</t>
</section>

<section title="IPv6 address of the gateway">
<t>
The data portion is an IPv6 address as described in section 3.2 of
<xref target="RFC1886" />. This is a 128-bit number in network byte order.
</t>
<t>
The presence of this value indicates the end point for an IPsec tunnel. This
record is mutually exclusive with types 2 and 4.
</t>
</section>

<section title="FQDN of the gateway">
<t>
The data portion is a %lt;domain-name%gt; encoded as described in section 3.3 of 
<xref target="RFC1886" />. 
</t>
<t>
The presence of this value indicates the end point for an IPsec tunnel. This
record is mutually exclusive with types 2 and 3.
</t>
</section>

<section title="RSA public of the gateway">
<t>
The data portion of the field contains an RSA public key, encoded as
described in secion 2 of <xref target="RFC3110" />, and repeated here:

<artwork><![CDATA[
                        1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | pub exp length|        public key exponent                    /
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               /
   +-                           modulus                            /
   |                                                               /
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-/
]]></artwork>
</t>

<t>
RFC2065 limited the exponent and modulus to 2552 bits in length, and
RFC3110 to 4096 bits. No such limit is specified here for the purposes of encoding and
decoding.
The length in octets of the public exponent length is represented as one
octet if it is in the range of 1 to 255 and by a zero octet followed by a two
octet unsigned length if it is longer than 255 bytes.
The public key modulus field is a multiprecision unsigned integer.  The
length of the modulus can be determined from the RDLENGTH and the preceding
RDATA fields including the exponent.
</t>
<t>
Leading zero bytes are prohibited in the exponent and modulus.
</t>

</section>
</section>

<section title="Presentation formats">

<section title="File Representation of IPSECKEY RRs">
<t>
   IPSECKEY RRs may appear as lines in a zone data master file.
   The preference and at least one key are mandatory. 
</t>
<t>
   As the IPv4, IPv6 and FQDN references to the gateway are mutually
   exclusive, they can share a position. If no gateway is to be indicated,
   then the special tokens of either "-" or "none" may be used.
</t>

<t>	
<artwork><![CDATA[
38.46.139.192.in-addr.arpa. 7200 IN     IPSECKEY ( 10 192.139.46.38
            RSA: AQOrXJxB56Q28iOO43Va36elIFFKc/QB2orIeL94BdC5X4idFQZjSpsZ
                 Th48wKVXUE9xjwUkwR4R4/+1vjNN7KFp9fcqa2OxgjsoGqCn+3OPR8La 
                 9uyvZg0OBuSTj3qkbh/2HacAUJ7vqvjQ3W8Wj6sMXtTueR8NNcdSzJh1 
                 49ch3zqfiXrxxna8+8UEDQaRR9KOPiSvXb2KjnuDan6hDKOT4qTZRRRC 
	         MWwnNQ9zPIMNbLBp0rNcZ+ZGFg2ckWtWh5yhv1iXYLV2vmd9DB6d4Dv8 
                 cW7scc3rPmDXpYR6APqPBRHlcbenfHCt+oCkEWse8OQhMM56KODIVQq3 
	         fejrfi1H )
]]></artwork>
</t>

</section>
</section>

<section title="IANA Considerations">
<t>
    Additional field types must be assigned by IANA. 
    A document must detail the format of the field.
</t>
</section>

<section title="Acknowledgments">
<t>
    People who pushed me to write this.
</t>
</section>

</middle>

<back>
<references title="Normative references">
<!-- DNSSEC -->
<?rfc include="reference.KEYRESTRICT" ?>
<?rfc include="reference.RFC.1034" ?>
<?rfc include="reference.RFC.1035" ?>
<?rfc include="reference.RFC.1886" ?>
<?rfc include="reference.RFC.2535" ?>
<?rfc include="reference.RFC.3110" ?>
</references>
</back>
</rfc>
<!--
  $Id: draft-richardson-ipsec-rr.xml,v 1.2 2002/08/26 18:20:54 mcr Exp $

  $Log: draft-richardson-ipsec-rr.xml,v $
  Revision 1.2  2002/08/26 18:20:54  mcr
  	updated documents

  Revision 1.1  2002/08/10 20:05:33  mcr
  	document proposing IPSECKEY Resource Record


!>
