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