Network Working Group B. Sarikaya Internet-Draft F. Xia Intended status: Standards Track Huawei USA Expires: April 7, 2011 October 4, 2010 Lightweight Secure Neighbor Discovery for Low-power and Lossy Networks draft-sarikaya-lwip-cgand-00 Abstract This document defines lightweight secure neighbor discovery for low- power and lossy networks. The nodes generate a Cryptographically Generated Address using an Elliptic Curve Cryptography public key, register the Cryptographically Generated Address with a default router and periodically refresh the registration. Modifications to 6lowpan Neighbor Discovery protocol are described for secure neighbor discovery for low-power and lossy networks. Cryptographically generated address and digital signature are calculated using elliptic curve cryptography public key of the node. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on April 7, 2011. Copyright Notice Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect Sarikaya & Xia Expires April 7, 2011 [Page 1] Internet-Draft LSEND for LLN October 2010 to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 4. New Options . . . . . . . . . . . . . . . . . . . . . . . . . 4 4.1. CGA Parameters and Digital Signature Option . . . . . . . 4 4.2. Digital Signature Option . . . . . . . . . . . . . . . . . 6 4.3. Calculation of Digital Signature and CGA Using ECC . . . . 7 5. Protocol Interactions . . . . . . . . . . . . . . . . . . . . 7 5.1. Packet Sizes . . . . . . . . . . . . . . . . . . . . . . . 9 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 7. IANA considerations . . . . . . . . . . . . . . . . . . . . . 10 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 9.1. Normative References . . . . . . . . . . . . . . . . . . . 10 9.2. Informative references . . . . . . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 11 Sarikaya & Xia Expires April 7, 2011 [Page 2] Internet-Draft LSEND for LLN October 2010 1. Introduction Neighbor discovery for IPv6 [RFC4861] and stateless address autoconfiguration [RFC4862] together referred to as neighbor discovery protocols (NDP) are defined for regular hosts operating in wired/wireless links. These protocols are not suitable and require optimizations for resource constrained, low power hosts operating in lossy wireless links. Neighbor discovery optimizations for 6lowpan networks include simple optimizations such as host address registration feature using the address registration option which is sent in unicast Neighbor Solicitation (NS) and Neighbor Advertisement (NA) messages [I-D.ietf-6lowpan-nd]. Neighbor discovery protocols (NDP) are not secure especially when physical security on the link is not assured and vulnerable to attacks. Secure neighbor discovery protocol (SEND) is defined to secure NDP [RFC3971]. Cryptographically generated addresses (CGA) are used in SEND [RFC3972]. SEND mandates the use of RSA signature algorithm which is computationally heavy and not suitable to use for low-power and resource constrained nodes [I-D.cheneau-csi-send-sig-agility]. The use of RSA public key and signature leads to long message sizes not suitable to use in low-bit rate, short range, asymmetric and non-transitive links such as IEEE 802.15.4. In this document we extend 6lowpan neighbor discovery protocol with cryptographically generated addresses. The nodes generate CGAs and register them with the default router. CGA generation is based on elliptic curve cryptography (ECC)and signature is calculated using elliptic curve digital signature algorithm (ECDSA) known to be lightweight and lead to much smaller packet sizes. The resulting protocol is called Lightweight Secure Neighbor Discovery Protocol (LSEND). 2. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. The terminology in this document is based on the definitions in [RFC3971], [RFC3972] in addition to the ones specified in [I-D.ietf-6lowpan-nd]. Sarikaya & Xia Expires April 7, 2011 [Page 3] Internet-Draft LSEND for LLN October 2010 3. Problem Statement In this section we state requirements on secure neighbor discovery protocol for low-power and lossy networks. The protocol MUST be based on Neighbor Discovery Optimization for Low-power and Lossy Networks protocol defined in [I-D.ietf-6lowpan-nd] due to the host-initiated interactions to allow for sleeping hosts, elimination of multicast-based address resolution for hosts, etc. New options to be added to neighbor solicitation messages MUST lead to minimal packet sizes. Such packet sizes facilitate low-power transmission by resource constrained nodes on lossy links. CGA generation, signature and key hash calculation MUST avoid the use of SHA-1 which is known to have security flaws. In this document, we use SHA-2 instead of SHA-1 and thus avoid SHA-1's flaws. Public key and signature sizes MUST be minimized and signature calculation MUST be lightweight. In this document we adopt ECC and ECDSA with P-256 curve in order to meet this requirement. 4. New Options 4.1. CGA Parameters and Digital Signature Option This option contains both CGA parameters and the digital signature. A summary of the CGA Parameters and Digital Signature Option format is shown below. Sarikaya & Xia Expires April 7, 2011 [Page 4] Internet-Draft LSEND for LLN October 2010 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | Pad Length | Sig. Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . CGA Parameters . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Digital Signature . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Padding . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type TBA1 for CGA Parameters and Digital Signature Length The length of the option (including the Type, Length, Pad Length, Signature Length, CGA Parameters, Digital Signature and Padding fields) in units of 8 octets. Pad Length The length of the Padding field. Sig Length The length of the Digital Signature field. CGA Parameters The CGA Parameters field is variable-length containing the CGA Parameters data structure described in Section 4 of [RFC3972]. Digital Signature The Digital Signature field is a variable length field containing a Elliptic Curve Digital Signature Algorithm (ECDSA) signature (with SHA-256 and P-256 curve of [FIPS-186-3]). Digital signature is constructed as explained in Section 4.3. Sarikaya & Xia Expires April 7, 2011 [Page 5] Internet-Draft LSEND for LLN October 2010 Padding The Padding field contains a variable-length field making the CGA Parameters and Digital Signature Option length a multiple of 8. 4.2. Digital Signature Option This option contains the digital signature. A summary of the Digital Signature Option format is shown below. Note that this option has the same format as RSA Signature Option defined in [RFC3971]. The differences are that Digital Signature field carries Ellictic Curve Cryptography signature not RSA signature and in calculating Key Hash field SHA-2 is used not SHA-1. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Key Hash | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Digital Signature . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Padding . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type TBA2 for Digital Signature Length The length of the option (including the Type, Length, Reserved, Key Hash, Digital Signature and Padding fields) in units of 8 octets. Sarikaya & Xia Expires April 7, 2011 [Page 6] Internet-Draft LSEND for LLN October 2010 Key Hash The Key Hash field is a 128-bit field containing the most significant (leftmost) 128 bits of a SHA-2 hash of the public key used for constructing the signature. This is the same as in [RFC3971] except for SHA-1 which has been proved to be flawed in the light of recent attacks [NIST-ST]. Digital Signature Same as in Section 4.1. Padding The Padding field contains a variable-length field containing as many bytes long as remain after the end of the signature. 4.3. Calculation of Digital Signature and CGA Using ECC Due to the use of Elliptic Curve Cryptography, the following modifications are needed to [RFC3971] and [RFC3972]. Digital signature is constructed by using the sender's private key over the same sequence of octets specified in Section 5.2 of [RFC3971] up to all neighbor discovery protocol options preceding the Digital Signature option containing Elliptic Curve Cryptography digital signature. The signature value is computed using the ECDSA signature algorithm as defined in [SEC1] and hash function SHA-256. Public Key is the most important parameter in CGA Parameters defined in Section 4.1. Public Key MUST be DER-encoded ASN.1 structure of the type SubjectPublicKeyInfo formatted as ECC Public Key. The AlgorithmIdentifier, contained in ASN.1 structure of type SubjectPublicKeyInfo, MUST be the (unrestricted) id- ecPublicKey algorithm identifier, which is OID 1.2.840.10045.2.1, and the subjectPublicKey MUST be formatted as an ECC Public Key, specified in Section 2.2 of [RFC5480]. Note that the ECC key lengths are determined by the namedCurves parameter stored in ECParameters field of the AlgorithmIdentifier. The named curve to use is secp256r1 corresponding to P-256 which is OID 1.2.840.10045.3.1.7. 5. Protocol Interactions Lightweight Secure Neighbor Discovery for Low-power and Lossy Networks (LSEND for LLN) modifies Neighbor Discovery Optimization for Low-power and Lossy Networks [I-D.ietf-6lowpan-nd] as explained in this section. Protocol interactions are shown in Figure 1. Sarikaya & Xia Expires April 7, 2011 [Page 7] Internet-Draft LSEND for LLN October 2010 6LoWPAN Border Routers (6LBR) send router advertisements (RA). 6LoWPAN Nodes (6LN) or nodes in short receive these RAs and generate their own cryptographically generated addresses using elliptic curve cryptography as explained in Section 4.3. The node sends a neighbor solicitation (NS) message with address registration option (ARO) to 6LBR. Such a NS is called an address registration NS. A LSEND for LLN node MUST send an address registration NS message after adding CGA Parameters and Digital Signature Option defined in Section 4.1. Source address MUST be set to its crypotographically generated address. A LSEND for LLN node MUST set the Owner Interface Identifier field (EUI-64) in ARO to the rightmost 64 bits of its crypotographically generated address. Subnet Prefix field of CGA Parameters MUST be set to the leftmost 64 bits of its crypotographically generated address. Public Key field of CGA Parameters MUST be set to the node's ECC Public Key. 6LBR receives the address registration NS. 6LBR verifies the source address as described in Section 5.1.2. of [RFC3971] using the claimed source address and CGA Parameters field in the message. After successfully verifying the address 6LBR next does a cryptographic check of the signature included in Digital Signature field in the message. If all checks succeed then 6LBR performs a duplicate address detection procedure first on the address. If that also succeeds 6LBR registers CGA in the neighbor cache. 6LBR also caches the node's public key. 6LBR sends an address registration neighbor advertisement (NA) as a reply to confirm the node's registration. Status is set to 0 to indicate success. This completes initial address registration. The address registration needs to be refreshed after the neighbor cache entry times out. Sarikaya & Xia Expires April 7, 2011 [Page 8] Internet-Draft LSEND for LLN October 2010 6LN 6LBR | | |<-----------------------RA-------------------------------| | | |---------------NS with ARO and CGA Option--------------->| | | |<-----------------------NA with ARO----------------------| | | |---------------NS with ARO and Digital Signature Option->| | | |<-----------------------NA with ARO----------------------| | | |---------------NS with ARO and Digital Signature Option->| | | |<-----------------------NA with ARO----------------------| Figure 1: Lightweight SEND for LLA Protocol In order to refresh the neighbor cache entry, a LSEND for LLN node MUST send an address registration NS message after adding Digital Signature Option defined in Section 4.2. Key hash field is a hash of the node's public key and MUST be set as described in Section 4.2. Digital Signature field MUST be set as described in Section 4.2. 6LBR receives the address registration refresh NS. 6LBR uses the key hash field in Digital Signature Option to find the node's public key from the neighbor cache. 6LBR verifies the digital signature in the NS. In case of successful verification, 6LBR sends back an address registration neighbor advertisement (NA) to the node and sets the status to 0 indicating successful refreshment of the CGA of the node. Similar refresh NS and NA exchanges happen afterwards as shown in Figure 1 5.1. Packet Sizes Original address registration NS message contains 40 byte header and ARO is 16 octets. DER-encoded ECC Public Key for P-256 curve is 88 octets long. Digital Signature field when using ECDSA for P-256 curve is 71 octets long without padding [I-D.cheneau-csi-ecc-sig-agility]. CGA Parameters and Digital Signature Option's CGA Parameters include 16 octet modifier, 8 octet prefix obtained from the router advertisement message sent from 6LBR, 1 octet collision count and 88 octet Public Key. Digital Signature is 71 octets. The option is 184 octets with Padding 0 octets. The total message size of an original LSEND address registration NS message is 240 octets and such a Sarikaya & Xia Expires April 7, 2011 [Page 9] Internet-Draft LSEND for LLN October 2010 message can be encapsulated into three 802.15.4 frames. An address registration refresh NS message contains an ARO which is 16 octets and digital signature option containing 16 octet key hash and 71 octet signature and 5 octet Padding. The message is 152 octets long with the header. Such a message could be encapsulated in two 802.15.4 frames. 6. Security Considerations Same considerations regarding the threats to the Local Link Not Covered as in [RFC3971] apply. The threats discussed in Section 9.2 of [RFC3971] are countered by the protocol described in this document as well. As to the attacks to the protocol itself, denial of service attacks that involve producing a very high number of packets are deemed unlikely because of the assumptions on the node capabilities in low- power and lossy networks. 7. IANA considerations This document defines two new options to be used in neighbor discovery protocol messages and new type values for CGA Parameters and Digital Signature Option (TBA1) and Digital Signature Option (TBA2) need to be assigned by IANA. 8. Acknowledgements TBD. 9. References 9.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3971] Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure Neighbor Discovery (SEND)", RFC 3971, March 2005. [RFC3972] Aura, T., "Cryptographically Generated Addresses (CGA)", RFC 3972, March 2005. Sarikaya & Xia Expires April 7, 2011 [Page 10] Internet-Draft LSEND for LLN October 2010 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, September 2007. [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless Address Autoconfiguration", RFC 4862, September 2007. [RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, "Elliptic Curve Cryptography Subject Public Key Information", RFC 5480, March 2009. [I-D.ietf-6lowpan-nd] Shelby, Z., Chakrabarti, S., and E. Nordmark, "Neighbor Discovery Optimization for Low-power and Lossy Networks", draft-ietf-6lowpan-nd-13 (work in progress), September 2010. 9.2. Informative references [SEC1] "Standards for Efficient Crtptography Group. SEC 1: Elliptic Curve Cryptography", September 2000. [FIPS-186-3] "National Institute of Standards and Technology, "Digital Signature Standard"", June 2009. [NIST-ST] "National Institute of Standards and Technology, "NIST Comments on Cryptanalytic Attackts on SHA-1"", January 2009, . [I-D.cheneau-csi-ecc-sig-agility] Cheneau, T., Laurent, M., Shen, S., and M. Vanderveen, "ECC public key and signature support in Cryptographically Generated Addresses (CGA) and in the Secure Neighbor Discovery (SEND)", draft-cheneau-csi-ecc-sig-agility-02 (work in progress), June 2010. [I-D.cheneau-csi-send-sig-agility] Cheneau, T., Laurent, M., Shen, S., and M. Vanderveen, "Signature Algorithm Agility in the Secure Neighbor Discovery (SEND) Protocol", draft-cheneau-csi-send-sig-agility-02 (work in progress), June 2010. Sarikaya & Xia Expires April 7, 2011 [Page 11] Internet-Draft LSEND for LLN October 2010 Authors' Addresses Behcet Sarikaya Huawei USA 1700 Alma Dr. Suite 500 Plano, TX 75075 Phone: +1 972-509-5599 Email: sarikaya@ieee.org Frank Xia Huawei USA 1700 Alma Dr. Suite 500 Plano, TX 75075 Phone: +1 972-509-5599 Email: xiayangsong@huawei.com Sarikaya & Xia Expires April 7, 2011 [Page 12]