idnits 2.17.1 draft-ietf-dhc-sedhcpv6-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 19, 2014) is 3596 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) ** Obsolete normative reference: RFC 3315 (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 5996 (Obsoleted by RFC 7296) -- Obsolete informational reference (is this intentional?): RFC 2629 (Obsoleted by RFC 7749) -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DHC Working Group S. Jiang, Ed. 3 Internet-Draft Huawei Technologies Co., Ltd 4 Intended status: Standards Track S. Shen 5 Expires: December 21, 2014 CNNIC 6 D. Zhang 7 Huawei Technologies Co., Ltd 8 T. Jinmei 9 WIDE Project 10 June 19, 2014 12 Secure DHCPv6 with Public Key 13 draft-ietf-dhc-sedhcpv6-03 15 Abstract 17 The Dynamic Host Configuration Protocol for IPv6 (DHCPv6) enables 18 DHCPv6 servers to pass configuration parameters. It offers 19 configuration flexibility. If not secured, DHCPv6 is vulnerable to 20 various attacks, particularly spoofing attacks. This document 21 analyzes the security issues of DHCPv6 and specifies a Secure DHCPv6 22 mechanism for communication between DHCPv6 clients and DHCPv6 23 servers. This mechanism is based on public/private key pairs. The 24 authority of the sender may depend on either pre-configuration 25 mechanism or Public Key Infrastructure. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on December 21, 2014. 44 Copyright Notice 46 Copyright (c) 2014 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 62 2. Requirements Language and Terminology . . . . . . . . . . . . 3 63 3. Security Overview of DHCPv6 . . . . . . . . . . . . . . . . . 3 64 4. Overview of Secure DHCPv6 Mechanism with Public Key . . . . . 4 65 4.1. New Components . . . . . . . . . . . . . . . . . . . . . 6 66 4.2. Support for algorithm agility . . . . . . . . . . . . . . 6 67 4.3. Applicability . . . . . . . . . . . . . . . . . . . . . . 7 68 5. Extensions for Secure DHCPv6 . . . . . . . . . . . . . . . . 7 69 5.1. Public Key Option . . . . . . . . . . . . . . . . . . . . 7 70 5.2. Certificate Option . . . . . . . . . . . . . . . . . . . 8 71 5.3. Signature Option . . . . . . . . . . . . . . . . . . . . 9 72 5.4. Status Codes . . . . . . . . . . . . . . . . . . . . . . 10 73 6. Processing Rules and Behaviors . . . . . . . . . . . . . . . 11 74 6.1. Processing Rules of Sender . . . . . . . . . . . . . . . 11 75 6.2. Processing Rules of Recipient . . . . . . . . . . . . . . 12 76 6.3. Processing Rules of Relay Agent . . . . . . . . . . . . . 14 77 6.4. Timestamp Check . . . . . . . . . . . . . . . . . . . . . 14 78 7. Deployment Consideration . . . . . . . . . . . . . . . . . . 16 79 7.1. Authentication on a client . . . . . . . . . . . . . . . 16 80 7.2. Authentication on a server . . . . . . . . . . . . . . . 16 81 8. Security Considerations . . . . . . . . . . . . . . . . . . . 17 82 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 83 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 20 84 11. Change log [RFC Editor: Please remove] . . . . . . . . . . . 20 85 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 21 86 12.1. Normative References . . . . . . . . . . . . . . . . . . 21 87 12.2. Informative References . . . . . . . . . . . . . . . . . 22 88 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 90 1. Introduction 92 The Dynamic Host Configuration ProtocoFl for IPv6 (DHCPv6, [RFC3315]) 93 enables DHCPv6 servers to pass configuration parameters. It offers 94 configuration flexibility. If not secured, DHCPv6 is vulnerable to 95 various attacks, particularly spoofing attacks. 97 This document analyzes the security issues of DHCPv6 in details. 98 This document provides mechanisms for improving the security of 99 DHCPv6 between client and server: 101 o the identity of a DHCPv6 message sender, which can be a DHCPv6 102 server or a client, can be verified by a recipient. 104 o the integrity of DHCPv6 messages can be checked by the recipient 105 of the message. 107 o anti-replay protection based on timestamp checking. 109 Note: this secure mechanism in this document does not protect the 110 relay-relevant options, either added by a relay agent toward a server 111 or added by a server toward a relay agent, are considered less 112 vulnerable, because they are only transported within operator 113 networks. Communication between a server and a relay agent, and 114 communication between relay agents, may be secured through the use of 115 IPsec, as described in section 21.1 in [RFC3315]. 117 The security mechanisms specified in this document is based on self- 118 generated public/private key pairs. It also integrates timestamps 119 for anti-replay. The authentication procedure defined in this 120 document may depend on either deployed Public Key Infrastructure 121 (PKI, [RFC5280]) or pre-configured sender's public key. However, the 122 deployment of PKI or pre-configuration is out of the scope. 124 Secure DHCPv6 is applicable in environments where physical security 125 on the link is not assured (such as over wireless) and attacks on 126 DHCPv6 are a concern. 128 2. Requirements Language and Terminology 130 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 131 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 132 "OPTIONAL" in this document are to be interpreted as described in 133 [RFC2119] when they appear in ALL CAPS. When these words are not in 134 ALL CAPS (such as "should" or "Should"), they have their usual 135 English meanings, and are not to be interpreted as [RFC2119] key 136 words. 138 3. Security Overview of DHCPv6 140 DHCPv6 is a client/server protocol that provides managed 141 configuration of devices. It enables DHCPv6 server to automatically 142 configure relevant network parameters on clients. In the basic 143 DHCPv6 specification [RFC3315], security of DHCPv6 message can be 144 improved. 146 The basic DHCPv6 specifications can optionally authenticate the 147 origin of messages and validate the integrity of messages using an 148 authentication option with a symmetric key pair. [RFC3315] relies on 149 pre-established secret keys. For any kind of meaningful security, 150 each DHCPv6 client would need to be configured with its own secret 151 key; [RFC3315] provides no mechanism for doing this. 153 For the key of the hash function, there are two key management 154 mechanisms. Firstly, the key management is done out of band, usually 155 through some manual process. For example, operators can set up a key 156 database for both servers and clients which the client obtains a key 157 before running DHCPv6. 159 Manual key distribution runs counter to the goal of minimizing the 160 configuration data needed at each host. 162 [RFC3315] provides an additional mechanism for preventing off-network 163 timing attacks using the Reconfigure message: the Reconfigure Key 164 authentication method. However, this method provides no message 165 integrity or source integrity check. This key is transmitted in 166 plaintext. 168 In comparison, the public/private key security mechanism allows the 169 keys to be generated by the sender, and allows the public key 170 database on the recipient to be populated opportunistically or 171 manually, depending on the degree of confidence desired in a specific 172 application. PKI security mechanism is simpler in the local key 173 management respect. 175 4. Overview of Secure DHCPv6 Mechanism with Public Key 177 In order to enable a DHCPv6 client and a server mutually authenticate 178 each other without previous key deployment, this document introduces 179 the use of public/private key pair mechanism into DHCPv6, also with 180 timestamp. The authority of the sender may depend on either pre- 181 configuration mechanism or PKI. By combining with the signatures, 182 sender identity can be verified and messages protected. 184 This document introduces a Secure DHCPv6 mechanism that uses a 185 public/private key pair to secure the DHCPv6 protocol. In order to 186 enable DHCPv6 clients and DHCPv6 servers to perform mutual 187 authentication, this solution provides two public key based 188 mechanisms with different security strengths. One is stronger and 189 only the certificate signed by a trusted CA or preconfigured public 190 key can be accepted. The other one, called as leap of faith (LoF) 191 mechanism, is relatively weak. It allows a client/server pair that 192 lacks essential trust relationship to build up their trust 193 relationship at run time for subsequent exchanges based on faith. 195 This design simplifies the precondition of deploying DHCPv6 196 authentication and provides limited protection of DHCPv6 message. 198 In the proposed solution, either public/private key pairs or 199 certificates can be used in authentication. When using public/ 200 private key pairs directly, the public key of the sender is pre- 201 shared with the recipient, either opportunistically or through a 202 manual process. When using certificates, the sender has a 203 certificate for its public key, signed by a CA that is trusted by the 204 recipient. It is possible for the same public key to be used with 205 different recipients in both modes. 207 In this document, we introduce a public key option, a certificate 208 option and a signature option with a corresponding verification 209 mechanism. Timestamp is integrated into signature options. A DHCPv6 210 message (from a server or a client), with either a public key or 211 certificate option, and carrying a digital signature, can be verified 212 by the recipient for both the timestamp and authentication, then 213 process the payload of the DHCPv6 message only if the validation is 214 successful. Because the sender can be a DHCPv6 server or a client, 215 the end-to-end security protection can be from DHCPv6 servers to 216 clients or from clients to DHCPv6 servers. 218 The recipient may choose to further process the message from a sender 219 for which no authentication information exists, either non-matched 220 public key or certificate cannot be verified. By recording the 221 public key or unverifiable certificate that was used by the sender, 222 when the first time it is seen, the recipient can make a leap of 223 faith that the sender is trustworthy. If no evidence to the contrary 224 surfaces, the recipient can then validate the sender as trustworthy 225 when it subsequently sees the same public key or certificate used to 226 sign messages from the same sender. In opposite, once the recipient 227 has determined that it is being attacked, it can either forget that 228 sender, or remember that sender in a blacklist and drop further 229 packets associated with that sender. 231 This improves communication security of DHCPv6 messages. 233 Secure DHCPv6 messages are commonly large. IP fragments [RFC2460] 234 are highly possible. Hence, deployment of Secure DHCPv6 should also 235 consider the issues of IP fragment, PMTU, etc. Also, if there are 236 firewalls between secure DHCPv6 clients and secure DHCPv6 servers, it 237 is RECOMMENDED that the firewalls are configureed to pass ICMP Packet 238 Too Big messages [RFC4443]. 240 4.1. New Components 242 The components of the solution specified in this document are as 243 follows: 245 o The node generates a public/private key pair. A DHCPv6 option is 246 defined that carries the public key. 248 The node may also obtain a certificate from a Certificate 249 Authority that can be used to establish the trustworthiness of the 250 node. Another option is defined to carry the certificate. 251 Because the certificate contains the public key, there is never a 252 need to send both options at the same time. 254 o A signature generated using the private key that protects the 255 integrity of the DHCPv6 messages and authenticates the identity of 256 the sender. 258 o A timestamp, to detect and prevent packet replay. The secure 259 DHCPv6 nodes need to meet some accuracy requirements and be synced 260 to global time, while the timestamp checking mechanism allows a 261 configurable time value for clock drift. The real time provision 262 is out of scope. 264 4.2. Support for algorithm agility 266 Hash functions are used to provide message integrity checks. In 267 order to provide a means of addressing problems that may emerge in 268 the future with existing hash algorithms, as recommended in 269 [RFC4270], this document provides a mechanism for negotiating the use 270 of more secure hashes in the future. 272 In addition to hash algorithm agility, this document also provides a 273 mechanism for signature algorithm agility. 275 The support for algorithm agility in this document is mainly a 276 unilateral notification mechanism from sender to recipient. A 277 recipient MAY support various algorithms simultaneously, and the 278 differenet senders in a same administrative domain may be allowed to 279 use various algorithms simultaneously. 281 If the recipient does not support the algorithm used by the sender, 282 it cannot authenticate the message. In the client-to-server case, 283 the server SHOULD reply with a AlgorithmNotSupported status code 284 (defined in Section 5.4). Upon receiving this status code, the 285 client MAY resend the message protected with the mandatory algorithm 286 (defined in Section 5.3). 288 4.3. Applicability 290 By default, a secure DHCPv6 enabled client SHOULD start with secure 291 mode by sending secure DHCPv6 messages. If the recipient is secure 292 DHCPv6 enabled server, their communication would be in secure mode. 293 In the scenario where the secure DHCPv6 enabled client and server 294 fail to build up secure communication between them, the secure DHCPv6 295 enabled client MAY choose to send unsecured DHCPv6 message towards 296 the server. 298 A secure DHCPv6 enabled server MAY also provide services for 299 unsecured clients. In such case, the resources allocated for 300 unsecured clients SHOULD be separated and restricted, in order to 301 protect against bidding down attacks. 303 In the scenario where the recipient is a legacy DHCPv6 server that 304 does not support secure mechanism, the DHCPv6 server (for all of 305 known DHCPv6 implementations) would just omit or disregard unknown 306 options (secure options defined in this document) and still process 307 the known options. The reply message would be unsecured, of course. 308 It is up to the local policy of the client whether to accept the 309 messages. If the client accepts the unsecured messages from the 310 DHCPv6 server, the subsequent exchanges will be in the unsecured 311 mode. 313 In the scenario where a legacy client sends an unsecured message to a 314 secure DHCPv6 enabled server, there are two possibilities depending 315 on the server policy. If the server's policy requires the 316 authentication, an UnspecFail (value 1, [RFC3315]) error status code, 317 SHOULD be returned. In such case, the client cannot build up the 318 connection with the server. If the server has been configured to 319 support unsecured clients, the server would fall back to the 320 unsecured DHCPv6 mode, and reply unsecured messages toward the 321 client. The resources allocated for unsecured clients SHOULD be 322 separated and restricted. 324 5. Extensions for Secure DHCPv6 326 This section extends DHCPv6. Three new options have been defined. 327 The new options MUST be supported in the Secure DHCPv6 message 328 exchange. 330 5.1. Public Key Option 332 The Public Key option carries the public key of the sender. The 333 format of the Public Key option is described as follows: 335 0 1 2 3 336 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 337 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 338 | OPTION_PK_PARAMETER | option-len | 339 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 340 | | 341 . Public Key (variable length) . 342 . . 343 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 345 option-code OPTION_PK_PARAMETER (TBA1). 347 option-len Length of public key in octets. 349 Public Key A variable-length field containing public key and 350 identify the algorithm with which the key is used 351 (e.g., RSA, DSA, or Diffie-Hellman). The algorithm 352 is identified using the AlgorithmIdentifier structure 353 specified in section 4.1.1.2, [RFC5280]. The object 354 identifiers for the supported algorithms and the 355 methods for encoding the public key materials 356 (public key and parameters) are specified in 357 [RFC3279], [RFC4055], and [RFC4491]. 359 5.2. Certificate Option 361 The Certificate option carries the certificate of the sender. The 362 format of the Certificate option is described as follows: 364 0 1 2 3 365 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 366 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 367 | OPTION_CERT_PARAMETER | option-len | 368 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 369 | | 370 . Certificate (variable length) . 371 . . 372 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 374 option-code OPTION_CERT_PARAMETER (TBA2). 376 option-len Length of certificate in octets. 378 Certificate A variable-length field containing certificate. The 379 encoding of certificate and certificate data MUST 380 be in format as defined in Section 3.6, [RFC5996]. 381 The support of X.509 certificate is mandatory. The 382 length of a certificate is various. 384 5.3. Signature Option 386 The Signature option allows public key-based signatures to be 387 attached to a DHCPv6 message. The Signature option could be any 388 place within the DHCPv6 message. It protects the entire DHCPv6 389 header and options, including itself, except for the Authentication 390 Option. The format of the Signature option is described as follows: 392 0 1 2 3 393 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 394 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 395 | OPTION_SIGNATURE | option-len | 396 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 397 | HA-id | SA-id | | 398 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 399 | Timestamp (64-bit) | 400 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 401 | | | 402 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 403 | | 404 . Signature (variable length) . 405 . . 406 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 408 option-code OPTION_SIGNATURE (TBA3). 410 option-len 10 + Length of Signature field in octets. 412 HA-id Hash Algorithm id. The hash algorithm is used for 413 computing the signature result. This design is 414 adopted in order to provide hash algorithm agility. 415 The value is from the Hash Algorithm for Secure 416 DHCPv6 registry in IANA. The support of SHA-256 is 417 mandatory. A registry of the initial assigned values 418 is defined in Section 8. 420 SA-id Signature Algorithm id. The signature algorithm is 421 used for computing the signature result. This 422 design is adopted in order to provide signature 423 algorithm agility. The value is from the Signature 424 Algorithm for Secure DHCPv6 registry in IANA. The 425 support of RSASSA-PKCS1-v1_5 is mandatory. A 426 registry of the initial assigned values is defined 427 in Section 8. 429 Timestamp The current time of day (NTP-format timestamp 430 [RFC5905] in UTC (Coordinated Universal Time), a 431 64-bit unsigned fixed-point number, in seconds 432 relative to 0h on 1 January 1900.). It can reduce 433 the danger of replay attacks. 435 Signature A variable-length field containing a digital 436 signature. The signature value is computed with 437 the hash algorithm and the signature algorithm, 438 as described in HA-id and SA-id. The signature 439 constructed by using the sender's private key 440 protects the following sequence of octets: 442 1. The DHCPv6 message header. 444 2. All DHCPv6 options including the Signature 445 option (fill the signature field with zeroes) 446 except for the Authentication Option. 448 The signature filed MUST be padded, with all 0, to 449 the next octet boundary if its size is not an even 450 multiple of 8 bits. The padding length depends on 451 the signature algorithm, which is indicated in the 452 SA-id field. 454 Note: if both signature and authentication option are presented, 455 signature option does not protect the Authentication Option. It 456 allows to be created after signature has been calculated and filled 457 with the valid signature. It is because both needs to apply hash 458 algorithm to whole message, so there must be a clear order and there 459 could be only one last-created option. In order to avoid update 460 [RFC3315] because of changing auth option, the authors chose not 461 include authentication option in the signature. 463 5.4. Status Codes 465 o AlgorithmNotSupported (TBD4): indicates that the DHCPv6 server 466 does not support algorithms that sender used. 468 o AuthFailNotSupportLoF (TBD5): indicates that the DHCPv6 client 469 fails authentication check and the DHCPv6 server does not support 470 the leaf of faith mode 472 o AuthFailSupportLoF (TBD6): indicates that the DHCPv6 client fails 473 authentication check. Although the DHCPv6 server does support the 474 leaf of faith, its list that stores public keys or unverifiable 475 certificates in the leap of faith mode currently exceeds. 477 o TimestampFail (TBD7): indicates the message from DHCPv6 client 478 fails the timstamp check. 480 o SignatureFail (TBD8): indicates the message from DHCPv6 client 481 fails the signature check. 483 6. Processing Rules and Behaviors 485 This section only covers the scenario where both DHCPv6 client and 486 DHCPv6 server are secure enabled. 488 6.1. Processing Rules of Sender 490 The sender of a Secure DHCPv6 message could be a DHCPv6 server or a 491 DHCPv6 client. 493 The node must have a public/private key pair in order to create 494 Secure DHCPv6 messages. The node may have a certificate which is 495 signed by a CA trusted by both sender and recipient. 497 To support secure DHCPv6, the secure DHCPv6 enabled sender MUST 498 construct the DHCPv6 message following the rules defined in 499 [RFC3315]. 501 A Secure DHCPv6 message, except for Relay-forward and Relay-reply 502 messages, MUST contain either a Public Key or a Certificate option, 503 which MUST be constructed as explained in Section 5.1 or Section 5.2. 505 A Secure DHCPv6 message, except for Relay-forward and Relay-reply 506 messages, MUST contain one and only one Signature option, which MUST 507 be constructed as explained in Section 5.3. It protects the message 508 header and all DHCPv6 options except for the Authentication Option. 509 Within the Signature option the Timestamp field SHOULD be set to the 510 current time, according to sender's real time clock. 512 A Relay-forward and relay-reply message MUST NOT contain any 513 additional Public Key or Certificate option or Signature Option, 514 aside from those present in the innermost encapsulated message from 515 the client or server. 517 If the sender is a DHCPv6 client, in the failure cases, it receives a 518 Reply message with an error status code. The error status code 519 indicates the failure reason on the server side. According to the 520 received status code, the client MAY take follow-up action: 522 o Upon receiving a AlgorithmNotSupported error status code, the 523 client MAY resend the message protected with the mandatory 524 algorithms. 526 o Upon receiving an AuthFailNotSupportLoF error status code, the 527 client is not able to build up the secure communication with the 528 recipient. The client MAY switch to other certificate or public 529 key if it has. But it SHOULD NOT retry with the same certificate/ 530 public-key. It MAY retry with the same certificate/public-key 531 following normal retransmission routines defined in [RFC3315]. 533 o Upon receiving an AuthFailSupportLoF error status code, the client 534 is not able to build up the secure communication with the 535 recipient. The client MAY switch to other certificate or public 536 key if it has. The client MAY retry with the same certificate/ 537 public-key following normal retransmission routines defined in 538 [RFC3315]. 540 o Upon receiving a TimestampFail error status code, the client MAY 541 fall back to unsecured mode. 543 o Upon receiving a SignatureFail error status code, the client MAY 544 resend the message following normal retransmission routines 545 defined in [RFC3315]. 547 6.2. Processing Rules of Recipient 549 The recipient of a Secure DHCPv6 message could be a DHCPv6 server or 550 a DHCPv6 client. In the failure cases, both DHCPv6 server and client 551 SHOULD NOT process received message, and the server SHOULD reply a 552 correspondent error status code, while the client does nothing. The 553 specific behavior depends on the configured local policy. 555 When receiving a DHCPv6 message, except for Relay-Forward and Relay- 556 Reply messages, a secure DHCPv6 enabled recipient SHOULD discard the 557 DHCPv6 message if the Signature option is absent, or multiple 558 Signature option is presented, or both the Public Key and Certificate 559 options are absent, or both the Public Key and Certificate option are 560 presented. In such failure, the DHCPv6 server SHOULD reply an 561 UnspecFail (value 1, [RFC3315]) error status code. If all three 562 options are absent, the sender MAY be legacy node or in unsecured 563 mode, then, the recipient MAY fall back to the unsecured DHCPv6 mode 564 if its local policy allows. 566 The recipient SHOULD first check the support of algorithms that 567 sender used. If all algorithms are supported, the recipient then 568 checks the authority of this sender. If not, the message is dropped. 569 In such failure, the DHCPv6 server SHOULD reply a 570 AlgorithmNotSupported error status code, defined in Section 5.4, back 571 to the client. 573 If the sender uses certificate, the recipient SHOULD validate the 574 sender's certificate following the rules defined in [RFC5280]. An 575 implementation may create a local trust certificate record for a 576 verified certificate in order to avoid repeated verification 577 procedure in the future. A sender certificate that finds a match in 578 the local trust certificate list is treated as verified. A fast 579 search index may be created for this list. 581 If the sender uses a public key, the recipient SHOULD validate it by 582 finding a matching public key from the local trust public key list, 583 which is pre-configured or recorded from previous communications. A 584 local trust public key list is a data table maintained by the 585 recipient. It restores public keys from all trustworthy senders. A 586 fast search index may be created for this list. 588 The recipient may choose to further process the message from a sender 589 for which no authentication information exists, either non-matched 590 public key or certificate cannot be verified. By recording the 591 public key or unverifiable certificate that was used by the sender, 592 when the first time it is seen, the recipient can make a leap of 593 faith (LoF) that the sender is trustworthy. If no evidence to the 594 contrary surfaces, the recipient can then validate the sender as 595 trustworthy for subsequent message exchanges. In opposite, once the 596 recipient has determined that it is being attacked, it can either 597 forget that key, or remember that key in a blacklist and drop further 598 packets associated with that key. 600 If recipient does not support the leap of faith mode, the message 601 that fails authentication check MUST be dropped. In such failure, 602 the DHCPv6 server SHOULD reply an AuthFailNotSupportLoF error status 603 code, defined in Section 5.4, back to the client. 605 On the recipient that supports the leap of faith mode, the number of 606 cached public keys or unverifiable certificates MAY be limited in 607 order to protect against resource exhaustion attacks. If the 608 recipient's list that stores public keys or unverifiable certificates 609 in the leap of faith mode exceeds, the message that fails 610 authentication check MUST be dropped. In such failure, the DHCPv6 611 server SHOULD reply an AuthFailNotSupportLoF error status code, 612 defined in Section 5.4, back to the client. The resource releasing 613 policy against exceeding situations is out of scope. Giving the 614 complexity, the key rollover mechanism is out of scope of this 615 document. 617 At this point, the recipient has either recognized the authentication 618 of the sender, or decided to attempt a leap of faith. The recipient 619 MUST now authenticate the sender by verifying the Signature and 620 checking timestamp (see details in Section 6.4). The order of two 621 procedures is left as an implementation decision. It is RECOMMENDED 622 to check timestamp first, because signature verification is much more 623 computationally expensive. 625 The signature field verification MUST show that the signature has 626 been calculated as specified in Section 5.3. Only the messages that 627 get through both the signature verifications and timestamp check are 628 accepted as secured DHCPv6 messages and continue to be handled for 629 their contained DHCPv6 options as defined in [RFC3315]. Messages 630 that do not pass the above tests MUST be discarded or treated as 631 unsecured messages. In the case the recipient is DHCPv6 server, the 632 DHCPv6 server SHOULD reply a SignatureFail error status code, defined 633 in Section 5.4, for the signature verification failure, or a 634 TimestampFail error status code, defined in Section 5.4, for the 635 timestamp check failure, back to the client. 637 Furthermore, the node that supports the verification of the Secure 638 DHCPv6 messages MAY record the following information: 640 Minbits The minimum acceptable key length for public keys. An upper 641 limit MAY also be set for the amount of computation needed when 642 verifying packets that use these security associations. The 643 appropriate lengths SHOULD be set according to the signature 644 algorithm and also following prudent cryptographic practice. For 645 example, minimum length 1024 and upper limit 2048 may be used for 646 RSA [RSA]. 648 A Relay-forward or Relay-reply message with any Public Key, 649 Certificate or the Signature option is invalid. The message MUST be 650 discarded silently. 652 6.3. Processing Rules of Relay Agent 654 To support Secure DHCPv6, relay agents just need to follow the same 655 processing rules defined in [RFC3315]. There is nothing more the 656 relay agents have to do, either verify the messages from client or 657 server, or add any secure DHCPv6 options. Actually, by definition in 658 this document, relay agents SHOULD NOT add any secure DHCPv6 options. 660 6.4. Timestamp Check 662 Recipients SHOULD be configured with an allowed timestamp Delta 663 value, a "fuzz factor" for comparisons, and an allowed clock drift 664 parameter. The recommended default value for the allowed Delta is 665 300 seconds (5 minutes); for fuzz factor 1 second; and for clock 666 drift, 0.01 second. 668 Note: the Timestamp mechanism is based on the assumption that 669 communication peers have roughly synchronized clocks, with certain 670 allowed clock drift. So, accurate clock is not necessary. If one 671 has a clock too far from the current time, the timestamp mechanism 672 would not work. 674 To facilitate timestamp checking, each recipient SHOULD store the 675 following information for each sender, from which at least one 676 accepted secure DHCPv6 message is successfully verified (for both 677 timestamp check and signature verification): 679 o The receive time of the last received and accepted DHCPv6 message. 680 This is called RDlast. 682 o The timestamp in the last received and accepted DHCPv6 message. 683 This is called TSlast. 685 A verified (for both timestamp check and signature verification) 686 secure DHCPv6 message initiates the update of the above variables in 687 the recipient's record. 689 Recipients MUST check the Timestamp field as follows: 691 o When a message is received from a new peer (i.e., one that is not 692 stored in the cache), the received timestamp, TSnew, is checked, 693 and the message is accepted if the timestamp is recent enough to 694 the reception time of the packet, RDnew: 696 -Delta < (RDnew - TSnew) < +Delta 698 After the signature verification also successes, the RDnew and 699 TSnew values SHOULD be stored in the cache as RDlast and TSlast. 701 o When a message is received from a known peer (i.e., one that 702 already has an entry in the cache), the timestamp is checked 703 against the previously received Secure DHCPv6 message: 705 TSnew + fuzz > TSlast + (RDnew - RDlast) x (1 - drift) - fuzz 707 If this inequality does not hold or RDnew < RDlast, the recipient 708 SHOULD silently discard the message. If, on the other hand, the 709 inequality holds, the recipient SHOULD process the message. 711 Moreover, if the above inequality holds and TSnew > TSlast, the 712 recipient SHOULD update RDlast and TSlast after the signature 713 verification also successes. Otherwise, the recipient MUST NOT 714 update RDlast or TSlast. 716 An implementation MAY use some mechanism such as a timestamp cache to 717 strengthen resistance to replay attacks. When there is a very large 718 number of nodes on the same link, or when a cache filling attack is 719 in progress, it is possible that the cache holding the most recent 720 timestamp per sender will become full. In this case, the node MUST 721 remove some entries from the cache or refuse some new requested 722 entries. The specific policy as to which entries are preferred over 723 others is left as an implementation decision. 725 7. Deployment Consideration 727 This document defines two levels of authentication: full 728 authentication based on certificate or pre-shared key verification 729 and weaker authentication based on leap-of-faith (LoF). As a 730 mechanism, both levels can be applied on servers and clients. 731 Depending on the details of expected threats and other constraints, 732 some cases may have limited applicability. This section discusses 733 such details. 735 7.1. Authentication on a client 737 For clients, DHCP authentication generally means authenticating the 738 server (the sender of DHCP messages) and verifying message integrity. 740 This is satisfied with full authentication. Due to the configuration 741 overhead, however, full authentication may not always be feasible. 742 It would still be viable in a controlled environment with skilled 743 staff, such as a corporate intranet. 745 If LoF is used, message integrity is provided but there is a chance 746 for the client to incorrectly trust a malicious server at the 747 beginning of the first session with the server (and therefore keep 748 trusting it thereafter). But LoF guarantees the subsequent messages 749 are sent by the same server that sent the public key, and therefore 750 narrows the attack scope. This may make sense if the network can be 751 reasonably considered secure and requesting pre-configuration is 752 deemed to be infeasible. A small home network would be an example of 753 such cases. 755 For environments that are neither controlled nor really trustworthy, 756 such as a network cafe, full authentication wouldn't be feasible due 757 to configuration overhead, while pure LoF, i.e. silently trusting the 758 server at the first time, would be too insecure. But some 759 middleground might be justified, such as requiring human intervention 760 at the point of LoF. 762 7.2. Authentication on a server 764 As for authentication on a server, there are several different 765 scenarios to consider, each of which has different applicability 766 issues. 768 A server may have to selectively serve a specific client or deny 769 specific clients depending on the identify of the client. This will 770 require full authentication, since if the server allows LoF any 771 malicious user can pretend to be a new legitimate client. Also, the 772 use of certification wouldn't be feasible in this case, since it's 773 less likely for all such clients to have valid (and generally 774 different) certificates. So the applicable case may be limited, but 775 a controlled environment with skilled staff and a specifically 776 expected set of clients such as a corporate intranet may still find 777 it useful and viable. 779 A server can prevent an attack on the DHCP session with an existing 780 client from a malicious client, e.g., by sending a bogus Release 781 message: the server would remember the original client's public key 782 at the beginning of the DHCP session and authenticate subsequent 783 messages (and their sender). Neither full authentication nor LoF is 784 needed for this purpose, since the server does not have to trust the 785 public key itself. So this can be generally used for any usage of 786 DHCP. 788 A server can prevent an attack by a malicious client that pretends to 789 be a valid past client and tries to establish a new DHCP session 790 (whether this is a real security threat may be a subject of debate, 791 but this is probably at least annoying). This is similar to the 792 first scenario, but full authentication may not necessarily be 793 required; since the purpose is to confirm a returning client has the 794 same identify as a valid past client, the server only has to remember 795 the client's public key at the first time. So LoF can be used at the 796 risk of allowing a malicious client to mount this attack before the 797 initial session with a valid client. An uncontrolled, but reasonably 798 reliable network like a home network may use this defense with LoF. 800 8. Security Considerations 802 This document provides new security features to the DHCPv6 protocol. 804 Using public key based security mechanism and its verification 805 mechanism in DHCPv6 message exchanging provides the authentication 806 and data integrity protection. Timestamp mechanism provides anti- 807 replay function. 809 The Secure DHCPv6 mechanism is based on the pre-condition that the 810 recipient knows the public key of senders or the sender's certificate 811 can be verified through a trust CA. It prevents DHCPv6 server 812 spoofing. The clients may discard the DHCPv6 messages from unknown/ 813 unverified servers, which may be fake servers; or may prefer DHCPv6 814 messages from known/verified servers over unsigned messages or 815 messages from unknown/unverified servers. The pre-configuration 816 operation also needs to be protected, which is out of scope. The 817 deployment of PKI is also out of scope. 819 However, when a DHCPv6 client first encounters a new public key or a 820 new unverifiable certificate, it can make a leap of faith. If the 821 DHCPv6 server that used that public key or unverifiable certificate 822 is in fact legitimate, then all future communication with that DHCPv6 823 server can be protected by storing the public key or unverifiable 824 certificate. This does not provide complete security, but it limits 825 the opportunity to mount an attack on a specific DHCPv6 client to the 826 first time it communicates with a new DHCPv6 server. The number of 827 cached public keys or unverifiable certificates MUST be limited in 828 order to protect the DHCPv6 server against resource exhaustion 829 attacks. 831 Downgrade attacks cannot be avoided if nodes are configured to accept 832 both secured and unsecured messages. A future specification may 833 provide a mechanism on how to treat unsecured DHCPv6 messages. 835 [RFC6273] has analyzed possible threats to the hash algorithms used 836 in SEND. Since the Secure DHCPv6 defined in this document uses the 837 same hash algorithms in similar way to SEND, analysis results could 838 be applied as well: current attacks on hash functions do not 839 constitute any practical threat to the digital signatures used in the 840 signature algorithm in the Secure DHCPv6. 842 A window of vulnerability for replay attacks exists until the 843 timestamp expires. Secure DHCPv6 nodes are protected against replay 844 attacks as long as they cache the state created by the message 845 containing the timestamp. The cached state allows the node to 846 protect itself against replayed messages. However, once the node 847 flushes the state for whatever reason, an attacker can re-create the 848 state by replaying an old message while the timestamp is still valid. 849 In addition, the effectiveness of timestamps is largely dependent 850 upon the accuracy of synchronization between communicating nodes. 851 However, how the two communicating nodes can be synchronized is out 852 of scope of this work. 854 Attacks against time synchronization protocols such as NTP [RFC5905] 855 may cause Secure DHCPv6 nodes to have an incorrect timestamp value. 856 This can be used to launch replay attacks, even outside the normal 857 window of vulnerability. To protect against these attacks, it is 858 recommended that Secure DHCPv6 nodes keep independently maintained 859 clocks or apply suitable security measures for the time 860 synchronization protocols. 862 9. IANA Considerations 864 This document defines three new DHCPv6 [RFC3315] options. The IANA 865 is requested to assign values for these three options from the DHCPv6 866 Option Codes table of the DHCPv6 Parameters registry maintained in 867 http://www.iana.org/assignments/dhcpv6-parameters. The three options 868 are: 870 The Public Key Option (TBA1), described in Section 5.1. 872 The Certificate Option (TBA2), described in Section 5.2. 874 The Signature Option (TBA3), described in Section 5.3. 876 The IANA is also requested to add two new registry tables to the 877 DHCPv6 Parameters registry maintained in 878 http://www.iana.org/assignments/dhcpv6-parameters. The two tables 879 are the Hash Algorithm for Secure DHCPv6 table and the Signature 880 Algorithm for Secure DHCPv6 table. 882 Initial values for these registries are given below. Future 883 assignments are to be made through Standards Action [RFC5226]. 884 Assignments for each registry consist of a name, a value and a RFC 885 number where the registry is defined. 887 Hash Algorithm for Secure DHCPv6. The values in this table are 8-bit 888 unsigned integers. The following initial values are assigned for 889 Hash Algorithm for Secure DHCPv6 in this document: 891 Name | Value | RFCs 892 -------------------+---------+-------------- 893 SHA-1 | 0x01 | this document 894 SHA-256 | 0x02 | this document 895 SHA-512 | 0x03 | this document 897 Signature Algorithm for Secure DHCPv6. The values in this table are 898 8-bit unsigned integers. The following initial values are assigned 899 for Signature Algorithm for Secure DHCPv6 in this document: 901 Name | Value | RFCs 902 -------------------+---------+-------------- 903 RSASSA-PKCS1-v1_5 | 0x01 | this document 905 IANA is requested to assign the following new DHCPv6 Status Codes, 906 defined in Section 5.4, in the DHCPv6 Parameters registry maintained 907 in http://www.iana.org/assignments/dhcpv6-parameters: 909 Code | Name | Reference 910 ---------+-----------------------+-------------- 911 TBD4 | AlgorithmNotSupported | this document 912 TBD5 | AuthFailNotSupportLoF | this document 913 TBD6 | AuthFailSupportLoF | this document 914 TBD7 | TimestampFail | this document 915 TBD8 | SignatureFail | this document 917 10. Acknowledgments 919 The authors would like to thank Bernie Volz, Ted Lemon, Ralph Droms, 920 Jari Arkko, Sean Turner, Stephen Kent, Thomas Huth, David Schumacher, 921 Francis Dupont, Tomek Mrugalski, Gang Chen, Qi Sun, Suresh Krishnan, 922 Tatuya Jinmei and other members of the IETF DHC working groups for 923 their valuable comments. 925 This document was produced using the xml2rfc tool [RFC2629]. 927 11. Change log [RFC Editor: Please remove] 929 draft-ietf-dhc-sedhcpv6-03: addressed comments from WGLC. Added a 930 new section "Deployment Consideration". Corrected the Public Key 931 Field in the Public Key Option. Added considation for large DHCPv6 932 message transmission. Added TimestampFail error code. Refined the 933 retransmission rules. 2014-06-18. 935 draft-ietf-dhc-sedhcpv6-02: addressed comments (applicability 936 statement, redesign the error codes and their logic) from IETF89 DHC 937 WG meeting and volunteer reviewers. 2014-04-14. 939 draft-ietf-dhc-sedhcpv6-01: addressed comments from IETF88 DHC WG 940 meeting. Moved Dacheng Zhang from acknowledgement to be co-author. 941 2014-02-14. 943 draft-ietf-dhc-sedhcpv6-00: adopted by DHC WG. 2013-11-19. 945 draft-jiang-dhc-sedhcpv6-02: removed protection between relay agent 946 and server due to complexity, following the comments from Ted Lemon, 947 Bernie Volz. 2013-10-16. 949 draft-jiang-dhc-sedhcpv6-01: update according to review comments from 950 Ted Lemon, Bernie Volz, Ralph Droms. Separated Public Key/ 951 Certificate option into two options. Refined many detailed 952 processes. 2013-10-08. 954 draft-jiang-dhc-sedhcpv6-00: original version, this draft is a 955 replacement of draft-ietf-dhc-secure-dhcpv6, which reached IESG and 956 dead because of consideration regarding to CGA. The authors followed 957 the suggestion from IESG making a general public key based mechanism. 958 2013-06-29. 960 12. References 962 12.1. Normative References 964 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 965 Requirement Levels", BCP 14, RFC 2119, March 1997. 967 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 968 (IPv6) Specification", RFC 2460, December 1998. 970 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 971 Identifiers for the Internet X.509 Public Key 972 Infrastructure Certificate and Certificate Revocation List 973 (CRL) Profile", RFC 3279, April 2002. 975 [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., 976 and M. Carney, "Dynamic Host Configuration Protocol for 977 IPv6 (DHCPv6)", RFC 3315, July 2003. 979 [RFC4055] Schaad, J., Kaliski, B., and R. Housley, "Additional 980 Algorithms and Identifiers for RSA Cryptography for use in 981 the Internet X.509 Public Key Infrastructure Certificate 982 and Certificate Revocation List (CRL) Profile", RFC 4055, 983 June 2005. 985 [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control 986 Message Protocol (ICMPv6) for the Internet Protocol 987 Version 6 (IPv6) Specification", RFC 4443, March 2006. 989 [RFC4491] Leontiev, S. and D. Shefanovski, "Using the GOST R 990 34.10-94, GOST R 34.10-2001, and GOST R 34.11-94 991 Algorithms with the Internet X.509 Public Key 992 Infrastructure Certificate and CRL Profile", RFC 4491, May 993 2006. 995 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 996 Housley, R., and W. Polk, "Internet X.509 Public Key 997 Infrastructure Certificate and Certificate Revocation List 998 (CRL) Profile", RFC 5280, May 2008. 1000 [RFC5905] Mills, D., Martin, J., Burbank, J., and W. Kasch, "Network 1001 Time Protocol Version 4: Protocol and Algorithms 1002 Specification", RFC 5905, June 2010. 1004 [RFC5996] Kaufman, C., Hoffman, P., Nir, Y., and P. Eronen, 1005 "Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 1006 5996, September 2010. 1008 12.2. Informative References 1010 [RFC2629] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, 1011 June 1999. 1013 [RFC4270] Hoffman, P. and B. Schneier, "Attacks on Cryptographic 1014 Hashes in Internet Protocols", RFC 4270, November 2005. 1016 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1017 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 1018 May 2008. 1020 [RFC6273] Kukec, A., Krishnan, S., and S. Jiang, "The Secure 1021 Neighbor Discovery (SEND) Hash Threat Analysis", RFC 6273, 1022 June 2011. 1024 [RSA] RSA Laboratories, "RSA Encryption Standard, Version 2.1, 1025 PKCS 1", November 2002. 1027 Authors' Addresses 1029 Sheng Jiang (editor) 1030 Huawei Technologies Co., Ltd 1031 Q14, Huawei Campus, No.156 Beiqing Road 1032 Hai-Dian District, Beijing, 100095 1033 P.R. China 1035 Email: jiangsheng@huawei.com 1037 Sean Shen 1038 CNNIC 1039 4, South 4th Street, Zhongguancun 1040 Beijing 100190 1041 P.R. China 1043 Email: shenshuo@cnnic.cn 1044 Dacheng Zhang 1045 Huawei Technologies Co., Ltd 1046 Q14, Huawei Campus, No.156 Beiqing Road 1047 Hai-Dian District, Beijing, 100095 1048 P.R. China 1050 Email: zhangdacheng@huawei.com 1052 Tatuya Jinmei 1053 WIDE Project 1054 Japan 1056 Email: jinmei@wide.ad.jp