idnits 2.17.1 draft-tiloca-core-multicast-oscoap-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 7 instances of too long lines in the document, the longest one being 6 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (July 26, 2017) is 2463 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) == Outdated reference: A later version (-16) exists of draft-ietf-core-object-security-04 ** Downref: Normative reference to an Informational RFC: RFC 8032 == Outdated reference: A later version (-46) exists of draft-ietf-ace-oauth-authz-06 == Outdated reference: A later version (-06) exists of draft-seitz-ace-oscoap-profile-04 == Outdated reference: A later version (-14) exists of draft-selander-ace-cose-ecdhe-07 -- Obsolete informational reference (is this intentional?): RFC 6347 (Obsoleted by RFC 9147) Summary: 2 errors (**), 0 flaws (~~), 6 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 CoRE Working Group M. Tiloca 3 Internet-Draft RISE SICS AB 4 Intended status: Standards Track G. Selander 5 Expires: January 27, 2018 F. Palombini 6 Ericsson AB 7 July 26, 2017 9 Secure group communication for CoAP 10 draft-tiloca-core-multicast-oscoap-03 12 Abstract 14 This document describes a method for protecting group communication 15 over the Constrained Application Protocol (CoAP). The proposed 16 approach relies on Object Security of CoAP (OSCOAP) and the CBOR 17 Object Signing and Encryption (COSE) format. All security 18 requirements fulfilled by OSCOAP are maintained for multicast OSCOAP 19 request messages and related unicast OSCOAP response messages. 20 Source authentication of all messages exchanged within the group is 21 ensured, by means of digital signatures produced through private keys 22 of sender devices and embedded in the protected CoAP messages. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on January 27, 2018. 41 Copyright Notice 43 Copyright (c) 2017 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 59 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Prerequisites and Requirements . . . . . . . . . . . . . . . 4 61 3. Set-up Phase . . . . . . . . . . . . . . . . . . . . . . . . 7 62 4. Security Context . . . . . . . . . . . . . . . . . . . . . . 8 63 5. Message Processing . . . . . . . . . . . . . . . . . . . . . 9 64 5.1. Protecting the Request . . . . . . . . . . . . . . . . . 10 65 5.2. Verifying the Request . . . . . . . . . . . . . . . . . . 10 66 5.3. Protecting the Response . . . . . . . . . . . . . . . . . 10 67 5.4. Verifying the Response . . . . . . . . . . . . . . . . . 11 68 6. The COSE Object . . . . . . . . . . . . . . . . . . . . . . . 11 69 7. Security Considerations . . . . . . . . . . . . . . . . . . . 13 70 7.1. Group-level Security . . . . . . . . . . . . . . . . . . 14 71 7.2. Management of Group Keying Material . . . . . . . . . . . 14 72 7.3. Synchronization of Sequence Numbers . . . . . . . . . . . 14 73 7.4. Provisioning of Public Keys . . . . . . . . . . . . . . . 16 74 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 75 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 17 76 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 77 10.1. Normative References . . . . . . . . . . . . . . . . . . 17 78 10.2. Informative References . . . . . . . . . . . . . . . . . 18 79 Appendix A. Group Joining Based on the ACE Framework . . . . . . 19 80 Appendix B. List of Use Cases . . . . . . . . . . . . . . . . . 20 81 Appendix C. No Verification of Signatures . . . . . . . . . . . 22 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 84 1. Introduction 86 The Constrained Application Protocol (CoAP) [RFC7252] is a web 87 transfer protocol specifically designed for constrained devices and 88 networks [RFC7228]. 90 Group communication for CoAP [RFC7390] addresses use cases where 91 deployed devices benefit from a group communication model, for 92 example to reduce latencies and improve performance. Use cases 93 include lighting control, integrated building control, software and 94 firmware updates, parameter and configuration updates, commissioning 95 of constrained networks, and emergency multicast (see Appendix B). 96 Furthermore, [RFC7390] recognizes the importance to introduce a 97 secure mode for CoAP group communication. This specification defines 98 such a mode. 100 Object Security of CoAP (OSCOAP)[I-D.ietf-core-object-security] 101 describes a security protocol based on the exchange of protected CoAP 102 messages. OSCOAP builds on CBOR Object Signing and Encryption (COSE) 103 [I-D.ietf-cose-msg] and provides end-to-end encryption, integrity, 104 and replay protection between a sending endpoint and a receiving 105 endpoint across intermediary nodes. To this end, a CoAP message is 106 protected by including payload (if any), certain options, and header 107 fields in a COSE object, which finally replaces the authenticated and 108 encrypted fields in the protected message. 110 This document describes multicast OSCOAP, providing end-to-end 111 security of CoAP messages exchanged between members of a multicast 112 group. In particular, the described approach defines how OSCOAP 113 should be used in a group communication context, while fulfilling the 114 same security requirements. That is, end-to-end security is assured 115 for multicast CoAP requests sent by multicaster nodes to the group 116 and for related unicast CoAP responses sent as reply by multiple 117 listener nodes. Multicast OSCOAP provides source authentication of 118 all CoAP messages exchanged within the group, by means of digital 119 signatures produced through private keys of sender devices and 120 embedded in the protected CoAP messages. As in OSCOAP, it is still 121 possible to simultaneously rely on DTLS to protect hop-by-hop 122 communication between a multicaster node and a proxy (and vice 123 versa), and between a proxy and a listener node (and vice versa). 125 1.1. Terminology 127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 128 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 129 document are to be interpreted as described in [RFC2119]. These 130 words may also appear in this document in lowercase, absent their 131 normative meanings. 133 Readers are expected to be familiar with the terms and concepts 134 described in CoAP [RFC7252]; group communication for CoAP [RFC7390]; 135 COSE and counter signatures [I-D.ietf-cose-msg]. 137 Readers are also expected to be familiar with the terms and concepts 138 for protection and processing of CoAP messages through OSCOAP, such 139 as "Security Context", "Master Secret" and "Master Salt", defined in 140 [I-D.ietf-core-object-security]. 142 Terminology for constrained environments, such as "constrained 143 device", "constrained-node network", is defined in [RFC7228]. 145 This document refers also to the following terminology. 147 o Keying material: data that is necessary to establish and maintain 148 secure communication among member of a multicast group. This 149 includes, for instance, keys and IVs [RFC4949]. 151 o Group Manager (GM): entity responsible for creating a multicast 152 group, establishing and provisioning security contexts among 153 authorized group members, as well as managing the joining of new 154 group members and the leaving of current group members. A GM can 155 be responsible for multiple multicast groups. Besides, a GM is 156 not required to be an actual group member and to take part in the 157 group communication. The GM is also responsible for renewing/ 158 updating security contexts and related keying material in the 159 multicast groups of its competence. Each endpoint in a multicast 160 group securely communicates with the respective GM. 162 o Multicaster: member of a multicast group that sends multicast CoAP 163 messages intended for all members of the group. In a 1-to-N 164 multicast group, only a single multicaster transmits data to the 165 group; in an M-to-N multicast group (where M and N do not 166 necessarily have the same value), M group members are 167 multicasters. 169 o Listener: member of a multicast group that receives multicast CoAP 170 messages when listening to the multicast IP address associated to 171 the multicast group. A listener may reply back, by sending a 172 unicast response message to the multicaster which has sent the 173 multicast message. 175 o Pure listener: member of a multicast group that is configured as 176 listener and never replies back to multicasters after receiving 177 multicast messages. 179 o Group request: multicast CoAP request message sent by a 180 multicaster in the group to all listeners in the group through 181 multicast IP, unless otherwise specified. 183 o Source authentication: evidence that a received message in the 184 group originated from a specifically identified group member. 185 This also provides assurances that the message was not tampered 186 with either by a different group member or by a non-group member. 188 2. Prerequisites and Requirements 190 The following security prerequisites are assumed to be already 191 fulfilled and are out of the scope of this document. 193 o Establishment and management of a security context: a security 194 context must be established among the group members by the Group 195 Manager which manages the multicast group. A secure mechanism 196 must be used to generate, revoke and (re-)distribute keying 197 material, multicast security policies and security parameters in 198 the multicast group. The actual establishment and management of 199 the security context is out of the scope of this document, and it 200 is anticipated that an activity in IETF dedicated to the design of 201 a generic key management scheme will include this feature, 202 preferably based on [RFC3740][RFC4046][RFC4535]. 204 o Multicast data security ciphersuite: all group members MUST agree 205 on a ciphersuite to provide authenticity, integrity and 206 confidentiality of messages in the multicast group. The 207 ciphersuite is specified as part of the security context. 209 o Backward security: a new device joining the multicast group should 210 not have access to any old security contexts used before its 211 joining. This ensures that a new group member is not able to 212 decrypt confidential data sent before it has joined the group. 213 The adopted key management scheme should ensure that the security 214 context is updated to ensure backward confidentiality. The actual 215 mechanism to update the security context and renew the group 216 keying material upon a group member's joining has to be defined as 217 part of the group key management scheme. 219 o Forward security: entities that leave the multicast group should 220 not have access to any future security contexts or message 221 exchanged within the group after their leaving. This ensures that 222 a former group member is not able to decrypt confidential data 223 sent within the group anymore. Also, it ensures that a former 224 member is not able to send encrypted and/or integrity protected 225 messages to the group anymore. The actual mechanism to update the 226 security context and renew the group keying material upon a group 227 member's leaving has to be defined as part of the group key 228 management scheme. 230 The following security requirements need to be fulfilled by the 231 approach described in this document: 233 o Multicast communication topology: this document considers both 234 1-to-N (one multicaster and multiple listeners) and M-to-N 235 (multiple multicasters and multiple listeners) communication 236 topologies. The 1-to-N communication topology is the simplest 237 group communication scenario that would serve the needs of a 238 typical low-power and lossy network (LLN). For instance, in a 239 typical lighting control use case, a single switch is the only 240 entity responsible for sending commands to a group of lighting 241 devices. In more advanced lighting control use cases, a M-to-N 242 communication topology would be required, for instance in case 243 multiple sensors (presence or day-light) are responsible to 244 trigger events to a group of lighting devices. 246 o Multicast group size: security solutions for group communication 247 should be able to adequately support different, possibly large, 248 group sizes. Group size is the combination of the number of 249 multicasters and listeners in a multicast group, with possible 250 overlap (i.e. a multicaster may also be a listener at the same 251 time). In the use cases mentioned in this document, the number of 252 multicasters (normally the controlling devices) is expected to be 253 much smaller than the number of listeners (i.e. the controlled 254 devices). A security solution for group communication that 255 supports 1 to 50 multicasters would be able to properly cover the 256 group sizes required for most use cases that are relevant for this 257 document. The total number of group members is expected to be in 258 the range of 2 to 100 devices. Groups larger than that should be 259 divided into smaller independent multicast groups, e.g. by 260 grouping lights in a building on a per floor basis. 262 o Data replay protection: it must be possible to detect a replayed 263 group request message or response message. 265 o Group-level data confidentiality: messages sent within the 266 multicast group SHALL be encrypted if privacy sensitive data is 267 exchanged within the group. In fact, some control commands and/or 268 associated responses could pose unforeseen security and privacy 269 risks to the system users, when sent as plaintext. This document 270 considers group-level data confidentiality since messages are 271 encrypted at a group level, i.e. in such a way that they can be 272 decrypted by any member of the multicast group, but not by an 273 external adversary or other external entities. 275 o Source authentication: messages sent within the multicast group 276 SHALL be authenticated. That is, it is essential to ensure that a 277 message is originated by a member of the group in the first place 278 (group authentication), and in particular by a specific member of 279 the group (source authentication). 281 o Message integrity: messages sent within the multicast group SHALL 282 be integrity protected. That is, it is essential to ensure that a 283 message has not been tampered with by an external adversary or 284 other external entities which are not group members. 286 o Message ordering: it must be possible to determine the ordering of 287 messages coming from a single sender endpoint. In accordance with 288 OSCOAP [I-D.ietf-core-object-security], this results in providing 289 relative freshness of group requests and absolute freshness of 290 responses. It is not required to determine ordering of messages 291 from different sender endpoints. 293 3. Set-up Phase 295 An endpoint joins a multicast group by explicitly interacting with 296 the responsible Group Manager. The actual join process can be based 297 on the ACE framework [I-D.ietf-ace-oauth-authz] and the OSCOAP 298 profile of ACE [I-D.seitz-ace-oscoap-profile], as discussed in 299 Appendix A. 301 An endpoint registered as member of a group can behave as a 302 multicaster and/or as a listener. As a multicaster, it can transmit 303 multicast request messages to the group. As a listener, it receives 304 multicast request messages from any multicaster in the group, and 305 possibly replies by transmitting unicast response messages. A pure 306 listener never replies to multicast request messages. Upon joining 307 the group, endpoints are not required to know how many and what 308 endpoints are active in the same group. A number of use cases that 309 benefit from secure group communication are discussed in Appendix B. 311 An endpoint is identified by an endpoint ID provided by the Group 312 Manager upon joining the group, unless configured exclusively as pure 313 listener. That is, pure listener endpoints are not associated to and 314 are not provided with an endpoint ID. The Group Manager generates 315 and manages endpoint IDs in order to ensure their uniqueness within a 316 same multicast group. That is, within a single multicast group, the 317 same endpoint ID cannot be associated to more endpoints at the same 318 time. Endpoint IDs are not necessarily related to any protocol- 319 relevant identifiers, such as IP addresses. 321 In order to participate in the secure group communication, an 322 endpoint needs to maintain a number of information elements, stored 323 in its own security context. Those include keying material used to 324 protect and verify group messages, as well as the public keys of 325 other endpoints in the groups, in order to verify digital signatures 326 of secure messages and ensure their source authenticity. The Group 327 Manager provides these pieces of information to an endpoint upon its 328 joining, through out-of-band means or other pre-established secure 329 channels. Further details about establishment, revocation and 330 renewal of the security context and keying material are out of the 331 scope of this document. 333 According to [RFC7390], any possible proxy entity is supposed to know 334 about the multicasters in the group and to not perform aggregation of 335 response messages. Also, every multicaster expects and is able to 336 handle multiple unicast response messages associated to a given 337 multicast request message. 339 4. Security Context 341 To support multicast communication secured with OSCOAP, each endpoint 342 registered as member of a multicast group maintains a Security 343 Context as defined in Section 3 of [I-D.ietf-core-object-security]. 344 In particular, each endpoint in a group stores: 346 1. one Common Context, received from the Group Manager upon joining 347 the multicast group and shared by all the endpoints in the group. 348 All the endpoints in the group agree on the same COSE AEAD 349 algorithm. Besides, in addition to what is defined in 350 [I-D.ietf-core-object-security], the Common Context stores the 351 following parameters: 353 * Context Identifier (Cid). Variable length byte string that 354 identifies the Security Context. The Cid used in a multicast 355 group is determined by the responsible Group Manager and does 356 not change over time. A Cid MUST be unique in the set of all 357 the multicast groups associated to the same Group Manager. 358 The choice of the Cid for a given group's Security Context is 359 application specific. However, Cids MUST be random as well as 360 long enough so that the probability of collisions is 361 negligible and Context Identifiers are globally unique. It is 362 the role of the application to specify how to handle possible 363 collisions. 365 * Counter signature algorithm. Value that identifies the 366 algorithm used for source authenticating messages sent within 367 the group, by means of a counter signature (see Section 4.5 of 368 [I-D.ietf-cose-msg]). Its value is immutable once the 369 security context is established. All the endpoints in the 370 group agree on the same counter signature algorithm. In the 371 absence of an application profile standard specifying 372 otherwise, a compliant application MUST implement the EdDSA 373 signature algorithm ed25519 [RFC8032]. 375 2. one Sender Context, unless the endpoint is configured exclusively 376 as pure listener. The Sender Context is used to secure outgoing 377 messages and is initialized according to Section 3 of 378 [I-D.ietf-core-object-security], once the endpoint has joined the 379 multicast group. In practice, the sender endpoint shares the 380 same symmetric keying material stored in the Sender Context with 381 all the recipient endpoints receiving its outgoing OSCOAP 382 messages. The Sender ID in the Sender Context coincides with the 383 endpoint ID received upon joining the group. As stated in 384 Section 3, it is responsibility of the Group Manager to assign 385 endpoint IDs to new joining endpoints in such a way that uniquess 386 is ensured within the multicast group. Besides, in addition to 387 what is defined in [I-D.ietf-core-object-security], the Sender 388 Context stores also the endpoint's public-private key pair. 390 3. one Recipient Context for each distinct endpoint from which 391 messages are received, used to process such incoming secure 392 messages. The endpoint creates a new Recipient Context upon 393 receiving an incoming message from another endpoint in the group 394 for the first time. In practice, the recipient endpoint shares 395 the symmetric keying material stored in the Recipient Context 396 with the associated other endpoint from which secure messages are 397 received. Besides, in addition to what is defined in 398 [I-D.ietf-core-object-security], each Recipient Context stores 399 also the public key of the associated other endpoint from which 400 secure messages are received. Possible approaches to provision 401 and retrieve public keys of group members are discussed in 402 Section 7.4. 404 The Sender Key/IV stored in the Sender Context and the Recipient 405 Keys/IVs stored in the Recipient Contexts are derived according to 406 the same scheme defined in Section 3.2 of 407 [I-D.ietf-core-object-security]. 409 The 3-tuple (Cid, Sender ID, Partial IV) is called Transaction 410 Identifier (Tid), and SHALL be unique for each Master Secret. The 411 Tid is used as a unique challenge in the COSE object of the protected 412 CoAP request. The Tid is part of the Additional Authenticated Data 413 (AAD, see Section 5.2 of [I-D.ietf-core-object-security]) of the 414 protected CoAP response message, which is how unicast responses are 415 bound to multicast requests. 417 5. Message Processing 419 Each multicast request message and unicast response message is 420 protected and processed as specified in 421 [I-D.ietf-core-object-security], with the modifications described in 422 the following sections. Furthermore, error handling and processing 423 of invalid messages are performed according to the same principles 424 adopted in [I-D.ietf-core-object-security]. In particular, a 425 receiver endpoint MUST stop processing and reject any message which 426 is malformed and does not follow the format specified in Section 6. 428 5.1. Protecting the Request 430 A multicaster endpoint transmits a secure multicast request message 431 as described in Section 7.1 of [I-D.ietf-core-object-security], with 432 the following modifications: 434 1. The multicaster endpoint stores the association Token - Cid. That 435 is, it SHALL be able to find the correct Security Context used to 436 protect the multicast request and verify the unicast response(s) 437 by using the CoAP Token used in the message exchange. 439 2. The multicaster endpoint computes the COSE object as defined in 440 Section 6 of this specification. 442 5.2. Verifying the Request 444 Upon receiving a secure multicast request message, a listener 445 endpoint proceeds as described in Section 7.2 of 446 [I-D.ietf-core-object-security], with the following modifications: 448 1. The listener endpoint retrieves the Context Identifier from the 449 "gid" parameter of the received COSE object, and uses it to 450 identify the correct group's Security Context. 452 2. The listener endpoint retrieves the Sender ID from the header of 453 the COSE object. Then, the Sender ID is used to retrieve the 454 correct Recipient Context associated to the multicaster endpoint 455 and used to process the request message. When receiving a secure 456 multicast CoAP request message from that multicaster endpoint for 457 the first time, the listener endpoint creates a new Recipient 458 Context, initializes it according to Section 3 of 459 [I-D.ietf-core-object-security], and includes the multicaster 460 endpoint's public key. 462 3. The listener endpoint retrieves the corresponding public key of 463 the multicaster endpoint from the associated Recipient Context. 464 Then, it verifies the counter signature and decrypts the request 465 message. 467 5.3. Protecting the Response 469 A listener endpoint that has received a multicast request message may 470 reply with a secure unicast response message, which is protected as 471 described in Section 7.3 of [I-D.ietf-core-object-security], with the 472 following modifications: 474 1. The listener endpoint retrieves the Transaction Identifier (Tid) 475 as defined in Section 4 of this specification. 477 2. The listener endpoint computes the COSE object as defined in 478 Section 6 of this specification. 480 5.4. Verifying the Response 482 Upon receiving a secure unicast response message, a multicaster 483 endpoint proceeds as described in Section 7.4 of 484 [I-D.ietf-core-object-security], with the following modifications: 486 1. The multicaster endpoint retrieves the Security Context 487 identified by the Token of the received response message. 489 2. The multicaster endpoint retrieves the Sender ID from the header 490 of the COSE object. Then, the Sender ID is used to retrieve the 491 correct Recipient Context associated to the listener endpoint and 492 used to process the response message. When receiving a secure 493 CoAP response message from that listener endpoint for the first 494 time, the multicaster endpoint creates a new Recipient Context, 495 initializes it according to Section 3 of 496 [I-D.ietf-core-object-security], and includes the listener 497 endpoint's public key. 499 3. The multicaster endpoint retrieves the corresponding public key 500 of the listener endpoint from the associated Recipient Context. 501 Then, it verifies the counter signature and decrypts the response 502 message. 504 The mapping between unicast response messages from listener endpoints 505 and the associated multicast request message from a multicaster 506 endpoint relies on the Transaction Identifier (Tid) associated to the 507 secure multicast request message. The Tid is used by listener 508 endpoints as part of the Additional Authenticated Data when 509 protecting their own response message, as described in Section 4. 511 6. The COSE Object 513 When creating a protected CoAP message, an endpoint in the group 514 computes the COSE object using the untagged COSE_Encrypt0 structure 515 [I-D.ietf-cose-msg] as defined in Section 5 of 516 [I-D.ietf-core-object-security], with the following modifications. 518 1. The value of the "Partial IV" parameter in the "unprotected" 519 field is set to the Sequence Number used to protect the message, 520 and SHALL always be present in both multicast requests and 521 unicast responses. Specifically, a multicaster endpoint sets the 522 value of "Partial IV" to the Sequence Number from its own Sender 523 Context, upon sending a multicast request message. Furthermore, 524 unlike described in Section 5 of [I-D.ietf-core-object-security], 525 a listener endpoint explicitly sets the value of "Partial IV" to 526 the Sequence Number from its own Sender Context, upon sending a 527 unicast response message. 529 2. The value of the "kid" parameter in the "unprotected" field is 530 set to the Sender ID of the endpoint and SHALL always be present 531 in both multicast requests and unicast responses. 533 3. The "unprotected" field of the "Headers" field SHALL include also 534 the following parameters: 536 * gid : its value is set to the Context Identifier (Cid) of the 537 group's Security Context. This parameter MAY be omitted if 538 the message is a CoAP response. 540 * countersign : its value is set to the counter signature of the 541 COSE object (Appendix C.3.3 of [I-D.ietf-cose-msg]), computed 542 by the endpoint by means of its own private key as described 543 in Section 4.5 of [I-D.ietf-cose-msg]. 545 4. The Additional Authenticated Data (AAD) considered to compute the 546 COSE object is extended. In particular, the "external_aad" 547 considered for secure response messages SHALL include also the 548 following parameter: 550 * gid : bstr, contains the Context Idenfier (Cid) of the 551 Security Context considered to protect the request message 552 (which is same as the Cid considered to protect the response 553 message). 555 5. The compressed version of COSE defined in Section 8 of 556 [I-D.ietf-core-object-security] is used, with the following 557 additions for the encoding of the Object-Security option. 559 * The three least significant bit of the first byte SHALL NOT 560 have value 0, since the "Partial IV" parameter is always 561 present for both multicast requests and unicast responses. 563 * The fourth least significant bit of the first byte SHALL be 564 set to 1, to indicate the presence of the "kid" parameter in 565 the compressed message for both multicast requests and unicast 566 responses. 568 * The fifth least significant bit of the first byte is set to 1 569 if the "gid" parameter is present, or to 0 otherwise. In 570 order to enable secure group communication as described in 571 this specification, this bit SHALL be set to 1 for multicast 572 requests. 574 * The sixth least significant bit of the first byte is set to 1 575 if the "countersign" parameter is present, or to 0 otherwise. 576 In order to ensure source authentication of group messages as 577 described in this specification, this bit SHALL be set to 1. 579 * The following n bytes (n being the value of the Partial IV 580 size in the first byte) encode the value of the "Partial IV", 581 which is always present in the compressed message. 583 * The following byte encodes the size of the "kid" parameter and 584 SHALL NOT have value 0. 586 * The following m bytes (m given by the previous byte) encode 587 the value of the "kid" parameter. 589 * The following byte encodes the size of the "gid" parameter and 590 SHALL NOT have value 0. 592 * The following p bytes (p given by the previous byte) encode 593 the value of the "gid" parameter. 595 * The following q bytes (q given by the counter signature 596 algorithm specified in the Security Context) encode the value 597 of the "countersign" parameter including the counter signature 598 of the COSE object. 600 * The remainining bytes encode the ciphertext. 602 In particular, "gid" is included as header parameter as defined in 603 Table 1. 605 +---------+-------+----------------+------------------+-------------------+ 606 | name | label | value type | value registry | description | 607 +---------+-------+----------------+------------------+-------------------+ 608 | gid | TBD | bstr | | Identifies the | 609 | | | | | OSCOAP group | 610 | | | | | security context | 611 +---------+-------+----------------+------------------+-------------------+ 613 Table 1: Additional common header parameter for the COSE object 615 7. Security Considerations 617 The same security considerations from OSCOAP (Section 10 of 618 [I-D.ietf-core-object-security]) apply to this specification. 620 Furthermore, additional security aspects to be taken into account are 621 discussed below. 623 7.1. Group-level Security 625 The approach described in this document relies on commonly shared 626 group keying material to protect communication within a multicast 627 group. This means that messages are encrypted at a group level 628 (group-level data confidentiality), i.e. they can be decrypted by any 629 member of the multicast group, but not by an external adversary or 630 other external entities. 632 In addition, it is required that all group members are trusted, i.e. 633 they do not forward the content of group messages to unauthorized 634 entities. However, in many use cases, the devices in the multicast 635 group belong to a common authority and are configured by a 636 commissioner. For instance, in a professional lighting scenario, the 637 roles of multicaster and listener are configured by the lighting 638 commissioner, and devices strictly follow those roles. 640 7.2. Management of Group Keying Material 642 The presented approach should take into consideration the risk of 643 compromise of group members. Such a risk is reduced when multicast 644 groups are deployed in physically secured locations, like lighting 645 inside office buildings. The adoption of key management schemes for 646 secure revocation and renewal of security contexts and group keying 647 material should be considered. 649 As stated in Section 2, it is RECOMMENDED to adopt a group key 650 management scheme that updates the security context and keying 651 material in the group, before a new endpoint joins the group or after 652 a currently present endpoint leaves the group. This is necessary in 653 order to preserve backward security and forward security in the 654 multicast group. 656 Especially in dynamic, large-scale, multicast groups where endpoints 657 can join and leave at any time, it is important that the considered 658 group key management scheme is efficient and highly scalable with the 659 group size, in order to limit the impact on performance due to the 660 security context and keying material update. 662 7.3. Synchronization of Sequence Numbers 664 Upon joining the multicast group, new listeners are not aware of the 665 sequence number values currently used by different multicasters to 666 transmit multicast request messages. This means that, when such 667 listeners receive a secure multicast request from a given multicaster 668 for the first time, they are not able to verify if that request is 669 fresh and has not been replayed. In order to address this issue, a 670 listener can perform a challenge-response exchange with a 671 multicaster, by using the Repeat Option for CoAP described in 672 Section 2 of [I-D.amsuess-core-repeat-request-tag]. 674 That is, upon receiving a multicast request from a particular 675 multicaster for the first time, the listener processes the message as 676 described in Section 5.2 of this specification, but, even if valid, 677 does not deliver it to the application. Instead, the listener 678 replies to the multicaster with a 4.03 Forbidden response message 679 including a Repeat Option, and stores the option value included 680 therein. 682 Upon receiving a 4.03 Forbidden response that includes a Repeat 683 Option and originates from a verified group member, a multicaster 684 MUST send a group request as a unicast message addressed to the same 685 listener, echoing the Repeat Option value. In particular, the 686 multicaster does not necessarily resend the same group request, but 687 can instead send a more recent one, if the application permits it. 688 This makes it possible for the multicaster to not retain previously 689 sent group requests for full retransmission, unless the application 690 explicitly requires otherwise. In either case, the multicaster uses 691 the sequence number value currently stored in its own Sender Context. 692 If the multicaster stores group requests for possible retransmission 693 with the Repeat Option, it should not store a given request for 694 longer than a pre-configured time interval. Note that the unicast 695 request echoing the Repeat Option is correctly treated and processed 696 as a group message, since the "gid" field including the Context 697 Identifier of the OSCOAP group's Security Context is still present in 698 the Object-Security Option as part of the COSE object (see 699 Section 6). 701 Upon receiving the unicast group request including the Repeat Option, 702 the listener verifies that the option value equals the stored and 703 previously sent value; otherwise, the request is silently discarded. 704 Then, the listener verifies that the unicast group request has been 705 received within a pre-configured time interval, as described in 706 [I-D.amsuess-core-repeat-request-tag]. In such a case, the request 707 is further processed and verified; otherwise, it is silently 708 discarded. Finally, the listener updates the Recipient Context 709 associated to that multicaster, by setting the Sequence Number to the 710 value included in the unicast group request conveying the Repeat 711 Option. The listener either delivers the request to the application 712 if it is an actual retransmission of the original one, or discard it 713 otherwise. Mechanisms to signal whether the resent request is a full 714 retransmission of the original one are out of the scope of this 715 specification. 717 In case it does not receive a valid group request including the 718 Repeat Option within the configured time interval, the listener node 719 SHOULD perform the same challenge-response upon receiving the next 720 multicast request from that same multicaster. 722 A listener SHOULD NOT deliver group request messages from a given 723 multicaster to the application until one valid group request from 724 that same multicaster has been verified as fresh, as conveying an 725 echoed Repeat Option [I-D.amsuess-core-repeat-request-tag]. Also, a 726 listener MAY perform the challenge-response described above at any 727 time, if synchronization with sequence numbers of multicasters is 728 (believed to be) lost, for instance after a device reboot. It is the 729 role of the application to define under what circumstances sequence 730 numbers lose synchronization. This can include a minimum gap between 731 the sequence number of the latest accepted group request from a 732 multicaster and the sequence number of a group request just received 733 from the same multicaster. A multicaster MUST always be ready to 734 perform the challenge-response based on the Repeat Option in case a 735 listener starts it. 737 Note that endpoints configured as pure listeners are not able to 738 perform the challenge-response described above, as they do not store 739 a Sender Context to secure the 4.03 Forbidden response to the 740 multicaster. Therefore, pure listeners SHOULD adopt alternative 741 approaches to achieve and maintain synchronization with sequence 742 numbers of multicasters. 744 7.4. Provisioning of Public Keys 746 Upon receiving a secure CoAP message, a recipient endpoint relies on 747 the sender endpoint's public key, in order to verify the counter 748 signature conveyed in the COSE Object. 750 If not already stored in the Recipient Context associated to the 751 sender endpoint, the recipient endpoint retrieves the public key from 752 a trusted key repository. In such a case, the correct binding 753 between the sender endpoint and the retrieved public key MUST be 754 assured, for instance by means of public key certificates. Further 755 details about how this requirement can be fulfilled are out of the 756 scope of this document. 758 Alternatively, the Group Manager can be configured to store public 759 keys of group members and provide them upon request. In such a case, 760 upon joining a multicast group, an endpoint provides its own public 761 key to the Group Manager, by means of the same secure channel used to 762 carry out the join procedure. After that, the Group Manager MUST 763 verify that the joining endpoint actually owns the associated private 764 key, for instance by performing a proof-of-possession challenge- 765 response. In case of success, the Group Manager stores the received 766 public key as associated to the joining endpoint and its endpoint ID. 767 From then on, that public key will be available for secure and 768 trusted delivery to other endpoints in the multicast group. 770 Note that a joining endpoint is not required to provide its own 771 public key to the Group Manager in the following two cases. First, 772 the endpoint is joining the multicast group exclusively as pure 773 listener. Second, the endpoint has already provided its own public 774 key, upon previously joining a multicast group under the same Group 775 Manager. 777 Furthermore, in simple, less dynamic, multicast groups, it can be 778 convenient for the Group Manager to provide an endpoint upon its 779 joining with the public keys associated to the endpoints currently 780 present in the group. 782 8. IANA Considerations 784 TBD. Header parameter 'gid'. 786 9. Acknowledgments 788 The authors sincerely thank Rolf Blom, Carsten Bormann, John 789 Mattsson, Jim Schaad, Stefan Beck, Richard Kelsey, Ludwig Seitz and 790 Klaus Hartke for their feedback and comments. 792 10. References 794 10.1. Normative References 796 [I-D.amsuess-core-repeat-request-tag] 797 Amsuess, C., Mattsson, J., and G. Selander, "Repeat And 798 Request-Tag", draft-amsuess-core-repeat-request-tag-00 799 (work in progress), July 2017. 801 [I-D.ietf-core-object-security] 802 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 803 "Object Security of CoAP (OSCOAP)", draft-ietf-core- 804 object-security-04 (work in progress), July 2017. 806 [I-D.ietf-cose-msg] 807 Schaad, J., "CBOR Object Signing and Encryption (COSE)", 808 draft-ietf-cose-msg-24 (work in progress), November 2016. 810 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 811 Requirement Levels", BCP 14, RFC 2119, 812 DOI 10.17487/RFC2119, March 1997, 813 . 815 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 816 Application Protocol (CoAP)", RFC 7252, 817 DOI 10.17487/RFC7252, June 2014, 818 . 820 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 821 Signature Algorithm (EdDSA)", RFC 8032, 822 DOI 10.17487/RFC8032, January 2017, 823 . 825 10.2. Informative References 827 [I-D.ietf-ace-oauth-authz] 828 Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and 829 H. Tschofenig, "Authentication and Authorization for 830 Constrained Environments (ACE)", draft-ietf-ace-oauth- 831 authz-06 (work in progress), March 2017. 833 [I-D.seitz-ace-oscoap-profile] 834 Seitz, L., Palombini, F., and M. Gunnarsson, "OSCOAP 835 profile of the Authentication and Authorization for 836 Constrained Environments Framework", draft-seitz-ace- 837 oscoap-profile-04 (work in progress), July 2017. 839 [I-D.selander-ace-cose-ecdhe] 840 Selander, G., Mattsson, J., and F. Palombini, "Ephemeral 841 Diffie-Hellman Over COSE (EDHOC)", draft-selander-ace- 842 cose-ecdhe-07 (work in progress), July 2017. 844 [I-D.somaraju-ace-multicast] 845 Somaraju, A., Kumar, S., Tschofenig, H., and W. Werner, 846 "Security for Low-Latency Group Communication", draft- 847 somaraju-ace-multicast-02 (work in progress), October 848 2016. 850 [RFC3740] Hardjono, T. and B. Weis, "The Multicast Group Security 851 Architecture", RFC 3740, DOI 10.17487/RFC3740, March 2004, 852 . 854 [RFC4046] Baugher, M., Canetti, R., Dondeti, L., and F. Lindholm, 855 "Multicast Security (MSEC) Group Key Management 856 Architecture", RFC 4046, DOI 10.17487/RFC4046, April 2005, 857 . 859 [RFC4535] Harney, H., Meth, U., Colegrove, A., and G. Gross, 860 "GSAKMP: Group Secure Association Key Management 861 Protocol", RFC 4535, DOI 10.17487/RFC4535, June 2006, 862 . 864 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 865 "Transmission of IPv6 Packets over IEEE 802.15.4 866 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 867 . 869 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 870 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 871 . 873 [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 874 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, 875 DOI 10.17487/RFC6282, September 2011, 876 . 878 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 879 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 880 January 2012, . 882 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 883 RFC 6749, DOI 10.17487/RFC6749, October 2012, 884 . 886 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 887 Constrained-Node Networks", RFC 7228, 888 DOI 10.17487/RFC7228, May 2014, 889 . 891 [RFC7390] Rahman, A., Ed. and E. Dijk, Ed., "Group Communication for 892 the Constrained Application Protocol (CoAP)", RFC 7390, 893 DOI 10.17487/RFC7390, October 2014, 894 . 896 Appendix A. Group Joining Based on the ACE Framework 898 The join process to register an endpoint as a new member of a 899 multicast group can be based on the ACE framework 900 [I-D.ietf-ace-oauth-authz] and the OSCOAP profile of ACE 901 [I-D.seitz-ace-oscoap-profile]. With reference to the terminology 902 defined in OAuth 2.0 [RFC6749]: 904 o The joining endpoint acts as Client; 905 o The Group Manager acts as Resource Server, exporting one join- 906 resource for each multicast group it is responsible for; 908 o An Authorization Server enables and enforces authorized access of 909 the joining endpoint to the Group Manager and its join-resources. 911 Then, in accordance with [I-D.seitz-ace-oscoap-profile], the joining 912 endpoint and the Group Manager rely on OSCOAP 913 [I-D.ietf-core-object-security] for secure communication and can use 914 Ephemeral Diffie-Hellman Over COSE (EDHOC) 915 [I-D.selander-ace-cose-ecdhe] as a possible method to establish key 916 material. 918 The joining endpoint sends to the Group Manager an OSCOAP request to 919 access the join-resource associated to the multicast group to join. 920 The Group Manager replies with an OSCOAP response including the 921 Common Context associated to that group (see Section 4). In case the 922 Group Manager is configured to store the public keys of group 923 members, the joining endpoint additionally provides the Group Manager 924 with its own public key, and MAY obtain from the Group Manager the 925 public keys of the endpoints currently present in the group (see 926 Section 7.4). 928 Both the joining endpoint and the Group Manager MUST adopt secure 929 communication also for any message exchange with the Authorization 930 Server. To this end, different alternatives are possible, including 931 OSCOAP and DTLS [RFC6347]. 933 Appendix B. List of Use Cases 935 Group Communication for CoAP [RFC7390] provides the necessary 936 background for multicast-based CoAP communication, with particular 937 reference to low-power and lossy networks (LLNs) and resource 938 constrained environments. The interested reader is encouraged to 939 first read [RFC7390] to understand the non-security related details. 940 This section discusses a number of use cases that benefit from secure 941 group communication. Specific security requirements for these use 942 cases are discussed in Section 2. 944 o Lighting control: consider a building equipped with IP-connected 945 lighting devices, switches, and border routers. The devices are 946 organized into groups according to their physical location in the 947 building. For instance, lighting devices and switches in a room 948 or corridor can be configured as members of a single multicast 949 group. Switches are then used to control the lighting devices by 950 sending on/off/dimming commands to all lighting devices in a 951 group, while border routers connected to an IP network backbone 952 (which is also multicast-enabled) can be used to interconnect 953 routers in the building. Consequently, this would also enable 954 logical multicast groups to be formed even if devices in the 955 lighting group may be physically in different subnets (e.g. on 956 wired and wireless networks). Connectivity between ligthing 957 devices may be realized, for instance, by means of IPv6 and 958 (border) routers supporting 6LoWPAN [RFC4944][RFC6282]. Group 959 communication enables synchronous operation of a group of 960 connected lights, ensuring that the light preset (e.g. dimming 961 level or color) of a large group of luminaires are changed at the 962 same perceived time. This is especially useful for providing a 963 visual synchronicity of light effects to the user. Devices may 964 reply back to the switches that issue on/off/dimming commands, in 965 order to report about the execution of the requested operation 966 (e.g. OK, failure, error) and their current operational status. 968 o Integrated building control: enabling Building Automation and 969 Control Systems (BACSs) to control multiple heating, ventilation 970 and air-conditioning units to pre-defined presets. Controlled 971 units can be organized into multicast groups in order to reflect 972 their physical position in the building, e.g. devices in the same 973 room can be configured as members of a single multicast group. 974 Furthermore, controlled units are expected to possibly reply back 975 to the BACS issuing control commands, in order to report about the 976 execution of the requested operation (e.g. OK, failure, error) 977 and their current operational status. 979 o Software and firmware updates: software and firmware updates often 980 comprise quite a large amount of data. This can overload a LLN 981 that is otherwise typically used to deal with only small amounts 982 of data, on an infrequent base. Rather than sending software and 983 firmware updates as unicast messages to each individual device, 984 multicasting such updated data to a larger group of devices at 985 once displays a number of benefits. For instance, it can 986 significantly reduce the network load and decrease the overall 987 time latency for propagating this data to all devices. Even if 988 the complete whole update process itself is secured, securing the 989 individual messages is important, in case updates consist of 990 relatively large amounts of data. In fact, checking individual 991 received data piecemeal for tampering avoids that devices store 992 large amounts of partially corrupted data and that they detect 993 tampering hereof only after all data has been received. Devices 994 receiving software and firmware updates are expected to possibly 995 reply back, in order to provide a feedback about the execution of 996 the update operation (e.g. OK, failure, error) and their current 997 operational status. 999 o Parameter and configuration update: by means of multicast 1000 communication, it is possible to update the settings of a group of 1001 similar devices, both simultaneously and efficiently. Possible 1002 parameters are related, for instance, to network load management 1003 or network access controls. Devices receiving parameter and 1004 configuration updates are expected to possibly reply back, to 1005 provide a feedback about the execution of the update operation 1006 (e.g. OK, failure, error) and their current operational status. 1008 o Commissioning of LLNs systems: a commissioning device is 1009 responsible for querying all devices in the local network or a 1010 selected subset of them, in order to discover their presence, and 1011 be aware of their capabilities, default configuration, and 1012 operating conditions. Queried devices displaying similarities in 1013 their capabilities and features, or sharing a common physical 1014 location can be configured as members of a single multicast group. 1015 Queried devices are expected to reply back to the commissioning 1016 device, in order to notify their presence, and provide the 1017 requested information and their current operational status. 1019 o Emergency multicast: a particular emergency related information 1020 (e.g. natural disaster) is generated and multicast by an emergency 1021 notifier, and relayed to multiple devices. The latters may reply 1022 back to the emergency notifier, in order to provide their feedback 1023 and local information related to the ongoing emergency. 1025 Appendix C. No Verification of Signatures 1027 Some application scenarios based on group communication can display 1028 particularly strict requirements, for instance low message latency in 1029 non-emergency lighting applications [I-D.somaraju-ace-multicast]. In 1030 such and similar non-critical applications with performance 1031 constraints and more relaxed security requirements, it can be 1032 inconvenient for some endpoints to verify digital signatures in order 1033 to assert source authenticity of received group messages. 1035 Although it is NOT RECOMMENDED by this specification, such endpoints 1036 may optionally not verify the counter signature of received group 1037 messages. As a consequence, they assert only group-authenticity of 1038 received group messages, when decrypting them by means of the AEAD 1039 algorithm and the Sender Key/IV used by the sender endpoint. That 1040 is, such endpoints have evidence that a received message has been 1041 originated by a group member, although not specifically identifiable 1042 in a secure way. 1044 Authors' Addresses 1045 Marco Tiloca 1046 RISE SICS AB 1047 Isafjordsgatan 22 1048 Kista SE-16440 Stockholm 1049 Sweden 1051 Email: marco.tiloca@ri.se 1053 Goeran Selander 1054 Ericsson AB 1055 Farogatan 6 1056 Kista SE-16480 Stockholm 1057 Sweden 1059 Email: goran.selander@ericsson.com 1061 Francesca Palombini 1062 Ericsson AB 1063 Farogatan 6 1064 Kista SE-16480 Stockholm 1065 Sweden 1067 Email: francesca.palombini@ericsson.com