idnits 2.17.1 draft-ietf-core-oscore-groupcomm-06.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 (November 04, 2019) is 1633 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 (-03) exists of draft-dijk-core-groupcomm-bis-01 ** Downref: Normative reference to an Informational RFC: RFC 6979 ** 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 (-16) exists of draft-ietf-ace-key-groupcomm-oscore-03 == Outdated reference: A later version (-46) exists of draft-ietf-ace-oauth-authz-25 == Outdated reference: A later version (-14) exists of draft-ietf-core-echo-request-tag-08 -- Obsolete informational reference (is this intentional?): RFC 6347 (Obsoleted by RFC 9147) Summary: 3 errors (**), 0 flaws (~~), 5 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: May 7, 2020 F. Palombini 6 Ericsson AB 7 J. Park 8 Universitaet Duisburg-Essen 9 November 04, 2019 11 Group OSCORE - Secure Group Communication for CoAP 12 draft-ietf-core-oscore-groupcomm-06 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 May 7, 2020. 43 Copyright Notice 45 Copyright (c) 2019 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 . . . . . . . . . . . 9 64 2.2. Wrap-Around of Partial IVs . . . . . . . . . . . . . . . 9 65 3. The COSE Object . . . . . . . . . . . . . . . . . . . . . . . 10 66 3.1. Updated external_aad . . . . . . . . . . . . . . . . . . 10 67 3.1.1. Updated external_aad for Encryption . . . . . . . . . 10 68 3.1.2. Updated external_aad for Signing . . . . . . . . . . 11 69 3.2. Use of the 'kid' Parameter . . . . . . . . . . . . . . . 12 70 3.3. Updated 'unprotected' Field . . . . . . . . . . . . . . . 12 71 4. OSCORE Header Compression . . . . . . . . . . . . . . . . . . 12 72 4.1. Encoding of the OSCORE Option Value . . . . . . . . . . . 12 73 4.2. Encoding of the OSCORE Payload . . . . . . . . . . . . . 13 74 4.3. Examples of Compressed COSE Objects . . . . . . . . . . . 14 75 5. Message Binding, Sequence Numbers, Freshness and Replay 76 Protection . . . . . . . . . . . . . . . . . . . . . . . . . 15 77 5.1. Synchronization of Sender Sequence Numbers . . . . . . . 15 78 6. Message Processing . . . . . . . . . . . . . . . . . . . . . 15 79 6.1. Protecting the Request . . . . . . . . . . . . . . . . . 16 80 6.2. Verifying the Request . . . . . . . . . . . . . . . . . . 16 81 6.3. Protecting the Response . . . . . . . . . . . . . . . . . 17 82 6.4. Verifying the Response . . . . . . . . . . . . . . . . . 17 83 7. Responsibilities of the Group Manager . . . . . . . . . . . . 18 84 8. Security Considerations . . . . . . . . . . . . . . . . . . . 19 85 8.1. Group-level Security . . . . . . . . . . . . . . . . . . 20 86 8.2. Uniqueness of (key, nonce) . . . . . . . . . . . . . . . 20 87 8.3. Management of Group Keying Material . . . . . . . . . . . 21 88 8.4. Update of Security Context and Key Rotation . . . . . . . 21 89 8.5. Collision of Group Identifiers . . . . . . . . . . . . . 22 90 8.6. Cross-group Message Injection . . . . . . . . . . . . . . 22 91 8.7. End-to-end Protection . . . . . . . . . . . . . . . . . . 24 92 8.8. Security Context Establishment . . . . . . . . . . . . . 24 93 8.9. Master Secret . . . . . . . . . . . . . . . . . . . . . . 24 94 8.10. Replay Protection . . . . . . . . . . . . . . . . . . . . 25 95 8.11. Client Aliveness . . . . . . . . . . . . . . . . . . . . 25 96 8.12. Cryptographic Considerations . . . . . . . . . . . . . . 25 97 8.13. Message Segmentation . . . . . . . . . . . . . . . . . . 26 98 8.14. Privacy Considerations . . . . . . . . . . . . . . . . . 26 99 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 100 9.1. Counter Signature Parameters Registry . . . . . . . . . . 27 101 9.2. Counter Signature Key Parameters Registry . . . . . . . . 29 102 9.3. Expert Review Instructions . . . . . . . . . . . . . . . 31 103 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 104 10.1. Normative References . . . . . . . . . . . . . . . . . . 32 105 10.2. Informative References . . . . . . . . . . . . . . . . . 33 106 Appendix A. Assumptions and Security Objectives . . . . . . . . 34 107 A.1. Assumptions . . . . . . . . . . . . . . . . . . . . . . . 34 108 A.2. Security Objectives . . . . . . . . . . . . . . . . . . . 36 109 Appendix B. List of Use Cases . . . . . . . . . . . . . . . . . 36 110 Appendix C. Example of Group Identifier Format . . . . . . . . . 39 111 Appendix D. Set-up of New Endpoints . . . . . . . . . . . . . . 40 112 Appendix E. Examples of Synchronization Approaches . . . . . . . 40 113 E.1. Best-Effort Synchronization . . . . . . . . . . . . . . . 40 114 E.2. Baseline Synchronization . . . . . . . . . . . . . . . . 41 115 E.3. Challenge-Response Synchronization . . . . . . . . . . . 41 116 Appendix F. No Verification of Signatures . . . . . . . . . . . 43 117 Appendix G. Document Updates . . . . . . . . . . . . . . . . . . 43 118 G.1. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 43 119 G.2. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 44 120 G.3. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 44 121 G.4. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 45 122 G.5. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 46 123 G.6. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 47 124 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 47 125 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 48 127 1. Introduction 129 The Constrained Application Protocol (CoAP) [RFC7252] is a web 130 transfer protocol specifically designed for constrained devices and 131 networks [RFC7228]. 133 Group communication for CoAP [RFC7390][I-D.dijk-core-groupcomm-bis] 134 addresses use cases where deployed devices benefit from a group 135 communication model, for example to reduce latencies, improve 136 performance and reduce bandwidth utilisation. Use cases include 137 lighting control, integrated building control, software and firmware 138 updates, parameter and configuration updates, commissioning of 139 constrained networks, and emergency multicast (see Appendix B). 140 Furthermore, [RFC7390] recognizes the importance to introduce a 141 secure mode for CoAP group communication. This specification defines 142 such a mode. 144 Object Security for Constrained RESTful Environments (OSCORE) 145 [RFC8613] describes a security protocol based on the exchange of 146 protected CoAP messages. OSCORE builds on CBOR Object Signing and 147 Encryption (COSE) [RFC8152] and provides end-to-end encryption, 148 integrity, replay protection and binding of response to request 149 between a sender and a receipient, also in the presence of 150 intermediaries. To this end, a CoAP message is protected by 151 including its payload (if any), certain options, and header fields in 152 a COSE object, which replaces the authenticated and encrypted fields 153 in the protected message. 155 This document defines Group OSCORE, providing end-to-end security of 156 CoAP messages exchanged between members of a group, and preserving 157 independence of transport layer. In particular, the described 158 approach defines how OSCORE should be used in a group communication 159 setting, so that end-to-end security is assured in the same way as 160 OSCORE for unicast communication. That is, end-to-end security is 161 provided for CoAP multicast requests sent by a client to the group, 162 and for related CoAP responses sent by multiple servers. Group 163 OSCORE provides source authentication of all CoAP messages exchanged 164 within the group, by means of digital signatures produced through 165 private keys of sender devices and embedded in the protected CoAP 166 messages. 168 As defined in the latest [I-D.dijk-core-groupcomm-bis], Group OSCORE 169 is the security protocol to use for applications that rely on CoAP 170 group communication. As in OSCORE, it is still possible to 171 simultaneously rely on DTLS [RFC6347] to protect hop-by-hop 172 communication between a sender and a proxy (and vice versa), and 173 between a proxy and a recipient (and vice versa). Note that DTLS 174 cannot be used to secure messages sent over multicast. 176 1.1. Terminology 178 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 179 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 180 "OPTIONAL" in this document are to be interpreted as described in BCP 181 14 [RFC2119] [RFC8174] when, and only when, they appear in all 182 capitals, as shown here. 184 Readers are expected to be familiar with the terms and concepts 185 described in CoAP [RFC7252] including "endpoint", "client", "server", 186 "sender" and "recipient"; group communication for CoAP 187 [RFC7390][I-D.dijk-core-groupcomm-bis]; COSE and counter signatures 188 [RFC8152]. 190 Readers are also expected to be familiar with the terms and concepts 191 for protection and processing of CoAP messages through OSCORE, such 192 as "Security Context" and "Master Secret", defined in [RFC8613]. 194 Terminology for constrained environments, such as "constrained 195 device", "constrained-node network", is defined in [RFC7228]. 197 This document refers also to the following terminology. 199 o Keying material: data that is necessary to establish and maintain 200 secure communication among endpoints. This includes, for 201 instance, keys and IVs [RFC4949]. 203 o Group: a set of endpoints that share group keying material and 204 security parameters (Common Context, see Section 2). The term 205 group used in this specification refers thus to a "security 206 group", not to be confused with network/multicast group or 207 application group. 209 o Group Manager: entity responsible for a group. Each endpoint in a 210 group communicates securely with the respective Group Manager, 211 which is neither required to be an actual group member nor to take 212 part in the group communication. The full list of 213 responsibilities of the Group Manager is provided in Section 7. 215 o Silent server: member of a group that never responds to requests. 216 Note that a silent server can act as a client, the two roles are 217 independent. 219 o Group Identifier (Gid): identifier assigned to the group. Group 220 Identifiers must be unique within the set of groups of a given 221 Group Manager. 223 o Group request: CoAP request message sent by a client in the group 224 to all servers in that group. 226 o Source authentication: evidence that a received message in the 227 group originated from a specific identified group member. This 228 also provides assurance that the message was not tampered with by 229 anyone, be it a different legitimate group member or an endpoint 230 which is not a group member. 232 2. OSCORE Security Context 234 To support group communication secured with OSCORE, each endpoint 235 registered as member of a group maintains a Security Context as 236 defined in Section 3 of [RFC8613], extended as defined below. Each 237 endpoint in a group makes use of: 239 1. one Common Context, shared by all the endpoints in a given group. 240 In particular: 242 * The ID Context parameter contains the Gid of the group, which 243 is used to retrieve the Security Context for processing 244 messages intended to the endpoints of the group (see 245 Section 6). The choice of the Gid is application specific. 246 An example of specific formatting of the Gid is given in 247 Appendix C. The application needs to specify how to handle 248 possible collisions between Gids, see Section 8.5. 250 * A new parameter Counter Signature Algorithm is included. Its 251 value identifies the digital signature algorithm used to 252 compute a counter signature on the COSE object (see 253 Section 4.5 of [RFC8152]) which provides source authentication 254 within the group. Its value is immutable once the Common 255 Context is established. The used Counter Signature Algorithm 256 MUST be selected among the signing ones defined in the COSE 257 Algorithms Registry (see section 16.4 of [RFC8152]). The 258 EdDSA signature algorithm ed25519 [RFC8032] is mandatory to 259 implement. If Elliptic Curve Digital Signature Algorithm 260 (ECDSA) is used, it is RECOMMENDED that implementations 261 implement "deterministic ECDSA" as specified in [RFC6979]. 263 * A new parameter Counter Signature Parameters is included. 264 This parameter identifies the parameters associated to the 265 digital signature algorithm specified in the Counter Signature 266 Algorithm. This parameter MAY be empty and is immutable once 267 the Common Context is established. The exact structure of 268 this parameter depends on the value of Counter Signature 269 Algorithm, and is defined in the Counter Signature Parameters 270 Registry (see Section 9.1), where each entry indicates a 271 specified structure of the Counter Signature Parameters. 273 * A new parameter Counter Signature Key Parameters is included. 274 This parameter identifies the parameters associated to the 275 keys used with the digital signature algorithm specified in 276 the Counter Signature Algorithm. This parameter MAY be empty 277 and is immutable once the Common Context is established. The 278 exact structure of this parameter depends on the value of 279 Counter Signature Algorithm, and is defined in the Counter 280 Signature Key Parameters Registry (see Section 9.2), where 281 each entry indicates a specified structure of the Counter 282 Signature Key Parameters. 284 2. one Sender Context, unless the endpoint is configured exclusively 285 as silent server. The Sender Context is used to secure outgoing 286 messages and is initialized according to Section 3 of [RFC8613], 287 once the endpoint has joined the group. The Sender Context of a 288 given endpoint matches the corresponding Recipient Context in all 289 the endpoints receiving a protected message from that endpoint. 290 Besides, in addition to what is defined in [RFC8613], the Sender 291 Context stores also the endpoint's private key. 293 3. one Recipient Context for each distinct endpoint from which 294 messages are received, used to process incoming messages. The 295 recipient may generate a Recipient Context whenever in possession 296 of all the required pieces of information on the corresponding 297 endpoint, e.g. they may be provided to the recipient upon joining 298 the group. Alternatively, the recipient may generate a Recipient 299 Context upon receiving an incoming message from another endpoint 300 in the group for the first time (see Section 6.2 and 301 Section 6.4). Each Recipient Context matches the Sender Context 302 of the endpoint from which protected messages are received. 303 Besides, in addition to what is defined in [RFC8613], each 304 Recipient Context stores also the public key of the associated 305 other endpoint from which messages are received. Note that each 306 Recipient Context includes a Replay Window, unless the recipient 307 acts only as client and hence processes only responses as 308 incoming messages. 310 The table in Figure 1 overviews the new information included in the 311 OSCORE Security Context, with respect to what defined in Section 3 of 312 [RFC8613]. 314 +---------------------------+------------------------------+ 315 | Context portion | New information | 316 +---------------------------+------------------------------+ 317 | | | 318 | Common Context | Counter signature algorithm | 319 | | | 320 | Common Context | Counter signature parameters | 321 | | | 322 | Sender Context | Endpoint's own private key | 323 | | | 324 | Each Recipient Context | Public key of the | 325 | | associated other endpoint | 326 | | | 327 +---------------------------+------------------------------+ 329 Figure 1: Additions to the OSCORE Security Context 331 Upon receiving a secure CoAP message, a recipient uses the sender's 332 public key, in order to verify the counter signature of the COSE 333 Object (see Section 3). 335 If not already stored in the Recipient Context associated to the 336 sender, the recipient retrieves the sender's public key from the 337 Group Manager, which collects public keys upon endpoints' joining the 338 group, acts as trusted key repository and ensures the correct 339 association between the public key and the identifier of the sender, 340 for instance by means of public key certificates. 342 For very constrained devices, it may be not feasible to 343 simultaneously handle the ongoing processing of a just received 344 message and the parallel retrieval of the sender's public key. Such 345 devices can be configured to drop that received message altogether, 346 switch to the retrieval of the sender's public key, and thus have it 347 available to verify following messages from that sender. 349 Note that a group member can retrieve public keys from the Group 350 Manager and generate the Recipient Context associated to another 351 group member at any point in time, as long as this is done before 352 verifying a received secure CoAP message. The exact configuration is 353 application dependent. For example, an application can configure a 354 group member to retrieve all the required information and to create 355 the Recipient Context exactly upon receiving a message from another 356 group member for the first time. As an alternative, the application 357 can configure a group member to asynchronously retrieve the required 358 information and update its list of Recipient Contexts well before 359 receiving any message, e.g. by Observing [RFC7641] the Group Manager 360 to get updates on the group membership. 362 It is RECOMMENDED that the Group Manager collects public keys and 363 provides them to group members upon request as described in 364 [I-D.ietf-ace-key-groupcomm-oscore], where the join process is based 365 on the ACE framework for Authentication and Authorization in 366 constrained environments [I-D.ietf-ace-oauth-authz]. Further details 367 about how public keys can be handled and retrieved in the group is 368 out of the scope of this document. 370 An endpoint receives its own Sender ID from the Group Manager upon 371 joining the group. That Sender ID is valid only within that group, 372 and is unique within the group. An endpoint uses its own Sender ID 373 (together with other data) to generate unique AEAD nonces for 374 outgoing messages, as in [RFC8613]. Endpoints which are configured 375 only as silent servers do not have a Sender ID. 377 The Sender/Recipient Keys and the Common IV are derived according to 378 the same scheme defined in Section 3.2 of [RFC8613]. The mandatory- 379 to-implement HKDF and AEAD algorithms for Group OSCORE are the same 380 as in [RFC8613]. 382 2.1. Management of Group Keying Material 384 In order to establish a new Security Context in a group, a new Group 385 Identifier (Gid) for that group and a new value for the Master Secret 386 parameter MUST be distributed. When doing so, a new value for the 387 Master Salt parameter MAY also be distributed, and the Group Manager 388 SHOULD preserve the current value of the Sender ID of each group 389 member. An example of Gid format supporting this operation is 390 provided in Appendix C. Then, each group member re-derives the 391 keying material stored in its own Sender Context and Recipient 392 Contexts as described in Section 2, using the updated Gid. 394 After a new Gid has been distributed, a same Recipient ID ('kid') 395 should not be considered as a persistent and reliable indicator of 396 the same group member. Such an indication can be actually achieved 397 only by verifying countersignatures of received messages. 399 As a consequence, group members may end up retaining stale Recipient 400 Contexts, that are no longer useful to verify incoming secure 401 messages. Applications may define policies to delete (long-)unused 402 Recipient Contexts and reduce the impact on storage space. 404 If the application requires so (see Appendix A.1), it is RECOMMENDED 405 to adopt a group key management scheme, and securely distribute a new 406 value for the Gid and for the Master Secret parameter of the group's 407 Security Context, before a new joining endpoint is added to the group 408 or after a currently present endpoint leaves the group. This is 409 necessary to preserve backward security and forward security in the 410 group, if the application requires it. 412 The specific approach used to distribute the new Gid and Master 413 Secret parameter to the group is out of the scope of this document. 414 However, it is RECOMMENDED that the Group Manager supports the 415 distribution of the new Gid and Master Secret parameter to the group 416 according to the Group Rekeying Process described in 417 [I-D.ietf-ace-key-groupcomm-oscore]. 419 2.2. Wrap-Around of Partial IVs 421 An endpoint can eventually experience a wrap-around of its own Sender 422 Sequence Number, which is incremented after sending each new message 423 including a Partial IV. This is the case for all group requests, all 424 Observe notifications [RFC7641] and, optionally, any other response. 426 When a wrap-around happens, the endpoint MUST NOT transmit further 427 messages including a Partial IV until it has derived a new Sender 428 Context, in order to avoid reusing nonces with the same keys. 430 Furthermore, the endpoint SHOULD inform the Group Manager, that can 431 take one of the following actions: 433 o The Group Manager renews the OSCORE Security Context in the group 434 (see Section 2.1). 436 o The Group Manager provides a new Sender ID value to the endpoint 437 that has experienced the wrap-around. Then, the endpoint derives 438 a new Sender Context using the new Sender ID, as described in 439 Section 3.2 of [RFC8613]. 441 Either case, same considerations from Section 2.1 hold about possible 442 retaining of stale Recipient Contexts. 444 3. The COSE Object 446 Building on Section 5 of [RFC8613], this section defines how to use 447 COSE [RFC8152] to wrap and protect data in the original message. 448 OSCORE uses the untagged COSE_Encrypt0 structure with an 449 Authenticated Encryption with Associated Data (AEAD) algorithm. For 450 Group OSCORE, the following modifications apply. 452 3.1. Updated external_aad 454 The external_aad of the Additional Authenticated Data (AAD) is 455 extended as follows. In particular, it has one structure used for 456 the encryption process producing the ciphertext, and one structure 457 used for the signing process producing the counter signature. 459 3.1.1. Updated external_aad for Encryption 461 The first external_aad structure used for the encryption process 462 producing the ciphertext (see Section 5.3 of [RFC8152]) includes also 463 the counter signature algorithm and related parameters used to sign 464 messages. In particular, compared with Section 5.4 of [RFC8613], the 465 'algorithms' array in the aad_array MUST also include: 467 o 'alg_countersign', which contains the Counter Signature Algorithm 468 from the Common Context (see Section 2). This parameter has the 469 value specified in the "Value" field of the Counter Signature 470 Parameters Registry (see Section 9.1) for this counter signature 471 algorithm. 473 The 'algorithms' array in the aad_array MAY also include: 475 o 'par_countersign', which contains the Counter Signature Parameters 476 from the Common Context (see Section 2). This parameter contains 477 the counter signature parameters encoded as specified in the 478 "Parameters" field of the Counter Signature Parameters Registry 479 (see Section 9.1), for the used counter signature algorithm. If 480 the Counter Signature Parameters in the Common Context is empty, 481 'par_countersign' MUST be encoding the CBOR simple value Null. 483 o 'par_countersign_key', which contains the Counter Signature Key 484 Parameters from the Common Context (see Section 2). This 485 parameter contains the counter signature key parameters encoded as 486 specified in the "Parameters" field of the Counter Signature Key 487 Parameters Registry (see Section 9.2), for the used counter 488 signature algorithm. If the Counter Signature Key Parameters in 489 the Common Context is empty, 'par_countersign_key' MUST be 490 encoding the CBOR simple value Null. 492 Thus, the following external_aad structure is used for the encryption 493 process producing the ciphertext (see Section 5.3 of [RFC8152]). 495 external_aad = bstr .cbor aad_array 497 aad_array = [ 498 oscore_version : uint, 499 algorithms : [alg_aead : int / tstr, 500 alg_countersign : int / tstr, 501 par_countersign : any / nil, 502 par_countersign_key : any / nil], 503 request_kid : bstr, 504 request_piv : bstr, 505 options : bstr 506 ] 508 3.1.2. Updated external_aad for Signing 510 The second external_aad structure used for the signing process 511 producing the counter signature as defined below includes also: 513 o the counter signature algorithm and related parameters used to 514 sign messages, encoded as in the external_aad structure defined in 515 Section 3.1.1; 517 o the value of the OSCORE Option included in the OSCORE message, 518 encoded as a binary string. 520 Thus, the following external_aad structure is used for the signing 521 process producing the counter signature, as defined below. 523 external_aad = bstr .cbor aad_array 525 aad_array = [ 526 oscore_version : uint, 527 algorithms : [alg_aead : int / tstr, 528 alg_countersign : int / tstr, 529 par_countersign : any / nil, 530 par_countersign_key : any / nil], 531 request_kid : bstr, 532 request_piv : bstr, 533 options : bstr, 534 OSCORE_option: bstr 535 ] 537 Note for implementation: this requires the value of the OSCORE option 538 to be fully ready, before starting the signing process. 540 3.2. Use of the 'kid' Parameter 542 The value of the 'kid' parameter in the 'unprotected' field of 543 response messages MUST be set to the Sender ID of the endpoint 544 transmitting the message. That is, unlike in [RFC8613], the 'kid' 545 parameter is always present in all messages, i.e. both requests and 546 responses. 548 3.3. Updated 'unprotected' Field 550 The 'unprotected' field MUST additionally include the following 551 parameter: 553 o CounterSignature0 : its value is set to the counter signature of 554 the COSE object, computed by the sender using its own private key 555 as described in Appendix A.2 of [RFC8152]. In particular, the 556 Sig_structure contains the external_aad as defined in 557 Section 3.1.2 and the ciphertext of the COSE_Encrypt0 object as 558 payload. 560 4. OSCORE Header Compression 562 The OSCORE compression defined in Section 6 of [RFC8613] is used, 563 with the following additions for the encoding of the OSCORE Option 564 and the OSCORE Payload. 566 4.1. Encoding of the OSCORE Option Value 568 Analogously to [RFC8613], the value of the OSCORE option SHALL 569 contain the OSCORE flag bits, the Partial IV parameter, the kid 570 context parameter (length and value), and the kid parameter, with the 571 following modifications: 573 o The first byte, containing the OSCORE flag bits, has the following 574 encoding modifications: 576 * The fourth least significant bit MUST be set to 1 in every 577 message, to indicate the presence of the 'kid' parameter for 578 all group requests and responses. That is, unlike in 579 [RFC8613], the 'kid' parameter is always present in all 580 messages. 582 * The fifth least significant bit MUST be set to 1 for group 583 requests, to indicate the presence of the 'kid context' 584 parameter in the compressed COSE object. The 'kid context' MAY 585 be present in responses if the application requires it. In 586 such a case, the kid context flag MUST be set to 1. 588 The flag bits are registered in the OSCORE Flag Bits registry 589 specified in Section 13.7 of [RFC8613]. 591 o The 'kid context' value encodes the Group Identifier value (Gid) 592 of the group's Security Context. 594 o The remaining bytes in the OSCORE Option value encode the value of 595 the 'kid' parameter, which is always present both in group 596 requests and in responses. 598 0 1 2 3 4 5 6 7 <------------ n bytes ------------> 599 +-+-+-+-+-+-+-+-+-----------------------------------+ 600 |0 0|0|h|1| n | Partial IV (if any) | 601 +-+-+-+-+-+-+-+-+-----------------------------------+ 603 <-- 1 byte ---> <------ s bytes ------> 604 +---------------+-----------------------+-----------+ 605 | s (if any) | kid context = Gid | kid | 606 +---------------+-----------------------+-----------+ 608 Figure 2: OSCORE Option Value 610 4.2. Encoding of the OSCORE Payload 612 The payload of the OSCORE message SHALL encode the ciphertext of the 613 COSE object concatenated with the value of the CounterSignature0 of 614 the COSE object, computed as in Appendix A.2 of [RFC8152] according 615 to the Counter Signature Algorithm and Counter Signature Parameters 616 in the Security Context. 618 4.3. Examples of Compressed COSE Objects 620 This section covers a list of OSCORE Header Compression examples for 621 group requests and responses. The examples assume that the 622 COSE_Encrypt0 object is set (which means the CoAP message and 623 cryptographic material is known). Note that the examples do not 624 include the full CoAP unprotected message or the full Security 625 Context, but only the input necessary to the compression mechanism, 626 i.e. the COSE_Encrypt0 object. The output is the compressed COSE 627 object as defined in Section 4 and divided into two parts, since the 628 object is transported in two CoAP fields: OSCORE option and payload. 630 The examples assume that the label for the new kid context defined in 631 [RFC8613] has value 10. COUNTERSIGN is the CounterSignature0 byte 632 string as described in Section 3 and is 64 bytes long. 634 1. Request with ciphertext = 0xaea0155667924dff8a24e4cb35b9, kid = 635 0x25, Partial IV = 5 and kid context = 0x44616c 637 Before compression (96 bytes): 639 [ 640 h'', 641 { 4:h'25', 6:h'05', 10:h'44616c', 9:COUNTERSIGN }, 642 h'aea0155667924dff8a24e4cb35b9' 643 ] 645 After compression (85 bytes): 647 Flag byte: 0b00011001 = 0x19 649 Option Value: 19 05 03 44 61 6c 25 (7 bytes) 651 Payload: ae a0 15 56 67 92 4d ff 8a 24 e4 cb 35 b9 COUNTERSIGN 652 (14 bytes + size of COUNTERSIGN) 654 1. Response with ciphertext = 60b035059d9ef5667c5a0710823b, kid = 655 0x52 and no Partial IV. 657 Before compression (88 bytes): 659 [ 660 h'', 661 { 4:h'52', 9:COUNTERSIGN }, 662 h'60b035059d9ef5667c5a0710823b' 663 ] 664 After compression (80 bytes): 666 Flag byte: 0b00001000 = 0x08 668 Option Value: 08 52 (2 bytes) 670 Payload: 60 b0 35 05 9d 9e f5 66 7c 5a 07 10 82 3b COUNTERSIGN 671 (14 bytes + size of COUNTERSIGN) 673 5. Message Binding, Sequence Numbers, Freshness and Replay Protection 675 The requirements and properties described in Section 7 of [RFC8613] 676 also apply to OSCORE used in group communication. In particular, 677 group OSCORE provides message binding of responses to requests, which 678 provides relative freshness of responses, and replay protection of 679 requests. 681 5.1. Synchronization of Sender Sequence Numbers 683 Upon joining the group, new servers are not aware of the Sender 684 Sequence Number values currently used by different clients to 685 transmit group requests. This means that, when such servers receive 686 a secure group request from a given client for the first time, they 687 are not able to verify if that request is fresh and has not been 688 replayed or (purposely) delayed. The same holds when a server loses 689 synchronization with Sender Sequence Numbers of clients, for instance 690 after a device reboot. 692 The exact way to address this issue is application specific, and 693 depends on the particular use case and its synchronization 694 requirements. The list of methods to handle synchronization of 695 Sender Sequence Numbers is part of the group communication policy, 696 and different servers can use different methods. 698 Appendix E describes three possible approaches that can be considered 699 for synchronization of sequence numbers. 701 6. Message Processing 703 Each request message and response message is protected and processed 704 as specified in [RFC8613], with the modifications described in the 705 following sections. The following security objectives are fulfilled, 706 as further discussed in Appendix A.2: data replay protection, group- 707 level data confidentiality, source authentication and message 708 integrity. 710 As per [RFC7252][RFC7390][I-D.dijk-core-groupcomm-bis], group 711 requests sent over multicast MUST be Non-Confirmable. Thus, senders 712 should store their outgoing messages for an amount of time defined by 713 the application and sufficient to correctly handle possible 714 retransmissions. However, this does not prevent the acknowledgment 715 of Confirmable group requests in non-multicast environments. 716 Besides, according to Section 5.2.3 of [RFC7252], responses to Non- 717 Confirmable group requests SHOULD be also Non-Confirmable. However, 718 endpoints MUST be prepared to receive Confirmable responses in reply 719 to a Non-Confirmable group request. 721 Furthermore, endpoints in the group locally perform error handling 722 and processing of invalid messages according to the same principles 723 adopted in [RFC8613]. However, a recipient MUST stop processing and 724 silently reject any message which is malformed and does not follow 725 the format specified in Section 3, or which is not cryptographically 726 validated in a successful way. Either case, it is RECOMMENDED that 727 the recipient does not send back any error message. This prevents 728 servers from replying with multiple error messages to a client 729 sending a group request, so avoiding the risk of flooding and 730 possibly congesting the group. 732 6.1. Protecting the Request 734 A client transmits a secure group request as described in Section 8.1 735 of [RFC8613], with the following modifications. 737 o In step 2, the 'algorithms' array in the Additional Authenticated 738 Data is modified as described in Section 3 of this specification. 740 o In step 4, the encryption of the COSE object is modified as 741 described in Section 3 of this specification. The encoding of the 742 compressed COSE object is modified as described in Section 4 of 743 this specification. 745 o In step 5, the counter signature is computed and the format of the 746 OSCORE mesage is modified as described in Section 4.2 of this 747 specification. In particular, the payload of the OSCORE message 748 includes also the counter signature. 750 6.2. Verifying the Request 752 Upon receiving a secure group request, a server proceeds as described 753 in Section 8.2 of [RFC8613], with the following modifications. 755 o In step 2, the decoding of the compressed COSE object follows 756 Section 4 of this specification. If the received Recipient ID 757 ('kid') does not match with any Recipient Context for the 758 retrieved Gid ('kid context'), then the server MAY create a new 759 Recipient Context and initializes it according to Section 3 of 761 [RFC8613], also retrieving the client's public key. Such a 762 configuration is application specific. If the application does 763 not specify dynamic derivation of new Recipient Contexts, then the 764 server SHALL stop processing the request. 766 o In step 4, the 'algorithms' array in the Additional Authenticated 767 Data is modified as described in Section 3 of this specification. 769 o In step 6, the server also verifies the counter signature using 770 the public key of the client from the associated Recipient 771 Context. If the signature verification fails, the server MAY 772 reply with a 4.00 (Bad Request) response. 774 o Additionally, if the used Recipient Context was created upon 775 receiving this group request and the message is not verified 776 successfully, the server MAY delete that Recipient Context. Such 777 a configuration, which is specified by the application, would 778 prevent attackers from overloading the server's storage and 779 creating processing overhead on the server. 781 6.3. Protecting the Response 783 A server that has received a secure group request may reply with a 784 secure response, which is protected as described in Section 8.3 of 785 [RFC8613], with the following modifications. 787 o In step 2, the 'algorithms' array in the Additional Authenticated 788 Data is modified as described in Section 3 of this specification. 790 o In step 4, the encryption of the COSE object is modified as 791 described in Section 3 of this specification. The encoding of the 792 compressed COSE object is modified as described in Section 4 of 793 this specification. 795 o In step 5, the counter signature is computed and the format of the 796 OSCORE mesage is modified as described in Section 4.2 of this 797 specification. In particular, the payload of the OSCORE message 798 includes also the counter signature. 800 6.4. Verifying the Response 802 Upon receiving a secure response message, the client proceeds as 803 described in Section 8.4 of [RFC8613], with the following 804 modifications. 806 o In step 2, the decoding of the compressed COSE object is modified 807 as described in Section 3 of this specification. If the received 808 Recipient ID ('kid') does not match with any Recipient Context for 809 the retrieved Gid ('kid context'), then the client MAY create a 810 new Recipient Context and initializes it according to Section 3 of 811 [RFC8613], also retrieving the server's public key. If the 812 application does not specify dynamic derivation of new Recipient 813 Contexts, then the client SHALL stop processing the response. 815 o In step 3, the 'algorithms' array in the Additional Authenticated 816 Data is modified as described in Section 3 of this specification. 818 o In step 5, the client also verifies the counter signature using 819 the public key of the server from the associated Recipient 820 Context. 822 o Additionally, if the used Recipient Context was created upon 823 receiving this response and the message is not verified 824 successfully, the client MAY delete that Recipient Context. Such 825 a configuration, which is specified by the application, would 826 prevent attackers from overloading the client's storage and 827 creating processing overhead on the client. 829 7. Responsibilities of the Group Manager 831 The Group Manager is responsible for performing the following tasks: 833 1. Creating and managing OSCORE groups. This includes the 834 assignment of a Gid to every newly created group, as well as 835 ensuring uniqueness of Gids within the set of its OSCORE groups. 837 2. Defining policies for authorizing the joining of its OSCORE 838 groups. 840 3. Handling the join process to add new endpoints as group members. 842 4. Establishing the Common Context part of the Security Context, 843 and providing it to authorized group members during the join 844 process, together with the corresponding Sender Context. 846 5. Generating and managing Sender IDs within its OSCORE groups, as 847 well as assigning and providing them to new endpoints during the 848 join process. This includes ensuring uniqueness of Sender IDs 849 within each of its OSCORE groups. 851 6. Defining a communication policy for each of its OSCORE groups, 852 and signalling it to new endpoints during the join process. 854 7. Renewing the Security Context of an OSCORE group upon membership 855 change, by revoking and renewing common security parameters and 856 keying material (rekeying). 858 8. Providing the management keying material that a new endpoint 859 requires to participate in the rekeying process, consistent with 860 the key management scheme used in the group joined by the new 861 endpoint. 863 9. Updating the Gid of its OSCORE groups, upon renewing the 864 respective Security Context. 866 10. Acting as key repository, in order to handle the public keys of 867 the members of its OSCORE groups, and providing such public keys 868 to other members of the same group upon request. The actual 869 storage of public keys may be entrusted to a separate secure 870 storage device. 872 11. Validating that the format and parameters of public keys of 873 group members are consistent with the countersignature algorithm 874 and related parameters used in the respective OSCORE group. 876 8. Security Considerations 878 The same threat model discussed for OSCORE in Appendix D.1 of 879 [RFC8613] holds for Group OSCORE. In addition, source authentication 880 of messages is explicitly ensured by means of counter signatures, as 881 further discussed in Section 8.1. 883 The same considerations on supporting Proxy operations discussed for 884 OSCORE in Appendix D.2 of [RFC8613] hold for Group OSCORE. 886 The same considerations on protected message fields for OSCORE 887 discussed in Appendix D.3 of [RFC8613] hold for Group OSCORE. 889 The same considerations on uniqueness of (key, nonce) pairs for 890 OSCORE discussed in Appendix D.4 of [RFC8613] hold for Group OSCORE. 891 This is further discussed in Section 8.2. 893 The same considerations on unprotected message fields for OSCORE 894 discussed in Appendix D.5 of [RFC8613] hold for Group OSCORE, with 895 the following difference. The countersignature included in a Group 896 OSCORE message is computed also over the value of the OSCORE option, 897 which is part of the Additional Authenticated Data used in the 898 signing process. This is further discussed in Section 8.6. 900 As discussed in Section 6.2.3 of [I-D.dijk-core-groupcomm-bis], Group 901 OSCORE addresses security attacks against CoAP listed in Sections 902 11.2-11.6 of [RFC7252], especially when mounted over IP multicast. 904 The rest of this section first discusses security aspects to be taken 905 into account when using Group OSCORE. Then it goes through aspects 906 covered in the security considerations of OSCORE (Section 12 of 907 [RFC8613]), and discusses how they hold when Group OSCORE is used. 909 8.1. Group-level Security 911 The approach described in this document relies on commonly shared 912 group keying material to protect communication within a group. This 913 has the following implications. 915 o Messages are encrypted at a group level (group-level data 916 confidentiality), i.e. they can be decrypted by any member of the 917 group, but not by an external adversary or other external 918 entities. 920 o The AEAD algorithm provides only group authentication, i.e. it 921 ensures that a message sent to a group has been sent by a member 922 of that group, but not by the alleged sender. This is why source 923 authentication of messages sent to a group is ensured through a 924 counter signature, which is computed by the sender using its own 925 private key and then appended to the message payload. 927 Note that, even if an endpoint is authorized to be a group member and 928 to take part in group communications, there is a risk that it behaves 929 inappropriately. For instance, it can forward the content of 930 messages in the group to unauthorized entities. However, in many use 931 cases, the devices in the group belong to a common authority and are 932 configured by a commissioner (see Appendix B), which results in a 933 practically limited risk and enables a prompt detection/reaction in 934 case of misbehaving. 936 8.2. Uniqueness of (key, nonce) 938 The proof for uniqueness of (key, nonce) pairs in Appendix D.4 of 939 [RFC8613] is also valid in group communication scenarios. That is, 940 given an OSCORE group: 942 o Uniqueness of Sender IDs within the group is enforced by the Group 943 Manager. 945 o The case A in Appendix D.4 of [RFC8613] concerns all group 946 requests and responses including a Partial IV (e.g. Observe 947 notifications). In this case, same considerations from [RFC8613] 948 apply here as well. 950 o The case B in Appendix D.4 of [RFC8613] concerns responses not 951 including a Partial IV (e.g. single response to a group request). 952 In this case, same considerations from [RFC8613] apply here as 953 well. 955 As a consequence, each message encrypted/decrypted with the same 956 Sender Key is processed by using a different (ID_PIV, PIV) pair. 957 This means that nonces used by any fixed encrypting endpoint are 958 unique. Thus, each message is processed with a different (key, 959 nonce) pair. 961 8.3. Management of Group Keying Material 963 The approach described in this specification should take into account 964 the risk of compromise of group members. In particular, this 965 document specifies that a key management scheme for secure revocation 966 and renewal of Security Contexts and group keying material should be 967 adopted. 969 Especially in dynamic, large-scale, groups where endpoints can join 970 and leave at any time, it is important that the considered group key 971 management scheme is efficient and highly scalable with the group 972 size, in order to limit the impact on performance due to the Security 973 Context and keying material update. 975 8.4. Update of Security Context and Key Rotation 977 A group member can receive a message shortly after the group has been 978 rekeyed, and new security parameters and keying material have been 979 distributed by the Group Manager. In the following two cases, this 980 may result in misaligned Security Contexts between the sender and the 981 recipient. 983 In the first case, the sender protects a message using the old 984 Security Context, i.e. before having installed the new Security 985 Context. However, the recipient receives the message after having 986 installed the new Security Context, hence not being able to correctly 987 process it. A possible way to ameliorate this issue is to preserve 988 the old, recent, Security Context for a maximum amount of time 989 defined by the application. By doing so, the recipient can still try 990 to process the received message using the old retained Security 991 Context as second attempt. This tolerance preserves the processing 992 of secure messages throughout a long-lasting key rotation, as group 993 rekeying processes may likely take a long time to complete, 994 especially in large scale groups. On the other hand, a former 995 (compromised) group member can abusively take advantage of this, and 996 send messages protected with the old retained Security Context. 997 Therefore, a conservative application policy should not admit the 998 retention of old Security Contexts. 1000 In the second case, the sender protects a message using the new 1001 Security Context, but the recipient receives that request before 1002 having installed the new Security Context. Therefore, the recipient 1003 would not be able to correctly process the request and hence discards 1004 it. If the recipient receives the new Security Context shortly after 1005 that and the sender endpoint uses CoAP retransmissions, the former 1006 will still be able to receive and correctly process the message. In 1007 any case, the recipient should actively ask the Group Manager for an 1008 updated Security Context according to an application-defined policy, 1009 for instance after a given number of unsuccessfully decrypted 1010 incoming messages. 1012 8.5. Collision of Group Identifiers 1014 In case endpoints are deployed in multiple groups managed by 1015 different non-synchronized Group Managers, it is possible for Group 1016 Identifiers of different groups to coincide. 1018 However, this does not impair the security of the AEAD algorithm. In 1019 fact, as long as the Master Secret is different for different groups 1020 and this condition holds over time, AEAD keys are different among 1021 different groups. 1023 8.6. Cross-group Message Injection 1025 A same endpoint is allowed to and would likely use the same signature 1026 key in multiple OSCORE groups, possibly administered by different 1027 Group Managers. Also, the same endpoint can register several times 1028 in the same group, getting multiple unique Sender IDs. This requires 1029 that, when a sender endpoint sends a message to an OSCORE group using 1030 a Sender ID, the countersignature included in the message is 1031 explicitly bound also to that group and to the used Sender ID. 1033 To this end, the countersignature of each message protected with 1034 Group OSCORE is computed also over the value of the OSCORE option, 1035 which is part of the Additional Authenticated Data used in the 1036 signing process (see Section 3.1.2). That is, the countersignature 1037 is computed also over: the ID Context (Group ID) and the Partial IV, 1038 which are always present in group requests; as well as the Sender ID 1039 of the message originator, which is always present in all group 1040 requests and responses. 1042 Since the signing process takes as input also the ciphertext of the 1043 COSE_Encrypt0 object, the countersignature is bound not only to the 1044 intended OSCORE group, hence to the triplet (Master Secret, Master 1045 Salt, ID Context), but also to a specific Sender ID in that group and 1046 to its specific symmetric key used for AEAD encryption, hence to the 1047 quartet (Master Secret, Master Salt, ID Context, Sender ID). 1049 This makes it practically infeasible to perform the attack described 1050 below, where a malicious group member injects forged messages to a 1051 different OSCORE group than the originally intended one. Let us 1052 consider: 1054 o Two OSCORE groups G1 and G2, with ID Context (Group ID) Gid1 and 1055 Gid2, respectively. Both G1 and G2 use the AEAD cipher AES-CCM- 1056 16-64-128, i.e. the MAC of the ciphertext is 8 bytes in size. 1058 o A victim endpoint V which is member of both G1 and G2, and uses 1059 the same signature key in both groups. The endpoint V has Sender 1060 ID Sid1 in G1 and Sender ID Sid2 in G2. The pairs (Sid1, Gid1) 1061 and (Sid2, Gid2) identify the same public key of V in G1 and G2, 1062 respectively. 1064 o A malicious endpoint Z is also member of both G1 and G2. Hence, Z 1065 is able to derive the symmetric keys associated to V in G1 and G2. 1067 If countersignatures were not computed also over the value of the 1068 OSCORE option as discussed above, Z can intercept a group message M1 1069 sent by V to G1, and forge a valid signed message M2 to be injected 1070 in G2, making it appear as sent by V and valid to be accepted. 1072 More in detail, Z first intercepts a message M1 sent by V in G1, and 1073 tries to forge a message M2, by changing the value of the OSCORE 1074 option from M1 as follows: the 'kid context' is changed from G1 to 1075 G2; and the 'kid' is changed from Sid1 to Sid2. 1077 If M2 is used as a request message, there is a probability equal to 1078 2^-64 that the same unchanged MAC is successfully verified by using 1079 Sid2 as 'request_kid' and the symmetric key associated to V in G2. 1080 In such a case, the same unchanged signature would be also valid. 1081 Note that Z can check offline if a performed forgery is actually 1082 valid before sending the forged message to G2. That is, this attack 1083 has a complexity of 2^64 offline calculations. 1085 If M2 is used as a response, Z can also change the response Partial 1086 IV, until the same unchanged MAC is successfully verified by using 1087 Sid2 as 'request_kid' and the symmetric key associated to V in G2. 1088 In such a case, the same unchanged signature would be also valid. 1089 Since the Partial IV is 5 bytes in size, this requires 2^40 1090 operations to test all the Partial IVs, which can be done in real- 1091 time. Also, the probability that a single given message M1 can be 1092 used to forge a response M2 for a given request is equal to 2^-24, 1093 since there are more MAC values (8 bytes in size) than Partial IV 1094 values (5 bytes in size). 1096 Note that, by changing the Partial IV as discussed above, any member 1097 of G1 would also be able to forge a valid signed response message M2 1098 to be injected in G1. 1100 8.7. End-to-end Protection 1102 The same considerations from Section 12.1 of [RFC8613] hold for Group 1103 OSCORE. 1105 Additionally, (D)TLS and Group OSCORE can be combined for protecting 1106 message exchanges occurring over unicast. Instead, it is not 1107 possible to combine DTLS and Group OSCORE for protecting message 1108 exchanges where messages are (also) sent over multicast. 1110 8.8. Security Context Establishment 1112 The use of COSE_Encrypt0 and AEAD to protect messages as specified in 1113 this document requires an endpoint to be a member of an OSCORE group. 1115 That is, upon joining the group, the endpoint securely receives from 1116 the Group Manager the necessary input parameters, which are used to 1117 derive the Common Context and the Sender Context (see Section 2). 1118 The Group Manager ensures uniqueness of Sender IDs in the same group. 1120 Each different Recipient Context for decrypting messages from a 1121 particular sender can be derived at runtime, at the latest upon 1122 receiving a message from that sender for the first time. 1124 Countersignatures of group messages are verified by means of the 1125 public key of the respective sender endpoint. Upon nodes' joining, 1126 the Group Manager collects such public keys and MUST verify proof-of- 1127 possession of the respective private key. Later on, a group member 1128 can request from the Group Manager the public keys of other group 1129 members. 1131 The joining process can occur, for instance, as defined in 1132 [I-D.ietf-ace-key-groupcomm-oscore]. 1134 8.9. Master Secret 1136 Group OSCORE derives the Security Context using the same construction 1137 as OSCORE, and by using the Group Identifier of a group as the 1138 related ID Context. Hence, the same required properties of the 1139 Security Context parameters discussed in Section 3.3 of [RFC8613] 1140 hold for this document. 1142 With particular reference to the OSCORE Master Secret, it has to be 1143 kept secret among the members of the respective OSCORE group and the 1144 Group Manager responsible for that group. Also, the Master Secret 1145 must have a good amount of randomness, and the Group Manager can 1146 generate it offline using a good random number generator. This 1147 includes the case where the Group Manager rekeys the group by 1148 generating and distributing a new Master Secret. Randomness 1149 requirements for security are described in [RFC4086]. 1151 8.10. Replay Protection 1153 As in OSCORE, also Group OSCORE relies on sender sequence numbers 1154 included in the COSE message field 'Partial IV' and used to build 1155 AEAD nonces. 1157 As discussed in Section 5.1, an endpoint that has just joined a group 1158 is exposed to replay attack, as it is not aware of the sender 1159 sequence numbers currently used by other group members. Appendix E 1160 describes how endpoints can synchronize with senders' sequence 1161 numbers. 1163 Unless exchanges in a group rely only on unicast messages, Group 1164 OSCORE cannot be used with reliable transport. Thus, unless only 1165 unicast messages are sent in the group, it cannot be defined that 1166 only messages with sequence numbers that are equal to the previous 1167 sequence number + 1 are accepted. 1169 The processing of response messages described in Section 6.4 also 1170 ensures that a client accepts a single valid response to a given 1171 request from each replying server, unless CoAP observation is used. 1173 8.11. Client Aliveness 1175 As discussed in Section 12.5 of [RFC8613], a server may use the Echo 1176 option [I-D.ietf-core-echo-request-tag] to verify the aliveness of 1177 the client that originated a received request. This would also allow 1178 the server to (re-)synchronize with the client's sequence number, as 1179 well as to ensure that the request is fresh and has not been replayed 1180 or (purposely) delayed, if it is the first one received from that 1181 client after having joined the group or rebooted (see Appendix E.3). 1183 8.12. Cryptographic Considerations 1185 The same considerations from Section 12.6 of [RFC8613] about the 1186 maximum Sender Sequence Number hold for Group OSCORE. 1188 As discussed in Section 2.2, an endpoint that experiences a wrap- 1189 around of its own Sender Sequence Number MUST NOT transmit further 1190 messages including a Partial IV, until it has derived a new Sender 1191 Context. This prevents the endpoint to reuse the same AEAD nonces 1192 with the same Sender key. 1194 In order to renew its own Sender Context, the endpoint SHOULD inform 1195 the Group Manager, which can either renew the whole Security Context 1196 by means of group rekeying, or provide only that endpoint with a new 1197 Sender ID value. Either case, the endpoint derives a new Sender 1198 Context, and in particular a new Sender Key. 1200 Additionally, the same considerations from Section 12.6 of [RFC8613] 1201 hold for Group OSCORE, about building the AEAD nonce and the secrecy 1202 of the Security Context parameters. 1204 8.13. Message Segmentation 1206 The same considerations from Section 12.7 of [RFC8613] hold for Group 1207 OSCORE. 1209 8.14. Privacy Considerations 1211 Group OSCORE ensures end-to-end integrity protection and encryption 1212 of the message payload and all options that are not used for proxy 1213 operations. In particular, options are processed according to the 1214 same class U/I/E that they have for OSCORE. Therefore, the same 1215 privacy considerations from Section 12.8 of [RFC8613] hold for Group 1216 OSCORE. 1218 Furthermore, the following privacy considerations hold, about the 1219 OSCORE option that may reveal information on the communicating 1220 endpoints. 1222 o The 'kid' parameter, which is intended to help a recipient 1223 endpoint to find the right Recipient Context, may reveal 1224 information about the Sender Endpoint. Since both requests and 1225 responses always include the 'kid' parameter, this may reveal 1226 information about both a client sending a group request and all 1227 the possibly replying servers sending their own individual 1228 response. 1230 o The 'kid context' parameter, which is intended to help a recipient 1231 endpoint to find the right Recipient Context, reveals information 1232 about the sender endpoint. In particular, it reveals that the 1233 sender endpoint is a member of a particular OSCORE group, whose 1234 current Group ID is indicated in the 'kid context' parameter. 1235 Moreover, this parameter explicitly relates two or more 1236 communicating endpoints, as members of the same OSCORE group. 1238 Also, using the mechanisms described in Appendix E.3 to achieve 1239 sequence number synchronization with a client may reveal when a 1240 server device goes through a reboot. This can be mitigated by the 1241 server device storing the precise state of the replay window of each 1242 known client on a clean shutdown. 1244 9. IANA Considerations 1246 Note to RFC Editor: Please replace all occurrences of "[This 1247 Document]" with the RFC number of this specification and delete this 1248 paragraph. 1250 This document has the following actions for IANA. 1252 9.1. Counter Signature Parameters Registry 1254 This specification establishes the IANA "Counter Signature 1255 Parameters" Registry. The Registry has been created to use the 1256 "Expert Review Required" registration procedure [RFC8126]. Expert 1257 review guidelines are provided in Section 9.3. 1259 This registry specifies the parameters of each admitted 1260 countersignature algorithm, as well as the possible structure they 1261 are organized into. This information is used to populate the 1262 parameter Counter Signature Parameters of the Common Context (see 1263 Section 2). 1265 The columns of this table are: 1267 o Name: A value that can be used to identify an algorithm in 1268 documents for easier comprehension. Its value is taken from the 1269 'Name' column of the "COSE Algorithms" Registry. 1271 o Value: The value to be used to identify this algorithm. Its 1272 content is taken from the 'Value' column of the "COSE Algorithms" 1273 Registry. The value MUST be the same one used in the "COSE 1274 Algorithms" Registry for the entry with the same 'Name' field. 1276 o Parameters: This indicates the CBOR encoding of the parameters (if 1277 any) for the counter signature algorithm indicated by the 'Value' 1278 field. 1280 o Description: A short description of the parameters encoded in the 1281 'Parameters' field (if any). 1283 o Reference: This contains a pointer to the public specification for 1284 the field, if one exists. 1286 Initial entries in the registry are as follows. 1288 +-------------+-------+--------------+-----------------+-----------+ 1289 | Name | Value | Parameters | Description | Reference | 1290 +-------------+-------+--------------+-----------------+-----------+ 1291 | | | | | | 1292 | EdDSA | -8 | crv : int | crv value taken | [This | 1293 | | | | from the COSE | Document] | 1294 | | | | Elliptic Curve | | 1295 | | | | Registry | | 1296 | | | | | | 1297 +-------------+-------+--------------+-----------------+-----------+ 1298 | | | | | | 1299 | ES256 | -7 | crv : int | crv value taken | [This | 1300 | | | | from the COSE | Document] | 1301 | | | | Elliptic Curve | | 1302 | | | | Registry | | 1303 | | | | | | 1304 +-------------+-------+--------------+-----------------+-----------+ 1305 | | | | | | 1306 | ES384 | -35 | crv : int | crv value taken | [This | 1307 | | | | from the COSE | Document] | 1308 | | | | Elliptic Curve | | 1309 | | | | Registry | | 1310 | | | | | | 1311 +-------------+-------+--------------+-----------------+-----------+ 1312 | | | | | | 1313 | ES512 | -36 | crv : int | crv value taken | [This | 1314 | | | | from the COSE | Document] | 1315 | | | | Elliptic Curve | | 1316 | | | | Registry | | 1317 | | | | | | 1318 +-------------+-------+--------------+-----------------+-----------+ 1319 | | | | | | 1320 | PS256 | -37 | | Parameters not | [This | 1321 | | | | present | Document] | 1322 | | | | | | 1323 +-------------+-------+--------------+-----------------+-----------+ 1324 | | | | | | 1325 | PS384 | -38 | | Parameters not | [This | 1326 | | | | present | Document] | 1327 | | | | | | 1328 +-------------+-------+--------------+-----------------+-----------+ 1329 | | | | | | 1330 | PS512 | -39 | | Parameters not | [This | 1331 | | | | present | Document] | 1332 | | | | | | 1333 +-------------+-------+--------------+-----------------+-----------+ 1335 9.2. Counter Signature Key Parameters Registry 1337 This specification establishes the IANA "Counter Signature Key 1338 Parameters" Registry. The Registry has been created to use the 1339 "Expert Review Required" registration procedure [RFC8126]. Expert 1340 review guidelines are provided in Section 9.3. 1342 This registry specifies the parameters of countersignature keys for 1343 each admitted countersignature algorithm, as well as the possible 1344 structure they are organized into. This information is used to 1345 populate the parameter Counter Signature Key Parameters of the Common 1346 Context (see Section 2). 1348 The columns of this table are: 1350 o Name: A value that can be used to identify an algorithm in 1351 documents for easier comprehension. Its value is taken from the 1352 'Name' column of the "COSE Algorithms" Registry. 1354 o Value: The value to be used to identify this algorithm. Its 1355 content is taken from the 'Value' column of the "COSE Algorithms" 1356 Registry. The value MUST be the same one used in the "COSE 1357 Algorithms" Registry for the entry with the same 'Name' field. 1359 o Parameters: This indicates the CBOR encoding of the key parameters 1360 (if any) for the counter signature algorithm indicated by the 1361 'Value' field. 1363 o Description: A short description of the parameters encoded in the 1364 'Parameters' field (if any). 1366 o Reference: This contains a pointer to the public specification for 1367 the field, if one exists. 1369 Initial entries in the registry are as follows. 1371 +-------------+-------+--------------+-------------------+-----------+ 1372 | Name | Value | Parameters | Description | Reference | 1373 +-------------+-------+--------------+-------------------+-----------+ 1374 | | | | | | 1375 | EdDSA | -8 | [kty : int , | kty value is 1, | [This | 1376 | | | | as Key Type "OKP" | Document] | 1377 | | | | from the COSE Key | | 1378 | | | | Types Registry | | 1379 | | | | | | 1380 | | | | | | 1381 | | | crv : int] | crv value taken | | 1382 | | | | from the COSE | | 1383 | | | | Elliptic Curve | | 1384 | | | | Registry | | 1385 | | | | | | 1386 +-------------+-------+--------------+-------------------+-----------+ 1387 | | | | | | 1388 | ES256 | -7 | [kty : int , | kty value is 2, | [This | 1389 | | | | as Key Type "EC2" | Document] | 1390 | | | | from the COSE Key | | 1391 | | | | Types Registry | | 1392 | | | | | | 1393 | | | | | | 1394 | | | crv : int] | crv value taken | | 1395 | | | | from the COSE | | 1396 | | | | Elliptic Curve | | 1397 | | | | Registry | | 1398 | | | | | | 1399 +-------------+-------+--------------+-------------------+-----------+ 1400 | | | | | | 1401 | ES384 | -35 | [kty : int , | kty value is 2, | [This | 1402 | | | | as Key Type "EC2" | Document] | 1403 | | | | from the COSE Key | | 1404 | | | | Types Registry | | 1405 | | | | | | 1406 | | | crv : int] | crv value taken | | 1407 | | | | from the COSE | | 1408 | | | | Elliptic Curve | | 1409 | | | | Registry | | 1410 | | | | | | 1411 +-------------+-------+--------------+-------------------+-----------+ 1412 | | | | | | 1413 | ES512 | -36 | [kty : int , | kty value is 2, | [This | 1414 | | | | as Key Type "EC2" | Document] | 1415 | | | | from the COSE Key | | 1416 | | | | Types Registry | | 1417 | | | | | | 1418 | | | crv : int] | crv value taken | | 1419 | | | | from the COSE | | 1420 | | | | Elliptic Curve | | 1421 | | | | Registry | | 1422 | | | | | | 1423 +-------------+-------+--------------+-------------------+-----------+ 1424 | | | | | | 1425 | PS256 | -37 | kty : int | kty value is 3, | [This | 1426 | | | | as Key Type "RSA" | Document] | 1427 | | | | from the COSE Key | | 1428 | | | | Types Registry | | 1429 | | | | | | 1430 +-------------+-------+--------------+-------------------+-----------+ 1431 | | | | | | 1432 | PS384 | -38 | kty : int | kty value is 3, | [This | 1433 | | | | as Key Type "RSA" | Document] | 1434 | | | | from the COSE Key | | 1435 | | | | Types Registry | | 1436 | | | | | | 1437 +-------------+-------+--------------+-------------------+-----------+ 1438 | | | | | | 1439 | PS512 | -39 | kty : int | kty value is 3, | [This | 1440 | | | | as Key Type "RSA" | Document] | 1441 | | | | from the COSE Key | | 1442 | | | | Types Registry | | 1443 | | | | | | 1444 +-------------+-------+--------------+-------------------+-----------+ 1446 9.3. Expert Review Instructions 1448 The IANA Registries established in this document are defined as 1449 "Expert Review". This section gives some general guidelines for what 1450 the experts should be looking for, but they are being designated as 1451 experts for a reason so they should be given substantial latitude. 1453 Expert reviewers should take into consideration the following points: 1455 o Clarity and correctness of registrations. Experts are expected to 1456 check the clarity of purpose and use of the requested entries. 1457 Experts should inspect the entry for the algorithm considered, to 1458 verify the conformity of the encoding proposed against the 1459 theoretical algorithm, including completeness of the 'Parameters' 1460 column. Expert needs to make sure values are taken from the right 1461 registry, when that's required. Expert should consider requesting 1462 an opinion on the correctness of registered parameters from the 1463 CBOR Object Signing and Encryption Working Group (COSE). 1464 Encodings that do not meet these objective of clarity and 1465 completeness should not be registered. 1467 o Duplicated registration and point squatting should be discouraged. 1468 Reviewers are encouraged to get sufficient information for 1469 registration requests to ensure that the usage is not going to 1470 duplicate one that is already registered and that the point is 1471 likely to be used in deployments. 1473 o Experts should take into account the expected usage of fields when 1474 approving point assignment. The length of the 'Parameters' 1475 encoding should be weighed against the usage of the entry, 1476 considering the size of device it will be used on. Additionally, 1477 the length of the encoded value should be weighed against how many 1478 code points of that length are left, the size of device it will be 1479 used on, and the number of code points left that encode to that 1480 size. 1482 o Specifications are recommended. When specifications are not 1483 provided, the description provided needs to have sufficient 1484 information to verify the points above. 1486 10. References 1488 10.1. Normative References 1490 [I-D.dijk-core-groupcomm-bis] 1491 Dijk, E., Wang, C., and M. Tiloca, "Group Communication 1492 for the Constrained Application Protocol (CoAP)", draft- 1493 dijk-core-groupcomm-bis-01 (work in progress), July 2019. 1495 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1496 Requirement Levels", BCP 14, RFC 2119, 1497 DOI 10.17487/RFC2119, March 1997, 1498 . 1500 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 1501 "Randomness Requirements for Security", BCP 106, RFC 4086, 1502 DOI 10.17487/RFC4086, June 2005, 1503 . 1505 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 1506 Algorithm (DSA) and Elliptic Curve Digital Signature 1507 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 1508 2013, . 1510 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 1511 Application Protocol (CoAP)", RFC 7252, 1512 DOI 10.17487/RFC7252, June 2014, 1513 . 1515 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 1516 Signature Algorithm (EdDSA)", RFC 8032, 1517 DOI 10.17487/RFC8032, January 2017, 1518 . 1520 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1521 Writing an IANA Considerations Section in RFCs", BCP 26, 1522 RFC 8126, DOI 10.17487/RFC8126, June 2017, 1523 . 1525 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 1526 RFC 8152, DOI 10.17487/RFC8152, July 2017, 1527 . 1529 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1530 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1531 May 2017, . 1533 [RFC8613] Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 1534 "Object Security for Constrained RESTful Environments 1535 (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019, 1536 . 1538 10.2. Informative References 1540 [I-D.ietf-ace-key-groupcomm-oscore] 1541 Tiloca, M., Park, J., and F. Palombini, "Key Management 1542 for OSCORE Groups in ACE", draft-ietf-ace-key-groupcomm- 1543 oscore-03 (work in progress), November 2019. 1545 [I-D.ietf-ace-oauth-authz] 1546 Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and 1547 H. Tschofenig, "Authentication and Authorization for 1548 Constrained Environments (ACE) using the OAuth 2.0 1549 Framework (ACE-OAuth)", draft-ietf-ace-oauth-authz-25 1550 (work in progress), October 2019. 1552 [I-D.ietf-core-echo-request-tag] 1553 Amsuess, C., Mattsson, J., and G. Selander, "CoAP: Echo, 1554 Request-Tag, and Token Processing", draft-ietf-core-echo- 1555 request-tag-08 (work in progress), November 2019. 1557 [I-D.somaraju-ace-multicast] 1558 Somaraju, A., Kumar, S., Tschofenig, H., and W. Werner, 1559 "Security for Low-Latency Group Communication", draft- 1560 somaraju-ace-multicast-02 (work in progress), October 1561 2016. 1563 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 1564 "Transmission of IPv6 Packets over IEEE 802.15.4 1565 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 1566 . 1568 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 1569 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 1570 . 1572 [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 1573 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, 1574 DOI 10.17487/RFC6282, September 2011, 1575 . 1577 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 1578 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 1579 January 2012, . 1581 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 1582 Constrained-Node Networks", RFC 7228, 1583 DOI 10.17487/RFC7228, May 2014, 1584 . 1586 [RFC7390] Rahman, A., Ed. and E. Dijk, Ed., "Group Communication for 1587 the Constrained Application Protocol (CoAP)", RFC 7390, 1588 DOI 10.17487/RFC7390, October 2014, 1589 . 1591 [RFC7641] Hartke, K., "Observing Resources in the Constrained 1592 Application Protocol (CoAP)", RFC 7641, 1593 DOI 10.17487/RFC7641, September 2015, 1594 . 1596 Appendix A. Assumptions and Security Objectives 1598 This section presents a set of assumptions and security objectives 1599 for the approach described in this document. 1601 A.1. Assumptions 1603 The following assumptions are assumed to be already addressed and are 1604 out of the scope of this document. 1606 o Multicast communication topology: this document considers both 1607 1-to-N (one sender and multiple recipients) and M-to-N (multiple 1608 senders and multiple recipients) communication topologies. The 1609 1-to-N communication topology is the simplest group communication 1610 scenario that would serve the needs of a typical Low-power and 1611 Lossy Network (LLN). Examples of use cases that benefit from 1612 secure group communication are provided in Appendix B. 1614 In a 1-to-N communication model, only a single client transmits 1615 data to the group, in the form of request messages; in an M-to-N 1616 communication model (where M and N do not necessarily have the 1617 same value), M group members are clients. According to [RFC7390], 1618 any possible proxy entity is supposed to know about the clients in 1619 the group and to not perform aggregation of response messages from 1620 multiple servers. Also, every client expects and is able to 1621 handle multiple response messages associated to a same request 1622 sent to the group. 1624 o Group size: security solutions for group communication should be 1625 able to adequately support different and possibly large groups. 1626 The group size is the current number of members in a group. In 1627 the use cases mentioned in this document, the number of clients 1628 (normally the controlling devices) is expected to be much smaller 1629 than the number of servers (i.e. the controlled devices). A 1630 security solution for group communication that supports 1 to 50 1631 clients would be able to properly cover the group sizes required 1632 for most use cases that are relevant for this document. The 1633 maximum group size is expected to be in the range of 2 to 100 1634 devices. Groups larger than that should be divided into smaller 1635 independent groups. 1637 o Communication with the Group Manager: an endpoint must use a 1638 secure dedicated channel when communicating with the Group 1639 Manager, also when not registered as group member. 1641 o Provisioning and management of Security Contexts: an OSCORE 1642 Security Context must be established among the group members. A 1643 secure mechanism must be used to generate, revoke and 1644 (re-)distribute keying material, multicast security policies and 1645 security parameters in the group. The actual provisioning and 1646 management of the Security Context is out of the scope of this 1647 document. 1649 o Multicast data security ciphersuite: all group members must agree 1650 on a ciphersuite to provide authenticity, integrity and 1651 confidentiality of messages in the group. The ciphersuite is 1652 specified as part of the Security Context. 1654 o Backward security: a new device joining the group should not have 1655 access to any old Security Contexts used before its joining. This 1656 ensures that a new group member is not able to decrypt 1657 confidential data sent before it has joined the group. The 1658 adopted key management scheme should ensure that the Security 1659 Context is updated to ensure backward confidentiality. The actual 1660 mechanism to update the Security Context and renew the group 1661 keying material upon a group member's joining has to be defined as 1662 part of the group key management scheme. 1664 o Forward security: entities that leave the group should not have 1665 access to any future Security Contexts or message exchanged within 1666 the group after their leaving. This ensures that a former group 1667 member is not able to decrypt confidential data sent within the 1668 group anymore. Also, it ensures that a former member is not able 1669 to send encrypted and/or integrity protected messages to the group 1670 anymore. The actual mechanism to update the Security Context and 1671 renew the group keying material upon a group member's leaving has 1672 to be defined as part of the group key management scheme. 1674 A.2. Security Objectives 1676 The approach described in this document aims at fulfilling the 1677 following security objectives: 1679 o Data replay protection: replayed group request messages or 1680 response messages must be detected. 1682 o Group-level data confidentiality: messages sent within the group 1683 shall be encrypted if privacy sensitive data is exchanged within 1684 the group. This document considers group-level data 1685 confidentiality since messages are encrypted at a group level, 1686 i.e. in such a way that they can be decrypted by any member of the 1687 group, but not by an external adversary or other external 1688 entities. 1690 o Source authentication: messages sent within the group shall be 1691 authenticated. That is, it is essential to ensure that a message 1692 is originated by a member of the group in the first place, and in 1693 particular by a specific member of the group. 1695 o Message integrity: messages sent within the group shall be 1696 integrity protected. That is, it is essential to ensure that a 1697 message has not been tampered with by an external adversary or 1698 other external entities which are not group members. 1700 o Message ordering: it must be possible to determine the ordering of 1701 messages coming from a single sender. In accordance with OSCORE 1702 [RFC8613], this results in providing relative freshness of group 1703 requests and absolute freshness of responses. It is not required 1704 to determine ordering of messages from different senders. 1706 Appendix B. List of Use Cases 1708 Group Communication for CoAP [RFC7390][I-D.dijk-core-groupcomm-bis] 1709 provides the necessary background for multicast-based CoAP 1710 communication, with particular reference to low-power and lossy 1711 networks (LLNs) and resource constrained environments. The 1712 interested reader is encouraged to first read 1713 [RFC7390][I-D.dijk-core-groupcomm-bis] to understand the non-security 1714 related details. This section discusses a number of use cases that 1715 benefit from secure group communication. Specific security 1716 requirements for these use cases are discussed in Appendix A. 1718 o Lighting control: consider a building equipped with IP-connected 1719 lighting devices, switches, and border routers. The devices are 1720 organized into groups according to their physical location in the 1721 building. For instance, lighting devices and switches in a room 1722 or corridor can be configured as members of a single group. 1723 Switches are then used to control the lighting devices by sending 1724 on/off/dimming commands to all lighting devices in a group, while 1725 border routers connected to an IP network backbone (which is also 1726 multicast-enabled) can be used to interconnect routers in the 1727 building. Consequently, this would also enable logical groups to 1728 be formed even if devices in the lighting group may be physically 1729 in different subnets (e.g. on wired and wireless networks). 1730 Connectivity between lighting devices may be realized, for 1731 instance, by means of IPv6 and (border) routers supporting 6LoWPAN 1732 [RFC4944][RFC6282]. Group communication enables synchronous 1733 operation of a group of connected lights, ensuring that the light 1734 preset (e.g. dimming level or color) of a large group of 1735 luminaires are changed at the same perceived time. This is 1736 especially useful for providing a visual synchronicity of light 1737 effects to the user. As a practical guideline, events within a 1738 200 ms interval are perceived as simultaneous by humans, which is 1739 necessary to ensure in many setups. Devices may reply back to the 1740 switches that issue on/off/dimming commands, in order to report 1741 about the execution of the requested operation (e.g. OK, failure, 1742 error) and their current operational status. In a typical 1743 lighting control scenario, a single switch is the only entity 1744 responsible for sending commands to a group of lighting devices. 1745 In more advanced lighting control use cases, a M-to-N 1746 communication topology would be required, for instance in case 1747 multiple sensors (presence or day-light) are responsible to 1748 trigger events to a group of lighting devices. Especially in 1749 professional lighting scenarios, the roles of client and server 1750 are configured by the lighting commissioner, and devices strictly 1751 follow those roles. 1753 o Integrated building control: enabling Building Automation and 1754 Control Systems (BACSs) to control multiple heating, ventilation 1755 and air-conditioning units to pre-defined presets. Controlled 1756 units can be organized into groups in order to reflect their 1757 physical position in the building, e.g. devices in the same room 1758 can be configured as members of a single group. As a practical 1759 guideline, events within intervals of seconds are typically 1760 acceptable. Controlled units are expected to possibly reply back 1761 to the BACS issuing control commands, in order to report about the 1762 execution of the requested operation (e.g. OK, failure, error) 1763 and their current operational status. 1765 o Software and firmware updates: software and firmware updates often 1766 comprise quite a large amount of data. This can overload a Low- 1767 power and Lossy Network (LLN) that is otherwise typically used to 1768 deal with only small amounts of data, on an infrequent base. 1769 Rather than sending software and firmware updates as unicast 1770 messages to each individual device, multicasting such updated data 1771 to a larger group of devices at once displays a number of 1772 benefits. For instance, it can significantly reduce the network 1773 load and decrease the overall time latency for propagating this 1774 data to all devices. Even if the complete whole update process 1775 itself is secured, securing the individual messages is important, 1776 in case updates consist of relatively large amounts of data. In 1777 fact, checking individual received data piecemeal for tampering 1778 avoids that devices store large amounts of partially corrupted 1779 data and that they detect tampering hereof only after all data has 1780 been received. Devices receiving software and firmware updates 1781 are expected to possibly reply back, in order to provide a 1782 feedback about the execution of the update operation (e.g. OK, 1783 failure, error) and their current operational status. 1785 o Parameter and configuration update: by means of multicast 1786 communication, it is possible to update the settings of a group of 1787 similar devices, both simultaneously and efficiently. Possible 1788 parameters are related, for instance, to network load management 1789 or network access controls. Devices receiving parameter and 1790 configuration updates are expected to possibly reply back, to 1791 provide a feedback about the execution of the update operation 1792 (e.g. OK, failure, error) and their current operational status. 1794 o Commissioning of Low-power and Lossy Network (LLN) systems: a 1795 commissioning device is responsible for querying all devices in 1796 the local network or a selected subset of them, in order to 1797 discover their presence, and be aware of their capabilities, 1798 default configuration, and operating conditions. Queried devices 1799 displaying similarities in their capabilities and features, or 1800 sharing a common physical location can be configured as members of 1801 a single group. Queried devices are expected to reply back to the 1802 commissioning device, in order to notify their presence, and 1803 provide the requested information and their current operational 1804 status. 1806 o Emergency multicast: a particular emergency related information 1807 (e.g. natural disaster) is generated and multicast by an emergency 1808 notifier, and relayed to multiple devices. The latter may reply 1809 back to the emergency notifier, in order to provide their feedback 1810 and local information related to the ongoing emergency. This kind 1811 of setups should additionally rely on a fault tolerance multicast 1812 algorithm, such as Multicast Protocol for Low-Power and Lossy 1813 Networks (MPL). 1815 Appendix C. Example of Group Identifier Format 1817 This section provides an example of how the Group Identifier (Gid) 1818 can be specifically formatted. That is, the Gid can be composed of 1819 two parts, namely a Group Prefix and a Group Epoch. 1821 For each group, the Group Prefix is constant over time and is 1822 uniquely defined in the set of all the groups associated to the same 1823 Group Manager. The choice of the Group Prefix for a given group's 1824 Security Context is application specific. The size of the Group 1825 Prefix directly impact on the maximum number of distinct groups under 1826 the same Group Manager. 1828 The Group Epoch is set to 0 upon the group's initialization, and is 1829 incremented by 1 upon completing each renewal of the Security Context 1830 and keying material in the group (see Section 2.1). In particular, 1831 once a new Master Secret has been distributed to the group, all the 1832 group members increment by 1 the Group Epoch in the Group Identifier 1833 of that group. 1835 As an example, a 3-byte Group Identifier can be composed of: i) a 1836 1-byte Group Prefix '0xb1' interpreted as a raw byte string; and ii) 1837 a 2-byte Group Epoch interpreted as an unsigned integer ranging from 1838 0 to 65535. Then, after having established the Common Context 61532 1839 times in the group, its Group Identifier will assume value 1840 '0xb1f05c'. 1842 Using an immutable Group Prefix for a group assumes that enough time 1843 elapses between two consecutive usages of the same Group Epoch value 1844 in that group. This ensures that the Gid value is temporally unique 1845 during the lifetime of a given message. Thus, the expected highest 1846 rate for addition/removal of group members and consequent group 1847 rekeying should be taken into account for a proper dimensioning of 1848 the Group Epoch size. 1850 As discussed in Section 8.5, if endpoints are deployed in multiple 1851 groups managed by different non-synchronized Group Managers, it is 1852 possible that Group Identifiers of different groups coincide at some 1853 point in time. In this case, a recipient has to handle coinciding 1854 Group Identifiers, and has to try using different Security Contexts 1855 to process an incoming message, until the right one is found and the 1856 message is correctly verified. Therefore, it is favourable that 1857 Group Identifiers from different Group Managers have a size that 1858 result in a small probability of collision. How small this 1859 probability should be is up to system designers. 1861 Appendix D. Set-up of New Endpoints 1863 An endpoint joins a group by explicitly interacting with the 1864 responsible Group Manager. When becoming members of a group, 1865 endpoints are not required to know how many and what endpoints are in 1866 the same group. 1868 Communications between a joining endpoint and the Group Manager rely 1869 on the CoAP protocol and must be secured. Specific details on how to 1870 secure communications between joining endpoints and a Group Manager 1871 are out of the scope of this document. 1873 The Group Manager must verify that the joining endpoint is authorized 1874 to join the group. To this end, the Group Manager can directly 1875 authorize the joining endpoint, or expect it to provide authorization 1876 evidence previously obtained from a trusted entity. Further details 1877 about the authorization of joining endpoints are out of scope. 1879 In case of successful authorization check, the Group Manager 1880 generates a Sender ID assigned to the joining endpoint, before 1881 proceeding with the rest of the join process. That is, the Group 1882 Manager provides the joining endpoint with the keying material and 1883 parameters to initialize the Security Context (see Section 2). The 1884 actual provisioning of keying material and parameters to the joining 1885 endpoint is out of the scope of this document. 1887 It is RECOMMENDED that the join process adopts the approach described 1888 in [I-D.ietf-ace-key-groupcomm-oscore] and based on the ACE framework 1889 for Authentication and Authorization in constrained environments 1890 [I-D.ietf-ace-oauth-authz]. 1892 Appendix E. Examples of Synchronization Approaches 1894 This section describes three possible approaches that can be 1895 considered by server endpoints to synchronize with sender sequence 1896 numbers of client endpoints sending group requests. 1898 E.1. Best-Effort Synchronization 1900 Upon receiving a group request from a client, a server does not take 1901 any action to synchonize with the sender sequence number of that 1902 client. This provides no assurance at all as to message freshness, 1903 which can be acceptable in non-critical use cases. 1905 E.2. Baseline Synchronization 1907 Upon receiving a group request from a given client for the first 1908 time, a server initializes its last-seen sender sequence number in 1909 its Recipient Context associated to that client. However, the server 1910 drops the group request without delivering it to the application 1911 layer. This provides a reference point to identify if future group 1912 requests from the same client are fresher than the last one received. 1914 A replay time interval exists, between when a possibly replayed or 1915 delayed message is originally transmitted by a given client and the 1916 first authentic fresh message from that same client is received. 1917 This can be acceptable for use cases where servers admit such a 1918 trade-off between performance and assurance of message freshness. 1920 E.3. Challenge-Response Synchronization 1922 A server performs a challenge-response exchange with a client, by 1923 using the Echo Option for CoAP described in Section 2 of 1924 [I-D.ietf-core-echo-request-tag] and according to Appendix B.1.2 of 1925 [RFC8613]. 1927 That is, upon receiving a group request from a particular client for 1928 the first time, the server processes the message as described in 1929 Section 6.2 of this specification, but, even if valid, does not 1930 deliver it to the application. Instead, the server replies to the 1931 client with an OSCORE protected 4.01 (Unauthorized) response message, 1932 including only the Echo Option and no diagnostic payload. The server 1933 stores the option value included therein. 1935 Upon receiving a 4.01 (Unauthorized) response that includes an Echo 1936 Option and originates from a verified group member, a client sends a 1937 request as a unicast message addressed to the same server, echoing 1938 the Echo Option value. In particular, the client does not 1939 necessarily resend the same group request, but can instead send a 1940 more recent one, if the application permits it. This makes it 1941 possible for the client to not retain previously sent group requests 1942 for full retransmission, unless the application explicitly requires 1943 otherwise. Either case, the client uses the sender sequence number 1944 value currently stored in its own Sender Context. If the client 1945 stores group requests for possible retransmission with the Echo 1946 Option, it should not store a given request for longer than a pre- 1947 configured time interval. Note that the unicast request echoing the 1948 Echo Option is correctly treated and processed as a message, since 1949 the 'kid context' field including the Group Identifier of the OSCORE 1950 group is still present in the OSCORE Option as part of the COSE 1951 object (see Section 3). 1953 Upon receiving the unicast request including the Echo Option, the 1954 server verifies that the option value equals the stored and 1955 previously sent value; otherwise, the request is silently discarded. 1956 Then, the server verifies that the unicast request has been received 1957 within a pre-configured time interval, as described in 1958 [I-D.ietf-core-echo-request-tag]. In such a case, the request is 1959 further processed and verified; otherwise, it is silently discarded. 1960 Finally, the server updates the Recipient Context associated to that 1961 client, by setting the Replay Window according to the Sequence Number 1962 from the unicast request conveying the Echo Option. The server 1963 either delivers the request to the application if it is an actual 1964 retransmission of the original one, or discards it otherwise. 1965 Mechanisms to signal whether the resent request is a full 1966 retransmission of the original one are out of the scope of this 1967 specification. 1969 In case it does not receive a valid unicast request including the 1970 Echo Option within the configured time interval, the server endpoint 1971 should perform the same challenge-response upon receiving the next 1972 group request from that same client. 1974 A server should not deliver group requests from a given client to the 1975 application until one valid request from that same client has been 1976 verified as fresh, as conveying an echoed Echo Option 1977 [I-D.ietf-core-echo-request-tag]. Also, a server may perform the 1978 challenge-response described above at any time, if synchronization 1979 with sender sequence numbers of clients is (believed to be) lost, for 1980 instance after a device reboot. It is the role of the application to 1981 define under what circumstances sender sequence numbers lose 1982 synchronization. This can include a minimum gap between the sender 1983 sequence number of the latest accepted group request from a client 1984 and the sender sequence number of a group request just received from 1985 the same client. A client has to be always ready to perform the 1986 challenge-response based on the Echo Option in case a server starts 1987 it. 1989 Note that endpoints configured as silent servers are not able to 1990 perform the challenge-response described above, as they do not store 1991 a Sender Context to secure the 4.01 (Unauthorized) response to the 1992 client. Therefore, silent servers should adopt alternative 1993 approaches to achieve and maintain synchronization with sender 1994 sequence numbers of clients. 1996 This approach provides an assurance of absolute message freshness. 1997 However, it can result in an impact on performance which is 1998 undesirable or unbearable, especially in large groups where many 1999 endpoints at the same time might join as new members or lose 2000 synchronization. 2002 Appendix F. No Verification of Signatures 2004 There are some application scenarios using group communication that 2005 have particularly strict requirements. One example of this is the 2006 requirement of low message latency in non-emergency lighting 2007 applications [I-D.somaraju-ace-multicast]. For those applications 2008 which have tight performance constraints and relaxed security 2009 requirements, it can be inconvenient for some endpoints to verify 2010 digital signatures in order to assert source authenticity of received 2011 messages. In other cases, the signature verification can be deferred 2012 or only checked for specific actions. For instance, a command to 2013 turn a bulb on where the bulb is already on does not need the 2014 signature to be checked. In such situations, the counter signature 2015 needs to be included anyway as part of the message, so that an 2016 endpoint that needs to validate the signature for any reason has the 2017 ability to do so. 2019 In this specification, it is NOT RECOMMENDED that endpoints do not 2020 verify the counter signature of received messages. However, it is 2021 recognized that there may be situations where it is not always 2022 required. The consequence of not doing the signature validation is 2023 that security in the group is based only on the group-authenticity of 2024 the shared keying material used for encryption. That is, endpoints 2025 in the group have evidence that a received message has been 2026 originated by a group member, although not specifically identifiable 2027 in a secure way. This can violate a number of security requirements, 2028 as the compromise of any element in the group means that the attacker 2029 has the ability to control the entire group. Even worse, the group 2030 may not be limited in scope, and hence the same keying material might 2031 be used not only for light bulbs but for locks as well. Therefore, 2032 extreme care must be taken in situations where the security 2033 requirements are relaxed, so that deployment of the system will 2034 always be done safely. 2036 Appendix G. Document Updates 2038 RFC EDITOR: PLEASE REMOVE THIS SECTION. 2040 G.1. Version -05 to -06 2042 o Group IDs mandated to be unique under the same Group Manager. 2044 o Clarifications on parameter update upon group rekeying. 2046 o Updated external_aad structures. 2048 o Dynamic derivation of Recipient Contexts made optional and 2049 application specific. 2051 o Optional 4.00 response for failed signature verification on the 2052 server. 2054 o Removed client handling of duplicated responses to multicast 2055 requests. 2057 o Additional considerations on public key retrieval and group 2058 rekeying. 2060 o Added Group Manager responsibility on validating public keys. 2062 o Updates IANA registries. 2064 o Reference to RFC 8613. 2066 o Editorial improvements. 2068 G.2. Version -04 to -05 2070 o Added references to draft-dijk-core-groupcomm-bis. 2072 o New parameter Counter Signature Key Parameters (Section 2). 2074 o Clarification about Recipient Contexts (Section 2). 2076 o Two different external_aad for encrypting and signing 2077 (Section 3.1). 2079 o Updated response verification to handle Observe notifications 2080 (Section 6.4). 2082 o Extended Security Considerations (Section 8). 2084 o New "Counter Signature Key Parameters" IANA Registry 2085 (Section 9.2). 2087 G.3. Version -03 to -04 2089 o Added the new "Counter Signature Parameters" in the Common Context 2090 (see Section 2). 2092 o Added recommendation on using "deterministic ECDSA" if ECDSA is 2093 used as counter signature algorithm (see Section 2). 2095 o Clarified possible asynchronous retrieval of key material from the 2096 Group Manager, in order to process incoming messages (see 2097 Section 2). 2099 o Structured Section 3 into subsections. 2101 o Added the new 'par_countersign' to the aad_array of the 2102 external_aad (see Section 3.1). 2104 o Clarified non reliability of 'kid' as identity indicator for a 2105 group member (see Section 2.1). 2107 o Described possible provisioning of new Sender ID in case of 2108 Partial IV wrap-around (see Section 2.2). 2110 o The former signature bit in the Flag Byte of the OSCORE option 2111 value is reverted to reserved (see Section 4.1). 2113 o Updated examples of compressed COSE object, now with the sixth 2114 less significant bit in the Flag Byte of the OSCORE option value 2115 set to 0 (see Section 4.3). 2117 o Relaxed statements on sending error messages (see Section 6). 2119 o Added explicit step on computing the counter signature for 2120 outgoing messages (see Setions 6.1 and 6.3). 2122 o Handling of just created Recipient Contexts in case of 2123 unsuccessful message verification (see Sections 6.2 and 6.4). 2125 o Handling of replied/repeated responses on the client (see 2126 Section 6.4). 2128 o New IANA Registry "Counter Signature Parameters" (see 2129 Section 9.1). 2131 G.4. Version -02 to -03 2133 o Revised structure and phrasing for improved readability and better 2134 alignment with draft-ietf-core-object-security. 2136 o Added discussion on wrap-Around of Partial IVs (see Section 2.2). 2138 o Separate sections for the COSE Object (Section 3) and the OSCORE 2139 Header Compression (Section 4). 2141 o The countersignature is now appended to the encrypted payload of 2142 the OSCORE message, rather than included in the OSCORE Option (see 2143 Section 4). 2145 o Extended scope of Section 5, now titled " Message Binding, 2146 Sequence Numbers, Freshness and Replay Protection". 2148 o Clarifications about Non-Confirmable messages in Section 5.1 2149 "Synchronization of Sender Sequence Numbers". 2151 o Clarifications about error handling in Section 6 "Message 2152 Processing". 2154 o Compacted list of responsibilities of the Group Manager in 2155 Section 7. 2157 o Revised and extended security considerations in Section 8. 2159 o Added IANA considerations for the OSCORE Flag Bits Registry in 2160 Section 9. 2162 o Revised Appendix D, now giving a short high-level description of a 2163 new endpoint set-up. 2165 G.5. Version -01 to -02 2167 o Terminology has been made more aligned with RFC7252 and draft- 2168 ietf-core-object-security: i) "client" and "server" replace the 2169 old "multicaster" and "listener", respectively; ii) "silent 2170 server" replaces the old "pure listener". 2172 o Section 2 has been updated to have the Group Identifier stored in 2173 the 'ID Context' parameter defined in draft-ietf-core-object- 2174 security. 2176 o Section 3 has been updated with the new format of the Additional 2177 Authenticated Data. 2179 o Major rewriting of Section 4 to better highlight the differences 2180 with the message processing in draft-ietf-core-object-security. 2182 o Added Sections 7.2 and 7.3 discussing security considerations 2183 about uniqueness of (key, nonce) and collision of group 2184 identifiers, respectively. 2186 o Minor updates to Appendix A.1 about assumptions on multicast 2187 communication topology and group size. 2189 o Updated Appendix C on format of group identifiers, with practical 2190 implications of possible collisions of group identifiers. 2192 o Updated Appendix D.2, adding a pointer to draft-palombini-ace-key- 2193 groupcomm about retrieval of nodes' public keys through the Group 2194 Manager. 2196 o Minor updates to Appendix E.3 about Challenge-Response 2197 synchronization of sequence numbers based on the Echo option from 2198 draft-ietf-core-echo-request-tag. 2200 G.6. Version -00 to -01 2202 o Section 1.1 has been updated with the definition of group as 2203 "security group". 2205 o Section 2 has been updated with: 2207 * Clarifications on etablishment/derivation of Security Contexts. 2209 * A table summarizing the the additional context elements 2210 compared to OSCORE. 2212 o Section 3 has been updated with: 2214 * Examples of request and response messages. 2216 * Use of CounterSignature0 rather than CounterSignature. 2218 * Additional Authenticated Data including also the signature 2219 algorithm, while not including the Group Identifier any longer. 2221 o Added Section 6, listing the responsibilities of the Group 2222 Manager. 2224 o Added Appendix A (former section), including assumptions and 2225 security objectives. 2227 o Appendix B has been updated with more details on the use cases. 2229 o Added Appendix C, providing an example of Group Identifier format. 2231 o Appendix D has been updated to be aligned with draft-palombini- 2232 ace-key-groupcomm. 2234 Acknowledgments 2236 The authors sincerely thank Stefan Beck, Rolf Blom, Carsten Bormann, 2237 Esko Dijk, Klaus Hartke, Rikard Hoeglund, Richard Kelsey, John 2238 Mattsson, Dave Robin, Jim Schaad, Ludwig Seitz and Peter van der Stok 2239 for their feedback and comments. 2241 The work on this document has been partly supported by VINNOVA and 2242 the Celtic-Next project CRITISEC; and by the EIT-Digital High Impact 2243 Initiative ACTIVE. 2245 Authors' Addresses 2247 Marco Tiloca 2248 RISE AB 2249 Isafjordsgatan 22 2250 Kista SE-16440 Stockholm 2251 Sweden 2253 Email: marco.tiloca@ri.se 2255 Goeran Selander 2256 Ericsson AB 2257 Torshamnsgatan 23 2258 Kista SE-16440 Stockholm 2259 Sweden 2261 Email: goran.selander@ericsson.com 2263 Francesca Palombini 2264 Ericsson AB 2265 Torshamnsgatan 23 2266 Kista SE-16440 Stockholm 2267 Sweden 2269 Email: francesca.palombini@ericsson.com 2271 Jiye Park 2272 Universitaet Duisburg-Essen 2273 Schuetzenbahn 70 2274 Essen 45127 2275 Germany 2277 Email: ji-ye.park@uni-due.de