One document matched: draft-ietf-dhc-sedhcpv6-06.xml


<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="3"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-dhc-sedhcpv6-06" ipr="trust200902">
  <front>
    <title abbrev="SeDHCPv6">Secure DHCPv6</title>

    <author fullname="Sheng Jiang" initials="S." role="editor" surname="Jiang">
      <organization>Huawei Technologies Co., Ltd</organization>

      <address>
        <postal>
          <street>Q14, Huawei Campus, No.156 Beiqing Road</street>

          <city>Hai-Dian District, Beijing, 100095</city>

          <country>CN</country>
        </postal>

        <email>jiangsheng@huawei.com</email>
      </address>
    </author>

    <author fullname="Sean Shen" initials="S." surname="Shen">
      <organization>CNNIC</organization>

      <address>
        <postal>
          <street>4, South 4th Street, Zhongguancun</street>

          <city>Beijing</city>

          <code>100190</code>

          <country>CN</country>
        </postal>

        <email>shenshuo@cnnic.cn</email>
      </address>
    </author>

    <author fullname="Dacheng Zhang" initials="D." surname="Zhang">
      <organization>Huawei Technologies Co., Ltd</organization>

      <address>
        <postal>
          <street>Q14, Huawei Campus, No.156 Beiqing Road</street>

          <city>Hai-Dian District, Beijing, 100095</city>

          <country>CN</country>
        </postal>

        <email>zhangdacheng@huawei.com</email>
      </address>
    </author>

    <author fullname="Tatuya Jinmei" initials="T." surname="Jinmei">
      <organization>Infoblox Inc.</organization>

      <address>
        <postal>
          <street>3111 Coronado Drive</street>

          <city>Santa Clara</city>

          <region>CA</region>

          <country>US</country>
        </postal>

        <email>jinmei@wide.ad.jp</email>
      </address>
    </author>

    <date month="" year="2015" />

    <area>Internet Area</area>

    <workgroup>DHC Working Group</workgroup>

    <keyword>Secure</keyword>

    <keyword>DHCPv6</keyword>

    <keyword>Public Key</keyword>

    <abstract>
      <t>The Dynamic Host Configuration Protocol for IPv6 (DHCPv6) enables
      DHCPv6 servers to pass configuration parameters. It offers configuration
      flexibility. If not being secured, DHCPv6 is vulnerable to various
      attacks, particularly spoofing attacks. This document analyzes the
      security issues of DHCPv6 and specifies a Secure DHCPv6 mechanism for
      communications between DHCPv6 clients and DHCPv6 servers. This document
      provides a DHCPv6 client/server authentication mechanism based on
      sender's public/private key pairs or certificates with associated
      private keys. The DHCPv6 message exchanges are protected by the
      signature option and the timestamp option newly defined in this
      document.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The Dynamic Host Configuration Protocol for IPv6 (DHCPv6, <xref
      target="RFC3315"></xref>) enables DHCPv6 servers to pass configuration
      parameters and offers configuration flexibility. If not being secured,
      DHCPv6 is vulnerable to various attacks, particularly spoofing
      attacks.</t>

      <t>This document analyzes the security issues of DHCPv6 in details. This
      document provides mechanisms for improving the security of DHCPv6
      between client and server:<list style="symbols">
          <t>the identity of a DHCPv6 message sender, which can be a DHCPv6
          server or a client, can be verified by a recipient.</t>

          <t>the integrity of DHCPv6 messages can be checked by the recipient
          of the message.</t>

          <t>anti-replay protection based on timestamps.</t>
        </list></t>

      <t>Note: this secure mechanism in this document does not protect the
      relay-relevant options, either added by a relay agent toward a server or
      added by a server toward a relay agent,
      because they are only transported within operator networks
      and considered less vulnerable.
      Communication between a server and a relay agent, and communications
      between relay agents, may be secured through the use of IPsec, as
      described in section 21.1 in <xref target="RFC3315"></xref>.</t>

      <t>The security mechanisms specified in this document is based on
      sender's public/private key pairs or certificates with associated
      private keys. The reason for such design and deployment consideration
      are discussed in <xref target="DeployConsider"></xref>. It also
      integrates message signatures for the integrity and timestamps for
      anti-replay. The sender authentication procedure using certificates
      defined in this document depends on deployed Public Key Infrastructure
      (PKI, <xref target="RFC5280"></xref>). However, the deployment of PKI is
      out of the scope.</t>

      <t>Secure DHCPv6 is applicable in environments where physical security
      on the link is not assured (such as over wireless) and attacks on DHCPv6
      are a concern.</t>
    </section>

    <section title="Requirements Language and Terminology">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in <xref
      target="RFC2119"></xref> when they appear in ALL CAPS. When these words
      are not in ALL CAPS (such as "should" or "Should"), they have their
      usual English meanings, and are not to be interpreted as <xref
      target="RFC2119"></xref> key words.</t>
    </section>

    <section title="Security Overview of DHCPv6">
      <t>DHCPv6 is a client/server protocol that provides managed
      configuration of devices. It enables a DHCPv6 server to automatically
      configure relevant network parameters on clients. In the basic DHCPv6
      specification <xref target="RFC3315"></xref>, security of DHCPv6
      messages can be improved.</t>

      <t>The basic DHCPv6 specifications can optionally authenticate the
      origin of messages and validate the integrity of messages using an
      authentication option with a symmetric key pair. <xref
      target="RFC3315"></xref> relies on pre-established secret keys. For any
      kind of meaningful security, each DHCPv6 client would need to be
      configured with its own secret key; <xref target="RFC3315"></xref>
      provides no mechanism for doing this.</t>

      <t>For the keyed hash function, there are two key management mechanisms.
      The first one is a key management done out of band, usually through some
      manual process. The second approach is to use Public Key Infrastructure
      (PKI).</t>

      <t>As an example of the first approach, operators can set up a key
      database for both servers and clients from which the client obtains a key
      before running DHCPv6. Manual key distribution runs counter to the goal
      of minimizing the configuration data needed at each host.</t>

      <t><xref target="RFC3315"></xref> provides an additional mechanism for
      preventing off-network timing attacks using the Reconfigure message: the
      Reconfigure Key authentication method. However, this method provides
      little message integrity or source integrity check, and it protects only
      the Reconfigure message. This key is transmitted in plaintext.</t>

      <t>In comparison, the security mechanism defined in this document allows
      the public key database on the client or server to be populated
      opportunistically or manually, depending on the degree of confidence
      desired in a specific application. PKI security mechanism is simpler in
      the local key management respect.</t>
    </section>

    <section title="Overview of Secure DHCPv6 Mechanism with Public Key">
      <t>This document introduces a Secure DHCPv6 mechanism that uses
      signatures to secure the DHCPv6 protocol. In order to enable DHCPv6
      clients and servers to perform mutual authentication without previous
      key deployment, this solution provides a DHCPv6 client/server
      authentication mechanism based on public/private key pairs and,
      optionally, PKI certificates. The purpose of this design
      is to make it easier to deploy DHCPv6 authentication and provides
      protection of DHCPv6 message within the scope of whatever trust
      relationship exists for the particular key used to authenticate the
      message.</t>

      <t>In this document, we introduce a public key option, a certificate
      option, a signature option and a timestamp option with corresponding
      verification mechanisms. A DHCPv6 message can include a public key
      option, and carrying a digital signature and a timestamp option. The
      signature can be verified using the supplied public key. The recipient
      processes the payload of the DHCPv6 message only if the validation is
      successful: the signature validates, and a trust relationship exists for
      the key. Alternatively, a DHCPv6 message can include a certificate
      option, and also carrying a digital signature and a timestamp option.
      The signature can be verified by the recipient. The recipient processes
      the payload of the DHCPv6 message only if the validation is successful:
      the certificate validates, and a trust relationship exists on the
      recipient for the provided certificate. The recipient processes the
      payload of the DHCPv6 message only if the validation is successful. The
      end-to-end security protection can be bidirectional, covering messages
      from servers to clients and from clients to servers. Additionally, the
      optional timestamp mechanism provides anti-replay protection.</t>

      <t>A trust relationship for a public key can be the result either of a
      Trust-on-first-use (TOFU) policy, or a list of trusted keys configured
      on the recipient.</t>

      <t>A trust relationship for a certificate could also be treated either
      as Trust-on-first-use or configured in a list of trusted certificate
      authorities, depending on the application. Such applications are out of
      scope for this document. </t>

      <t>Secure DHCPv6 messages are commonly large. One example is normal
      DHCPv6 message length plus a 1 KB for a X.509 certificate and signature
      and 256 Byte for a signature. IPv6 fragments <xref
      target="RFC2460"></xref> are highly possible. In practise, the total
      length would be various in a large range. Hence, deployment of Secure
      DHCPv6 should also consider the issues of IP fragment, PMTU, etc. Also,
      if there are firewalls between secure DHCPv6 clients and secure DHCPv6
      servers, it is RECOMMENDED that the firewalls are configured to pass
      ICMP Packet Too Big messages <xref target="RFC4443"></xref>.</t>

      <section title="New Components">
        <t>The components of the solution specified in this document are as
        follows:</t>

        <t><list style="symbols">
            <t>Servers and clients using public keys in their secure DHCPv6
            messages generate a public/private key pair. A DHCPv6 option that
            carries the public key is defined.</t>

            <t>Servers and clients that use certifiicates first generate a
            public/private key pair and then obtain a public key certificate
            from a Certificate Authority that signs the public key. Another
            option is defined to carry the certificate.</t>

            <t>A signature generated using the private key which is used by
            the receiver to verify the integrity of the DHCPv6 messages and
            then the identity of the sender.</t>

            <t>A timestamp, to detect replayed packet. The secure DHCPv6 nodes
            need to meet some accuracy requirements and be synced to global
            time, while the timestamp checking mechanism allows a configurable
            time value for clock drift. The real time provision is out of
            scope of this document.</t>
          </list></t>
      </section>

      <section title="Support for Algorithm Agility">
        <t>Hash functions are used to provide message integrity checks. In
        order to provide a means of addressing problems that may emerge in the
        future with existing hash algorithms, as recommended in <xref
        target="RFC4270"></xref>, this document provides a mechanism for
        negotiating the use of more secure hashes in the future.</t>

        <t>In addition to hash algorithm agility, this document also provides
        a mechanism for signature algorithm agility.</t>

        <t>The support for algorithm agility in this document is mainly a
        unilateral notification mechanism from sender to recipient. A
        recipient MAY support various algorithms simultaneously among
        different senders, and the different senders in a same administrative
        domain may be allowed to use various algorithms simultaneously. It is
        NOT RECOMMENDED that the same sender and recipient use various
        algorithms in a single communication session.</t>

        <t>If the recipient does not support the algorithm used by the sender,
        it cannot authenticate the message. In the client-to-server case, the
        server SHOULD reply with an AlgorithmNotSupported status code (defined
        in <xref target="StatusCodes"></xref>). Upon receiving this status
        code, the client MAY resend the message protected with the mandatory
        algorithm (defined in <xref target="SigOption"></xref>).</t>
      </section>

      <section title="Applicability">
        <t>By default, a secure DHCPv6 enabled client or server SHOULD start
        with secure mode by sending secure DHCPv6 messages. If the recipient
        is secure DHCPv6 enabled and the key or certificate authority is
        trusted by the recipient, then their communication would be in secure
        mode. In the scenario where the secure DHCPv6 enabled client and
        server fail to build up secure communication between them, the secure
        DHCPv6 enabled client MAY choose to send unsecured DHCPv6 message
        towards the server according to its local policies.</t>

        <t>In the scenario where the recipient is a legacy DHCPv6 server that
        does not support secure mechanism, the DHCPv6 server (for all of known
        DHCPv6 implementations) would just omit or disregard unknown options
        (secure options defined in this document) and still process the known
        options. The reply message would be unsecured, of course. It is up to
        the local policy of the client whether to accept the messages. If the
        client accepts the unsecured messages from the DHCPv6 server, the
        subsequent exchanges will be in the unsecured mode.</t>

        <t>In the scenario where a legacy client sends an unsecured message to
        a secure DHCPv6 enabled server, there are two possibilities depending
        on the server policy. If the server's policy requires the
        authentication, an UnspecFail (value 1, <xref
        target="RFC3315"></xref>) error status code, SHOULD be returned. In
        such case, the client cannot build up the connection with the server.
        If the server has been configured to support unsecured clients, the
        server MAY fall back to the unsecured DHCPv6 mode, and reply unsecured
        messages toward the client; depending on the local policy, the server
        MAY continue to send the secured reply messages with the consumption
        of computing resource. The resources allocated for unsecured clients
        SHOULD be separated and restricted.</t>
      </section>
    </section>

    <section title="Extensions for Secure DHCPv6">
      <t>This section describes the extensions to DHCPv6. Four new options
      have been defined. The new options MUST be supported in the Secure
      DHCPv6 message exchange.</t>

      <section anchor="PKOption" title="Public Key Option">
        <t>The Public Key option carries the public key of the sender. The
        format of the Public Key option is described as follows:</t>

        <t><figure align="center">
            <artwork><![CDATA[ 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      OPTION_PUBLIC_KEY        |         option-len            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                     Public Key (variable length)              .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

option-code    OPTION_PUBLIC_KEY (TBA1).

option-len     Length of public key in octets.

Public Key     A variable-length field containing a 
               SubjectPublicKeyInfo object specified in [RFC5280]. 
               The SubjectPublicKeyInfo structure is comprised with 
               a public key and an AlgorithmIdentifier object
               which is specified in section 4.1.1.2, [RFC5280]. The 
               object identifiers for the supported algorithms and 
               the methods for encoding the public key materials 
               (public key and parameters) are specified in 
               [RFC3279], [RFC4055], and [RFC4491].
]]></artwork>
          </figure></t>
      </section>

      <section anchor="CertOption" title="Certificate Option">
        <t>The Certificate option carries the public key certificate of the
        client. The format of the Certificate option is described as
        follows:</t>

        <t><figure align="center">
            <artwork><![CDATA[ 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      OPTION_CERTIFICATE       |         option-len            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                    Certificate (variable length)              .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

option-code    OPTION_CERTIFICATE (TBA2).

option-len     Length of certificate in octets.

Certificate    A variable-length field containing certificate. The
               encoding of certificate and certificate data MUST
               be in format as defined in Section 3.6, [RFC7296].
               The support of X.509 certificate - Signature (4)
               is mandatory.
]]></artwork>
          </figure></t>
      </section>

      <section anchor="SigOption" title="Signature Option">
        <t>The Signature option allows a signature that is signed by the
        private key to be attached to a DHCPv6 message. The Signature option
        could be any place within the DHCPv6 message while it is logically
        created after the entire DHCPv6 header and options, except for the
        Authentication Option. It protects the entire DHCPv6 header and
        options, including itself, except for the Authentication Option. The
        format of the Signature option is described as follows:</t>

        <t><figure align="center">
            <artwork><![CDATA[ 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OPTION_SIGNATURE          |        option-len             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     HA-id     |     SA-id     |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
|                                                               |
.                    Signature (variable length)                .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

option-code    OPTION_SIGNATURE (TBA3).

option-len     2 + Length of Signature field in octets.

HA-id          Hash Algorithm id. The hash algorithm is used for 
               computing the signature result. This design is 
               adopted in order to provide hash algorithm agility.
               The value is from the Hash Algorithm for Secure 
               DHCPv6 registry in IANA. The support of SHA-256 is
               mandatory. A registry of the initial assigned values
               is defined in Section 8.

SA-id          Signature Algorithm id. The signature algorithm is
               used for computing the signature result. This 
               design is adopted in order to provide signature 
               algorithm agility. The value is from the Signature
               Algorithm for Secure DHCPv6 registry in IANA. The
               support of RSASSA-PKCS1-v1_5 is mandatory. A 
               registry of the initial assigned values is defined
               in Section 8.

Signature      A variable-length field containing a digital 
               signature. The signature value is computed with
               the hash algorithm and the signature algorithm,
               as described in HA-id and SA-id. The signature
               constructed by using the sender's private key
               protects the following sequence of octets:

               1. The DHCPv6 message header.

               2. All DHCPv6 options including the Signature
               option (fill the signature field with zeroes)
               except for the Authentication Option.

               The signature field MUST be padded, with all 0, to
               the next octet boundary if its size is not a
               multiple of 8 bits. The padding length depends on
               the signature algorithm, which is indicated in the
               SA-id field.
]]></artwork>
          </figure>Note: if both signature and authentication option are
        present, signature option does not protect the Authentication Option.
        It allows the Authentication Option be created after signature has
        been calculated and filled with the valid signature. It is because
        both options need to apply hash algorithm to whole message, so there
        must be a clear order and there could be only one last-created option.
        In order to avoid update <xref target="RFC3315"></xref> because of
        changing auth option, the authors chose not include authentication
        option in the signature.</t>
      </section>

      <section anchor="TimeStampOption" title="Timestamp Option">
        <t>The Timestamp option carries the current time on the sender. It
        adds the anti-replay protection to the DHCPv6 messages. It is
        optional.</t>

        <t><figure>
            <artwork><![CDATA[ 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     OPTION_TIMESTAMP          |        option-len             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Timestamp (64-bit)                        |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

option-code    OPTION_TIMESTAMP (TBA4).

option-len     8, in octets.

Timestamp      The current time of day (NTP-format timestamp 
               [RFC5905] in UTC (Coordinated Universal Time), a
               64-bit unsigned fixed-point number, in seconds 
               relative to 0h on 1 January 1900.). It can reduce
               the danger of replay attacks.]]></artwork>
          </figure></t>
      </section>

      <section anchor="StatusCodes" title="Status Codes">
        <t>The following new status codes, see Section 5.4 of <xref
        target="RFC3315"></xref> are defined. <list style="symbols">
            <t>AlgorithmNotSupported (TBD5): indicates that the DHCPv6 server
            does not support algorithms that sender used.</t>

            <t>AuthenticationFail (TBD6): indicates that the DHCPv6 client
            fails authentication check.</t>

            <t>TimestampFail (TBD7): indicates the message from DHCPv6 client
            fails the timestamp check.</t>

            <t>SignatureFail (TBD8): indicates the message from DHCPv6 client
            fails the signature check.</t>
          </list></t>
      </section>
    </section>

    <section title="Processing Rules and Behaviors">
      <t>This section only covers the scenario where both DHCPv6 client and
      DHCPv6 server are secure enabled.</t>

      <section title="Processing Rules of Sender">
        <t>The sender of a Secure DHCPv6 message could be a DHCPv6 server or a
        DHCPv6 client.</t>

        <t>The sender must have a public/private key pair in order to create
        Secure DHCPv6 messages. The sender may also have a public key
        certificate, which is signed by a CA assumed to be trusted by the
        recipient, and its corresponding private key.</t>

        <t>To support Secure DHCPv6, the Secure DHCPv6 enabled sender MUST
        construct the DHCPv6 message following the rules defined in <xref
        target="RFC3315"></xref>.</t>

        <t>A Secure DHCPv6 message sent by a DHCPv6 server or a client, except
        for Relay-reply messages, MUST either contain a Public Key option,
        which MUST be constructed as explained in <xref
        target="PKOption"></xref>, or a Certificate option, which MUST be
        constructed as explained in <xref target="CertOption"></xref>.</t>

        <t>A Secure DHCPv6 message, except for Relay-forward and Relay-reply
        messages, MUST contain one and only one Signature option, which MUST
        be constructed as explained in <xref target="SigOption"></xref>. It
        protects the message header and all DHCPv6 options except for the
        Authentication Option.</t>

        <t>A Secure DHCPv6 message, except for Relay-forward and Relay-reply
        messages, SHOULD contain one and only one Timestamp option, which MUST
        be constructed as explained in <xref target="TimeStampOption"></xref>.
        The Timestamp field SHOULD be set to the current time, according to
        sender's real time clock.</t>

        <t>A Relay-forward and relay-reply message MUST NOT contain any
        additional Public Key or Certificate option or Signature Option or
        Timestamp Option, aside from those present in the innermost
        encapsulated messages from the client or server.</t>

        <t>If the sender is a DHCPv6 client, in the failure cases, it receives
        a Reply message with an error status code. The error status code
        indicates the failure reason on the server side. According to the
        received status code, the client MAY take follow-up action:</t>

        <t><list style="symbols">
            <t>Upon receiving an AlgorithmNotSupported error status code, the
            client SHOULD resend the message protected with one of the
            mandatory algorithms.</t>

            <t>Upon receiving an AuthenticationFail error status code, the
            client is not able to build up the secure communication with the
            recipient. The client MAY switch to other public key certificate
            if it has another one. But it SHOULD NOT retry with the same
            certificate. However, if the client decides to retransmit using
            the same certificate after receiving AuthenticationFail, it MUST
            NOT retransmit immediately and MUST follow normal retransmission
            routines defined in <xref target="RFC3315"></xref>.</t>

            <t>Upon receiving a TimestampFail error status code, the client
            MAY fall back to unsecured mode, or resend the message without a
            Timestamp option. However, the DHCPv6 server MAY not accept the
            message without a Timestamp option.</t>

            <t>Upon receiving a SignatureFail error status code, the client
            MAY resend the message following normal retransmission routines
            defined in <xref target="RFC3315"></xref>.</t>
          </list></t>
      </section>

      <section anchor="RuleRecipient" title="Processing Rules of Recipient ">
        <t>The recipient of a Secure DHCPv6 message could be a DHCPv6 server
        or a DHCPv6 client. In the failure cases, either DHCPv6 server or
        client SHOULD NOT process received message, and the server SHOULD
        reply a correspondent error status code, while the client does
        nothing. The specific behavior depends on the configured local
        policy.</t>

        <t>When receiving a DHCPv6 message, except for Relay-Forward and
        Relay-Reply messages, a Secure DHCPv6 enabled recipient SHOULD discard
        any DHCPv6 messages that meet any of the following conditions:<list
            style="symbols">
            <t>the Signature option is absent,</t>

            <t>multiple Signature options are present,</t>

            <t>both the Public Key option and the Certificate option are
            absent,</t>

            <t>both the Public Key option and the Certificate option are
            present.</t>
          </list></t>

        <t>In such failure, if the recipient is a DHCPv6 server, the server
        SHOULD reply an UnspecFail (value 1, <xref target="RFC3315"></xref>)
        error status code. If none of the Signature, Public Key or Certificate
        options is present, the sender MAY be a legacy node or in unsecured
        mode, then, the recipient MAY fall back to the unsecured DHCPv6 mode
        if its local policy allows.</t>

        <t>The recipient SHOULD first check the support of algorithms that
        sender used. If not pass, the message is dropped. In such failure, if
        the recipient is a DHCPv6 server, the server SHOULD reply an
        AlgorithmNotSupported error status code, defined in <xref
        target="StatusCodes"></xref>, back to the client. If both algorithms
        are supported, the recipient then checks the authority of this sender.
        The recipient SHOULD also use the same algorithms in the return
        messages.</t>

        <t>If a Certificate option is provided, the recipient SHOULD validate
        the certificate according to the rules defined in <xref
        target="RFC5280"></xref>. An implementation may create a local trust
        certificate record for verified certificates in order to avoid
        repeated verification procedure in the future. A certificate that
        finds a match in the local trust certificate list is treated as
        verified.</t>

        <t>If a Public Key option is provided, the recipient SHOULD validate
        it by finding a matching public key from the local trust public key
        list, which is pre-configured or recorded from previous communications
        (TOFU). A local trust public key list is a data table maintained by
        the recipient. It stores public keys from all trustworthy senders.</t>

        <t>The message that fails authentication check MUST be dropped. In
        such failure, the DHCPv6 server SHOULD reply an AuthenticationFail
        error status code, defined in <xref target="StatusCodes"></xref>, back
        to the client.</t>

        <t>The recipient MAY choose to further process messages from a sender
        when there is no matched public key. By recording the public key, when
        the first time it is seen, the recipient can make a Trust On First Use
        that the sender is trustworthy. The circumstances under which this
        might be done are out of scope for this document. </t>

        <t>At this point, the recipient has either recognized the
        authentication of the sender, or decided to drop the message. The
        recipient MUST now authenticate the sender by verifying the signature
        and checking timestamp (see details in <xref
        target="timestampCheck"></xref>), if there is a Timestamp option. The
        order of two procedures is left as an implementation decision. It is
        RECOMMENDED to check timestamp first, because signature verification
        is much more computationally expensive. Depending on server's local
        policy, the message without a Timestamp option MAY be acceptable or
        rejected. If the server rejects such a message, a TimestampFail error
        status code, defined in <xref target="StatusCodes"></xref>, should be
        sent back to the client. The reply message that carries the
        TimestampFail error status code SHOULD NOT carry a timestamp
        option.</t>

        <t>The signature field verification MUST show that the signature has
        been calculated as specified in <xref target="SigOption"></xref>. Only
        the messages that get through both the signature verifications and
        timestamp check (if there is a Timestamp option) are accepted as
        secured DHCPv6 messages and continue to be handled for their contained
        DHCPv6 options as defined in <xref target="RFC3315"></xref>. Messages
        that do not pass the above tests MUST be discarded or treated as
        unsecured messages. In the case the recipient is DHCPv6 server, the
        DHCPv6 server SHOULD reply a SignatureFail error status code, defined
        in <xref target="StatusCodes"></xref>, for the signature verification
        failure; or a TimestampFail error status code, defined in <xref
        target="StatusCodes"></xref>, for the timestamp check failure, back to
        the client.</t>

        <t>Furthermore, the node that supports the verification of the Secure
        DHCPv6 messages MAY impose additional constraints for the
        verification. For example, it may impose limits on minimum and maximum
        key lengths.</t>

        <t><list style="hanging">
            <t hangText="Minbits">The minimum acceptable key length for public
            keys. An upper limit MAY also be set for the amount of computation
            needed when verifying packets that use these security
            associations. The appropriate lengths SHOULD be set according to
            the signature algorithm and also following prudent cryptographic
            practice. For example, minimum length 1024 and upper limit 2048
            may be used for RSA <xref target="RSA"></xref>.</t>
          </list>A Relay-forward or Relay-reply message with any Public Key,
        Certificate or the Signature option is invalid. The message MUST be
        discarded silently.</t>
      </section>

      <section title="Processing Rules of Relay Agent">
        <t>To support Secure DHCPv6, relay agents just need to follow the same
        processing rules defined in <xref target="RFC3315"></xref>. There is
        nothing more the relay agents have to do, either verify the messages
        from client or server, or add any secure DHCPv6 options. Actually, by
        definition in this document, relay agents SHOULD NOT add any secure
        DHCPv6 options.</t>
      </section>

      <section anchor="timestampCheck" title="Timestamp Check">
        <t>In order to check the Timestamp option, defined in <xref
        target="TimeStampOption"></xref>, recipients SHOULD be configured with
        an allowed timestamp Delta value, a "fuzz factor" for comparisons, and
        an allowed clock drift parameter. The recommended default value for
        the allowed Delta is 300 seconds (5 minutes); for fuzz factor 1
        second; and for clock drift, 0.01 second.</t>

        <t>Note: the Timestamp mechanism is based on the assumption that
        communication peers have roughly synchronized clocks, with certain
        allowed clock drift. So, accurate clock is not necessary. If one has a
        clock too far from the current time, the timestamp mechanism would not
        work.</t>

        <t>To facilitate timestamp checking, each recipient SHOULD store the
        following information for each sender, from which at least one
        accepted secure DHCPv6 message is successfully verified (for both
        timestamp check and signature verification):</t>

        <t><list style="symbols">
            <t>The receive time of the last received and accepted DHCPv6
            message. This is called RDlast.</t>

            <t>The timestamp in the last received and accepted DHCPv6 message.
            This is called TSlast.</t>
          </list>A verified (for both timestamp check and signature
        verification) secure DHCPv6 message initiates the update of the above
        variables in the recipient's record.</t>

        <t>Recipients MUST check the Timestamp field as follows:</t>

        <t><list style="symbols">
            <t>When a message is received from a new peer (i.e., one that is
            not stored in the cache), the received timestamp, TSnew, is
            checked, and the message is accepted if the timestamp is recent
            enough to the reception time of the packet, RDnew:<list
                style="empty">
                <t>-Delta < (RDnew - TSnew) < +Delta</t>
              </list><vspace blankLines="1" />After the signature verification
            also succeeds, the RDnew and TSnew values SHOULD be stored in the
            cache as RDlast and TSlast.</t>

            <t>When a message is received from a known peer (i.e., one that
            already has an entry in the cache), the timestamp is checked
            against the previously received Secure DHCPv6 message:<list
                style="empty">
                <t>TSnew + fuzz > TSlast + (RDnew - RDlast) x (1 - drift) -
                fuzz</t>
              </list><vspace blankLines="1" />If this inequality does not hold
            or RDnew < RDlast, the recipient SHOULD silently discard the
            message. If, on the other hand, the inequality holds, the
            recipient SHOULD process the message. <vspace
            blankLines="1" />Moreover, if the above inequality holds and TSnew
            > TSlast, the recipient SHOULD update RDlast and TSlast after
            the signature verification also successes. Otherwise, the
            recipient MUST NOT update RDlast or TSlast.</t>
          </list>An implementation MAY use some mechanism such as a timestamp
        cache to strengthen resistance to replay attacks. When there is a very
        large number of nodes on the same link, or when a cache filling attack
        is in progress, it is possible that the cache holding the most recent
        timestamp per sender will become full. In this case, the node MUST
        remove some entries from the cache or refuse some new requested
        entries. The specific policy as to which entries are preferred over
        others is left as an implementation decision.</t>

        <t>An implementation MAY statefully record the latest timestamps from
        senders. In such implementation, the timestamps MUST be strictly
        monotonously increasing. This is reasonable given that DHCPv6 messages
        are rarely misordered.</t>
      </section>
    </section>

    <section anchor="DeployConsider" title="Deployment Consideration">
      <t>This document defines two directions of authentication:
      authentication based on client's public key certificate and
      authentication based on leap of faith to server's public key.</t>

      <section title="Authentication on a client">
        <t>For clients, DHCPv6 authentication generally means verifying
        whether the sender of DHCPv6 messages is a legal DHCPv6 server and
        verifying whether the message has been modified during transmission.
        Because the client may have to validate the authentication in the
        condition of without connectivity wider than link-local,
        authentication with certificates may not always be feasible. So, this
        document only sticks on Leaf of Faith mode, to make sure the client
        talks to the same previous server.</t>

        <t>Message integrity is provided. But there is a chance for the client
        to incorrectly trust a malicious server at the beginning of the first
        session with the server (and therefore keep trusting it thereafter).
        But the leap of faith mechanim guarantees the subsequent messages are
        sent by the same previous server, and therefore narrows the attack
        scope. This may make sense if the network can be reasonably considered
        secure and requesting pre-configuration is deemed to be infeasible. A
        small home network would be an example of such cases.</t>

        <t>For environments that are neither controlled nor really
        trustworthy, such as a network in a cafeteria, while the leap of faith
        mode, i.e., silently trusting the server at the first time, would be
        too insecure. But some middle ground might be justified, such as
        requiring human intervention at the point of the leap of faith.</t>
      </section>

      <section title="Authentication on a server">
        <t>As for authentication on a server, there are several different
        scenarios to consider, each of which has different applicability
        issues. If the server allows the leap of faith mode, any malicious
        user can pretend to be a new legitimate client. While the server can
        always be considered to have connectivity to validate certificate, it
        is feasible to check client certificates.</t>

        <t>Network administrators may wish to constrain the allocation of
        addresses to authorized hosts to avoid denial of service attacks in
        "hostile" environments where the network medium is not physically
        secured, such as wireless networks or college residence halls. A
        server may have to selectively serve a specific client or deny
        specific clients depending on the identity of the client in a
        controlled environment, like a corporate intranet. But the support
        from skilled staff or administrator may be required to set up the
        clients.</t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document provides new security features to the DHCPv6
      protocol.</t>

      <t>Using public key based security mechanism and its verification
      mechanism in DHCPv6 message exchanging provides the authentication and
      data integrity protection. Timestamp mechanism provides anti-replay
      function.</t>

      <t>The Secure DHCPv6 mechanism is based on the pre-condition that the
      recipient knows the public key of the sender or the sender's public key
      certificate can be verified through a trust CA. Clients may discard the
      DHCPv6 messages from unknown/unverified servers, which may be fake
      servers; or may prefer DHCPv6 messages from known/verified servers over
      unsigned messages or messages from unknown/unverified servers. The
      pre-configuration operation also needs to be protected, which is out of
      scope. The deployment of PKI is also out of scope.</t>

      <t>When a recipient first encounters a new public key, it may also store
      the key using a Trust On First Use policy. If the sender that used that
      public key is in fact legitimate, then all future communication with
      that sender can be protected by storing the public key. This does not
      provide complete security, but it limits the opportunity to mount an
      attack on a specific recipient to the first time it communicates with a
      new sender.</t>

      <t>Downgrade attacks cannot be avoided if nodes are configured to accept
      both secured and unsecured messages. A future specification may provide
      a mechanism on how to treat unsecured DHCPv6 messages.</t>

      <t><xref target="RFC6273"></xref> has analyzed possible threats to the
      hash algorithms used in SEND. Since the Secure DHCPv6 defined in this
      document uses the same hash algorithms in similar way to SEND, analysis
      results could be applied as well: current attacks on hash functions do
      not constitute any practical threat to the digital signatures used in
      the signature algorithm in the Secure DHCPv6.</t>

      <t>A server, whose local policy accepts messages without a Timestamp
      option, may have to face the risk of replay attacks.</t>

      <t>A window of vulnerability for replay attacks exists until the
      timestamp expires. Secure DHCPv6 nodes are protected against replay
      attacks as long as they cache the state created by the message
      containing the timestamp. The cached state allows the node to protect
      itself against replayed messages. However, once the node flushes the
      state for whatever reason, an attacker can re-create the state by
      replaying an old message while the timestamp is still valid. In
      addition, the effectiveness of timestamps is largely dependent upon the
      accuracy of synchronization between communicating nodes. However, how
      the two communicating nodes can be synchronized is out of scope of this
      work.</t>

      <t>Attacks against time synchronization protocols such as NTP [RFC5905]
      may cause Secure DHCPv6 nodes to have an incorrect timestamp value. This
      can be used to launch replay attacks, even outside the normal window of
      vulnerability. To protect against these attacks, it is recommended that
      Secure DHCPv6 nodes keep independently maintained clocks or apply
      suitable security measures for the time synchronization protocols.</t>

      <t>One more consideration is that this protocol does reveal additional
      client information in their certificate. It means less privacy. In
      current practice, the client privacy and the client authentication are
      mutually exclusive.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document defines four new DHCPv6 <xref target="RFC3315"></xref>
      options. The IANA is requested to assign values for these four options
      from the DHCPv6 Option Codes table of the DHCPv6 Parameters registry
      maintained in http://www.iana.org/assignments/dhcpv6-parameters. The
      four options are:</t>

      <t><list style="empty">
          <t>The Public Key Option (TBA1), described in <xref
          target="PKOption"></xref>.</t>

          <t>The Certificate Option (TBA2), described in <xref
          target="CertOption"></xref>.</t>

          <t>The Signature Option (TBA3), described in <xref
          target="SigOption"></xref>.</t>

          <t>The Timestamp Option (TBA4),described in <xref
          target="TimeStampOption"></xref>.</t>
        </list>The IANA is also requested to add two new registry tables to
      the DHCPv6 Parameters registry maintained in
      http://www.iana.org/assignments/dhcpv6-parameters. The two tables are
      the Hash Algorithm for Secure DHCPv6 table and the Signature Algorithm
      for Secure DHCPv6 table.</t>

      <t>Initial values for these registries are given below. Future
      assignments are to be made through Standards Action <xref
      target="RFC5226"></xref>. Assignments for each registry consist of a
      name, a value and a RFC number where the registry is defined.</t>

      <t>Hash Algorithm for Secure DHCPv6. The values in this table are 8-bit
      unsigned integers. The following initial values are assigned for Hash
      Algorithm for Secure DHCPv6 in this document:</t>

      <t><figure>
          <artwork><![CDATA[          Name        |  Value  |  RFCs
   -------------------+---------+--------------
         SHA-256      |   0x01  | this document
         SHA-512      |   0x02  | this document
]]></artwork>
        </figure>Signature Algorithm for Secure DHCPv6. The values in this
      table are 8-bit unsigned integers. The following initial values are
      assigned for Signature Algorithm for Secure DHCPv6 in this document:</t>

      <t><figure>
          <artwork><![CDATA[          Name        |  Value  |  RFCs
   -------------------+---------+--------------
    RSASSA-PKCS1-v1_5 |   0x01  | this document
]]></artwork>
        </figure>IANA is requested to assign the following new DHCPv6 Status
      Codes, defined in <xref target="StatusCodes"></xref>, in the DHCPv6
      Parameters registry maintained in
      http://www.iana.org/assignments/dhcpv6-parameters:</t>

      <t><figure>
          <artwork><![CDATA[      Code  |           Name        |   Reference
   ---------+-----------------------+--------------
      TBD5  | AlgorithmNotSupported | this document
      TBD6  |   AuthenticationFail  | this document
      TBD7  |     TimestampFail     | this document
      TBD8  |     SignatureFail     | this document
]]></artwork>
        </figure></t>
    </section>

    <section anchor="Acknowledgments" title="Acknowledgements">
      <t>The authors would like to thank Bernie Volz, Ted Lemon, Ralph Droms,
      Jari Arkko, Sean Turner, Stephen Kent, Thomas Huth, David Schumacher,
      Francis Dupont, Tomek Mrugalski, Gang Chen, Qi Sun, Suresh Krishnan,
      Fred Templin and other members of the IETF DHC working group for their
      valuable comments.</t>

      <t>This document was produced using the xml2rfc tool <xref
      target="RFC2629"></xref>.</t>
    </section>

    <section anchor="changes" title="Change log [RFC Editor: Please remove]">
      <t>draft-ietf-dhc-sedhcpv6-06: remove the limitation that only clients
      use PKI- certificates and only servers use public keys. The new text
      would allow clients use public keys and servers use PKI-certificates</t>

      <t>draft-ietf-dhc-sedhcpv6-05: addressed comments from mail list that
      responsed to the second WGLC.</t>

      <t>draft-ietf-dhc-sedhcpv6-04: addressed comments from mail list. Making
      timestamp an independent and optional option. Reduce the serverside
      authentication to base on only client's certificate. Reduce the
      clientside authentication to only Leaf of Faith base on server's public
      key. 2014-09-26.</t>

      <t>draft-ietf-dhc-sedhcpv6-03: addressed comments from WGLC. Added a new
      section "Deployment Consideration". Corrected the Public Key Field in
      the Public Key Option. Added consideration for large DHCPv6 message
      transmission. Added TimestampFail error code. Refined the retransmission
      rules on clients. 2014-06-18.</t>

      <t>draft-ietf-dhc-sedhcpv6-02: addressed comments (applicability
      statement, redesign the error codes and their logic) from IETF89 DHC WG
      meeting and volunteer reviewers. 2014-04-14.</t>

      <t>draft-ietf-dhc-sedhcpv6-01: addressed comments from IETF88 DHC WG
      meeting. Moved Dacheng Zhang from acknowledgement to be co-author.
      2014-02-14.</t>

      <t>draft-ietf-dhc-sedhcpv6-00: adopted by DHC WG. 2013-11-19.</t>

      <t>draft-jiang-dhc-sedhcpv6-02: removed protection between relay agent
      and server due to complexity, following the comments from Ted Lemon,
      Bernie Volz. 2013-10-16.</t>

      <t>draft-jiang-dhc-sedhcpv6-01: update according to review comments from
      Ted Lemon, Bernie Volz, Ralph Droms. Separated Public Key/Certificate
      option into two options. Refined many detailed processes.
      2013-10-08.</t>

      <t>draft-jiang-dhc-sedhcpv6-00: original version, this draft is a
      replacement of draft-ietf-dhc-secure-dhcpv6, which reached IESG and dead
      because of consideration regarding to CGA. The authors followed the
      suggestion from IESG making a general public key based mechanism.
      2013-06-29.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.RFC.2460'?>

      <?rfc include='reference.RFC.3279'?>

      <?rfc include='reference.RFC.3315'?>

      <?rfc include='reference.RFC.4055'?>

      <?rfc include='reference.RFC.4443'?>

      <?rfc include='reference.RFC.4491'?>

      <?rfc include='reference.RFC.5280'?>

      <?rfc include='reference.RFC.5905'?>

      <?rfc include='reference.RFC.7296'?>
    </references>

    <references title="Informative References">
      <reference anchor="RSA">
        <front>
          <title>RSA Encryption Standard, Version 2.1, PKCS 1</title>

          <author fullname="">
            <organization>RSA Laboratories</organization>
          </author>

          <date month="November" year="2002" />
        </front>
      </reference>

      <?rfc include='reference.RFC.2629'?>

      <?rfc include='reference.RFC.4270'?>

      <?rfc include='reference.RFC.5226'?>

      <?rfc include='reference.RFC.6273'?>
    </references>
  </back>
</rfc>

PAFTECH AB 2003-20262026-04-24 01:52:40