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

<rfc ipr="full2026" docName="draft-richardson-dhc-auth-sig0-00.txt">

<front>
  <area>Internet</area>
  <workgroup>DHC</workgroup>
  <title abbrev="auth-sig0">
     Securing DHCP with DNSSEC bourne public keys
  </title>

  <author initials="T." surname="Lemon"
          fullname="Ted Lemon">
    <organization abbrev="nominum">Nominum</organization>
    <address>
      <postal>   
        <city>Some City</city>
        <region>AZ</region>
        <country>USA</country>
      </postal>
      <email>Ted.Lemon@nominum.com</email>
    </address>
  </author>

  <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="February" year="2003"></date>

<abstract>
  <t>
The abstract.
  </t>
  <t>
This document is intended as a standards track document.
  </t>
</abstract>

</front>

<middle>

<section title="Introduction">

<t>
<xref target="RFC3118" /> defines a method for authenticating DHCP
messages. It does provide for a way to do key management for the many
relationships that a DHCP server may have. 
</t>
<t>
In particular, the scaling problem of pre-shared keys fails badly in open  
networks such as those that occur at conferences such as IETF. In the context
of conferences, it is not just malicious attacks that are a problem to the
network, but also rogue DHCP servers present due to misconfiguration on the
part of attendees.
</t>

</section>

<section title="Definition of RSA authentication option for DHCP">
<t>
    <figure anchor="authoption" title="RSA authentication option for DHCP">
	   <preamble>The new algorithm type XX for the DHCP option is defined
	   as follows:</preamble>
           <artwork>

0                   1                   2                   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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Code = 90    |    Length     | Protocol TBD  | Algorithm=1   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  RDM = 1      | Replay Detection (64 bits)                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Replay cont.                                                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Replay cont. | keyid of public key           |               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               |
~                                                               ~
|                      RSA signature                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           </artwork>
           <postamble></postamble>

       </figure>
</t>
<t>
This section defines the contents of the Authentication Information 
field of this payload. <xref target="RFC3447" /> defines the RSA
signature algorithm. <xref target="RFC2537" /> provides a more consise
definition. The RSA signature is defined with MD5 as the hash algorithm.
</t>
</section>

<section title="Definition of DSA authentication option for DHCP">
<t>
a diagram of the auth section for DSA, i.e. with Algorithm=2.
</t>
</section>

<section title="Model of operation">

<section title="Additions to client side state machine">
<t>
Section 4.4 of <xref target="RFC2131" /> defines the state machine
for the DHCP client. 
</t>
</section>

<section title="Client INIT state changes">
<t>
No changes to the transitions for this state. 
</t>
<t>
When the client sends the DHCP DISCOVER message,
it MUST sign the request with its private key, including an
authentication option in the DISCOVER message in an option as defined
above. The client SHOULD cache the resulting signature such that it
can retransmit it. 
(XXX - is there any value in this? The xid will change each time).
</t>
<t>
The client MUST include its proposed fully-qualified domain name in
a client FQDN, as specified in <xref target="clientFQDN" />.
</t>
<t>
The client MUST include a parameter request list option that includes
the DHCP authentication option, and the Server Name option.
</t>
</section>

<section title="Client SELECTING state changes">
<t>
No changes to the transitions for this state. 
</t>
<t>
The client SHOULD prefer DHCPOFFERs that include a authentication option
that are signed by keys that the client currently has cached.
</t>
<t>
If no preferred offer is seen, then the client MUST select among
the offers in a non-deterministic manner (ideally, random). This step
is important so that a client that has been deceived into binding to
the wrong DHCP server will have a chance to select a different server.
</t>
<t>
A client SHOULD NOT assume that offers that do not include valid and
verifiable signature options are exclusively preferred. There may be
no DHCP security on the network in question, and attackers could keep the
client from ever selecting the "real", unauthenticated server.
(XXX - yet, if one can remember them all, one would prefer to try the
offers with signatures first)
</t>
<t>
Note that this behaviour differs from that described in point 2 of
section 5.5.1 of <xref target="RFC3118" />. This is because a client
may not be able to determine the authenticity of the offer until after
it has connected to the network. Should an appropriate DHCP server
key be pre-configured, or cached, then the behaviour is the same.
</t>
</section>

