idnits 2.17.1 draft-ietf-core-oscore-groupcomm-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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 22, 2018) is 2011 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-15 ** Downref: Normative reference to an Informational RFC: RFC 8032 ** Obsolete normative reference: RFC 8152 (Obsoleted by RFC 9052, RFC 9053) == Outdated reference: A later version (-46) exists of draft-ietf-ace-oauth-authz-16 == Outdated reference: A later version (-14) exists of draft-ietf-core-echo-request-tag-02 -- Obsolete informational reference (is this intentional?): RFC 6347 (Obsoleted by RFC 9147) Summary: 2 errors (**), 0 flaws (~~), 4 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 AB 4 Intended status: Standards Track G. Selander 5 Expires: April 25, 2019 F. Palombini 6 Ericsson AB 7 J. Park 8 Universitaet Duisburg-Essen 9 October 22, 2018 11 Group OSCORE - Secure Group Communication for CoAP 12 draft-ietf-core-oscore-groupcomm-03 14 Abstract 16 This document describes a mode for protecting group communication 17 over the Constrained Application Protocol (CoAP). The proposed mode 18 relies on Object Security for Constrained RESTful Environments 19 (OSCORE) and the CBOR Object Signing and Encryption (COSE) format. 20 In particular, it defines how OSCORE is used in a group communication 21 setting, while fulfilling the same security requirements for group 22 requests and responses. Source authentication of all messages 23 exchanged within the group is provided by means of digital signatures 24 produced by the sender and embedded in the protected CoAP messages. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at https://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on April 25, 2019. 43 Copyright Notice 45 Copyright (c) 2018 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (https://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 61 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 62 2. OSCORE Security Context . . . . . . . . . . . . . . . . . . . 5 63 2.1. Management of Group Keying Material . . . . . . . . . . . 7 64 2.2. Wrap-Around of Partial IVs . . . . . . . . . . . . . . . 8 65 3. The COSE Object . . . . . . . . . . . . . . . . . . . . . . . 8 66 4. OSCORE Header Compression . . . . . . . . . . . . . . . . . . 9 67 4.1. Encoding of the OSCORE Option Value . . . . . . . . . . . 9 68 4.2. Encoding of the OSCORE Payload . . . . . . . . . . . . . 10 69 4.3. Examples of Compressed COSE Objects . . . . . . . . . . . 10 70 5. Message Binding, Sequence Numbers, Freshness and Replay 71 Protection . . . . . . . . . . . . . . . . . . . . . . . . . 11 72 5.1. Synchronization of Sender Sequence Numbers . . . . . . . 12 73 6. Message Processing . . . . . . . . . . . . . . . . . . . . . 12 74 6.1. Protecting the Request . . . . . . . . . . . . . . . . . 13 75 6.2. Verifying the Request . . . . . . . . . . . . . . . . . . 13 76 6.3. Protecting the Response . . . . . . . . . . . . . . . . . 13 77 6.4. Verifying the Response . . . . . . . . . . . . . . . . . 14 78 7. Responsibilities of the Group Manager . . . . . . . . . . . . 14 79 8. Security Considerations . . . . . . . . . . . . . . . . . . . 15 80 8.1. Group-level Security . . . . . . . . . . . . . . . . . . 15 81 8.2. Uniqueness of (key, nonce) . . . . . . . . . . . . . . . 16 82 8.3. Management of Group Keying Material . . . . . . . . . . . 16 83 8.4. Update of Security Context and Key Rotation . . . . . . . 17 84 8.5. Collision of Group Identifiers . . . . . . . . . . . . . 17 85 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 86 9.1. OSCORE Flag Bits Registry . . . . . . . . . . . . . . . . 18 87 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 88 10.1. Normative References . . . . . . . . . . . . . . . . . . 18 89 10.2. Informative References . . . . . . . . . . . . . . . . . 19 90 Appendix A. Assumptions and Security Objectives . . . . . . . . 20 91 A.1. Assumptions . . . . . . . . . . . . . . . . . . . . . . . 20 92 A.2. Security Objectives . . . . . . . . . . . . . . . . . . . 21 93 Appendix B. List of Use Cases . . . . . . . . . . . . . . . . . 22 94 Appendix C. Example of Group Identifier Format . . . . . . . . . 24 95 Appendix D. Set-up of New Endpoints . . . . . . . . . . . . . . 25 96 Appendix E. Examples of Synchronization Approaches . . . . . . . 26 97 E.1. Best-Effort Synchronization . . . . . . . . . . . . . . . 26 98 E.2. Baseline Synchronization . . . . . . . . . . . . . . . . 26 99 E.3. Challenge-Response Synchronization . . . . . . . . . . . 27 100 Appendix F. No Verification of Signatures . . . . . . . . . . . 28 101 Appendix G. Document Updates . . . . . . . . . . . . . . . . . . 29 102 G.1. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 29 103 G.2. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 30 104 G.3. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 31 105 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 31 106 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 108 1. Introduction 110 The Constrained Application Protocol (CoAP) [RFC7252] is a web 111 transfer protocol specifically designed for constrained devices and 112 networks [RFC7228]. 114 Group communication for CoAP [RFC7390] addresses use cases where 115 deployed devices benefit from a group communication model, for 116 example to reduce latencies, improve performance and reduce bandwidth 117 utilisation. Use cases include lighting control, integrated building 118 control, software and firmware updates, parameter and configuration 119 updates, commissioning of constrained networks, and emergency 120 multicast (see Appendix B). Furthermore, [RFC7390] recognizes the 121 importance to introduce a secure mode for CoAP group communication. 122 This specification defines such a mode. 124 Object Security for Constrained RESTful Environments 125 (OSCORE)[I-D.ietf-core-object-security] describes a security protocol 126 based on the exchange of protected CoAP messages. OSCORE builds on 127 CBOR Object Signing and Encryption (COSE) [RFC8152] and provides end- 128 to-end encryption, integrity, replay protection and binding of 129 response to request between a sender and a receipient, also in the 130 presence of intermediaries. To this end, a CoAP message is protected 131 by including its payload (if any), certain options, and header fields 132 in a COSE object, which replaces the authenticated and encrypted 133 fields in the protected message. 135 This document defines Group OSCORE, providing end-to-end security of 136 CoAP messages exchanged between members of a group, and preserving 137 independence of transport layer. In particular, the described 138 approach defines how OSCORE should be used in a group communication 139 setting, so that end-to-end security is assured in the same way as 140 OSCORE for unicast communication. That is, end-to-end security is 141 provided for CoAP multicast requests sent by a client to the group, 142 and for related CoAP responses sent by multiple servers. Group 143 OSCORE provides source authentication of all CoAP messages exchanged 144 within the group, by means of digital signatures produced through 145 private keys of sender devices and embedded in the protected CoAP 146 messages. 148 As in OSCORE, it is still possible to simultaneously rely on DTLS 149 [RFC6347] to protect hop-by-hop communication between a sender and a 150 proxy (and vice versa), and between a proxy and a recipient (and vice 151 versa). Note that DTLS cannot be used to secure messages sent over 152 multicast. 154 1.1. Terminology 156 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 157 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 158 "OPTIONAL" in this document are to be interpreted as described in BCP 159 14 [RFC2119] [RFC8174] when, and only when, they appear in all 160 capitals, as shown here. 162 Readers are expected to be familiar with the terms and concepts 163 described in CoAP [RFC7252] including "endpoint", "client", "server", 164 "sender" and "recipient"; group communication for CoAP [RFC7390]; 165 COSE and counter signatures [RFC8152]. 167 Readers are also expected to be familiar with the terms and concepts 168 for protection and processing of CoAP messages through OSCORE, such 169 as "Security Context" and "Master Secret", defined in 170 [I-D.ietf-core-object-security]. 172 Terminology for constrained environments, such as "constrained 173 device", "constrained-node network", is defined in [RFC7228]. 175 This document refers also to the following terminology. 177 o Keying material: data that is necessary to establish and maintain 178 secure communication among endpoints. This includes, for 179 instance, keys and IVs [RFC4949]. 181 o Group: a set of endpoints that share group keying material and 182 security parameters (Common Context, see Section 2). The term 183 group used in this specification refers thus to a "security 184 group", not to be confused with network/multicast group or 185 application group. 187 o Group Manager (GM): entity responsible for a group. Each endpoint 188 in a group communicates securely with the respective GM, which is 189 neither required to be an actual group member nor to take part in 190 the group communication. The full list of responsibilities of the 191 Group Manager is provided in Section 7. 193 o Silent server: member of a group that never responds to requests. 194 Note that a silent server can act as a client, the two roles are 195 independent. 197 o Group Identifier (Gid): identifier assigned to the group. Group 198 Identifiers should be unique within the set of groups of a given 199 Group Manager, in order to avoid collisions. In case they are 200 not, the considerations in Section 8.5 apply. 202 o Group request: CoAP request message sent by a client in the group 203 to all servers in that group. 205 o Source authentication: evidence that a received message in the 206 group originated from a specific identified group member. This 207 also provides assurance that the message was not tampered with by 208 anyone, be it a different legitimate group member or an endpoint 209 which is not a group member. 211 2. OSCORE Security Context 213 To support group communication secured with OSCORE, each endpoint 214 registered as member of a group maintains a Security Context as 215 defined in Section 3 of [I-D.ietf-core-object-security], extended as 216 defined below. Each endpoint in a group makes use of: 218 1. one Common Context, shared by all the endpoints in a given group. 219 In particular: 221 * The ID Context parameter contains the Gid of the group, which 222 is used to retrieve the Security Context for processing 223 messages intended to the endpoints of the group (see 224 Section 6). The choice of the Gid is application specific. 225 An example of specific formatting of the Gid is given in 226 Appendix C. The application needs to specify how to handle 227 possible collisions between Gids, see Section 8.5. 229 * A new parameter Counter Signature Algorithm is included. Its 230 value identifies the digital signature algorithm used to 231 compute a counter signature on the COSE object (see 232 Section 4.5 of [RFC8152]) which provides source authentication 233 within the group. Its value is immutable once the Common 234 Context is established. The EdDSA signature algorithm ed25519 235 [RFC8032] is mandatory to implement. 237 2. one Sender Context, unless the endpoint is configured exclusively 238 as silent server. The Sender Context is used to secure outgoing 239 messages and is initialized according to Section 3 of 240 [I-D.ietf-core-object-security], once the endpoint has joined the 241 group. The Sender Context of a given endpoint matches the 242 corresponding Recipient Context in all the endpoints receiving a 243 protected message from that endpoint. Besides, in addition to 244 what is defined in [I-D.ietf-core-object-security], the Sender 245 Context stores also the endpoint's private key. 247 3. one Recipient Context for each distinct endpoint from which 248 messages are received, used to process incoming messages. The 249 recipient may generate the Recipient Context upon receiving an 250 incoming message from another endpoint in the group for the first 251 time (see Section 6.2 and Section 6.4). Each Recipient Context 252 matches the Sender Context of the endpoint from which protected 253 messages are received. Besides, in addition to what is defined 254 in [I-D.ietf-core-object-security], each Recipient Context stores 255 also the public key of the associated other endpoint from which 256 messages are received. 258 The table in Figure 1 overviews the new information included in the 259 OSCORE Security Context, with respect to what defined in Section 3 of 260 [I-D.ietf-core-object-security]. 262 +---------------------------+-----------------------------+ 263 | Context portion | New information | 264 +---------------------------+-----------------------------+ 265 | | | 266 | Common Context | Counter signature algorithm | 267 | | | 268 | Sender Context | Endpoint's own private key | 269 | | | 270 | Each Recipient Context | Public key of the | 271 | | associated other endpoint | 272 | | | 273 +---------------------------+-----------------------------+ 275 Figure 1: Additions to the OSCORE Security Context 277 Upon receiving a secure CoAP message, a recipient uses the sender's 278 public key, in order to verify the counter signature of the COSE 279 Object (see Section 3). 281 If not already stored in the Recipient Context associated to the 282 sender, the recipient retrieves the public key from the Group 283 Manager, which collects public keys upon endpoints' joining, acts as 284 trusted key repository and ensures the correct association between 285 the public key and the identifier of the sender, for instance by 286 means of public key certificates. 288 It is RECOMMENDED that the Group Manager collects public keys and 289 provides them to group members upon request as described in 290 [I-D.tiloca-ace-oscoap-joining], where the join process is based on 291 the ACE framework for Authentication and Authorization in constrained 292 environments [I-D.ietf-ace-oauth-authz]. Further details about how 293 public keys can be handled and retrieved in the group is out of the 294 scope of this document. 296 An endpoint receives its own Sender ID from the Group Manager upon 297 joining the group. That Sender ID is valid only within that group, 298 and is unique within the group. An endpoint uses its own Sender ID 299 (together with other data) to generate unique AEAD nonces for 300 outgoing messages, as in [I-D.ietf-core-object-security]. Endpoints 301 which are configured only as silent servers do not have a Sender ID. 303 The Sender/Recipient Keys and the Common IV are derived according to 304 the same scheme defined in Sections 3.2 and 5.2 of 305 [I-D.ietf-core-object-security]. The mandatory-to-implement HKDF and 306 AEAD algorithms for Group OSCORE are the same as in 307 [I-D.ietf-core-object-security]. 309 2.1. Management of Group Keying Material 311 In order to establish a new Security Context in a group, a new Group 312 Identifier (Gid) for that group and a new value for the Master Secret 313 parameter MUST be distributed. An example of Gid format supporting 314 this operation is provided in Appendix C. Then, each group member 315 re-derives the keying material stored in its own Sender Context and 316 Recipient Contexts as described in Section 2, using the updated Gid. 318 Consistently with the security assumptions in Appendix A.1, it is 319 RECOMMENDED to adopt a group key management scheme, and securely 320 distribute a new value for the Gid and for the Master Secret 321 parameter of the group's Security Context, before a new joining 322 endpoint is added to the group or after a currently present endpoint 323 leaves the group. This is necessary to preserve backward security 324 and forward security in the group, if the application requires it. 326 The specific approach used to distribute the new Gid and Master 327 Secret parameter to the group is out of the scope of this document. 328 However, it is RECOMMENDED that the Group Manager supports the 329 distribution of the new Gid and Master Secret parameter to the group 330 according to the Group Rekeying Process described in 331 [I-D.tiloca-ace-oscoap-joining]. 333 2.2. Wrap-Around of Partial IVs 335 A client can eventually experience a wrap-around of its own Sender 336 Sequence Number, which is used as Partial IV in outgoing requests and 337 incremented after each request. When this happens, the OSCORE 338 Security Context MUST be renewed in the group, in order to avoid 339 reusing nonces with the same keys. 341 Therefore, when experiencing a wrap-around of its own Sender Sequence 342 Number, a group member MUST NOT transmit further group requests until 343 a new OSCORE Security Context has been derived. In particular, the 344 endpoint SHOULD inform the Group Manager of the occurred wrap-around, 345 in order to trigger a prompt renewal of the OSCORE Security Context. 347 3. The COSE Object 349 Building on Section 5 of [I-D.ietf-core-object-security], this 350 section defines how to use COSE [RFC8152] to wrap and protect data in 351 the original message. OSCORE uses the untagged COSE_Encrypt0 352 structure with an Authenticated Encryption with Additional Data 353 (AEAD) algorithm. For Group OSCORE, the following modifications 354 apply: 356 o The external_aad in the Additional Authenticated Data (AAD) is 357 extended with the counter signature algorithm used to sign 358 messages. In particular, compared with Section 5.4 of 359 [I-D.ietf-core-object-security], the 'algorithms' array in the 360 aad_array MUST also include 'alg_countersign', which contains the 361 Counter Signature Algorithm from the Common Context (see 362 Section 2). This external_aad structure is used both for the 363 encryption process producing the ciphertext (see Section 5.3 of 364 [RFC8152]) and for the signing process producing the counter 365 signature, as defined below. 367 external_aad = bstr .cbor aad_array 369 aad_array = [ 370 oscore_version : uint, 371 algorithms : [alg_aead : int / tstr , alg_countersign : int / tstr], 372 request_kid : bstr, 373 request_piv : bstr, 374 options : bstr 375 ] 377 o The value of the 'kid' parameter in the 'unprotected' field of 378 response messages MUST be set to the Sender ID of the endpoint 379 transmitting the message. That is, unlike in 381 [I-D.ietf-core-object-security], the 'kid' parameter is always 382 present in all messages, i.e. both requests and responses. 384 o The 'unprotected' field MUST additionally include the following 385 parameter: 387 * CounterSignature0 : its value is set to the counter signature 388 of the COSE object, computed by the sender using its own 389 private key as described in Appendix A.2 of [RFC8152]. In 390 particular, the Sig_structure contains the external_aad as 391 defined above and the ciphertext of the COSE_Encrypt0 object as 392 payload. 394 4. OSCORE Header Compression 396 The OSCORE compression defined in Section 6 of 397 [I-D.ietf-core-object-security] is used, with the following additions 398 for the encoding of the OSCORE Option and the OSCORE Payload. 400 4.1. Encoding of the OSCORE Option Value 402 Analogously to [I-D.ietf-core-object-security], the value of the 403 OSCORE option SHALL contain the OSCORE flag bits, the Partial IV 404 parameter, the kid context parameter (length and value), and the kid 405 parameter, with the following modifications: 407 o The first byte, containing the OSCORE flag bits, has the following 408 encoding modifications: 410 * The fourth least significant bit MUST be set to 1 in every 411 message, to indicate the presence of the 'kid' parameter for 412 all group requests and responses. That is, unlike in 413 [I-D.ietf-core-object-security], the 'kid' parameter is always 414 present in all messages. 416 * The fifth least significant bit MUST be set to 1 for group 417 requests, to indicate the presence of the 'kid context' 418 parameter in the compressed COSE object. The 'kid context' MAY 419 be present in responses if the application requires it. In 420 such a case, the kid context flag MUST be set to 1. 422 * The sixth least significant bit is set to 1 if the 423 'CounterSignature0' parameter is present, or to 0 otherwise. 424 In order to ensure source authentication of messages as 425 described in this specification, this bit MUST be set to 1. 427 The flag bits are registered in the OSCORE Flag Bits registry 428 specified in Section 13.7 of [I-D.ietf-core-object-security] and in 429 Section 9.1 of this Specification. 431 o The 'kid context' value encodes the Group Identifier value (Gid) 432 of the group's Security Context. 434 o The remaining bytes in the OSCORE Option value encode the value of 435 the 'kid' parameter, which is always present both in group 436 requests and in responses. 438 0 1 2 3 4 5 6 7 <----------- n bytes ------------> 439 +-+-+-+-+-+-+-+-+----------------------------------+ 440 |0 0|1|h|1| n | Partial IV (if any) | 441 +-+-+-+-+-+-+-+-+----------------------------------+ 443 <-- 1 byte --> <------ s bytes ------> 444 +--------------+-----------------------+-----------+ 445 | s (if any) | kid context = Gid | kid | 446 +--------------+-----------------------+-----------+ 448 Figure 2: OSCORE Option Value 450 4.2. Encoding of the OSCORE Payload 452 The payload of the OSCORE message SHALL encode the ciphertext of the 453 COSE object concatenated with the value of the CounterSignature0 (if 454 present) of the COSE object, computed as in Appendix A.2 of 455 [RFC8152]. 457 4.3. Examples of Compressed COSE Objects 459 This section covers a list of OSCORE Header Compression examples for 460 group requests and responses. The examples assume that the 461 COSE_Encrypt0 object is set (which means the CoAP message and 462 cryptographic material is known). Note that the examples do not 463 include the full CoAP unprotected message or the full security 464 context, but only the input necessary to the compression mechanism, 465 i.e. the COSE_Encrypt0 object. The output is the compressed COSE 466 object as defined in Section 4 and divided into two parts, since the 467 object is transported in two CoAP fields: OSCORE option and payload. 469 The examples assume that the label for the new kid context defined in 470 [I-D.ietf-core-object-security] has value 10. COUNTERSIGN is the 471 CounterSignature0 byte string as described in Section 3 and is 64 472 bytes long. 474 1. Request with ciphertext = 0xaea0155667924dff8a24e4cb35b9, kid = 475 0x25, Partial IV = 5 and kid context = 0x44616c 477 Before compression (96 bytes): 479 [ 480 h'', 481 { 4:h'25', 6:h'05', 10:h'44616c', 9:COUNTERSIGN }, 482 h'aea0155667924dff8a24e4cb35b9' 483 ] 485 After compression (85 bytes): 487 Flag byte: 0b00111001 = 0x39 489 Option Value: 39 05 03 44 61 6c 25 (7 bytes) 491 Payload: ae a0 15 56 67 92 4d ff 8a 24 e4 cb 35 b9 COUNTERSIGN 492 (14 bytes + size of COUNTERSIGN) 494 1. Response with ciphertext = 60b035059d9ef5667c5a0710823b, kid = 495 0x52 and no Partial IV. 497 Before compression (88 bytes): 499 [ 500 h'', 501 { 4:h'52', 9:COUNTERSIGN }, 502 h'60b035059d9ef5667c5a0710823b' 503 ] 505 After compression (80 bytes): 507 Flag byte: 0b00101000 = 0x28 509 Option Value: 28 52 (2 bytes) 511 Payload: 60 b0 35 05 9d 9e f5 66 7c 5a 07 10 82 3b COUNTERSIGN 512 (14 bytes + size of COUNTERSIGN) 514 5. Message Binding, Sequence Numbers, Freshness and Replay Protection 516 The requirements and properties described in Section 7 of 517 [I-D.ietf-core-object-security] also apply to OSCORE used in group 518 communication. In particular, group OSCORE provides message binding 519 of responses to requests, which provides relative freshness of 520 responses, and replay protection of requests. More details about 521 error processing for replay detection in group OSCORE are specified 522 in Section 6 of this specification. The mechanisms describing replay 523 protection and freshness of Observe notifications do not apply to 524 group OSCORE, as Observe is not defined for group settings. 526 5.1. Synchronization of Sender Sequence Numbers 528 Upon joining the group, new servers are not aware of the Sender 529 Sequence Number values currently used by different clients to 530 transmit group requests. This means that, when such servers receive 531 a secure group request from a given client for the first time, they 532 are not able to verify if that request is fresh and has not been 533 replayed or (purposely) delayed. The same holds when a server loses 534 synchronization with Sender Sequence Numbers of clients, for instance 535 after a device reboot. 537 The exact way to address this issue is application specific, and 538 depends on the particular use case and its synchronization 539 requirements. The list of methods to handle synchronization of 540 Sender Sequence Numbers is part of the group communication policy, 541 and different servers can use different methods. 543 Requests sent over Multicast must be Non-Confirmable (Section 8.1 of 544 [RFC7252]), as overall most of the messages sent within a group. 545 Thus, senders should store their outgoing messages for an amount of 546 time defined by the application and sufficient to correctly handle 547 possible retransmissions. 549 Appendix E describes three possible approaches that can be considered 550 for synchronization of sequence numbers. 552 6. Message Processing 554 Each request message and response message is protected and processed 555 as specified in [I-D.ietf-core-object-security], with the 556 modifications described in the following sections. The following 557 security objectives are fulfilled, as further discussed in 558 Appendix A.2: data replay protection, group-level data 559 confidentiality, source authentication, message integrity, and 560 message ordering. 562 Furthermore, endpoints in the group locally perform error handling 563 and processing of invalid messages according to the same principles 564 adopted in [I-D.ietf-core-object-security]. However, a recipient 565 MUST stop processing and silently reject any message which is 566 malformed and does not follow the format specified in Section 3, or 567 which is not cryptographically validated in a successful way. Either 568 case, the recipient MUST NOT send back any error message. This 569 prevents servers from replying with multiple error messages to a 570 client sending a group request, so avoiding the risk of flooding and 571 possibly congesting the group. 573 As per [RFC7252][RFC7390], group requests sent over multicast must be 574 Non-confirmable. However, this does not prevent the acknowledgment 575 of Confirmable group requests in non-multicast environments. 577 6.1. Protecting the Request 579 A client transmits a secure group request as described in Section 8.1 580 of [I-D.ietf-core-object-security], with the following modifications. 582 o In step 2, the 'algorithms' array in the Additional Authenticated 583 Data is modified as described in Section 3. 585 o In step 4, the encryption of the COSE object is modified as 586 described in Section 3. The encoding of the compressed COSE 587 object is modified as described in Section 4. 589 6.2. Verifying the Request 591 Upon receiving a secure group request, a server proceeds as described 592 in Section 8.2 of [I-D.ietf-core-object-security], with the following 593 modifications. 595 o In step 2, the decoding of the compressed COSE object follows 596 Section 4. If the received Recipient ID ('kid') does not match 597 with any Recipient Context for the retrieved Gid ('kid context'), 598 then the server creates a new Recipient Context, initializes it 599 according to Section 3 of [I-D.ietf-core-object-security], also 600 retrieving the client's public key. 602 o In step 4, the 'algorithms' array in the Additional Authenticated 603 Data is modified as described in Section 3. 605 o In step 6, the server also verifies the counter signature using 606 the public key of the client from the associated Recipient 607 Context. 609 6.3. Protecting the Response 611 A server that has received a secure group request may reply with a 612 secure response, which is protected as described in Section 8.3 of 613 [I-D.ietf-core-object-security], with the following modifications. 615 o In step 2, the 'algorithms' array in the Additional Authenticated 616 Data is modified as described in Section 3. 618 o In step 4, the encryption of the COSE object is modified as 619 described in Section 3. The encoding of the compressed COSE 620 object is modified as described in Section 4. 622 6.4. Verifying the Response 624 Upon receiving a secure response message, the client proceeds as 625 described in Section 8.4 of [I-D.ietf-core-object-security], with the 626 following modifications. 628 o In step 2, the decoding of the compressed COSE object is modified 629 as described in Section 3. If the received Recipient ID ('kid') 630 does not match with any Recipient Context for the retrieved Gid 631 ('kid context'), then the client creates a new Recipient Context, 632 initializes it according to Section 3 of 633 [I-D.ietf-core-object-security], also retrieving the server's 634 public key. 636 o In step 3, the 'algorithms' array in the Additional Authenticated 637 Data is modified as described in Section 3. 639 o In step 5, the client also verifies the counter signature using 640 the public key of the server from the associated Recipient 641 Context. 643 7. Responsibilities of the Group Manager 645 The Group Manager is responsible for performing the following tasks: 647 1. Creating and managing OSCORE groups. This includes the 648 assignment of a Gid to every newly created group, as well as 649 ensuring uniqueness of Gids within the set of its OSCORE groups. 651 2. Defining policies for authorizing the joining of its OSCORE 652 groups. Such policies can be enforced locally by the Group 653 Manager, or by a third party in a trust relation with the Group 654 Manager and entrusted to enforce join policies on behalf of the 655 Group Manager. 657 3. Driving the join process to add new endpoints as group members. 659 4. Establishing Security Common Contexts and providing them to 660 authorized group members during the join process, together with 661 a corresponding Security Sender Context. 663 5. Generating and managing Sender IDs within its OSCORE groups, as 664 well as assigning and providing them to new endpoints during the 665 join process. This includes ensuring uniqueness of Sender IDs 666 within each of its OSCORE groups. 668 6. Defining a communication policy for each of its OSCORE groups, 669 and signalling it to new endpoints during the join process. 671 7. Renewing the Security Context of an OSCORE group upon membership 672 change, by revoking and renewing common security parameters and 673 keying material (rekeying). 675 8. Providing the management keying material that a new endpoint 676 requires to participate in the rekeying process, consistent with 677 the key management scheme used in the group joined by the new 678 endpoint. 680 9. Updating the Gid of its OSCORE groups, upon renewing the 681 respective Security Context. 683 10. Acting as key repository, in order to handle the public keys of 684 the members of its OSCORE groups, and providing such public keys 685 to other members of the same group upon request. The actual 686 storage of public keys may be entrusted to a separate secure 687 storage device. 689 8. Security Considerations 691 The same security considerations from OSCORE (Section 11 of 692 [I-D.ietf-core-object-security]) apply to this specification. 693 Additional security aspects to be taken into account are discussed 694 below. 696 8.1. Group-level Security 698 The approach described in this document relies on commonly shared 699 group keying material to protect communication within a group. This 700 has the following implications. 702 o Messages are encrypted at a group level (group-level data 703 confidentiality), i.e. they can be decrypted by any member of the 704 group, but not by an external adversary or other external 705 entities. 707 o The AEAD algorithm provides only group authentication, i.e. it 708 ensures that a message sent to a group has been sent by a member 709 of that group, but not by the alleged sender. This is why source 710 authentication of messages sent to a group is ensured through a 711 counter signature, which is computed by the sender using its own 712 private key and then appended to the message payload. 714 Note that, even if an endpoint is authorized to be a group member and 715 to take part in group communications, there is a risk that it behaves 716 inappropriately. For instance, it can forward the content of 717 messages in the group to unauthorized entities. However, in many use 718 cases, the devices in the group belong to a common authority and are 719 configured by a commissioner (see Appendix B), which results in a 720 practically limited risk and enables a prompt detection/reaction in 721 case of misbehaving. 723 8.2. Uniqueness of (key, nonce) 725 The proof for uniqueness of (key, nonce) pairs in Appendix D.3 of 726 [I-D.ietf-core-object-security] is also valid in group communication 727 scenarios. That is, given an OSCORE group: 729 o Uniqueness of Sender IDs within the group is enforced by the Group 730 Manager. 732 o The case A in Appendix D.3 of [I-D.ietf-core-object-security] for 733 messages including a Partial IV concerns only group requests, and 734 same considerations from [I-D.ietf-core-object-security] apply 735 here as well. 737 o The case B in Appendix D.3 of [I-D.ietf-core-object-security] for 738 messages not including a Partial IV concerns all group responses, 739 and same considerations from [I-D.ietf-core-object-security] apply 740 here as well. 742 As a consequence, each message encrypted/decrypted with the same 743 Sender Key is processed by using a different (ID_PIV, PIV) pair. 744 This means that nonces used by any fixed encrypting endpoint are 745 unique. Thus, each message is processed with a different (key, 746 nonce) pair. 748 8.3. Management of Group Keying Material 750 The approach described in this specification should take into account 751 the risk of compromise of group members. In particular, this 752 document specifies that a key management scheme for secure revocation 753 and renewal of Security Contexts and group keying material should be 754 adopted. 756 Especially in dynamic, large-scale, groups where endpoints can join 757 and leave at any time, it is important that the considered group key 758 management scheme is efficient and highly scalable with the group 759 size, in order to limit the impact on performance due to the Security 760 Context and keying material update. 762 8.4. Update of Security Context and Key Rotation 764 A group member can receive a message shortly after the group has been 765 rekeyed, and new security parameters and keying material have been 766 distributed by the Group Manager. In the following two cases, this 767 may result in misaligned Security Contexts between the sender and the 768 recipient. 770 In the first case, the sender protects a message using the old 771 Security Context, i.e. before having installed the new Security 772 Context. However, the recipient receives the message after having 773 installed the new Security Context, hence not being able to correctly 774 process it. A possible way to ameliorate this issue is to preserve 775 the old, recent, Security Context for a maximum amount of time 776 defined by the application. By doing so, the recipient can still try 777 to process the received message using the old retained Security 778 Context as second attempt. Note that a former (compromised) group 779 member can take advantage of this by sending messages protected with 780 the old retained Security Context. Therefore, a conservative 781 application policy should not admit the storage of old Security 782 Contexts. 784 In the second case, the sender protects a message using the new 785 Security Context, but the recipient receives that request before 786 having installed the new Security Context. Therefore, the recipient 787 would not be able to correctly process the request and hence discards 788 it. If the recipient receives the new Security Context shortly after 789 that and the sender endpoint uses CoAP retransmissions, the former 790 will still be able to receive and correctly process the message. In 791 any case, the recipient should actively ask the Group Manager for an 792 updated Security Context according to an application-defined policy, 793 for instance after a given number of unsuccessfully decrypted 794 incoming messages. 796 8.5. Collision of Group Identifiers 798 In case endpoints are deployed in multiple groups managed by 799 different non-synchronized Group Managers, it is possible for Group 800 Identifiers of different groups to coincide. That can also happen if 801 the application can not guarantee unique Group Identifiers within a 802 given Group Manager. However, this does not impair the security of 803 the AEAD algorithm. 805 In fact, as long as the Master Secret is different for different 806 groups and this condition holds over time, and as long as the Sender 807 IDs within a group are unique, AEAD keys are different among 808 different groups. 810 9. IANA Considerations 812 Note to RFC Editor: Please replace all occurrences of "[[this 813 document]]" with the RFC number of this specification. 815 9.1. OSCORE Flag Bits Registry 817 The entry with Bit Position TBD is added to the "OSCORE Flag Bits" 818 registry. 820 +--------------+-------------+---------------------+-------------------+ 821 | Bit Position | Name | Description | Specification | 822 +--------------+-------------+---------------------+-------------------+ 823 | TBD | Counter | Set to 1 if counter | [[this document]] | 824 | | Signature | signature present | | 825 | | | in the compressed | | 826 | | | COSE object | | 827 +--------------+-------------+---------------------+-------------------+ 829 10. References 831 10.1. Normative References 833 [I-D.ietf-core-object-security] 834 Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 835 "Object Security for Constrained RESTful Environments 836 (OSCORE)", draft-ietf-core-object-security-15 (work in 837 progress), August 2018. 839 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 840 Requirement Levels", BCP 14, RFC 2119, 841 DOI 10.17487/RFC2119, March 1997, 842 . 844 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 845 Application Protocol (CoAP)", RFC 7252, 846 DOI 10.17487/RFC7252, June 2014, 847 . 849 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 850 Signature Algorithm (EdDSA)", RFC 8032, 851 DOI 10.17487/RFC8032, January 2017, 852 . 854 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 855 RFC 8152, DOI 10.17487/RFC8152, July 2017, 856 . 858 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 859 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 860 May 2017, . 862 10.2. Informative References 864 [I-D.ietf-ace-oauth-authz] 865 Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and 866 H. Tschofenig, "Authentication and Authorization for 867 Constrained Environments (ACE) using the OAuth 2.0 868 Framework (ACE-OAuth)", draft-ietf-ace-oauth-authz-16 869 (work in progress), October 2018. 871 [I-D.ietf-core-echo-request-tag] 872 Amsuess, C., Mattsson, J., and G. Selander, "Echo and 873 Request-Tag", draft-ietf-core-echo-request-tag-02 (work in 874 progress), June 2018. 876 [I-D.somaraju-ace-multicast] 877 Somaraju, A., Kumar, S., Tschofenig, H., and W. Werner, 878 "Security for Low-Latency Group Communication", draft- 879 somaraju-ace-multicast-02 (work in progress), October 880 2016. 882 [I-D.tiloca-ace-oscoap-joining] 883 Tiloca, M., Park, J., and F. Palombini, "Key Management 884 for OSCORE Groups in ACE", draft-tiloca-ace-oscoap- 885 joining-05 (work in progress), October 2018. 887 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 888 "Transmission of IPv6 Packets over IEEE 802.15.4 889 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 890 . 892 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 893 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 894 . 896 [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 897 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, 898 DOI 10.17487/RFC6282, September 2011, 899 . 901 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 902 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 903 January 2012, . 905 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 906 Constrained-Node Networks", RFC 7228, 907 DOI 10.17487/RFC7228, May 2014, 908 . 910 [RFC7390] Rahman, A., Ed. and E. Dijk, Ed., "Group Communication for 911 the Constrained Application Protocol (CoAP)", RFC 7390, 912 DOI 10.17487/RFC7390, October 2014, 913 . 915 Appendix A. Assumptions and Security Objectives 917 This section presents a set of assumptions and security objectives 918 for the approach described in this document. 920 A.1. Assumptions 922 The following assumptions are assumed to be already addressed and are 923 out of the scope of this document. 925 o Multicast communication topology: this document considers both 926 1-to-N (one sender and multiple recipients) and M-to-N (multiple 927 senders and multiple recipients) communication topologies. The 928 1-to-N communication topology is the simplest group communication 929 scenario that would serve the needs of a typical low-power and 930 lossy network (LLN). Examples of use cases that benefit from 931 secure group communication are provided in Appendix B. 933 In a 1-to-N communication model, only a single client transmits 934 data to the group, in the form of request messages; in an M-to-N 935 communication model (where M and N do not necessarily have the 936 same value), M group members are clients. According to [RFC7390], 937 any possible proxy entity is supposed to know about the clients in 938 the group and to not perform aggregation of response messages from 939 multiple servers. Also, every client expects and is able to 940 handle multiple response messages associated to a same request 941 sent to the group. 943 o Group size: security solutions for group communication should be 944 able to adequately support different and possibly large groups. 945 The group size is the current number of members in a group. In 946 the use cases mentioned in this document, the number of clients 947 (normally the controlling devices) is expected to be much smaller 948 than the number of servers (i.e. the controlled devices). A 949 security solution for group communication that supports 1 to 50 950 clients would be able to properly cover the group sizes required 951 for most use cases that are relevant for this document. The 952 maximum group size is expected to be in the range of 2 to 100 953 devices. Groups larger than that should be divided into smaller 954 independent groups. 956 o Communication with the Group Manager: an endpoint must use a 957 secure dedicated channel when communicating with the Group 958 Manager, also when not registered as group member. 960 o Provisioning and management of Security Contexts: an OSCORE 961 Security Context must be established among the group members. A 962 secure mechanism must be used to generate, revoke and 963 (re-)distribute keying material, multicast security policies and 964 security parameters in the group. The actual provisioning and 965 management of the Security Context is out of the scope of this 966 document. 968 o Multicast data security ciphersuite: all group members must agree 969 on a ciphersuite to provide authenticity, integrity and 970 confidentiality of messages in the group. The ciphersuite is 971 specified as part of the Security Context. 973 o Backward security: a new device joining the group should not have 974 access to any old Security Contexts used before its joining. This 975 ensures that a new group member is not able to decrypt 976 confidential data sent before it has joined the group. The 977 adopted key management scheme should ensure that the Security 978 Context is updated to ensure backward confidentiality. The actual 979 mechanism to update the Security Context and renew the group 980 keying material upon a group member's joining has to be defined as 981 part of the group key management scheme. 983 o Forward security: entities that leave the group should not have 984 access to any future Security Contexts or message exchanged within 985 the group after their leaving. This ensures that a former group 986 member is not able to decrypt confidential data sent within the 987 group anymore. Also, it ensures that a former member is not able 988 to send encrypted and/or integrity protected messages to the group 989 anymore. The actual mechanism to update the Security Context and 990 renew the group keying material upon a group member's leaving has 991 to be defined as part of the group key management scheme. 993 A.2. Security Objectives 995 The approach described in this document aims at fulfilling the 996 following security objectives: 998 o Data replay protection: replayed group request messages or 999 response messages must be detected. 1001 o Group-level data confidentiality: messages sent within the group 1002 shall be encrypted if privacy sensitive data is exchanged within 1003 the group. This document considers group-level data 1004 confidentiality since messages are encrypted at a group level, 1005 i.e. in such a way that they can be decrypted by any member of the 1006 group, but not by an external adversary or other external 1007 entities. 1009 o Source authentication: messages sent within the group shall be 1010 authenticated. That is, it is essential to ensure that a message 1011 is originated by a member of the group in the first place, and in 1012 particular by a specific member of the group. 1014 o Message integrity: messages sent within the group shall be 1015 integrity protected. That is, it is essential to ensure that a 1016 message has not been tampered with by an external adversary or 1017 other external entities which are not group members. 1019 o Message ordering: it must be possible to determine the ordering of 1020 messages coming from a single sender. In accordance with OSCORE 1021 [I-D.ietf-core-object-security], this results in providing 1022 relative freshness of group requests and absolute freshness of 1023 responses. It is not required to determine ordering of messages 1024 from different senders. 1026 Appendix B. List of Use Cases 1028 Group Communication for CoAP [RFC7390] provides the necessary 1029 background for multicast-based CoAP communication, with particular 1030 reference to low-power and lossy networks (LLNs) and resource 1031 constrained environments. The interested reader is encouraged to 1032 first read [RFC7390] to understand the non-security related details. 1033 This section discusses a number of use cases that benefit from secure 1034 group communication. Specific security requirements for these use 1035 cases are discussed in Appendix A. 1037 o Lighting control: consider a building equipped with IP-connected 1038 lighting devices, switches, and border routers. The devices are 1039 organized into groups according to their physical location in the 1040 building. For instance, lighting devices and switches in a room 1041 or corridor can be configured as members of a single group. 1042 Switches are then used to control the lighting devices by sending 1043 on/off/dimming commands to all lighting devices in a group, while 1044 border routers connected to an IP network backbone (which is also 1045 multicast-enabled) can be used to interconnect routers in the 1046 building. Consequently, this would also enable logical groups to 1047 be formed even if devices in the lighting group may be physically 1048 in different subnets (e.g. on wired and wireless networks). 1050 Connectivity between lighting devices may be realized, for 1051 instance, by means of IPv6 and (border) routers supporting 6LoWPAN 1052 [RFC4944][RFC6282]. Group communication enables synchronous 1053 operation of a group of connected lights, ensuring that the light 1054 preset (e.g. dimming level or color) of a large group of 1055 luminaires are changed at the same perceived time. This is 1056 especially useful for providing a visual synchronicity of light 1057 effects to the user. As a practical guideline, events within a 1058 200 ms interval are perceived as simultaneous by humans, which is 1059 necessary to ensure in many setups. Devices may reply back to the 1060 switches that issue on/off/dimming commands, in order to report 1061 about the execution of the requested operation (e.g. OK, failure, 1062 error) and their current operational status. In a typical 1063 lighting control scenario, a single switch is the only entity 1064 responsible for sending commands to a group of lighting devices. 1065 In more advanced lighting control use cases, a M-to-N 1066 communication topology would be required, for instance in case 1067 multiple sensors (presence or day-light) are responsible to 1068 trigger events to a group of lighting devices. Especially in 1069 professional lighting scenarios, the roles of client and server 1070 are configured by the lighting commissioner, and devices strictly 1071 follow those roles. 1073 o Integrated building control: enabling Building Automation and 1074 Control Systems (BACSs) to control multiple heating, ventilation 1075 and air-conditioning units to pre-defined presets. Controlled 1076 units can be organized into groups in order to reflect their 1077 physical position in the building, e.g. devices in the same room 1078 can be configured as members of a single group. As a practical 1079 guideline, events within intervals of seconds are typically 1080 acceptable. Controlled units are expected to possibly reply back 1081 to the BACS issuing control commands, in order to report about the 1082 execution of the requested operation (e.g. OK, failure, error) 1083 and their current operational status. 1085 o Software and firmware updates: software and firmware updates often 1086 comprise quite a large amount of data. This can overload a LLN 1087 that is otherwise typically used to deal with only small amounts 1088 of data, on an infrequent base. Rather than sending software and 1089 firmware updates as unicast messages to each individual device, 1090 multicasting such updated data to a larger group of devices at 1091 once displays a number of benefits. For instance, it can 1092 significantly reduce the network load and decrease the overall 1093 time latency for propagating this data to all devices. Even if 1094 the complete whole update process itself is secured, securing the 1095 individual messages is important, in case updates consist of 1096 relatively large amounts of data. In fact, checking individual 1097 received data piecemeal for tampering avoids that devices store 1098 large amounts of partially corrupted data and that they detect 1099 tampering hereof only after all data has been received. Devices 1100 receiving software and firmware updates are expected to possibly 1101 reply back, in order to provide a feedback about the execution of 1102 the update operation (e.g. OK, failure, error) and their current 1103 operational status. 1105 o Parameter and configuration update: by means of multicast 1106 communication, it is possible to update the settings of a group of 1107 similar devices, both simultaneously and efficiently. Possible 1108 parameters are related, for instance, to network load management 1109 or network access controls. Devices receiving parameter and 1110 configuration updates are expected to possibly reply back, to 1111 provide a feedback about the execution of the update operation 1112 (e.g. OK, failure, error) and their current operational status. 1114 o Commissioning of LLNs systems: a commissioning device is 1115 responsible for querying all devices in the local network or a 1116 selected subset of them, in order to discover their presence, and 1117 be aware of their capabilities, default configuration, and 1118 operating conditions. Queried devices displaying similarities in 1119 their capabilities and features, or sharing a common physical 1120 location can be configured as members of a single group. Queried 1121 devices are expected to reply back to the commissioning device, in 1122 order to notify their presence, and provide the requested 1123 information and their current operational status. 1125 o Emergency multicast: a particular emergency related information 1126 (e.g. natural disaster) is generated and multicast by an emergency 1127 notifier, and relayed to multiple devices. The latters may reply 1128 back to the emergency notifier, in order to provide their feedback 1129 and local information related to the ongoing emergency. This kind 1130 of setups should additionally rely on a fault tolerance multicast 1131 algorithm, such as MPL. 1133 Appendix C. Example of Group Identifier Format 1135 This section provides an example of how the Group Identifier (Gid) 1136 can be specifically formatted. That is, the Gid can be composed of 1137 two parts, namely a Group Prefix and a Group Epoch. 1139 The Group Prefix is constant over time and is uniquely defined in the 1140 set of all the groups associated to the same Group Manager. The 1141 choice of the Group Prefix for a given group's Security Context is 1142 application specific. The size of the Group Prefix directly impact 1143 on the maximum number of distinct groups under the same Group 1144 Manager. 1146 The Group Epoch is set to 0 upon the group's initialization, and is 1147 incremented by 1 upon completing each renewal of the Security Context 1148 and keying material in the group (see Section 2.1). In particular, 1149 once a new Master Secret has been distributed to the group, all the 1150 group members increment by 1 the Group Epoch in the Group Identifier 1151 of that group. 1153 As an example, a 3-byte Group Identifier can be composed of: i) a 1154 1-byte Group Prefix '0xb1' interpreted as a raw byte string; and ii) 1155 a 2-byte Group Epoch interpreted as an unsigned integer ranging from 1156 0 to 65535. Then, after having established the Security Common 1157 Context 61532 times in the group, its Group Identifier will assume 1158 value '0xb1f05c'. 1160 Using an immutable Group Prefix for a group assumes that enough time 1161 elapses between two consecutive usages of the same Group Epoch value 1162 in that group. This ensures that the Gid value is temporally unique 1163 during the lifetime of a given message. Thus, the expected highest 1164 rate for addition/removal of group members and consequent group 1165 rekeying should be taken into account for a proper dimensioning of 1166 the Group Epoch size. 1168 As discussed in Section 8.5, if endpoints are deployed in multiple 1169 groups managed by different non-synchronized Group Managers, it is 1170 possible that Group Identifiers of different groups coincide at some 1171 point in time. In this case, a recipient has to handle coinciding 1172 Group Identifiers, and has to try using different OSCORE Security 1173 Contexts to process an incoming message, until the right one is found 1174 and the message is correctly verified. Therefore, it is favourable 1175 that Group Identifiers from different Group Managers have a size that 1176 result in a small probability of collision. How small this 1177 probability should be is up to system designers. 1179 Appendix D. Set-up of New Endpoints 1181 An endpoint joins a group by explicitly interacting with the 1182 responsible Group Manager. When becoming members of a group, 1183 endpoints are not required to know how many and what endpoints are in 1184 the same group. 1186 Communications between a joining endpoint and the Group Manager rely 1187 on the CoAP protocol and must be secured. Specific details on how to 1188 secure communications between joining endpoints and a Group Manager 1189 are out of the scope of this document. 1191 The Group Manager must verify that the joining endpoint is authorized 1192 to join the group. To this end, the Group Manager can directly 1193 authorize the joining endpoint, or expect it to provide authorization 1194 evidence previously obtained from a trusted entity. Further details 1195 about the authorization of joining endpoints are out of scope. 1197 In case of successful authorization check, the Group Manager 1198 generates a Sender ID assigned to the joining endpoint, before 1199 proceeding with the rest of the join process. That is, the Group 1200 Manager provides the joining endpoint with the keying material and 1201 parameters to initialize the OSCORE Security Context (see Section 2). 1202 The actual provisioning of keying material and parameters to the 1203 joining endpoint is out of the scope of this document. 1205 It is RECOMMENDED that the join process adopts the approach described 1206 in [I-D.tiloca-ace-oscoap-joining] and based on the ACE framework for 1207 Authentication and Authorization in constrained environments 1208 [I-D.ietf-ace-oauth-authz]. 1210 Appendix E. Examples of Synchronization Approaches 1212 This section describes three possible approaches that can be 1213 considered by server endpoints to synchronize with sender sequence 1214 numbers of client endpoints sending group requests. 1216 E.1. Best-Effort Synchronization 1218 Upon receiving a group request from a client, a server does not take 1219 any action to synchonize with the sender sequence number of that 1220 client. This provides no assurance at all as to message freshness, 1221 which can be acceptable in non-critical use cases. 1223 E.2. Baseline Synchronization 1225 Upon receiving a group request from a given client for the first 1226 time, a server initializes its last-seen sender sequence number in 1227 its Recipient Context associated to that client. However, the server 1228 drops the group request without delivering it to the application 1229 layer. This provides a reference point to identify if future group 1230 requests from the same client are fresher than the last one received. 1232 A replay time interval exists, between when a possibly replayed or 1233 delayed message is originally transmitted by a given client and the 1234 first authentic fresh message from that same client is received. 1235 This can be acceptable for use cases where servers admit such a 1236 trade-off between performance and assurance of message freshness. 1238 E.3. Challenge-Response Synchronization 1240 A server performs a challenge-response exchange with a client, by 1241 using the Echo Option for CoAP described in Section 2 of 1242 [I-D.ietf-core-echo-request-tag] and according to Section 7.5.2 of 1243 [I-D.ietf-core-object-security]. 1245 That is, upon receiving a group request from a particular client for 1246 the first time, the server processes the message as described in 1247 Section 6.2 of this specification, but, even if valid, does not 1248 deliver it to the application. Instead, the server replies to the 1249 client with a 4.03 Forbidden response message including an Echo 1250 Option, and stores the option value included therein. 1252 Upon receiving a 4.03 Forbidden response that includes an Echo Option 1253 and originates from a verified group member, a client sends a request 1254 as a unicast message addressed to the same server, echoing the Echo 1255 Option value. In particular, the client does not necessarily resend 1256 the same group request, but can instead send a more recent one, if 1257 the application permits it. This makes it possible for the client to 1258 not retain previously sent group requests for full retransmission, 1259 unless the application explicitly requires otherwise. In either 1260 case, the client uses the sender sequence number value currently 1261 stored in its own Sender Context. If the client stores group 1262 requests for possible retransmission with the Echo Option, it should 1263 not store a given request for longer than a pre-configured time 1264 interval. Note that the unicast request echoing the Echo Option is 1265 correctly treated and processed as a message, since the 'kid context' 1266 field including the Group Identifier of the OSCORE group is still 1267 present in the OSCORE Option as part of the COSE object (see 1268 Section 3). 1270 Upon receiving the unicast request including the Echo Option, the 1271 server verifies that the option value equals the stored and 1272 previously sent value; otherwise, the request is silently discarded. 1273 Then, the server verifies that the unicast request has been received 1274 within a pre-configured time interval, as described in 1275 [I-D.ietf-core-echo-request-tag]. In such a case, the request is 1276 further processed and verified; otherwise, it is silently discarded. 1277 Finally, the server updates the Recipient Context associated to that 1278 client, by setting the Replay Window according to the Sequence Number 1279 from the unicast request conveying the Echo Option. The server 1280 either delivers the request to the application if it is an actual 1281 retransmission of the original one, or discards it otherwise. 1282 Mechanisms to signal whether the resent request is a full 1283 retransmission of the original one are out of the scope of this 1284 specification. 1286 In case it does not receive a valid unicast request including the 1287 Echo Option within the configured time interval, the server endpoint 1288 should perform the same challenge-response upon receiving the next 1289 group request from that same client. 1291 A server should not deliver group requests from a given client to the 1292 application until one valid request from that same client has been 1293 verified as fresh, as conveying an echoed Echo Option 1294 [I-D.ietf-core-echo-request-tag]. Also, a server may perform the 1295 challenge-response described above at any time, if synchronization 1296 with sender sequence numbers of clients is (believed to be) lost, for 1297 instance after a device reboot. It is the role of the application to 1298 define under what circumstances sender sequence numbers lose 1299 synchronization. This can include a minimum gap between the sender 1300 sequence number of the latest accepted group request from a client 1301 and the sender sequence number of a group request just received from 1302 the same client. A client has to be always ready to perform the 1303 challenge-response based on the Echo Option in case a server starts 1304 it. 1306 Note that endpoints configured as silent servers are not able to 1307 perform the challenge-response described above, as they do not store 1308 a Sender Context to secure the 4.03 Forbidden response to the client. 1309 Therefore, silent servers should adopt alternative approaches to 1310 achieve and maintain synchronization with sender sequence numbers of 1311 clients. 1313 This approach provides an assurance of absolute message freshness. 1314 However, it can result in an impact on performance which is 1315 undesirable or unbearable, especially in large groups where many 1316 endpoints at the same time might join as new members or lose 1317 synchronization. 1319 Appendix F. No Verification of Signatures 1321 There are some application scenarios using group communication that 1322 have particularly strict requirements. One example of this is the 1323 requirement of low message latency in non-emergency lighting 1324 applications [I-D.somaraju-ace-multicast]. For those applications 1325 which have tight performance constraints and relaxed security 1326 requirements, it can be inconvenient for some endpoints to verify 1327 digital signatures in order to assert source authenticity of received 1328 messages. In other cases, the signature verification can be deferred 1329 or only checked for specific actions. For instance, a command to 1330 turn a bulb on where the bulb is already on does not need the 1331 signature to be checked. In such situations, the counter signature 1332 needs to be included anyway as part of the message, so that an 1333 endpoint that needs to validate the signature for any reason has the 1334 ability to do so. 1336 In this specification, it is NOT RECOMMENDED that endpoints do not 1337 verify the counter signature of received messages. However, it is 1338 recognized that there may be situations where it is not always 1339 required. The consequence of not doing the signature validation is 1340 that security in the group is based only on the group-authenticity of 1341 the shared keying material used for encryption. That is, endpoints 1342 in the group have evidence that a received message has been 1343 originated by a group member, although not specifically identifiable 1344 in a secure way. This can violate a number of security requirements, 1345 as the compromise of any element in the group means that the attacker 1346 has the ability to control the entire group. Even worse, the group 1347 may not be limited in scope, and hence the same keying material might 1348 be used not only for light bulbs but for locks as well. Therefore, 1349 extreme care must be taken in situations where the security 1350 requirements are relaxed, so that deployment of the system will 1351 always be done safely. 1353 Appendix G. Document Updates 1355 RFC EDITOR: PLEASE REMOVE THIS SECTION. 1357 G.1. Version -02 to -03 1359 o Revised structure and phrasing for improved readability and better 1360 alignment with draft-ietf-core-object-security. 1362 o Added discussion on wrap-Around of Partial IVs (see Section 2.2). 1364 o Separate sections for the COSE Object (Section 3) and the OSCORE 1365 Header Compression (Section 4). 1367 o The countersignature is now appended to the encrypted payload of 1368 the OSCORE message, rather than included in the OSCORE Option (see 1369 Section 4). 1371 o Extended scope of Section 5, now titled " Message Binding, 1372 Sequence Numbers, Freshness and Replay Protection". 1374 o Clarifications about Non-Confirmable messages in Section 5.1 1375 "Synchronization of Sender Sequence Numbers". 1377 o Clarifications about error handling in Section 6 "Message 1378 Processing". 1380 o Compacted list of responsibilities of the Group Manager in 1381 Section 7. 1383 o Revised and extended security considerations in Section 8. 1385 o Added IANA considerations for the OSCORE Flag Bits Registry in 1386 Section 9. 1388 o Revised Appendix D, now giving a short high-level description of a 1389 new endpoint set-up. 1391 G.2. Version -01 to -02 1393 o Terminology has been made more aligned with RFC7252 and draft- 1394 ietf-core-object-security: i) "client" and "server" replace the 1395 old "multicaster" and "listener", respectively; ii) "silent 1396 server" replaces the old "pure listener". 1398 o Section 2 has been updated to have the Group Identifier stored in 1399 the 'ID Context' parameter defined in draft-ietf-core-object- 1400 security. 1402 o Section 3 has been updated with the new format of the Additional 1403 Authenticated Data. 1405 o Major rewriting of Section 4 to better highlight the differences 1406 with the message processing in draft-ietf-core-object-security. 1408 o Added Sections 7.2 and 7.3 discussing security considerations 1409 about uniqueness of (key, nonce) and collision of group 1410 identifiers, respectively. 1412 o Minor updates to Appendix A.1 about assumptions on multicast 1413 communication topology and group size. 1415 o Updated Appendix C on format of group identifiers, with practical 1416 implications of possible collisions of group identifiers. 1418 o Updated Appendix D.2, adding a pointer to draft-palombini-ace-key- 1419 groupcomm about retrieval of nodes' public keys through the Group 1420 Manager. 1422 o Minor updates to Appendix E.3 about Challenge-Response 1423 synchronization of sequence numbers based on the Echo option from 1424 draft-ietf-core-echo-request-tag. 1426 G.3. Version -00 to -01 1428 o Section 1.1 has been updated with the definition of group as 1429 "security group". 1431 o Section 2 has been updated with: 1433 * Clarifications on etablishment/derivation of security contexts. 1435 * A table summarizing the the additional context elements 1436 compared to OSCORE. 1438 o Section 3 has been updated with: 1440 * Examples of request and response messages. 1442 * Use of CounterSignature0 rather than CounterSignature. 1444 * Additional Authenticated Data including also the signature 1445 algorithm, while not including the Group Identifier any longer. 1447 o Added Section 6, listing the responsibilities of the Group 1448 Manager. 1450 o Added Appendix A (former section), including assumptions and 1451 security objectives. 1453 o Appendix B has been updated with more details on the use cases. 1455 o Added Appendix C, providing an example of Group Identifier format. 1457 o Appendix D has been updated to be aligned with draft-palombini- 1458 ace-key-groupcomm. 1460 Acknowledgments 1462 The authors sincerely thank Stefan Beck, Rolf Blom, Carsten Bormann, 1463 Esko Dijk, Klaus Hartke, Rikard Hoeglund, Richard Kelsey, John 1464 Mattsson, Jim Schaad, Ludwig Seitz and Peter van der Stok for their 1465 feedback and comments. 1467 The work on this document has been partly supported by the EIT- 1468 Digital High Impact Initiative ACTIVE. 1470 Authors' Addresses 1472 Marco Tiloca 1473 RISE AB 1474 Isafjordsgatan 22 1475 Kista SE-16440 Stockholm 1476 Sweden 1478 Email: marco.tiloca@ri.se 1480 Goeran Selander 1481 Ericsson AB 1482 Torshamnsgatan 23 1483 Kista SE-16440 Stockholm 1484 Sweden 1486 Email: goran.selander@ericsson.com 1488 Francesca Palombini 1489 Ericsson AB 1490 Torshamnsgatan 23 1491 Kista SE-16440 Stockholm 1492 Sweden 1494 Email: francesca.palombini@ericsson.com 1496 Jiye Park 1497 Universitaet Duisburg-Essen 1498 Schuetzenbahn 70 1499 Essen 45127 1500 Germany 1502 Email: ji-ye.park@uni-due.de