Independent submission                                     M. Richardson
Internet-Draft                                                       SSW
Expires: February 8, 2003                                August 10, 2002


           A method for storing IPsec keying material in DNS.
                    draft-richardson-ipsec-rr-00.txt

Status of this Memo

   This document is an Internet-Draft and is in full conformance with
   all provisions of Section 10 of RFC2026.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at http://
   www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on February 8, 2003.

Copyright Notice

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

Abstract

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

   This record replaces the functionality of the sub-type #1 of the KEY
   Resource Record, which has been proposed to be obsoleted by [1].









Richardson              Expires February 8, 2003                [Page 1]


Internet-Draft                   ipsecrr                     August 2002


Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .  3

   2.  Storage formats  . . . . . . . . . . . . . . . . . . . . . . .  4
   2.1 IPSECKEY RDATA format  . . . . . . . . . . . . . . . . . . . .  4
   2.2 priority of this entry . . . . . . . . . . . . . . . . . . . .  5
   2.3 IPv4 address of the gateway  . . . . . . . . . . . . . . . . .  5
   2.4 IPv6 address of the gateway  . . . . . . . . . . . . . . . . .  5
   2.5 FQDN of the gateway  . . . . . . . . . . . . . . . . . . . . .  5
   2.6 RSA public of the gateway  . . . . . . . . . . . . . . . . . .  5

   3.  Presentation formats . . . . . . . . . . . . . . . . . . . . .  7
   3.1 File Representation of IPSECKEY RRs  . . . . . . . . . . . . .  7

   4.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  8

   5.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . .  9

       Normative references . . . . . . . . . . . . . . . . . . . . . 10

       Author's Address . . . . . . . . . . . . . . . . . . . . . . . 10

       Full Copyright Statement . . . . . . . . . . . . . . . . . . . 11
1. Introduction

1.1 Overview

   A
2. Storage formats

   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).

   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.

   The type number for the IPSECKEY RR is TBD.

2.1 IPSECKEY RDATA format

   The RDATA for an IPSECKEY RR consists of a series of type/length/



Richardson              Expires February 8, 2003                [Page 2]


Internet-Draft                   ipsecrr                     August 2002


   value and type/value records.  The canonical ordering of the fields
   is by increasing ordinal values of the type field.

   A type may not occur more than once.

   Each field consistsa reserved field, a field type octet, and a length
   of that field.

                           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                             /
      /                                                               /
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|

   (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?)

   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.

   Definitions for field types:

   0  no more fields

   1  priority of this entry

   2  IPv4 address of the gateway for this host

   3  IPv6 address of the gateway for this host

   4  FQDN of the gateway for this host

   5  RSA public key for the gateway


2.2 priority of this entry

   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
   [3].

2.3 IPv4 address of the gateway



Richardson              Expires February 8, 2003                [Page 3]


Internet-Draft                   ipsecrr                     August 2002


   The data portion is an IPv4 address as described in section 3.4.1 of
   [3].  This is a 32-bit number in network byte order.

   The presence of this value indicates the end point for an IPsec
   tunnel.  This record is mutually exclusive with types 3 and 4.

2.4 IPv6 address of the gateway

   The data portion is an IPv6 address as described in section 3.2 of
   [4].  This is a 128-bit number in network byte order.

   The presence of this value indicates the end point for an IPsec
   tunnel.  This record is mutually exclusive with types 2 and 4.

2.5 FQDN of the gateway

   The data portion is a %lt;domain-name%gt; encoded as described in
   section 3.3 of [4].

   The presence of this value indicates the end point for an IPsec
   tunnel.  This record is mutually exclusive with types 2 and 3.

2.6 RSA public of the gateway

   The data portion of the field contains an RSA public key, encoded as
   described in secion 2 of [6], and repeated here:

                           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                            /
      |                                                               /
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-/

   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.

   Leading zero bytes are prohibited in the exponent and modulus.



Richardson              Expires February 8, 2003                [Page 4]


Internet-Draft                   ipsecrr                     August 2002


3. Presentation formats

3.1 File Representation of IPSECKEY RRs

   IPSECKEY RRs may appear as lines in a zone data master file.  The
   preference and at least one key are mandatory.

   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.


   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 )

4. IANA Considerations

   Additional field types must be assigned by IANA.  A document must
   detail the format of the field.
5. Acknowledgments

   People who pushed me to write this.
Normative references

   [1]  Massey, D. and S. Rose, "Limiting the Scope of the KEY Resource
        Record", ID internet-draft (draft-ietf-dnsext-restrict-key-for-
        dnssec-02) (normative), March 2002.

   [2]  Mockapetris, P., "Domain names - concepts and facilities", STD
        13, RFC 1034, November 1987.

   [3]  Mockapetris, P., "Domain names - implementation and
        specification", STD 13, RFC 1035, November 1987.

   [4]  Thomson, S. and C. Huitema, "DNS Extensions to support IP
        version 6", RFC 1886, December 1995.

   [5]  Eastlake, D., "Domain Name System Security Extensions", RFC
        2535, March 1999.

   [6]  Eastlake, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain Name



Richardson              Expires February 8, 2003                [Page 5]


Internet-Draft                   ipsecrr                     August 2002


        System (DNS)", RFC 3110, May 2001.


Author's Address

   Michael C. Richardson
   Sandelman Software Works
   470 Dawson Avenue
   Ottawa, ON  K1Z 5V7
   CA

   EMail: mcr@sandelman.ottawa.on.ca
   URI:   http://www.sandelman.ottawa.on.ca/
Full Copyright Statement

   Copyright (C) The Internet Society (2002).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.






Richardson              Expires February 8, 2003                [Page 6]