<section title="Client REQUESTING state changes">
<t>
A new state called "Provisionally BOUND" MUST be added. The system
will transition to this new state upon receipt of a DHCP ACK that
contains a DHCP authentication option, and a DHCP Server name option.
</t>
<t>
When sending the DHCP REQUEST to the server, it MUST also be signed.
The DHCP REQUEST MUST also include the same client FQDN as was sent in the
DISCOVER message.
</t>
<t>
XXX - should the DHCP Decline be signed? I think so.
</t>
</section>

<section title="Provisionally BOUND state">
<t>
The provisionally bound state is operationally similar to the BOUND
state. The timers should be recorded as with the previous state. 
Additional DHCP offers received should be discarded. 
</t>
<t>
The system should be sufficiently configured with the provided IP
address such that DNS requests to the root name server(s) may be done.
If the system is going to be configured with the a DNS server as
specified in the Domain Name Server option of <xref target="RFC2132" />, 
and this name server is directly reachable, it may be reasonable to
defer any additional system configuration until the BOUND state. Some
systems may not provide such a "partially configured" state. 
</t>
<t>
In any case, if the system has any kind of system event that indicates
that it is on the network, this event SHOULD be deferred until the
BOUND state has been reached.
</t>
<t>
Upon entering this state, after performing the partial configuration,
the client MUST authenticate the DHCP ACK. To do this, if it does not
already have the public key of the DHCP server, it must look it up.
</t>
<t>
The client MUST lookup the KEY resource record (subtype DNSSEC)
associated with the name provided by the server in its DHCP server
name option. The DNS lookup SHOULD be done with DNSSEC enabled.
</t>
<t>
{XXX - DHCP server name option. Is there such a thing? The original
idea was to lookup the KEY record in the reverse map
(in-addr.arpa/ip6.arpa), based upon the IP address in the server
identifier.
Ted suggested that we wanted to use FQDN, but I'm not sure where it will
get stored. Do we need a new option}
</t>
<t>
If the DHCP ACK can not be authenticated (either because the KEY can
not be retrieved, the DNSSEC does not authenticate the key, or
integrity check on the message fails), then the lease MUST be
discarded. The client transitions back to INIT state, having sent a
DHCPNAK to the server, and then halting the network.
</t>
<t>
XXX - Do we go back and authenticate the DHCP OFFER?
</t>
</section>

<section title="Client BOUND state changes">
<t>
There is a new transition from the Provisionally BOUND state.
</t>
<t>
The only change in behaviour of this state is that when lease renewal
occurs, the DHCP REQUEST SHOULD be signed. This is done even if 
the lease was not originally acquired through a signature, as it MAY
be that the server will adopt security in the interum.
</t>
</section>

<section title="Client RENEWING state changes">
<t>
There is a new transition to the Provisionally BOUND state.
</t>
<t>
If a DHCP ACK is received that has a DHCP Authentication option in it,
then the client transitions to the Provisionally BOUND state rather
than directly back to the BOUND state.
</t>
</section>

<section title="Client REBINDING state changes">
<t>
The system will transition to Provisionally BOUND upon receipt of a
DHCP ACK that contains a DHCP authentication option, and a DHCP Server
name option.
</t> 
<t>
The broadcast DHCP REQUEST SHOULD contain an authentication option,
as with the one sent by state SELECTING.
</t>
</section>

<section title="Additions to server side state machine">
<t>
Section 4.4 of <xref target="RFC2131" /> defines the state machine
for the DHCP client. 
</t>

