idnits 2.17.1 draft-ietf-6lo-ap-nd-12.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 : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC8505, but the abstract doesn't seem to directly say this. It does mention RFC8505 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 10, 2019) is 1840 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) -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS186-4' -- Possible downref: Non-RFC (?) normative reference: ref. 'SEC1' == Outdated reference: A later version (-20) exists of draft-ietf-6lo-backbone-router-11 == Outdated reference: A later version (-23) exists of draft-ietf-lwig-curve-representations-03 Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 6lo P. Thubert, Ed. 3 Internet-Draft Cisco 4 Updates: 8505 (if approved) B. Sarikaya 5 Intended status: Standards Track 6 Expires: October 12, 2019 M. Sethi 7 Ericsson 8 R. Struik 9 Struik Security Consultancy 10 April 10, 2019 12 Address Protected Neighbor Discovery for Low-power and Lossy Networks 13 draft-ietf-6lo-ap-nd-12 15 Abstract 17 This document specifies an extension to 6LoWPAN Neighbor Discovery 18 (ND) protocol defined in RFC6775 and updated in RFC8505. The new 19 extension is called Address Protected Neighbor Discovery (AP-ND) and 20 it protects the owner of an address against address theft and 21 impersonation attacks in a low-power and lossy network (LLN). Nodes 22 supporting this extension compute a cryptographic identifier (Crypto- 23 ID) and use it with one or more of their Registered Addresses. The 24 Crypto-ID identifies the owner of the Registered Address and can be 25 used to provide proof of ownership of the Registered Addresses. Once 26 an address is registered with the Crypto-ID and a proof-of-ownership 27 is provided, only the owner of that address can modify the 28 registration information, thereby enforcing Source Address 29 Validation. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at https://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on October 12, 2019. 48 Copyright Notice 50 Copyright (c) 2019 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (https://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with respect 58 to this document. Code Components extracted from this document must 59 include Simplified BSD License text as described in Section 4.e of 60 the Trust Legal Provisions and are provided without warranty as 61 described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 66 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 67 2.1. BCP 14 . . . . . . . . . . . . . . . . . . . . . . . . . 4 68 2.2. References . . . . . . . . . . . . . . . . . . . . . . . 4 69 2.3. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 5 70 3. Updating RFC 8505 . . . . . . . . . . . . . . . . . . . . . . 6 71 4. New Fields and Options . . . . . . . . . . . . . . . . . . . 6 72 4.1. New Crypto-ID . . . . . . . . . . . . . . . . . . . . . . 6 73 4.2. Updated EARO . . . . . . . . . . . . . . . . . . . . . . 7 74 4.3. Crypto-ID Parameters Option . . . . . . . . . . . . . . . 8 75 4.4. NDP Signature Option . . . . . . . . . . . . . . . . . . 9 76 5. Protocol Scope . . . . . . . . . . . . . . . . . . . . . . . 11 77 6. Protocol Flows . . . . . . . . . . . . . . . . . . . . . . . 11 78 6.1. First Exchange with a 6LR . . . . . . . . . . . . . . . . 12 79 6.2. NDPSO generation and verification . . . . . . . . . . . . 14 80 6.3. Multihop Operation . . . . . . . . . . . . . . . . . . . 16 81 7. Security Considerations . . . . . . . . . . . . . . . . . . . 17 82 7.1. Inheriting from RFC 3971 . . . . . . . . . . . . . . . . 17 83 7.2. Related to 6LoWPAN ND . . . . . . . . . . . . . . . . . . 18 84 7.3. ROVR Collisions . . . . . . . . . . . . . . . . . . . . . 18 85 7.4. Implementation Attacks . . . . . . . . . . . . . . . . . 19 86 7.5. Cross-Protocol Attacks . . . . . . . . . . . . . . . . . 19 87 8. IANA considerations . . . . . . . . . . . . . . . . . . . . . 19 88 8.1. CGA Message Type . . . . . . . . . . . . . . . . . . . . 19 89 8.2. IPv6 ND option types . . . . . . . . . . . . . . . . . . 19 90 8.3. Crypto-Type Subregistry . . . . . . . . . . . . . . . . . 20 91 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 21 92 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 21 93 10.1. Normative References . . . . . . . . . . . . . . . . . . 21 94 10.2. Informative references . . . . . . . . . . . . . . . . . 22 95 Appendix A. Requirements Addressed in this Document . . . . . . 24 96 Appendix B. Representation Conventions . . . . . . . . . . . . . 24 97 B.1. Signature Schemes . . . . . . . . . . . . . . . . . . . . 24 98 B.2. Integer Representation for ECDSA signatures . . . . . . . 25 99 B.3. Alternative Representations of Curve25519 . . . . . . . . 25 100 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27 102 1. Introduction 104 Neighbor Discovery Optimizations for 6LoWPAN networks [RFC6775] 105 (6LoWPAN ND) adapts the original IPv6 neighbor discovery (NDv6) 106 protocols defined in [RFC4861] and [RFC4862] for constrained low- 107 power and lossy network (LLN). In particular, 6LoWPAN ND introduces 108 a unicast host address registration mechanism that reduces the use of 109 multicast. 6LoWPAN ND defines a new Address Registration Option (ARO) 110 that is carried in the unicast Neighbor Solicitation (NS) and 111 Neighbor Advertisement (NA) messages exchanged between a 6LoWPAN Node 112 (6LN) and a 6LoWPAN Router (6LR). It also defines the Duplicate 113 Address Request (DAR) and Duplicate Address Confirmation (DAC) 114 messages between the 6LR and the 6LoWPAN Border Router (6LBR). In 115 LLN networks, the 6LBR is the central repository of all the 116 registered addresses in its domain. 118 The registration mechanism in 6LoWPAN ND [RFC6775] prevents the use 119 of an address if that address is already registered in the subnet 120 (first come first serve). In order to validate address ownership, 121 the registration mechanism enables the 6LR and 6LBR to validate the 122 association between the registered address of a node, and its 123 Registration Ownership Verifier (ROVR). ROVR is defined in [RFC8505] 124 and it can be derived from the MAC address of the device (using the 125 64-bit Extended Unique Identifier EUI-64 address format specified by 126 IEEE). However, the EUI-64 can be spoofed, and therefore, any node 127 connected to the subnet and aware of a registered-address-to-ROVR 128 mapping could effectively fake the ROVR. This would allow the an 129 attacker to steal the address and redirect traffic for that address. 130 [RFC8505] defines an Extended Address Registration Option (EARO) 131 option that allows to transport alternate forms of ROVRs, and is a 132 pre-requisite for this specification. 134 In this specification, a 6LN generates a cryptographic ID (Crypto-ID) 135 and places it in the ROVR field during the registration of one (or 136 more) of its addresses with the 6LR(s). Proof of ownership of the 137 Crypto-ID is passed with the first registration exchange to a new 138 6LR, and enforced at the 6LR. The 6LR validates ownership of the 139 cryptographic ID before it creates any new registration state, or 140 changes existing information. 142 The protected address registration protocol proposed in this document 143 enables Source Address Validation (SAVI) [RFC7039]. This ensures 144 that only the actual owner uses a registered address in the IPv6 145 source address field. A 6LN can only use a 6LR for forwarding 146 packets only if it has previously registered the address used in the 147 source field of the IPv6 packet. 149 The 6lo adaptation layer in [RFC4944] and [RFC6282] requires a device 150 to form its IPv6 addresses based on its Layer-2 address to enable a 151 better compression. This is incompatible with Secure Neighbor 152 Discovery (SeND) [RFC3971] and Cryptographically Generated Addresses 153 (CGAs) [RFC3972], since they derive the Interface ID (IID) in IPv6 154 addresses with cryptographic keys. 156 2. Terminology 158 2.1. BCP 14 160 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 161 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 162 "OPTIONAL" in this document are to be interpreted as described in BCP 163 14 [RFC2119] [RFC8174] when, and only when, they appear in all 164 capitals, as shown here. 166 2.2. References 168 Terms and concepts from the following documents are used in this 169 specification: 171 o "Terms Used in Routing for Low-Power and Lossy Networks (LLNs)" 172 [RFC7102], 174 o "SEcure Neighbor Discovery (SEND)" [RFC3971], 176 o "Cryptographically Generated Addresses (CGA)" [RFC3972], 178 o "Neighbor Discovery for IP version 6" [RFC4861] , 180 o "IPv6 Stateless Address Autoconfiguration" [RFC4862], 182 o "IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs): 183 Overview, Assumptions, Problem Statement, and Goals " [RFC4919], 185 o "Neighbor Discovery Optimization for Low-power and Lossy Networks" 186 [RFC6775], and 188 o "Registration Extensions for 6LoWPAN Neighbor Discovery" 189 [RFC8505]. 191 2.3. Abbreviations 193 This document uses the following abbreviations: 195 6BBR: 6LoWPAN Backbone Router 197 6LBR: 6LoWPAN Border Router 199 6LN: 6LoWPAN Node 201 6LR: 6LoWPAN Router 203 6CIO: Capability Indication Option 205 ARO: Address Registration Option 207 CIPO: Crypto-ID Parameters Option 209 LLN: Low-Power and Lossy Network 211 NA: Neighbor Advertisement 213 NCE: Neighbor Cache Entry 215 ND: Neighbor Discovery 217 NDP: Neighbor Discovery Protocol 219 NDPSO: NDP Signature Option 221 NS: Neighbor Solicitation 223 ROVR: Registration Ownership Verifier 225 RPL: IPv6 Routing Protocol for LLNs 227 RA: Router Advertisement 229 RS: Router Solicitation 231 RSAO: RSA Signature Option 233 TID: Transaction ID 235 3. Updating RFC 8505 237 This specification introduces a new token called a cryptographic 238 identifier (Crypto-ID) that is used to prove indirectly the ownership 239 of an address that is being registered by means of [RFC8505]. The 240 Crypto-ID is derived from a cryptographic public key and additional 241 parameters. The proof requires the support of Elliptic Curve 242 Cryptography (ECC) and that of a hash function as detailed in 243 Section 6.2. To enable the verification of the proof, the 244 registering node needs to supply certain parameters including a nonce 245 and a signature that will demonstrate that the node has the private- 246 key corresponding to the public-key used to build the Crypto-ID. 248 The elliptic curves and the hash functions that can be used with this 249 specification are listed in Table 2 in Section 8.3. The signature 250 scheme that specifies which combination is used is signaled by a 251 Crypto-Type in the CIPO (see Section 4.3). 253 The NS(EARO) is extended to transport a new Crypto-ID Parameters 254 Option (CIPO, see Section 4.3) that contains the parameters that are 255 necessary for the proof, a Nonce option ([RFC3971]) and a NDP 256 Signature option (Section 4.4). The NA(EARO) is modified to enable a 257 challenge and transport a Nonce option as well. 259 4. New Fields and Options 261 4.1. New Crypto-ID 263 The Crypto-ID is transported in the ROVR field of the EARO option and 264 the EDAR message, and is associated with the Registered Address at 265 the 6LR and the 6LBR. The ownership of a Crypto-ID can be 266 demonstrated by cryptographic mechanisms, and by association, the 267 ownership of the Registered Address can be acertained. 269 A node in possession of the necessary cryptographic primitives SHOULD 270 use Crypto-ID by default as ROVR in its registrations. Whether a 271 ROVR is a Crypto-ID is indicated by a new "C" flag in the NS(EARO) 272 message. 274 The Crypto-ID is derived from the public key and a modifier as 275 follows: 277 1. The hash function indicated by the Crypto-Type is applied to the 278 CIPO. Note that all the reserved and padding bits MUST be set to 279 zero. 281 2. The leftmost bits of the resulting hash, up to the size of the 282 ROVR field, are used as the Crypto-ID. 284 4.2. Updated EARO 286 This specification updates the EARO option as follows: 288 0 1 2 3 289 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 290 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 291 | Type | Length | Status | Opaque | 292 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 293 |Rsvd |C| I |R|T| TID | Registration Lifetime | 294 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 295 | | 296 ... Registration Ownership Verifier (ROVR) ... 297 | | 298 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 300 Figure 1: Enhanced Address Registration Option 302 Type: 33 304 Length: 8-bit unsigned integer. The length of the option 305 (including the type and length fields) in units of 8 306 bytes. 308 Status: 8-bit unsigned integer. Indicates the status of a 309 registration in the NA response. MUST be set to 0 in 310 NS messages. 312 Opaque: Defined in [RFC8505]. 314 Rsvd (Reserved): This field is unused. It MUST be initialized to 315 zero by the sender and MUST be ignored by the 316 receiver. 318 C: This "C" flag is set to indicate that the ROVR field 319 contains a Crypto-ID and that the 6LN MAY be 320 challenged for ownership as specified in this 321 document. 323 I, R, T, and TID: Defined in [RFC8505]. 325 Registration Ownership Verifier (ROVR): When the "C" flag is set, 326 this field contains a Crypto-ID. 328 This specification uses Status values "Validation Requested" and 329 "Validation Failed", which are defined in [RFC8505]. No other new 330 Status values are defined. 332 4.3. Crypto-ID Parameters Option 334 This specification defines the Crypto-ID Parameters Option (CIPO). 335 It carries the parameters used to form a Crypto-ID. In order to 336 provide cryptographic agility [RFC7696], this specification supports 337 different elliptic curves, indicated by a Crypto-Type field. NIST 338 P-256 [FIPS186-4] MUST be supported by all implementations. The 339 Edwards-Curve Digital Signature Algorithm (EdDSA) curve Ed25519 340 (PureEdDSA) [RFC8032] MAY be supported as an alternate. 342 0 1 2 3 343 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 344 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 345 | Type | Length | Pad Length | Reserved | 346 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 347 | Crypto-Type | Modifier | Reserved | 348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 349 | | 350 | | 351 . . 352 . Public Key (variable length) . 353 . . 354 | | 355 | | 356 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 357 | | 358 . . 359 . Padding . 360 . . 361 | | 362 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 364 Figure 2: Crypto-ID Parameters Option 366 Type: to be assigned by IANA, see Table 1. 368 Length: 8-bit unsigned integer. The length of the option in 369 units of 8 octets. 371 Pad Length: 8-bit unsigned integer. The length of the Padding 372 field. 374 Reserved: This field is unused. It MUST be initialized to zero 375 by the sender and MUST be ignored by the receiver. 377 Crypto-Type: The type of cryptographic algorithm used in 378 calculation Crypto-ID (see Table 2 in Section 8.3). 379 Although the different signature schemes target 380 similar cryptographic strength, they rely on 381 different curves, hash functions, signature 382 algorithms, and/or representation conventions. 384 Modifier: 8-bit unsigned integer. Set to an arbitrary value by 385 the creator of the Crypto-ID. The role of the 386 modifier is to enable the formation of multiple 387 Crypto-IDs from a same key pair, which reduces the 388 traceability and thus improves the privacy of a 389 constrained node that could not maintain many key- 390 pairs. 392 Public Key: JWK-Encoded Public Key [RFC7517]. 394 Padding: A variable-length field making the option length a 395 multiple of 8, containing as many octets as specified 396 in the Pad Length field. 398 The implementation of multiple hash functions in a constrained 399 devices may consume excessive amounts of program memory. 401 [I-D.ietf-lwig-curve-representations] provides information on how to 402 represent Montgomery curves and (twisted) Edwards curves as curves in 403 short-Weierstrass form and illustrates how this can be used to 404 implement elliptic curve computations using existing implementations 405 that already provide, e.g., ECDSA and ECDH using NIST [FIPS186-4] 406 prime curves. 408 For more details on representation conventions, we refer to 409 Appendix B. 411 4.4. NDP Signature Option 413 The format of the NDP Signature Option (NDPSO) is illustrated in 414 Figure 3. 416 As opposed to the RSA Signature Option (RSAO) defined in section 5.2. 417 of SEND [RFC3971], the NDPSO does not have a key hash field. The 418 hash that can be used as index is the 128 leftmost bits of the ROVR 419 field in the EARO. The CIPO may be present in the same message as 420 the NDPSO. If not, it an be found in an abstract table that was 421 created by a previous message and indexed by the hash. 423 0 1 2 3 424 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 425 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 426 | Type | Length | Pad Length | Reserved | 427 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 428 | Reserved | 429 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 430 | | 431 | | 432 . . 433 . Digital Signature . 434 . . 435 | | 436 | | 437 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 438 | | 439 . . 440 . Padding . 441 . . 442 | | 443 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 445 Figure 3: NDP signature Option 447 Type: to be assigned by IANA, see Table 1. 449 Length: 8-bit unsigned integer. The length of the option in 450 units of 8 octets. 452 Pad Length: 8-bit unsigned integer. The length of the Padding 453 field. 455 Digital Signature: A variable-length field containing a digital 456 signature. The computation of the digital signature 457 depends on the Crypto-Type which is found in the 458 associated CIPO. For the values of the Crypto-Type 459 that are defined in ths specification, the signature 460 is computed as detailed in Section 6.2. 462 Padding: A variable-length field making the option length a 463 multiple of 8, containing as many octets as specified 464 in the Pad Length field. Typically there is no need 465 of a padding and the field is NULL. 467 5. Protocol Scope 469 The scope of the protocol specified here is a 6LoWPAN Low Power Lossy 470 Network (LLN), typically a stub network connected to a larger IP 471 network via a Border Router called a 6LBR per [RFC6775]. A 6LBR has 472 sufficient capability to satisfy the needs of duplicate address 473 detection. 475 The 6LBR maintains registration state for all devices in its attached 476 LLN. Together with the first-hop router (the 6LR), the 6LBR assures 477 uniqueness and grants ownership of an IPv6 address before it can be 478 used in the LLN. This is in contrast to a traditional network that 479 relies on IPv6 address auto-configuration [RFC4862], where there is 480 no guarantee of ownership from the network, and each IPv6 Neighbor 481 Discovery packet must be individually secured [RFC3971]. 483 ---+-------- ............ 484 | External Network 485 | 486 +-----+ 487 | | 6LBR 488 +-----+ 489 o o o 490 o o o o 491 o o LLN o o o 492 o o o (6LR) 493 o (6LN) 495 Figure 4: Basic Configuration 497 In a mesh network, the 6LR is directly connected to the host device. 498 This specification mandates that the peer-wise layer-2 security is 499 deployed so that all the packets from a particular host are securely 500 identifiable by the 6LR. The 6LR may be multiple hops away from the 501 6LBR. Packets are routed between the 6LR and the 6LBR via other 502 6LRs. This specification mandates that a chain of trust is 503 established so that a packet that was validated by the first 6LR can 504 be safely routed by other on-path 6LRs to the 6LBR. 506 6. Protocol Flows 508 The 6LR/6LBR ensures first-come/first-serve by storing the EARO 509 information including the Crypto-ID associated to the node being 510 registered. The node can claim any address as long as it is the 511 first to make such a claim. After a successful registration, the 512 node becomes the owner of the registered address and the address is 513 bound to the Crypto-ID in the 6LR/6LBR registry. 515 This specification enables the 6LR to verify the ownership of the 516 binding at any time assuming that the "C" flag is set. The 517 verification prevents other nodes from stealing the address and 518 trying to attract traffic for that address or use it as their source 519 address. 521 A node may use multiple IPv6 addresses at the same time. The node 522 may use a same Crypto-ID, to prove the ownership of multiple IPv6 523 addresses. The separation of the address and the cryptographic 524 material avoids the constrained device to compute multiple keys for 525 multiple addresses. The registration process allows the node to use 526 the same Crypto-ID for all of its addresses. 528 6.1. First Exchange with a 6LR 530 A 6LN registers to a 6LR that is one hop away from it with the "C" 531 flag set in the EARO, indicating that the ROVR field contains a 532 Crypto-ID. The Target Address in the NS message indicates the IPv6 533 address that the 6LN is trying to register. The on-link (local) 534 protocol interactions are shown in Figure 5. If the 6LR does not 535 have a state with the 6LN that is consistent with the NS(EARO), then 536 it replies with a challenge NA (EARO, status=Validation Requested) 537 that contains a Nonce Option (shown as NonceLR in Figure 5). The 538 Nonce option MUST contain a random Nonce value that was never used 539 with this device. 541 The 6LN replies to the challenge with an NS(EARO) that includes a new 542 Nonce option (shown as NonceLN in Figure 5), the CIPO (Section 4.3), 543 and the NDPSO containing the signature. The information associated 544 to a Crypto-ID stored by the 6LR on the first NS exchange where it 545 appears. The 6LR MUST store the CIPO parameters associated with the 546 Crypto-ID so it can be used for more than one address. 548 6LN 6LR 549 | | 550 |<------------------------- RA -------------------------| 551 | | ^ 552 |---------------- NS with EARO (Crypto-ID) ------------>| | 553 | | option 554 |<- NA with EARO (status=Validation Requested), NonceLR-| | 555 | | v 556 |------- NS with EARO, CIPO, NonceLN and NDPSO -------->| 557 | | 558 |<------------------- NA with EARO ---------------------| 559 | | 560 ... 561 | | 562 |--------------- NS with EARO (Crypto-ID) ------------->| 563 | | 564 |<------------------- NA with EARO ---------------------| 565 | | 566 ... 567 | | 568 |--------------- NS with EARO (Crypto-ID) ------------->| 569 | | 570 |<------------------- NA with EARO ---------------------| 571 | | 573 Figure 5: On-link Protocol Operation 575 The steps for the registration to the 6LR are as follows: 577 o Upon the first exchange with a 6LR, a 6LN will be challenged to 578 prove ownership of the Crypto-ID and the Target Address being 579 registered in the Neighbor Solicitation message. When a 6LR 580 receives a NS(EARO) registration with a new Crypto-ID as a ROVR, 581 it SHOULD challenge by responding with a NA(EARO) with a status of 582 "Validation Requested". 584 o The challenge is triggered when the registration for a Source 585 Link-Layer Address is not verifiable either at the 6LR or the 586 6LBR. In the latter case, the 6LBR returns a status of 587 "Validation Requested" in the DAR/DAC exchange, which is echoed by 588 the 6LR in the NA (EARO) back to the registering node. The 589 challenge MUST NOT alter a valid registration in the 6LR or the 590 6LBR. 592 o Upon receiving a first NA(EARO) with a status of "Validation 593 Requested" from a 6LR, the registering node SHOULD retry its 594 registration with a Crypto-ID Parameters Option (CIPO) 595 (Section 4.3) that contains all the necessary material for 596 building the Crypto-ID, the NonceLN that it generated, and the NDP 597 signature (Section 4.4) option that proves its ownership of the 598 Crypto-ID and intent of registering the Target Address. In 599 subsequent revalidation with the same 6LR, the 6LN MAY try to omit 600 the CIPO to save bandwidth, with the expectation that the 6LR 601 saved it. If the validation fails and it gets challenged again, 602 then it SHOULD add the CIPO again. 604 o In order to validate the ownership, the 6LR performs the same 605 steps as the 6LN and rebuilds the Crypto-ID based on the 606 parameters in the CIPO. If the rebuilt Crypto-ID matches the 607 ROVR, the 6LN also verifies the signature contained in the NDPSO 608 option. If at that point the signature in the NDPSO option can be 609 verified, then the validation succeeds. Otherwise the validation 610 fails. 612 o If the 6LR fails to validate the signed NS(EARO), it responds with 613 a status of "Validation Failed". After receiving a NA(EARO) with 614 a status of "Validation Failed", the registering node SHOULD try 615 to register an alternate target address in the NS message. 617 6.2. NDPSO generation and verification 619 The signature generated by the 6LN to provide proof-of-ownership of 620 the private-key is carried in the NDP Signature Option (NDPSO). It 621 is generated by the 6LN in a fashion that depends on the Crypto-Type 622 (see Table 2 in Section 8.3) chosen by the 6LN as follows: 624 o Concatenate the following in the order listed: 626 1. The 128-bit Message Type tag [RFC3972] (in network byte 627 order). For this specification the tag is 0x8701 55c8 0cca 628 dd32 6ab7 e415 f148 84d0. (The tag value has been generated 629 by the editor of this specification on random.org). 631 2. JWK-encoded public key 633 3. the 16-byte Target Address (in network byte order) sent in the 634 Neighbor Solicitation (NS) message. It is the address which 635 the 6LN is registering with the 6LR and 6LBR. 637 4. NonceLR received from the 6LR (in network byte order) in the 638 Neighbor Advertisement (NA) message. The random nonce is at 639 least 6 bytes long as defined in [RFC3971]. 641 5. NonceLN sent from the 6LN (in network byte order). The random 642 nonce is at least 6 bytes long as defined in [RFC3971]. 644 6. The length of the ROVR field in the NS message containing the 645 Crypto-ID that was sent. 647 7. 1-byte (in network byte order) Crypto-Type value sent in the 648 CIPO option. 650 o Depending on the Crypto-Type, apply the hash function on this 651 concatenation. 653 o Depending on the Crypto-Type, sign the hash output with ECDSA (if 654 curve P-256 is used) or sign the hash with EdDSA (if curve Ed25519 655 (PureEdDSA)). 657 The 6LR on receiving the NDPSO and CIPO options first Regenerates the 658 Crypto-ID based on the CIPO option to make sure that the leftmost 659 bits up to the size of the ROVR match. Only if the check is 660 successful, it tries to verify the signature in the NDPSO option 661 using the following. 663 o Concatenate the following in the order listed: 665 1. 128-bit type tag (in network byte order) 667 2. JWK-encoded public key received in the CIPO option 669 3. the 16-byte Target Address (in network byte order) received in 670 the Neighbor Solicitation (NS) message. It is the address 671 which the 6LN is registering with the 6LR and 6LBR. 673 4. NonceLR sent in the Neighbor Advertisement (NA) message. The 674 random nonce is at least 6 bytes long as defined in [RFC3971]. 676 5. NonceLN received from the 6LN (in network byte order) in the 677 NS message. The random nonce is at least 6 bytes long as 678 defined in [RFC3971]. 680 6. The length of the ROVR field in the NS message containing the 681 Crypto-ID that was received. 683 7. 1-byte (in network byte order) Crypto-Type value received in 684 the CIPO option. 686 o Depending on the Crypto-Type indicated by the (6LN) in the CIPO, 687 apply the hash function on this concatenation. 689 o Verify the signature with the public-key received and the locally 690 computed values. If the verification succeeds, the 6LR and 6LBR 691 add the state information about the Crypto-ID, public-key and 692 Target Address being registered to their database. 694 6.3. Multihop Operation 696 In a multihop 6LoWPAN, the registration with Crypto-ID is propagated 697 to 6LBR as described in this section. If the 6LR and the 6LBR 698 maintain a security association, then there is no need to propagate 699 the proof of ownership to the 6LBR. 701 A new device that joins the network auto-configures an address and 702 performs an initial registration to a neighboring 6LR with an NS 703 message that carries an Address Registration Option (EARO) [RFC8505]. 704 The 6LR validates the address with an 6LBR using a DAR/DAC exchange, 705 and the 6LR confirms (or denies) the address ownership with an NA 706 message that also carries an Address Registration Option. 708 Figure 6 illustrates a registration flow all the way to a 6LowPAN 709 Backbone Router (6BBR) [I-D.ietf-6lo-backbone-router]. 711 6LN 6LR 6LBR 6BBR 712 | | | | 713 | NS(EARO) | | | 714 |--------------->| | | 715 | | Extended DAR | | 716 | |-------------->| | 717 | | | | 718 | | | proxy NS(EARO) | 719 | | |--------------->| 720 | | | | NS(DAD) 721 | | | | ------> 722 | | | | 723 | | | | 724 | | | | 725 | | | proxy NA(EARO) | 726 | | |<---------------| 727 | | Extended DAC | | 728 | |<--------------| | 729 | NA(EARO) | | | 730 |<---------------| | | 731 | | | | 733 Figure 6: (Re-)Registration Flow 735 In a multihop 6LoWPAN, a 6LBR sends RAs with prefixes downstream and 736 the 6LR receives and relays them to the nodes. 6LR and 6LBR 737 communicate using ICMPv6 Duplicate Address Request (DAR) and 738 Duplicate Address Confirmation (DAC) messages. The DAR and DAC use 739 the same message format as NS and NA, but have different ICMPv6 type 740 values. 742 In AP-ND we extend DAR/DAC messages to carry cryptographically 743 generated ROVR. In a multihop 6LoWPAN, the node exchanges the 744 messages shown in Figure 6. The 6LBR must identify who owns an 745 address (EUI-64) to defend it, if there is an attacker on another 746 6LR. 748 7. Security Considerations 750 7.1. Inheriting from RFC 3971 752 Observations regarding the following threats to the local network in 753 [RFC3971] also apply to this specification. 755 Neighbor Solicitation/Advertisement Spoofing 757 Threats in section 9.2.1 of RFC3971 apply. AP-ND counters the 758 threats on NS(EARO) messages by requiring that the NDP Signature 759 and CIPO options be present in these solicitations. 761 Duplicate Address Detection DoS Attack 763 Inside the LLN, Duplicate Addresses are sorted out using the ROVR, 764 which differentiates it from a movement. DAD coming from the 765 backbone are not forwarded over the LLN, which provides some 766 protection against DoS attacks inside the resource-constrained 767 part of the network. Over the backbone, the EARO option is 768 present in NS/NA messages. This protects against misinterpreting 769 a movement for a duplication, and enables the backbone routers to 770 determine which one has the freshest registration and is thus the 771 best candidate to validate the registration for the device 772 attached to it. But this specification does not guarantee that 773 the backbone router claiming an address over the backbone is not 774 an attacker. 776 Router Solicitation and Advertisement Attacks 778 This specification does not change the protection of RS and RA 779 which can still be protected by SEND. 781 Replay Attacks 783 Nonces (NonceLR and NonceLN) generated by the 6LR and 6LN 784 guarantees against replay attacks of the NS(EARO). 786 Neighbor Discovery DoS Attack 788 A rogue node that managed to access the L2 network may form many 789 addresses and register them using AP-ND. The perimeter of the 790 attack is all the 6LRs in range of the attacker. The 6LR must 791 protect itself against overflows and reject excessive registration 792 with a status 2 "Neighbor Cache Full". This effectively blocks 793 another (honest) 6LN from registering to the same 6LR, but the 6LN 794 may register to other 6LRs that are in its range but not in that 795 of the rogue. 797 7.2. Related to 6LoWPAN ND 799 The threats discussed in 6LoWPAN ND [RFC6775][RFC8505] also apply 800 here. Compared with SeND, this specification saves about 1Kbyte in 801 every NS/NA message. Also, this specification separates the 802 cryptographic identifier from the registered IPv6 address so that a 803 node can have more than one IPv6 address protected by the same 804 cryptographic identifier. SeND forces the IPv6 address to be 805 cryptographic since it integrates the CGA as the IID in the IPv6 806 address. This specification frees the device to form its addresses 807 in any fashion, thereby enabling not only 6LoWPAN compression which 808 derives IPv6 addresses from Layer-2 addresses but also privacy 809 addresses. 811 7.3. ROVR Collisions 813 A collision of Registration Ownership Verifiers (ROVR) (i.e., the 814 Crypto-ID in this specification) is possible, but it is a rare event. 815 The formula for calculating the probability of a collision is 1 - 816 e^{-k^2/(2n)} where n is the maximum population size (2^64 here, 817 1.84E19) and K is the actual population (number of nodes). If the 818 Crypto-ID is 64-bits (the least possible size allowed), the chance of 819 a collision is 0.01% when the network contains 66 million nodes. 820 Moreover, the collision is only relevant when this happens within one 821 stub network (6LBR). In the case of such a collision, an attacker 822 may be able to claim the registered address of an another legitimate 823 node. However for this to happen, the attacker would also need to 824 know the address which was registered by the legitimate node. This 825 registered address is never broadcasted on the network and therefore 826 providing an additional 64-bits that an attacker must correctly 827 guess. To prevent address disclosure, it is RECOMMENDED that nodes 828 derive the address being registered independently of the ROVR. 830 7.4. Implementation Attacks 832 The signature schemes referenced in this specification comply with 833 NIST [FIPS186-4] or Crypto Forum Research Group (CFRG) standards 834 [RFC8032] and offer strong algorithmic security at roughly 128-bit 835 security level. These signature schemes use elliptic curves that 836 were either specifically designed with exception-free and constant- 837 time arithmetic in mind [RFC7748] or where one has extensive 838 implementation experience of resistance to timing attacks 839 [FIPS186-4]. However, careless implementations of the signing 840 operations could nevertheless leak information on private keys. For 841 example, there are micro-architectural side channel attacks that 842 implementors should be aware of [breaking-ed25519]. Implementors 843 should be particularly aware that a secure implementation of Ed25519 844 requires a protected implementation of the hash function SHA-512, 845 whereas this is not required with implementations of SHA-256 used 846 with ECDSA. 848 7.5. Cross-Protocol Attacks 850 The same private key MUST NOT be reused with more than one signature 851 scheme in this specification. 853 8. IANA considerations 855 8.1. CGA Message Type 857 This document defines a new 128-bit value under the CGA Message Type 858 [RFC3972] name space: 0x8701 55c8 0cca dd32 6ab7 e415 f148 84d0. 860 8.2. IPv6 ND option types 862 This document registers two new ND option types under the subregistry 863 "IPv6 Neighbor Discovery Option Formats": 865 +------------------------------+----------------+-------------------+ 866 | Option Name | Suggested | Defined in | 867 | | value | | 868 +------------------------------+----------------+-------------------+ 869 | Crypto-ID Parameters Option | 39 | This_RFC Section | 870 | (CIPO) | | 4.3 | 871 | NDP Signature Option (NDPSO) | 38 | This_RFC Section | 872 | | | 4.4 | 873 +------------------------------+----------------+-------------------+ 875 Table 1: New ND options 877 8.3. Crypto-Type Subregistry 879 IANA is requested to create a new subregistry "Crypto-Type 880 Subregistry" in the "Internet Control Message Protocol version 6 881 (ICMPv6) Parameters". The registry is indexed by an integer in the 882 interval 0..255 and contains an Elliptic Curve, a Hash Function, a 883 Signature Algorithm, and Representation Conventions, as shown in 884 Table 2, which together specify a signature scheme. The following 885 Crypto-Type values are defined in this document: 887 +----------------+-----------------+-------------+------------------+ 888 | Crypto-Type | 0 (ECDSA256) | 1 (Ed25519) | 2 (ECDSA25519) | 889 | value | | | | 890 +----------------+-----------------+-------------+------------------+ 891 | Elliptic curve | NIST P-256 | Curve25519 | Curve25519 | 892 | | [FIPS186-4] | [RFC7748] | [RFC7748] | 893 | | | | | 894 | Hash function | SHA-256 | SHA-512 | SHA-256 | 895 | | [RFC6234] | [RFC6234] | [RFC6234] | 896 | | | | | 897 | Signature | ECDSA | Ed25519 | ECDSA | 898 | algorithm | [FIPS186-4] | [RFC8032] | [FIPS186-4] | 899 | | | | | 900 | Representation | Weierstrass, | Edwards, | Weierstrass, | 901 | conventions | (un)compressed, | compressed, | (un)compressed, | 902 | | MSB/msb first | LSB/lsb | MSB/msb first | 903 | | | first | | 904 | | | | | 905 | Defining | RFC THIS | RFC THIS | RFC THIS | 906 | specification | | | | 907 +----------------+-----------------+-------------+------------------+ 909 Table 2: Crypto-Types 911 New Crypto-Type values providing similar or better security (with 912 less code) may be defined in the future. 914 Assignment of new values for new Crypto-Type MUST be done through 915 IANA with "Specification Required" and "IESG Approval" as defined in 916 [RFC8126]. 918 9. Acknowledgments 920 Many thanks to Charlie Perkins for his in-depth review and 921 constructive suggestions. We are also especially grateful to Robert 922 Moskowitz for his comments that led to many improvements. 924 10. References 926 10.1. Normative References 928 [FIPS186-4] 929 FIPS 186-4, "Digital Signature Standard (DSS), Federal 930 Information Processing Standards Publication 186-4", US 931 Department of Commerce/National Institute of Standards and 932 Technology , July 2013. 934 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 935 Requirement Levels", BCP 14, RFC 2119, 936 DOI 10.17487/RFC2119, March 1997, 937 . 939 [RFC3971] Arkko, J., Ed., Kempf, J., Zill, B., and P. Nikander, 940 "SEcure Neighbor Discovery (SEND)", RFC 3971, 941 DOI 10.17487/RFC3971, March 2005, 942 . 944 [RFC3972] Aura, T., "Cryptographically Generated Addresses (CGA)", 945 RFC 3972, DOI 10.17487/RFC3972, March 2005, 946 . 948 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 949 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 950 DOI 10.17487/RFC4861, September 2007, 951 . 953 [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless 954 Address Autoconfiguration", RFC 4862, 955 DOI 10.17487/RFC4862, September 2007, 956 . 958 [RFC6775] Shelby, Z., Ed., Chakrabarti, S., Nordmark, E., and C. 959 Bormann, "Neighbor Discovery Optimization for IPv6 over 960 Low-Power Wireless Personal Area Networks (6LoWPANs)", 961 RFC 6775, DOI 10.17487/RFC6775, November 2012, 962 . 964 [RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, 965 DOI 10.17487/RFC7517, May 2015, 966 . 968 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 969 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 970 May 2017, . 972 [RFC8505] Thubert, P., Ed., Nordmark, E., Chakrabarti, S., and C. 973 Perkins, "Registration Extensions for IPv6 over Low-Power 974 Wireless Personal Area Network (6LoWPAN) Neighbor 975 Discovery", RFC 8505, DOI 10.17487/RFC8505, November 2018, 976 . 978 [SEC1] SEC1, "SEC 1: Elliptic Curve Cryptography, Version 2.0", 979 Standards for Efficient Cryptography , June 2009. 981 10.2. Informative references 983 [breaking-ed25519] 984 Samwel, N., Batina, L., Bertoni, G., Daemen, J., and R. 985 Susella, "Breaking Ed25519 in WolfSSL", Cryptographers' 986 Track at the RSA Conference , 2018, 987 . 990 [I-D.ietf-6lo-backbone-router] 991 Thubert, P., Perkins, C., and E. Levy-Abegnoli, "IPv6 992 Backbone Router", draft-ietf-6lo-backbone-router-11 (work 993 in progress), February 2019. 995 [I-D.ietf-lwig-curve-representations] 996 Struik, R., "Alternative Elliptic Curve Representations", 997 draft-ietf-lwig-curve-representations-03 (work in 998 progress), March 2019. 1000 [RFC4919] Kushalnagar, N., Montenegro, G., and C. Schumacher, "IPv6 1001 over Low-Power Wireless Personal Area Networks (6LoWPANs): 1002 Overview, Assumptions, Problem Statement, and Goals", 1003 RFC 4919, DOI 10.17487/RFC4919, August 2007, 1004 . 1006 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 1007 "Transmission of IPv6 Packets over IEEE 802.15.4 1008 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 1009 . 1011 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 1012 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 1013 DOI 10.17487/RFC6234, May 2011, 1014 . 1016 [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 1017 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, 1018 DOI 10.17487/RFC6282, September 2011, 1019 . 1021 [RFC7039] Wu, J., Bi, J., Bagnulo, M., Baker, F., and C. Vogt, Ed., 1022 "Source Address Validation Improvement (SAVI) Framework", 1023 RFC 7039, DOI 10.17487/RFC7039, October 2013, 1024 . 1026 [RFC7102] Vasseur, JP., "Terms Used in Routing for Low-Power and 1027 Lossy Networks", RFC 7102, DOI 10.17487/RFC7102, January 1028 2014, . 1030 [RFC7217] Gont, F., "A Method for Generating Semantically Opaque 1031 Interface Identifiers with IPv6 Stateless Address 1032 Autoconfiguration (SLAAC)", RFC 7217, 1033 DOI 10.17487/RFC7217, April 2014, 1034 . 1036 [RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm 1037 Agility and Selecting Mandatory-to-Implement Algorithms", 1038 BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, 1039 . 1041 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 1042 for Security", RFC 7748, DOI 10.17487/RFC7748, January 1043 2016, . 1045 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 1046 Signature Algorithm (EdDSA)", RFC 8032, 1047 DOI 10.17487/RFC8032, January 2017, 1048 . 1050 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1051 Writing an IANA Considerations Section in RFCs", BCP 26, 1052 RFC 8126, DOI 10.17487/RFC8126, June 2017, 1053 . 1055 Appendix A. Requirements Addressed in this Document 1057 In this section we state requirements of a secure neighbor discovery 1058 protocol for low-power and lossy networks. 1060 o The protocol MUST be based on the Neighbor Discovery Optimization 1061 for Low-power and Lossy Networks protocol defined in [RFC6775]. 1062 RFC6775 utilizes optimizations such as host-initiated interactions 1063 for sleeping resource-constrained hosts and elimination of 1064 multicast address resolution. 1066 o New options to be added to Neighbor Solicitation messages MUST 1067 lead to small packet sizes, especially compared with existing 1068 protocols such as SEcure Neighbor Discovery (SEND). Smaller 1069 packet sizes facilitate low-power transmission by resource- 1070 constrained nodes on lossy links. 1072 o The support for this registration mechanism SHOULD be extensible 1073 to more LLN links than IEEE 802.15.4 only. Support for at least 1074 the LLN links for which a 6lo "IPv6 over foo" specification 1075 exists, as well as Low-Power Wi-Fi SHOULD be possible. 1077 o As part of this extension, a mechanism to compute a unique 1078 Identifier should be provided with the capability to form a Link 1079 Local Address that SHOULD be unique at least within the LLN 1080 connected to a 6LBR. 1082 o The Address Registration Option used in the ND registration SHOULD 1083 be extended to carry the relevant forms of Unique Interface 1084 Identifier. 1086 o The Neighbor Discovery should specify the formation of a site- 1087 local address that follows the security recommendations from 1088 [RFC7217]. 1090 Appendix B. Representation Conventions 1092 B.1. Signature Schemes 1094 The signature scheme ECDSA256 corresponding to Crypto-Type 0 is 1095 ECDSA, as specified in [FIPS186-4], instantiated with the NIST prime 1096 curve P-256, as specified in Appendix B of [FIPS186-4], and the hash 1097 function SHA-256, as specified in [RFC6234], where points of this 1098 NIST curve are represented as points of a short-Weierstrass curve 1099 (see [FIPS186-4]) and are encoded as octet strings in most- 1100 significant-bit first (msb) and most-significant-byte first (MSB) 1101 order. The signature itself consists of two integers (r and s), 1102 which are each encoded as fixed-size octet strings in most- 1103 significant-bit first and most-significant-byte first order. For 1104 details on ECDSA, see [FIPS186-4]; for details on the integer 1105 encoding, see Appendix B.2. 1107 The signature scheme Ed25519 corresponding to Crypto-Type 1 is EdDSA, 1108 as specified in [RFC8032], instantiated with the Montgomery curve 1109 Curve25519, as specified in [RFC7748], and the hash function SHA-512, 1110 as specified in [RFC6234], where points of this Montgomery curve are 1111 represented as points of the corresponding twisted Edwards curve (see 1112 Appendix B.3) and are encoded as octet strings in least-significant- 1113 bit first (lsb) and least-significant-byte first (LSB) order. The 1114 signature itself consists of a bit string that encodes a point of 1115 this twisted Edwards curve, in compressed format, and an integer 1116 encoded in least-significant-bit first and least-significant-byte 1117 first order. For details on EdDSA and on the encoding conversions, 1118 see the specification of pure Ed25519 in . [RFC8032] 1120 The signature scheme ECDSA25519 corresponding to Crypto-Type 2 is 1121 ECDSA, as specified in [FIPS186-4], instantiated with the Montgomery 1122 curve Curve25519, as specified in [RFC7748], and the hash function 1123 SHA-256, as specified in [RFC6234], where points of this Montgomery 1124 curve are represented as points of a corresponding curve in short- 1125 Weierstrass form (see Appendix B.3) and are encoded as octet strings 1126 in most-significant-bit first and most-significant-byte first order. 1127 The signature itself consists of a bit string that encodes two 1128 integers, each encoded as fixed-size octet strings in most- 1129 significant-bit first and most-significant-byte first order. For 1130 details on ECDSA, see [FIPS186-4]; for details on the integer 1131 encoding, see Appendix B.2 1133 B.2. Integer Representation for ECDSA signatures 1135 With ECDSA, each signature is a pair (r, s) of integers [FIPS186-4]. 1136 Each integer is encoded as a fixed-size 256-bit bit string, where 1137 each integer is represented according to the Field Element to Octet 1138 String and Octet String to Bit String conversion rules in [SEC1] and 1139 where the ordered pair of integers is represented as the 1140 rightconcatenation of the resulting representation values. The 1141 inverse operation follows the corresponding Bit String to Octet 1142 String and Octet String to Field Element conversion rules of [SEC1]. 1144 B.3. Alternative Representations of Curve25519 1146 The elliptic curve Curve25519, as specified in [RFC7748], is a so- 1147 called Montgomery curve. Each point of this curve can also be 1148 represented as a point of a twisted Edwards curve or as a point of an 1149 elliptic curve in short-Weierstrass form, via a coordinate 1150 transformation (a so-called isomorphic mapping). The parameters of 1151 the Montgomery curve and the corresponding isomorphic curves in 1152 twisted Edwards curve and short-Weierstrass form are as indicated 1153 below. Here, the domain parameters of the Montgomery curve 1154 Curve25519 and of the twisted Edwards curve Edwards25519 are as 1155 specified in [RFC7748]; the domain parameters of the elliptic curve 1156 Wei25519 in short-Weierstrass curve comply with Section 6.1.1 of 1157 [FIPS186-4]. For details of the coordinate transformation referenced 1158 above, see [RFC7748] and [I-D.ietf-lwig-curve-representations]. 1160 General parameters (for all curve models): 1162 p 2^{255}-19 1164 (=0x7fffffff ffffffff ffffffff ffffffff ffffffff ffffffff 1165 ffffffff ffffffed) 1167 h 8 1169 n 72370055773322622139731865630429942408571163593799076060019509382 1170 85454250989 1172 (=2^{252} + 0x14def9de a2f79cd6 5812631a 5cf5d3ed) 1174 Montgomery curve-specific parameters (for Curve25519): 1176 A 486662 1178 B 1 1180 Gu 9 (=0x9) 1182 Gv 14781619447589544791020593568409986887264606134616475288964881837 1183 755586237401 1185 (=0x20ae19a1 b8a086b4 e01edd2c 7748d14c 923d4d7e 6d7c61b2 1186 29e9c5a2 7eced3d9) 1188 Twisted Edwards curve-specific parameters (for Edwards25519): 1190 a -1 (-0x01) 1192 d -121665/121666 1194 (=370957059346694393431380835087545651895421138798432190163887855 1195 33085940283555) 1197 (=0x52036cee 2b6ffe73 8cc74079 7779e898 00700a4d 4141d8ab 1198 75eb4dca 135978a3) 1200 Gx 15112221349535400772501151409588531511454012693041857206046113283 1201 949847762202 1203 (=0x216936d3 cd6e53fe c0a4e231 fdd6dc5c 692cc760 9525a7b2 1204 c9562d60 8f25d51a) 1206 Gy 4/5 1208 (=463168356949264781694283940034751631413079938662562256157830336 1209 03165251855960) 1211 (=0x66666666 66666666 66666666 66666666 66666666 66666666 1212 66666666 66666658) 1214 Weierstrass curve-specific parameters (for Wei25519): 1216 a 19298681539552699237261830834781317975544997444273427339909597334 1217 573241639236 1219 (=0x2aaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa 1220 aaaaaa98 4914a144) 1222 b 55751746669818908907645289078257140818241103727901012315294400837 1223 956729358436 1225 (=0x7b425ed0 97b425ed 097b425e d097b425 ed097b42 5ed097b4 1226 260b5e9c 7710c864) 1228 GX 19298681539552699237261830834781317975544997444273427339909597334 1229 652188435546 1231 (=0x2aaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaa 1232 aaaaaaaa aaad245a) 1234 GY 14781619447589544791020593568409986887264606134616475288964881837 1235 755586237401 1237 (=0x20ae19a1 b8a086b4 e01edd2c 7748d14c 923d4d7e 6d7c61b2 1238 29e9c5a2 7eced3d9) 1240 Authors' Addresses 1241 Pascal Thubert (editor) 1242 Cisco Systems, Inc 1243 Building D 1244 45 Allee des Ormes - BP1200 1245 MOUGINS - Sophia Antipolis 06254 1246 FRANCE 1248 Phone: +33 497 23 26 34 1249 Email: pthubert@cisco.com 1251 Behcet Sarikaya 1253 Email: sarikaya@ieee.org 1255 Mohit Sethi 1256 Ericsson 1257 Jorvas 02420 1258 Finland 1260 Email: mohit@piuha.net 1262 Rene Struik 1263 Struik Security Consultancy 1265 Email: rstruik.ext@gmail.com