idnits 2.17.1 draft-sarikaya-6lowpan-cgand-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 (April 30, 2012) is 4371 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) == Unused Reference: 'NIST-ST' is defined on line 471, but no explicit reference was found in the text == Unused Reference: 'I-D.cheneau-csi-ecc-sig-agility' is defined on line 476, but no explicit reference was found in the text == Unused Reference: 'I-D.cheneau-csi-send-sig-agility' is defined on line 483, but no explicit reference was found in the text ** Downref: Normative reference to an Informational RFC: RFC 3756 == Outdated reference: A later version (-21) exists of draft-ietf-6lowpan-nd-18 -- Possible downref: Non-RFC (?) normative reference: ref. 'SEC1' Summary: 1 error (**), 0 flaws (~~), 5 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group B. Sarikaya, Ed. 3 Internet-Draft F. Xia 4 Intended status: Standards Track Huawei USA 5 Expires: November 1, 2012 G. Zaverucha, Ed. 6 RIM 7 April 30, 2012 9 Lightweight Secure Neighbor Discovery for Low-power and Lossy Networks 10 draft-sarikaya-6lowpan-cgand-03 12 Abstract 14 This document defines lightweight secure neighbor discovery for low- 15 power and lossy networks. The nodes generate a Cryptographically 16 Generated Address, register the Cryptographically Generated Address 17 with a default router and periodically refresh the registration. 18 Modifications to 6lowpan Neighbor Discovery protocol are described 19 for secure neighbor discovery for low-power and lossy networks. 20 Cryptographically generated address and digital signatures are 21 calculated using elliptic curve cryptography, so that the 22 cryptographic operations are suitable for low power devices. 24 Status of this Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on November 1, 2012. 41 Copyright Notice 43 Copyright (c) 2012 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 61 4. New Options . . . . . . . . . . . . . . . . . . . . . . . . . 4 62 4.1. CGA Parameters and Digital Signature Option . . . . . . . 4 63 4.2. Digital Signature Option . . . . . . . . . . . . . . . . . 6 64 4.3. Calculation of the Digital Signature and CGA Using ECC . . 7 65 5. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 8 66 5.1. Packet Sizes . . . . . . . . . . . . . . . . . . . . . . . 9 67 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 68 7. IANA considerations . . . . . . . . . . . . . . . . . . . . . 10 69 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10 70 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 71 9.1. Normative References . . . . . . . . . . . . . . . . . . . 10 72 9.2. Informative references . . . . . . . . . . . . . . . . . . 11 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 12 75 1. Introduction 77 Neighbor discovery for IPv6 [RFC4861] and stateless address 78 autoconfiguration [RFC4862], together referred to as neighbor 79 discovery protocols (NDP), are defined for regular hosts operating 80 with wired/wireless links. These protocols are not suitable and 81 require optimizations for resource constrained, low power hosts 82 operating with lossy wireless links. Neighbor discovery 83 optimizations for 6lowpan networks include simple optimizations such 84 as a host address registration feature using the address registration 85 option which is sent in unicast Neighbor Solicitation (NS) and 86 Neighbor Advertisement (NA) messages [I-D.ietf-6lowpan-nd]. 88 Neighbor discovery protocols (NDP) are not secure especially when 89 physical security on the link is not assured and vulnerable to 90 attacks defined in [RFC3756]. Secure neighbor discovery protocol 91 (SEND) is defined to secure NDP [RFC3971]. Cryptographically 92 generated addresses (CGA) are used in SEND [RFC3972]. SEND mandates 93 the use of the RSA signature algorithm which is computationally heavy 94 and not suitable to use for low-power and resource constrained nodes. 95 The use of an RSA public key and signature leads to long message 96 sizes not suitable to use in low-bit rate, short range, asymmetric 97 and non-transitive links such as IEEE 802.15.4. 99 In this document we extend the 6lowpan neighbor discovery protocol 100 with cryptographically generated addresses. The nodes generate CGAs 101 and register them with the default router. CGA generation is based 102 on elliptic curve cryptography (ECC)and signature is calculated using 103 elliptic curve digital signature algorithm (ECDSA) known to be 104 lightweight, leading to much smaller packet sizes. The resulting 105 protocol is called Lightweight Secure Neighbor Discovery Protocol 106 (LSEND). 108 2. Terminology 110 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 111 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 112 document are to be interpreted as described in [RFC2119]. 114 The terminology in this document is based on the definitions in 115 [RFC3971], [RFC3972] in addition to the ones specified in 116 [I-D.ietf-6lowpan-nd]. 118 3. Problem Statement 120 In this section we state requirements of a secure neighbor discovery 121 protocol for low-power and lossy networks. 123 The protocol MUST be based on the Neighbor Discovery Optimization for 124 Low-power and Lossy Networks protocol defined in 125 [I-D.ietf-6lowpan-nd] due to the host-initiated interactions to allow 126 for sleeping hosts, elimination of multicast-based address resolution 127 for hosts, etc. 129 New options to be added to neighbor solicitation messages MUST lead 130 to small packet sizes. Smaller packet sizes facilitate low-power 131 transmission by resource constrained nodes on lossy links. 133 CGA generation, signature and key hash calculation MUST avoid the use 134 of SHA-1 which is known to have security flaws. In this document, we 135 use SHA-2 instead of SHA-1 and thus avoid SHA-1's flaws. 137 Public key and signature sizes MUST be minimized and signature 138 calculation MUST be lightweight. In this document we adopt ECC and 139 ECDSA with the P-256 curve in order to meet this requirement. 141 4. New Options 143 4.1. CGA Parameters and Digital Signature Option 145 This option contains both CGA parameters and the digital signature. 147 A summary of the CGA Parameters and Digital Signature Option format 148 is shown below. 150 0 1 2 3 151 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 152 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 153 | Type | Length | Pad Length | Sig. Length | 154 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 155 | | 156 . . 157 . CGA Parameters . 158 . . 159 | | 160 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 161 | | 162 . . 163 . Digital Signature . 164 . . 165 | | 166 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 167 | | 168 . . 169 . Padding . 170 . . 171 | | 172 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 174 Type 176 TBA1 for CGA Parameters and Digital Signature 177 Length 179 The length of the option (including the Type, Length, Pad Length, 180 Signature Length, CGA Parameters, Digital Signature and Padding 181 fields) in units of 8 octets. 182 Pad Length 184 The length of the Padding field. 185 Sig Length 187 The length of the Digital Signature field. 188 CGA Parameters 190 The CGA Parameters field is variable-length containing the CGA 191 Parameters data structure described in Section 4 of [RFC3972]. 192 Digital Signature 194 The Digital Signature field is a variable length field containing 195 a Elliptic Curve Digital Signature Algorithm (ECDSA) signature 196 (with SHA-256 and P-256 curve of [FIPS-186-3]). Digital signature 197 is constructed as explained in Section 4.3. 199 Padding 201 The Padding field contains a variable-length field making the CGA 202 Parameters and Digital Signature Option length a multiple of 8. 204 4.2. Digital Signature Option 206 This option contains the digital signature. 208 A summary of the Digital Signature Option format is shown below. 209 Note that this option has the same format as RSA Signature Option 210 defined in [RFC3971]. The differences are that Digital Signature 211 field carries an ECDSA signature not an RSA signature, and in 212 calculating Key Hash field SHA-2 is used instead of SHA-1. 214 In the sequence of octets to be signed using the sender's private key 215 includes 128-bit CGA Message Type tag. In LSEND, CGA Message Type 216 tag of 0xE8C47FB7FD2BB885DAB2D31A0F2808B4 MUST be used. 218 0 1 2 3 219 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 220 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 221 | Type | Length | Reserved | 222 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 223 | | 224 | Key Hash | 225 | | 226 | | 227 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 228 | | 229 . . 230 . Digital Signature . 231 . . 232 | | 233 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 234 | | 235 . . 236 . Padding . 237 . . 238 | | 239 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 241 Type 243 TBA2 for Digital Signature 245 Length 247 The length of the option (including the Type, Length, Reserved, 248 Key Hash, Digital Signature and Padding fields) in units of 8 249 octets. 250 Key Hash 252 The Key Hash field is a 128-bit field containing the most 253 significant (leftmost) 128 bits of a SHA-2 hash of the public key 254 used for constructing the signature. This is the same as in 255 [RFC3971] except for SHA-1 which has been replaced by SHA-2. 256 Digital Signature 258 Same as in Section 4.1. 259 Padding 261 The Padding field contains a variable-length field containing as 262 many bytes long as remain after the end of the signature. 264 4.3. Calculation of the Digital Signature and CGA Using ECC 266 Due to the use of Elliptic Curve Cryptography, the following 267 modifications are needed to [RFC3971] and [RFC3972]. 269 The digital signature is constructed by using the sender's private 270 key over the same sequence of octets specified in Section 5.2 of 271 [RFC3971] up to all neighbor discovery protocol options preceding the 272 Digital Signature option containing the ECC-based signature. The 273 signature value is computed using the ECDSA signature algorithm as 274 defined in [SEC1] and hash function SHA-256. 276 Public Key is the most important parameter in CGA Parameters defined 277 in Section 4.1. Public Key MUST be DER-encoded ASN.1 structure of 278 the type SubjectPublicKeyInfo formatted as ECC Public Key. The 279 AlgorithmIdentifier, contained in ASN.1 structure of type 280 SubjectPublicKeyInfo, MUST be the (unrestricted) id- ecPublicKey 281 algorithm identifier, which is OID 1.2.840.10045.2.1, and the 282 subjectPublicKey MUST be formatted as an ECC Public Key, specified in 283 Section 2.2 of [RFC5480]. 285 Note that the ECC key lengths are determined by the namedCurves 286 parameter stored in ECParameters field of the AlgorithmIdentifier. 287 The named curve to use is secp256r1 corresponding to P-256 which is 288 OID 1.2.840.10045.3.1.7 [SEC2]. 290 ECC Public Key could be in uncompressed form or in compressed form 291 where the first octet of the OCTET STRING is 0x04 and 0x02 or 0x03, 292 respectively. Point compression using secp256r1 reduces the key size 293 by 32 octets. In LSEND, point compression MUST be supported. 295 5. Protocol Interactions 297 Lightweight Secure Neighbor Discovery for Low-power and Lossy 298 Networks (LSEND for LLN) modifies Neighbor Discovery Optimization for 299 Low-power and Lossy Networks [I-D.ietf-6lowpan-nd] as explained in 300 this section. Protocol interactions are shown in Figure 1. 302 6LoWPAN Border Routers (6LBR) send router advertisements (RA). 303 6LoWPAN Nodes (6LN, or simply "nodes") receive these RAs and generate 304 their own cryptographically generated addresses using elliptic curve 305 cryptography as explained in Section 4.3. The node sends a neighbor 306 solicitation (NS) message with the address registration option (ARO) 307 to 6LBR. Such a NS is called an address registration NS. 309 An LSEND for LLN node MUST send an address registration NS message 310 after adding CGA Parameters and Digital Signature Option defined in 311 Section 4.1. Source address MUST be set to its crypotographically 312 generated address. An LSEND for LLN node MUST set the Owner 313 Interface Identifier field (EUI-64) in ARO to the rightmost 64 bits 314 of its crypotographically generated address. The Subnet Prefix field 315 of CGA Parameters MUST be set to the leftmost 64 bits of its 316 crypotographically generated address. The Public Key field of CGA 317 Parameters MUST be set to the node's ECC Public Key. 319 6LBR receives the address registration NS. 6LBR then verifies the 320 source address as described in Section 5.1.2. of [RFC3971] using the 321 claimed source address and CGA Parameters field in the message. 322 After successfully verifying the address 6LBR next does a 323 cryptographic check of the signature included in the Digital 324 Signature field in the message. If all checks succeed then 6LBR 325 performs a duplicate address detection procedure on the address. If 326 that also succeeds 6LBR registers the CGA in the neighbor cache. 6LBR 327 also caches the node's public key. 329 6LBR sends an address registration neighbor advertisement (NA) as a 330 reply to confirm the node's registration. Status is set to 0 to 331 indicate success. This completes initial address registration. The 332 address registration needs to be refreshed after the neighbor cache 333 entry times out. 335 6LN 6LBR 336 | | 337 |<-----------------------RA-------------------------------| 338 | | 339 |---------------NS with ARO and CGA Option--------------->| 340 | | 341 |<-----------------------NA with ARO----------------------| 342 | | 343 |---------------NS with ARO and Digital Signature Option->| 344 | | 345 |<-----------------------NA with ARO----------------------| 346 | | 347 |---------------NS with ARO and Digital Signature Option->| 348 | | 349 |<-----------------------NA with ARO----------------------| 351 Figure 1: Lightweight SEND for LLN Protocol 353 In order to refresh the neighbor cache entry, an LSEND for LLN node 354 MUST send an address registration NS message after adding the Digital 355 Signature Option defined in Section 4.2. The Key Hash field is a 356 hash of the node's public key and MUST be set as described in 357 Section 4.2. The Digital Signature field MUST be set as described in 358 Section 4.2. 360 6LBR receives the address registration refresh NS. 6LBR uses the key 361 hash field in Digital Signature Option to find the node's public key 362 from the neighbor cache. 6LBR verifies the digital signature in the 363 NS. In case of successful verification, 6LBR sends back an address 364 registration neighbor advertisement (NA) to the node and sets the 365 status to 0 indicating successful refreshment of the CGA of the node. 366 Similar refresh NS and NA exchanges happen afterwards as shown in 367 Figure 1. 369 5.1. Packet Sizes 371 An original address registration NS message that contains a 40 byte 372 header and ARO is 16 octets. DER-encoded ECC Public Key for P-256 373 curve is 88 octets long uncompressed and 88-32=56 octets with point 374 compression. Digital Signature field when using ECDSA for P-256 375 curve is 72 octets long without padding bytes for a DER encoding of 376 the ASN.1 type "ECDSA-sig-value" [ANSIX9.62]. 378 CGA Parameters and Digital Signature Option's CGA Parameters include 379 16 octet modifier, 8 octet prefix obtained from the router 380 advertisement message sent from 6LBR, 1 octet collision count and 56 381 octet Public Key. Digital Signature is 72 octets. The option is 160 382 octets with Padding of 7 octets. The total message size of an 383 original LSEND address registration NS message is 216 octets and such 384 a message can be encapsulated into three 802.15.4 frames. 386 An address registration refresh NS message contains an ARO which is 387 16 octets and the digital signature option containing 16 octet key 388 hash and 71 octet signature and 5 octet Padding. The message is 152 389 octets long with the header. Such a message could be encapsulated in 390 two 802.15.4 frames. 392 6. Security Considerations 394 The same considerations regarding the threats to the Local Link Not 395 Covered (as in [RFC3971]) apply. 397 The threats discussed in Section 9.2 of [RFC3971] are countered by 398 the protocol described in this document as well. 400 As to the attacks to the protocol itself, denial of service attacks 401 that involve producing a very high number of packets are deemed 402 unlikely because of the assumptions on the node capabilities in low- 403 power and lossy networks. 405 7. IANA considerations 407 This document defines two new options to be used in neighbor 408 discovery protocol messages and new type values for CGA Parameters 409 and Digital Signature Option (TBA1) and Digital Signature Option 410 (TBA2) need to be assigned by IANA. 412 This document defines 0xE8C47FB7FD2BB885DAB2D31A0F2808B4 for LSEND 413 CGA Message Type Tag. 415 8. Acknowledgements 417 TBD. 419 9. References 421 9.1. Normative References 423 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 424 Requirement Levels", BCP 14, RFC 2119, March 1997. 426 [RFC3756] Nikander, P., Kempf, J., and E. Nordmark, "IPv6 Neighbor 427 Discovery (ND) Trust Models and Threats", RFC 3756, 428 May 2004. 430 [RFC3971] Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure 431 Neighbor Discovery (SEND)", RFC 3971, March 2005. 433 [RFC3972] Aura, T., "Cryptographically Generated Addresses (CGA)", 434 RFC 3972, March 2005. 436 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 437 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 438 September 2007. 440 [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless 441 Address Autoconfiguration", RFC 4862, September 2007. 443 [RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, 444 "Elliptic Curve Cryptography Subject Public Key 445 Information", RFC 5480, March 2009. 447 [I-D.ietf-6lowpan-nd] 448 Shelby, Z., Chakrabarti, S., and E. Nordmark, "Neighbor 449 Discovery Optimization for Low Power and Lossy Networks 450 (6LoWPAN)", draft-ietf-6lowpan-nd-18 (work in progress), 451 October 2011. 453 [SEC1] "Standards for Efficient Crtptography Group. SEC 1: 454 Elliptic Curve Cryptography Version 2.0", May 2009. 456 [ANSIX9.62] 457 "American National Standards Institute (ANSI), ANS X9.62- 458 2005: The Elliptic Curve Digital Signature Algorithm 459 (ECDSA)", November 2005. 461 9.2. Informative references 463 [SEC2] "Standards for Efficient Crtptography Group. SEC 2: 464 Recommended Elliptic Curve Domain Parameters Version 465 2.0", January 2010. 467 [FIPS-186-3] 468 "National Institute of Standards and Technology, "Digital 469 Signature Standard"", June 2009. 471 [NIST-ST] "National Institute of Standards and Technology, "NIST 472 Comments on Cryptanalytic Attackts on SHA-1"", 473 January 2009, 474 . 476 [I-D.cheneau-csi-ecc-sig-agility] 477 Cheneau, T., Laurent, M., Shen, S., and M. Vanderveen, 478 "ECC public key and signature support in Cryptographically 479 Generated Addresses (CGA) and in the Secure Neighbor 480 Discovery (SEND)", draft-cheneau-csi-ecc-sig-agility-02 481 (work in progress), June 2010. 483 [I-D.cheneau-csi-send-sig-agility] 484 Cheneau, T., Laurent, M., Shen, S., and M. Vanderveen, 485 "Signature Algorithm Agility in the Secure Neighbor 486 Discovery (SEND) Protocol", 487 draft-cheneau-csi-send-sig-agility-02 (work in progress), 488 June 2010. 490 Authors' Addresses 492 Behcet Sarikaya (editor) 493 Huawei USA 494 1700 Alma Dr. Suite 500 495 Plano, TX 75075 497 Phone: +1 972-509-5599 498 Email: sarikaya@ieee.org 500 Frank Xia 501 Huawei USA 502 1700 Alma Dr. Suite 500 503 Plano, TX 75075 505 Phone: +1 972-509-5599 506 Email: xiayangsong@huawei.com 508 Greg Zaverucha (editor) 509 RIM 510 5520 Explorer Drive, 4th Floor 511 Missisauga, ON, Canada L4W 5L1 513 Phone: 514 Email: gzaverucha@rim.com