<section title="DHCP DISCOVER processing changes">
<t>
Upon receipt of a DHCP DISCOVER that includes an Authentication option
of the type defined in this document, then it MUST verify that there
is a provided client FQDN option, and that it is fully qualified.
</t>
<t>
The server MUST then do a DNSSEC lookup on the provided FQDN,
looking for a KEY resource record (sub-type DNSSEC). The server SHOULD
cache this result for at least as long as the DHCP OFFER that will
be made would be valid for. The server MAY cache it for as long
as the DNS time to live value.
</t>
<t>
Having found a valid KEY (with the matching keyid), the server MAY
verify the signature at this point. If the server feels that it is
overloaded or under denial of service attack, it may defer
authentication at this step.
</t>
<t>
If appropriate authentication material is not found, then the request
SHOULD be treated as if none were present. If authentication material
was found, but the signature check fails, then the message MUST be
discarded. Audit entries SHOULD be made, including the keyid that was
used, and the computed vs actual MD5 checks.
</t>
</section>

<section title="DHCP REQUEST processing changes">
<t>
Upon receipt of a DHCP REQUEST that includes an Authentication option
of the type defined in this document, then it MUST verify that there
is a provided client FQDN option, and that it is fully qualified.
</t>
<t>
The server MAY have already cached the KEY record associated with
this FQDN. If it has not, then it MUST lookup the record
again, as described above. 
</t>
<t>
The signature MUST be authenticated in this step. 
</t>
<t>
The server MAY then insert the provided FQDN into the reverse map
using dynamic update, as described in <xref target="clientFQDN" />.
</t>
<t>
If the client has requested it, via the DHCP IPSECKEY option, then
the server should also insert the public key taken from the FQDN into
the reverse map.
</t>
</section>

<section title="DHCP DECLINE processing changes">
<t>
XXX - unclear yet.
</t>
</section>

<section title="Annotated exchange between client and server">
<t>
</t>
</section>

</section>
</section>

<section title="Samples">

<section title="Sample RSA keys and signature options for client">
<t>
Using a private key of: XXXX, having a public key value of: YYYY.
We produced the following authentication option:

</t>
</section>

<section title="Sample DSA keys and signature options for client">
<t>
Using a private key of: XXXX, having a public key value of: YYYY.
We produced the following authentication option:

</t>
</section>

<section title="Sample DSA keys and signature options for server">
<t>
Using a private key of: XXXX, having a public key value of: YYYY.
We produced the following authentication option:

</t>
</section>

<section title="Sample DSA keys and signature options for server">
<t>
Using a private key of: XXXX, having a public key value of: YYYY.
We produced the following authentication option:

</t>
</section>
</section>


<section title="IANA Considerations">
<t>
    IANA will need to assign X.
</t>
</section>

<section title="Acknowledgments">
<t>
	Original ideas due to Randy Bush, ... 
</t>
</section>

</middle>

<back>
<references title="Normative references">
<?rfc include="reference.RFC.3118" ?>
<?rfc include="reference.RFC.2131" ?>
<?rfc include="reference.RFC.2132" ?>
<?rfc include="reference.RFC.2537" ?>
<?rfc include="reference.RFC.3447" ?>
<?rfc include="reference.clientFQDN" ?>
</references> 
<!-- <references title="Non-normative references"> -->
<!-- ESPUDP -->
<!-- <?rfc include="reference.ESPUDP" ?> -->
<!-- </references> -->
</back>
</rfc>

<!--
  $Id: draft-richardson-dhc-auth-sig0.xml,v 1.1 2003/02/24 03:07:50 mcr Exp $

  $Log: draft-richardson-dhc-auth-sig0.xml,v $
  Revision 1.1  2003/02/24 03:07:50  mcr
    first draft

  Revision 1.2  2003/02/24 02:58:35  mcr
  	rev -00 of DHCP RSA security draft

  Revision 1.1  2003/01/16 23:25:53  mcr
    draft 00


!>

