idnits 2.17.1 draft-sarikaya-ace-cga-nd-00.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 (January 14, 2014) is 3745 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 468, but no explicit reference was found in the text ** Downref: Normative reference to an Informational RFC: RFC 3756 -- Possible downref: Non-RFC (?) normative reference: ref. 'SEC1' Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ace B. Sarikaya, Ed. 3 Internet-Draft Huawei USA 4 Intended status: Standards Track F. Xia 5 Expires: July 18, 2014 Huawei Technologies Co., Ltd. 6 January 14, 2014 8 Lightweight Secure Neighbor Discovery for Low-power and Lossy Networks 9 draft-sarikaya-ace-cga-nd-00 11 Abstract 13 Modifications to 6lowpan Neighbor Discovery protocol are proposed in 14 order to secure the neighbor discovery for low-power and lossy 15 networks. This document defines lightweight and secure version of 16 the neighbor discovery for low-power and lossy networks. The nodes 17 generate a Cryptographically Generated Address, register the 18 Cryptographically Generated Address with a default router and 19 periodically refresh the registration. Cryptographically generated 20 address and digital signatures are calculated using elliptic curve 21 cryptography, so that the cryptographic operations are suitable for 22 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 July 18, 2014. 41 Copyright Notice 43 Copyright (c) 2014 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 . . . . . . . . . . . . . . . . . . . . . . 3 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 [RFC6775]. 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 [RFC6775]. 117 3. Problem Statement 119 In this section we state requirements of a secure neighbor discovery 120 protocol for low-power and lossy networks. 122 The protocol MUST be based on the Neighbor Discovery Optimization for 123 Low-power and Lossy Networks protocol defined in [RFC6775] due to the 124 host-initiated interactions to allow for sleeping hosts, elimination 125 of multicast-based address resolution for hosts, etc. 127 New options to be added to neighbor solicitation messages MUST lead 128 to small packet sizes. Smaller packet sizes facilitate low-power 129 transmission by resource constrained nodes on lossy links. 131 CGA generation, signature and key hash calculation MUST avoid the use 132 of SHA-1 which is known to have security flaws. In this document, we 133 use SHA-2 instead of SHA-1 and thus avoid SHA-1's flaws. 135 Public key and signature sizes MUST be minimized and signature 136 calculation MUST be lightweight. In this document we adopt ECC and 137 ECDSA with the P-256 curve in order to meet this requirement. 139 4. New Options 141 4.1. CGA Parameters and Digital Signature Option 143 This option contains both CGA parameters and the digital signature. 145 A summary of the CGA Parameters and Digital Signature Option format 146 is shown below. 148 0 1 2 3 149 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 150 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 151 | Type | Length | Pad Length | Sig. Length | 152 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 153 | | 154 . . 155 . CGA Parameters . 156 . . 157 | | 158 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 159 | | 160 . . 161 . Digital Signature . 162 . . 163 | | 164 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 165 | | 166 . . 167 . Padding . 168 . . 169 | | 170 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 172 Type 174 TBA1 for CGA Parameters and Digital Signature 175 Length 177 The length of the option (including the Type, Length, Pad Length, 178 Signature Length, CGA Parameters, Digital Signature and Padding 179 fields) in units of 8 octets. 180 Pad Length 182 The length of the Padding field. 183 Sig Length 185 The length of the Digital Signature field. 186 CGA Parameters 188 The CGA Parameters field is variable-length containing the CGA 189 Parameters data structure described in Section 4 of [RFC3972]. 190 Digital Signature 192 The Digital Signature field is a variable length field containing 193 a Elliptic Curve Digital Signature Algorithm (ECDSA) signature 194 (with SHA-256 and P-256 curve of [FIPS-186-3]). Digital signature 195 is constructed as explained in Section 4.3. 197 Padding 199 The Padding field contains a variable-length field making the CGA 200 Parameters and Digital Signature Option length a multiple of 8. 202 4.2. Digital Signature Option 204 This option contains the digital signature. 206 A summary of the Digital Signature Option format is shown below. 207 Note that this option has the same format as RSA Signature Option 208 defined in [RFC3971]. The differences are that Digital Signature 209 field carries an ECDSA signature not an RSA signature, and in 210 calculating Key Hash field SHA-2 is used instead of SHA-1. 212 In the sequence of octets to be signed using the sender's private key 213 includes 128-bit CGA Message Type tag. In LSEND, CGA Message Type 214 tag of 0xE8C47FB7FD2BB885DAB2D31A0F2808B4 MUST be used. 216 0 1 2 3 217 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 218 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 219 | Type | Length | Reserved | 220 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 221 | | 222 | Key Hash | 223 | | 224 | | 225 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 226 | | 227 . . 228 . Digital Signature . 229 . . 230 | | 231 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 232 | | 233 . . 234 . Padding . 235 . . 236 | | 237 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 239 Type 241 TBA2 for Digital Signature 243 Length 245 The length of the option (including the Type, Length, Reserved, 246 Key Hash, Digital Signature and Padding fields) in units of 8 247 octets. 248 Key Hash 250 The Key Hash field is a 128-bit field containing the most 251 significant (leftmost) 128 bits of a SHA-2 hash of the public key 252 used for constructing the signature. This is the same as in 253 [RFC3971] except for SHA-1 which has been replaced by SHA-2. 254 Digital Signature 256 Same as in Section 4.1. 257 Padding 259 The Padding field contains a variable-length field containing as 260 many bytes long as remain after the end of the signature. 262 4.3. Calculation of the Digital Signature and CGA Using ECC 264 Due to the use of Elliptic Curve Cryptography, the following 265 modifications are needed to [RFC3971] and [RFC3972]. 267 The digital signature is constructed by using the sender's private 268 key over the same sequence of octets specified in Section 5.2 of 269 [RFC3971] up to all neighbor discovery protocol options preceding the 270 Digital Signature option containing the ECC-based signature. The 271 signature value is computed using the ECDSA signature algorithm as 272 defined in [SEC1] and hash function SHA-256. 274 Public Key is the most important parameter in CGA Parameters defined 275 in Section 4.1. Public Key MUST be DER-encoded ASN.1 structure of 276 the type SubjectPublicKeyInfo formatted as ECC Public Key. The 277 AlgorithmIdentifier, contained in ASN.1 structure of type 278 SubjectPublicKeyInfo, MUST be the (unrestricted) id- ecPublicKey 279 algorithm identifier, which is OID 1.2.840.10045.2.1, and the 280 subjectPublicKey MUST be formatted as an ECC Public Key, specified in 281 Section 2.2 of [RFC5480]. 283 Note that the ECC key lengths are determined by the namedCurves 284 parameter stored in ECParameters field of the AlgorithmIdentifier. 285 The named curve to use is secp256r1 corresponding to P-256 which is 286 OID 1.2.840.10045.3.1.7 [SEC2]. 288 ECC Public Key could be in uncompressed form or in compressed form 289 where the first octet of the OCTET STRING is 0x04 and 0x02 or 0x03, 290 respectively. Point compression using secp256r1 reduces the key size 291 by 32 octets. In LSEND, point compression MUST be supported. 293 5. Protocol Interactions 295 Lightweight Secure Neighbor Discovery for Low-power and Lossy 296 Networks (LSEND for LLN) modifies Neighbor Discovery Optimization for 297 Low-power and Lossy Networks [RFC6775] as explained in this section. 298 Protocol interactions are shown in Figure 1. 300 6LoWPAN Border Routers (6LBR) send router advertisements (RA). 301 6LoWPAN Nodes (6LN, or simply "nodes") receive these RAs and generate 302 their own cryptographically generated addresses using elliptic curve 303 cryptography as explained in Section 4.3. The node sends a neighbor 304 solicitation (NS) message with the address registration option (ARO) 305 to 6LBR. Such a NS is called an address registration NS. 307 An LSEND for LLN node MUST send an address registration NS message 308 after adding CGA Parameters and Digital Signature Option defined in 309 Section 4.1. Source address MUST be set to its crypotographically 310 generated address. An LSEND for LLN node MUST set the Owner 311 Interface Identifier field (EUI-64) in ARO to the rightmost 64 bits 312 of its crypotographically generated address. The Subnet Prefix field 313 of CGA Parameters MUST be set to the leftmost 64 bits of its 314 crypotographically generated address. The Public Key field of CGA 315 Parameters MUST be set to the node's ECC Public Key. 317 6LBR receives the address registration NS. 6LBR then verifies the 318 source address as described in Section 5.1.2. of [RFC3971] using the 319 claimed source address and CGA Parameters field in the message. 320 After successfully verifying the address 6LBR next does a 321 cryptographic check of the signature included in the Digital 322 Signature field in the message. If all checks succeed then 6LBR 323 performs a duplicate address detection procedure on the address. If 324 that also succeeds 6LBR registers the CGA in the neighbor cache. 6LBR 325 also caches the node's public key. 327 6LBR sends an address registration neighbor advertisement (NA) as a 328 reply to confirm the node's registration. Status is set to 0 to 329 indicate success. This completes initial address registration. The 330 address registration needs to be refreshed after the neighbor cache 331 entry times out. 333 6LN 6LBR 334 | | 335 |<-----------------------RA-------------------------------| 336 | | 337 |---------------NS with ARO and CGA Option--------------->| 338 | | 339 |<-----------------------NA with ARO----------------------| 340 | | 341 |---------------NS with ARO and Digital Signature Option->| 342 | | 343 |<-----------------------NA with ARO----------------------| 344 | | 345 |---------------NS with ARO and Digital Signature Option->| 346 | | 347 |<-----------------------NA with ARO----------------------| 349 Figure 1: Lightweight SEND for LLN Protocol 351 In order to refresh the neighbor cache entry, an LSEND for LLN node 352 MUST send an address registration NS message after adding the Digital 353 Signature Option defined in Section 4.2. The Key Hash field is a 354 hash of the node's public key and MUST be set as described in 355 Section 4.2. The Digital Signature field MUST be set as described in 356 Section 4.2. 358 6LBR receives the address registration refresh NS. 6LBR uses the key 359 hash field in Digital Signature Option to find the node's public key 360 from the neighbor cache. 6LBR verifies the digital signature in the 361 NS. In case of successful verification, 6LBR sends back an address 362 registration neighbor advertisement (NA) to the node and sets the 363 status to 0 indicating successful refreshment of the CGA of the node. 364 Similar refresh NS and NA exchanges happen afterwards as shown in 365 Figure 1. 367 5.1. Packet Sizes 369 An original address registration NS message that contains a 40 byte 370 header and ARO is 16 octets. DER-encoded ECC Public Key for P-256 371 curve is 88 octets long uncompressed and 88-32=56 octets with point 372 compression. Digital Signature field when using ECDSA for P-256 373 curve is 72 octets long without padding bytes for a DER encoding of 374 the ASN.1 type "ECDSA-sig-value" [ANSIX9.62]. 376 CGA Parameters and Digital Signature Option's CGA Parameters include 377 16 octet modifier, 8 octet prefix obtained from the router 378 advertisement message sent from 6LBR, 1 octet collision count and 56 379 octet Public Key. Digital Signature is 72 octets. The option is 160 380 octets with Padding of 7 octets. The total message size of an 381 original LSEND address registration NS message is 216 octets and such 382 a message can be encapsulated into three 802.15.4 frames. 384 An address registration refresh NS message contains an ARO which is 385 16 octets and the digital signature option containing 16 octet key 386 hash and 71 octet signature and 5 octet Padding. The message is 152 387 octets long with the header. Such a message could be encapsulated in 388 two 802.15.4 frames. 390 6. Security Considerations 392 The same considerations regarding the threats to the Local Link Not 393 Covered (as in [RFC3971]) apply. 395 The threats discussed in Section 9.2 of [RFC3971] are countered by 396 the protocol described in this document as well. 398 As to the attacks to the protocol itself, denial of service attacks 399 that involve producing a very high number of packets are deemed 400 unlikely because of the assumptions on the node capabilities in low- 401 power and lossy networks. 403 7. IANA considerations 405 This document defines two new options to be used in neighbor 406 discovery protocol messages and new type values for CGA Parameters 407 and Digital Signature Option (TBA1) and Digital Signature Option 408 (TBA2) need to be assigned by IANA. 410 This document defines 0xE8C47FB7FD2BB885DAB2D31A0F2808B4 for LSEND 411 CGA Message Type Tag. 413 8. Acknowledgements 415 Greg Zaverucha from RIM made contributions to this document. 417 9. References 419 9.1. Normative References 421 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 422 Requirement Levels", BCP 14, RFC 2119, March 1997. 424 [RFC3756] Nikander, P., Kempf, J., and E. Nordmark, "IPv6 Neighbor 425 Discovery (ND) Trust Models and Threats", RFC 3756, 426 May 2004. 428 [RFC3971] Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure 429 Neighbor Discovery (SEND)", RFC 3971, March 2005. 431 [RFC3972] Aura, T., "Cryptographically Generated Addresses (CGA)", 432 RFC 3972, March 2005. 434 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 435 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 436 September 2007. 438 [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless 439 Address Autoconfiguration", RFC 4862, September 2007. 441 [RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, 442 "Elliptic Curve Cryptography Subject Public Key 443 Information", RFC 5480, March 2009. 445 [RFC6775] Shelby, Z., Chakrabarti, S., Nordmark, E., and C. Bormann, 446 "Neighbor Discovery Optimization for IPv6 over Low-Power 447 Wireless Personal Area Networks (6LoWPANs)", RFC 6775, 448 November 2012. 450 [SEC1] "Standards for Efficient Crtptography Group. SEC 1: 451 Elliptic Curve Cryptography Version 2.0", May 2009. 453 [ANSIX9.62] 454 "American National Standards Institute (ANSI), ANS X9.62- 455 2005: The Elliptic Curve Digital Signature Algorithm 456 (ECDSA)", November 2005. 458 9.2. Informative references 460 [SEC2] "Standards for Efficient Crtptography Group. SEC 2: 461 Recommended Elliptic Curve Domain Parameters Version 462 2.0", January 2010. 464 [FIPS-186-3] 465 "National Institute of Standards and Technology, "Digital 466 Signature Standard"", June 2009. 468 [NIST-ST] "National Institute of Standards and Technology, "NIST 469 Comments on Cryptanalytic Attackts on SHA-1"", 470 January 2009, 471 . 473 Authors' Addresses 475 Behcet Sarikaya (editor) 476 Huawei USA 477 5340 Legacy Dr. Building 3 478 Plano, TX 75024 480 Email: sarikaya@ieee.org 482 Frank Xia 483 Huawei Technologies Co., Ltd. 484 101 Software Avenue, Yuhua District 485 Nanjing, Jiangsu 210012, China 487 Phone: ++86-25-56625443 488 Email: xiayangsong@huawei.com