idnits 2.17.00 (12 Aug 2021) /tmp/idnits17738/draft-sarikaya-6lo-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 (July 1, 2014) is 2881 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 476, 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 6lo B. Sarikaya, Ed. 3 Internet-Draft Huawei USA 4 Intended status: Standards Track F. Xia 5 Expires: January 2, 2015 Huawei Technologies Co., Ltd. 6 July 1, 2014 8 Lightweight and Secure Neighbor Discovery for Low-power and Lossy 9 Networks 10 draft-sarikaya-6lo-cga-nd-00 12 Abstract 14 Modifications to 6lowpan Neighbor Discovery protocol are proposed in 15 order to secure the neighbor discovery for low-power and lossy 16 networks. This document defines lightweight and secure version of 17 the neighbor discovery for low-power and lossy networks. The nodes 18 generate a Cryptographically Generated Address, register the 19 Cryptographically Generated Address with a default router and 20 periodically refresh the registration. Cryptographically generated 21 address and digital signatures are calculated using elliptic curve 22 cryptography, so that the cryptographic operations are suitable for 23 low power devices. 25 Status of this Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on January 2, 2015. 42 Copyright Notice 44 Copyright (c) 2014 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 3 62 4. New Options . . . . . . . . . . . . . . . . . . . . . . . . . 4 63 4.1. CGA Parameters and Digital Signature Option . . . . . . . 4 64 4.2. Digital Signature Option . . . . . . . . . . . . . . . . . 6 65 4.3. Calculation of the Digital Signature and CGA Using ECC . . 7 66 5. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 8 67 5.1. Packet Sizes . . . . . . . . . . . . . . . . . . . . . . . 9 68 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 69 7. IANA considerations . . . . . . . . . . . . . . . . . . . . . 10 70 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10 71 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11 72 9.1. Normative References . . . . . . . . . . . . . . . . . . . 11 73 9.2. Informative references . . . . . . . . . . . . . . . . . . 11 74 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 12 76 1. Introduction 78 Neighbor discovery for IPv6 [RFC4861] and stateless address 79 autoconfiguration [RFC4862], together referred to as neighbor 80 discovery protocols (NDP), are defined for regular hosts operating 81 with wired/wireless links. These protocols are not suitable and 82 require optimizations for resource constrained, low power hosts 83 operating with lossy wireless links. Neighbor discovery 84 optimizations for 6lowpan networks include simple optimizations such 85 as a host address registration feature using the address registration 86 option which is sent in unicast Neighbor Solicitation (NS) and 87 Neighbor Advertisement (NA) messages [RFC6775]. 89 Neighbor discovery protocols (NDP) are not secure especially when 90 physical security on the link is not assured and vulnerable to 91 attacks defined in [RFC3756]. Secure neighbor discovery protocol 92 (SEND) is defined to secure NDP [RFC3971]. Cryptographically 93 generated addresses (CGA) are used in SEND [RFC3972]. SEND mandates 94 the use of the RSA signature algorithm which is computationally heavy 95 and not suitable to use for low-power and resource constrained nodes. 96 The use of an RSA public key and signature leads to long message 97 sizes not suitable to use in low-bit rate, short range, asymmetric 98 and non-transitive links such as IEEE 802.15.4. 100 In this document we extend the 6lowpan neighbor discovery protocol 101 with cryptographically generated addresses. The nodes generate CGAs 102 and register them with the default router. CGA generation is based 103 on elliptic curve cryptography (ECC)and signature is calculated using 104 elliptic curve digital signature algorithm (ECDSA) known to be 105 lightweight, leading to much smaller packet sizes. The resulting 106 protocol is called Lightweight Secure Neighbor Discovery Protocol 107 (LSEND). 109 2. Terminology 111 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 112 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 113 document are to be interpreted as described in [RFC2119]. 115 The terminology in this document is based on the definitions in 116 [RFC3971], [RFC3972] in addition to the ones specified in [RFC6775]. 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 [RFC6775] due to the 125 host-initiated interactions to allow for sleeping hosts, elimination 126 of multicast-based address resolution for hosts, etc. 128 New options to be added to neighbor solicitation messages MUST lead 129 to small packet sizes. Smaller packet sizes facilitate low-power 130 transmission by resource constrained nodes on lossy links. 132 CGA generation, signature and key hash calculation MUST avoid the use 133 of SHA-1 which is known to have security flaws. In this document, we 134 use SHA-2 instead of SHA-1 and thus avoid SHA-1's flaws. 136 Public key and signature sizes MUST be minimized and signature 137 calculation MUST be lightweight. In this document we adopt ECC and 138 ECDSA with the P-256 curve in order to meet this requirement. 140 4. New Options 142 4.1. CGA Parameters and Digital Signature Option 144 This option contains both CGA parameters and the digital signature. 146 A summary of the CGA Parameters and Digital Signature Option format 147 is shown below. 149 0 1 2 3 150 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 151 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 152 | Type | Length | Pad Length | Sig. Length | 153 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 154 | | 155 . . 156 . CGA Parameters . 157 . . 158 | | 159 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 160 | | 161 . . 162 . Digital Signature . 163 . . 164 | | 165 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 166 | | 167 . . 168 . Padding . 169 . . 170 | | 171 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 173 Type 175 TBA1 for CGA Parameters and Digital Signature 176 Length 178 The length of the option (including the Type, Length, Pad Length, 179 Signature Length, CGA Parameters, Digital Signature and Padding 180 fields) in units of 8 octets. 181 Pad Length 183 The length of the Padding field. 184 Sig Length 186 The length of the Digital Signature field. 187 CGA Parameters 189 The CGA Parameters field is variable-length containing the CGA 190 Parameters data structure described in Section 4 of [RFC3972]. 191 Digital Signature 193 The Digital Signature field is a variable length field containing 194 a Elliptic Curve Digital Signature Algorithm (ECDSA) signature 195 (with SHA-256 and P-256 curve of [FIPS-186-3]). Digital signature 196 is constructed as explained in Section 4.3. 198 Padding 200 The Padding field contains a variable-length field making the CGA 201 Parameters and Digital Signature Option length a multiple of 8. 203 4.2. Digital Signature Option 205 This option contains the digital signature. 207 A summary of the Digital Signature Option format is shown below. 208 Note that this option has the same format as RSA Signature Option 209 defined in [RFC3971]. The differences are that Digital Signature 210 field carries an ECDSA signature not an RSA signature, and in 211 calculating Key Hash field SHA-2 is used instead of SHA-1. 213 In the sequence of octets to be signed using the sender's private key 214 includes 128-bit CGA Message Type tag. In LSEND, CGA Message Type 215 tag of 0xE8C47FB7FD2BB885DAB2D31A0F2808B4 MUST be used. 217 0 1 2 3 218 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 219 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 220 | Type | Length | Reserved | 221 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 222 | | 223 | Key Hash | 224 | | 225 | | 226 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 227 | | 228 . . 229 . Digital Signature . 230 . . 231 | | 232 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 233 | | 234 . . 235 . Padding . 236 . . 237 | | 238 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 240 Type 242 TBA2 for Digital Signature 244 Length 246 The length of the option (including the Type, Length, Reserved, 247 Key Hash, Digital Signature and Padding fields) in units of 8 248 octets. 249 Key Hash 251 The Key Hash field is a 128-bit field containing the most 252 significant (leftmost) 128 bits of a SHA-2 hash of the public key 253 used for constructing the signature. This is the same as in 254 [RFC3971] except for SHA-1 which has been replaced by SHA-2. 255 Digital Signature 257 Same as in Section 4.1. 258 Padding 260 The Padding field contains a variable-length field containing as 261 many bytes long as remain after the end of the signature. 263 4.3. Calculation of the Digital Signature and CGA Using ECC 265 Due to the use of Elliptic Curve Cryptography, the following 266 modifications are needed to [RFC3971] and [RFC3972]. 268 The digital signature is constructed by using the sender's private 269 key over the same sequence of octets specified in Section 5.2 of 270 [RFC3971] up to all neighbor discovery protocol options preceding the 271 Digital Signature option containing the ECC-based signature. The 272 signature value is computed using the ECDSA signature algorithm as 273 defined in [SEC1] and hash function SHA-256. 275 Public Key is the most important parameter in CGA Parameters defined 276 in Section 4.1. Public Key MUST be DER-encoded ASN.1 structure of 277 the type SubjectPublicKeyInfo formatted as ECC Public Key. The 278 AlgorithmIdentifier, contained in ASN.1 structure of type 279 SubjectPublicKeyInfo, MUST be the (unrestricted) id- ecPublicKey 280 algorithm identifier, which is OID 1.2.840.10045.2.1, and the 281 subjectPublicKey MUST be formatted as an ECC Public Key, specified in 282 Section 2.2 of [RFC5480]. 284 Note that the ECC key lengths are determined by the namedCurves 285 parameter stored in ECParameters field of the AlgorithmIdentifier. 286 The named curve to use is secp256r1 corresponding to P-256 which is 287 OID 1.2.840.10045.3.1.7 [SEC2]. 289 ECC Public Key could be in uncompressed form or in compressed form 290 where the first octet of the OCTET STRING is 0x04 and 0x02 or 0x03, 291 respectively. Point compression using secp256r1 reduces the key size 292 by 32 octets. In LSEND, point compression MUST be supported. 294 5. Protocol Interactions 296 Lightweight Secure Neighbor Discovery for Low-power and Lossy 297 Networks (LSEND for LLN) modifies Neighbor Discovery Optimization for 298 Low-power and Lossy Networks [RFC6775] as explained in this section. 299 Protocol interactions are shown in Figure 1. 301 6LoWPAN Border Routers (6LBR) send router advertisements (RA). 302 6LoWPAN Nodes (6LN, or simply "nodes") receive these RAs and generate 303 their own cryptographically generated addresses using elliptic curve 304 cryptography as explained in Section 4.3. The node sends a neighbor 305 solicitation (NS) message with the address registration option (ARO) 306 to 6LBR. Such a NS is called an address registration NS. 308 An LSEND for LLN node MUST send an address registration NS message 309 after adding CGA Parameters and Digital Signature Option defined in 310 Section 4.1. Source address MUST be set to its crypotographically 311 generated address. An LSEND for LLN node MUST set the Owner 312 Interface Identifier field (EUI-64) in ARO to the rightmost 64 bits 313 of its crypotographically generated address. The Subnet Prefix field 314 of CGA Parameters MUST be set to the leftmost 64 bits of its 315 crypotographically generated address. The Public Key field of CGA 316 Parameters MUST be set to the node's ECC Public Key. 318 It needs to be investigated whether to change SeND to use the Owner 319 Interface Identifier (UII) for the CGA calculation as opposed to the 320 source address. UII is more stable and a device could register all 321 its addresses with a single CGA-based UII / keypair. It also needs 322 to be investigated to modify 6LoWPAN ND [RFC6775] which registers the 323 source address to change that to register the target address. 325 6LBR receives the address registration NS. 6LBR then verifies the 326 source address as described in Section 5.1.2. of [RFC3971] using the 327 claimed source address and CGA Parameters field in the message. 328 After successfully verifying the address 6LBR next does a 329 cryptographic check of the signature included in the Digital 330 Signature field in the message. If all checks succeed then 6LBR 331 performs a duplicate address detection procedure on the address. If 332 that also succeeds 6LBR registers the CGA in the neighbor cache. 6LBR 333 also caches the node's public key. 335 6LBR sends an address registration neighbor advertisement (NA) as a 336 reply to confirm the node's registration. Status is set to 0 to 337 indicate success. This completes initial address registration. The 338 address registration needs to be refreshed after the neighbor cache 339 entry times out. 341 6LN 6LBR 342 | | 343 |<-----------------------RA-------------------------------| 344 | | 345 |---------------NS with ARO and CGA Option--------------->| 346 | | 347 |<-----------------------NA with ARO----------------------| 348 | | 349 |---------------NS with ARO and Digital Signature Option->| 350 | | 351 |<-----------------------NA with ARO----------------------| 352 | | 353 |---------------NS with ARO and Digital Signature Option->| 354 | | 355 |<-----------------------NA with ARO----------------------| 357 Figure 1: Lightweight SEND for LLN Protocol 359 In order to refresh the neighbor cache entry, an LSEND for LLN node 360 MUST send an address registration NS message after adding the Digital 361 Signature Option defined in Section 4.2. The Key Hash field is a 362 hash of the node's public key and MUST be set as described in 363 Section 4.2. The Digital Signature field MUST be set as described in 364 Section 4.2. 366 6LBR receives the address registration refresh NS. 6LBR uses the key 367 hash field in Digital Signature Option to find the node's public key 368 from the neighbor cache. 6LBR verifies the digital signature in the 369 NS. In case of successful verification, 6LBR sends back an address 370 registration neighbor advertisement (NA) to the node and sets the 371 status to 0 indicating successful refreshment of the CGA of the node. 372 Similar refresh NS and NA exchanges happen afterwards as shown in 373 Figure 1. 375 5.1. Packet Sizes 377 An original address registration NS message that contains a 40 byte 378 header and ARO is 16 octets. DER-encoded ECC Public Key for P-256 379 curve is 88 octets long uncompressed and 88-32=56 octets with point 380 compression. Digital Signature field when using ECDSA for P-256 381 curve is 72 octets long without padding bytes for a DER encoding of 382 the ASN.1 type "ECDSA-sig-value" [ANSIX9.62]. 384 CGA Parameters and Digital Signature Option's CGA Parameters include 385 16 octet modifier, 8 octet prefix obtained from the router 386 advertisement message sent from 6LBR, 1 octet collision count and 56 387 octet Public Key. Digital Signature is 72 octets. The option is 160 388 octets with Padding of 7 octets. The total message size of an 389 original LSEND address registration NS message is 216 octets and such 390 a message can be encapsulated into three 802.15.4 frames. 392 An address registration refresh NS message contains an ARO which is 393 16 octets and the digital signature option containing 16 octet key 394 hash and 71 octet signature and 5 octet Padding. The message is 152 395 octets long with the header. Such a message could be encapsulated in 396 two 802.15.4 frames. 398 6. Security Considerations 400 The same considerations regarding the threats to the Local Link Not 401 Covered (as in [RFC3971]) apply. 403 The threats discussed in Section 9.2 of [RFC3971] are countered by 404 the protocol described in this document as well. 406 As to the attacks to the protocol itself, denial of service attacks 407 that involve producing a very high number of packets are deemed 408 unlikely because of the assumptions on the node capabilities in low- 409 power and lossy networks. 411 7. IANA considerations 413 This document defines two new options to be used in neighbor 414 discovery protocol messages and new type values for CGA Parameters 415 and Digital Signature Option (TBA1) and Digital Signature Option 416 (TBA2) need to be assigned by IANA. 418 This document defines 0xE8C47FB7FD2BB885DAB2D31A0F2808B4 for LSEND 419 CGA Message Type Tag. 421 8. Acknowledgements 423 Greg Zaverucha from RIM made contributions to this document. 424 Comments from Pascal Thubert are appreciated. 426 9. References 427 9.1. Normative References 429 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 430 Requirement Levels", BCP 14, RFC 2119, March 1997. 432 [RFC3756] Nikander, P., Kempf, J., and E. Nordmark, "IPv6 Neighbor 433 Discovery (ND) Trust Models and Threats", RFC 3756, 434 May 2004. 436 [RFC3971] Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure 437 Neighbor Discovery (SEND)", RFC 3971, March 2005. 439 [RFC3972] Aura, T., "Cryptographically Generated Addresses (CGA)", 440 RFC 3972, March 2005. 442 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 443 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 444 September 2007. 446 [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless 447 Address Autoconfiguration", RFC 4862, September 2007. 449 [RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, 450 "Elliptic Curve Cryptography Subject Public Key 451 Information", RFC 5480, March 2009. 453 [RFC6775] Shelby, Z., Chakrabarti, S., Nordmark, E., and C. Bormann, 454 "Neighbor Discovery Optimization for IPv6 over Low-Power 455 Wireless Personal Area Networks (6LoWPANs)", RFC 6775, 456 November 2012. 458 [SEC1] "Standards for Efficient Crtptography Group. SEC 1: 459 Elliptic Curve Cryptography Version 2.0", May 2009. 461 [ANSIX9.62] 462 "American National Standards Institute (ANSI), ANS X9.62- 463 2005: The Elliptic Curve Digital Signature Algorithm 464 (ECDSA)", November 2005. 466 9.2. Informative references 468 [SEC2] "Standards for Efficient Crtptography Group. SEC 2: 469 Recommended Elliptic Curve Domain Parameters Version 470 2.0", January 2010. 472 [FIPS-186-3] 473 "National Institute of Standards and Technology, "Digital 474 Signature Standard"", June 2009. 476 [NIST-ST] "National Institute of Standards and Technology, "NIST 477 Comments on Cryptanalytic Attackts on SHA-1"", 478 January 2009, 479 . 481 Authors' Addresses 483 Behcet Sarikaya (editor) 484 Huawei USA 485 5340 Legacy Dr. Building 3 486 Plano, TX 75024 488 Email: sarikaya@ieee.org 490 Frank Xia 491 Huawei Technologies Co., Ltd. 492 101 Software Avenue, Yuhua District 493 Nanjing, Jiangsu 210012, China 495 Phone: ++86-25-56625443 496 Email: xiayangsong@huawei.com