idnits 2.17.1 draft-ietf-core-oscore-groupcomm-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 02, 2020) is 1271 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) -- Looks like a reference, but probably isn't: '1' on line 3150 -- Looks like a reference, but probably isn't: '6' on line 3149 -- Looks like a reference, but probably isn't: '2' on line 3152 -- Looks like a reference, but probably isn't: '3' on line 3155 -- Possible downref: Normative reference to a draft: ref. 'I-D.ietf-cbor-7049bis' == Outdated reference: A later version (-11) exists of draft-ietf-core-groupcomm-bis-02 == Outdated reference: A later version (-10) exists of draft-ietf-cose-countersign-01 -- Possible downref: Normative reference to a draft: ref. 'I-D.ietf-cose-countersign' ** Downref: Normative reference to an Informational draft: draft-ietf-cose-rfc8152bis-algs (ref. 'I-D.ietf-cose-rfc8152bis-algs') == Outdated reference: A later version (-15) exists of draft-ietf-cose-rfc8152bis-struct-14 -- Possible downref: Normative reference to a draft: ref. 'I-D.ietf-cose-rfc8152bis-struct' -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST-800-56A' ** Downref: Normative reference to an Informational RFC: RFC 7748 ** Downref: Normative reference to an Informational RFC: RFC 8032 == Outdated reference: A later version (-18) exists of draft-ietf-ace-key-groupcomm-10 == Outdated reference: A later version (-16) exists of draft-ietf-ace-key-groupcomm-oscore-09 == Outdated reference: A later version (-46) exists of draft-ietf-ace-oauth-authz-35 == Outdated reference: A later version (-14) exists of draft-ietf-core-echo-request-tag-10 == Outdated reference: A later version (-23) exists of draft-ietf-lwig-curve-representations-12 == Outdated reference: A later version (-07) exists of draft-ietf-lwig-security-protocol-comparison-04 == Outdated reference: A later version (-43) exists of draft-ietf-tls-dtls13-38 == Outdated reference: A later version (-04) exists of draft-mattsson-cfrg-det-sigs-with-noise-02 == Outdated reference: A later version (-05) exists of draft-tiloca-core-observe-multicast-notifications-04 -- Obsolete informational reference (is this intentional?): RFC 6347 (Obsoleted by RFC 9147) Summary: 3 errors (**), 0 flaws (~~), 13 warnings (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 CoRE Working Group M. Tiloca 3 Internet-Draft RISE AB 4 Intended status: Standards Track G. Selander 5 Expires: May 6, 2021 F. Palombini 6 Ericsson AB 7 J. Park 8 Universitaet Duisburg-Essen 9 November 02, 2020 11 Group OSCORE - Secure Group Communication for CoAP 12 draft-ietf-core-oscore-groupcomm-10 14 Abstract 16 This document defines Group Object Security for Constrained RESTful 17 Environments (Group OSCORE), providing end-to-end security of CoAP 18 messages exchanged between members of a group, e.g. sent over IP 19 multicast. In particular, the described approach defines how OSCORE 20 is used in a group communication setting to provide source 21 authentication for CoAP group requests, sent by a client to multiple 22 servers, and for protection of the corresponding CoAP responses. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at https://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on May 6, 2021. 41 Copyright Notice 43 Copyright (c) 2020 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (https://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 59 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 60 2. Security Context . . . . . . . . . . . . . . . . . . . . . . 7 61 2.1. Common Context . . . . . . . . . . . . . . . . . . . . . 9 62 2.1.1. ID Context . . . . . . . . . . . . . . . . . . . . . 9 63 2.1.2. Counter Signature Algorithm . . . . . . . . . . . . . 9 64 2.1.3. Counter Signature Parameters . . . . . . . . . . . . 9 65 2.1.4. Secret Derivation Algorithm . . . . . . . . . . . . . 10 66 2.1.5. Secret Derivation Parameters . . . . . . . . . . . . 10 67 2.2. Sender Context and Recipient Context . . . . . . . . . . 11 68 2.3. Pairwise Keys . . . . . . . . . . . . . . . . . . . . . . 12 69 2.3.1. Derivation of Pairwise Keys . . . . . . . . . . . . . 12 70 2.3.2. Usage of Sequence Numbers . . . . . . . . . . . . . . 13 71 2.3.3. Security Context for Pairwise Mode . . . . . . . . . 13 72 2.4. Update of Security Context . . . . . . . . . . . . . . . 14 73 2.4.1. Loss of Mutable Security Context . . . . . . . . . . 14 74 2.4.2. Exhaustion of Sender Sequence Number . . . . . . . . 15 75 2.4.3. Retrieving New Security Context Parameters . . . . . 16 76 3. The Group Manager . . . . . . . . . . . . . . . . . . . . . . 18 77 3.1. Management of Group Keying Material . . . . . . . . . . . 19 78 3.2. Responsibilities of the Group Manager . . . . . . . . . . 20 79 4. The COSE Object . . . . . . . . . . . . . . . . . . . . . . . 21 80 4.1. Counter Signature . . . . . . . . . . . . . . . . . . . . 21 81 4.2. The 'kid' and 'kid context' parameters . . . . . . . . . 21 82 4.3. external_aad . . . . . . . . . . . . . . . . . . . . . . 22 83 4.3.1. external_aad for Encryption . . . . . . . . . . . . . 22 84 4.3.2. external_aad for Signing . . . . . . . . . . . . . . 23 85 5. OSCORE Header Compression . . . . . . . . . . . . . . . . . . 24 86 5.1. Examples of Compressed COSE Objects . . . . . . . . . . . 25 87 5.1.1. Examples in Group Mode . . . . . . . . . . . . . . . 25 88 5.1.2. Examples in Pairwise Mode . . . . . . . . . . . . . . 26 89 6. Message Binding, Sequence Numbers, Freshness and Replay 90 Protection . . . . . . . . . . . . . . . . . . . . . . . . . 27 91 6.1. Update of Replay Window . . . . . . . . . . . . . . . . . 27 92 7. Message Reception . . . . . . . . . . . . . . . . . . . . . . 28 93 8. Message Processing in Group Mode . . . . . . . . . . . . . . 29 94 8.1. Protecting the Request . . . . . . . . . . . . . . . . . 29 95 8.1.1. Supporting Observe . . . . . . . . . . . . . . . . . 30 96 8.2. Verifying the Request . . . . . . . . . . . . . . . . . . 31 97 8.2.1. Supporting Observe . . . . . . . . . . . . . . . . . 32 98 8.3. Protecting the Response . . . . . . . . . . . . . . . . . 32 99 8.3.1. Supporting Observe . . . . . . . . . . . . . . . . . 33 100 8.4. Verifying the Response . . . . . . . . . . . . . . . . . 34 101 8.4.1. Supporting Observe . . . . . . . . . . . . . . . . . 34 102 9. Message Processing in Pairwise Mode . . . . . . . . . . . . . 35 103 9.1. Pre-Conditions . . . . . . . . . . . . . . . . . . . . . 36 104 9.2. Protecting the Request . . . . . . . . . . . . . . . . . 36 105 9.3. Verifying the Request . . . . . . . . . . . . . . . . . . 37 106 9.4. Protecting the Response . . . . . . . . . . . . . . . . . 37 107 9.5. Verifying the Response . . . . . . . . . . . . . . . . . 38 108 10. Security Considerations . . . . . . . . . . . . . . . . . . . 38 109 10.1. Group-level Security . . . . . . . . . . . . . . . . . . 39 110 10.2. Uniqueness of (key, nonce) . . . . . . . . . . . . . . . 40 111 10.3. Management of Group Keying Material . . . . . . . . . . 40 112 10.4. Update of Security Context and Key Rotation . . . . . . 41 113 10.4.1. Late Update on the Sender . . . . . . . . . . . . . 41 114 10.4.2. Late Update on the Recipient . . . . . . . . . . . . 42 115 10.5. Collision of Group Identifiers . . . . . . . . . . . . . 42 116 10.6. Cross-group Message Injection . . . . . . . . . . . . . 43 117 10.6.1. Attack Description . . . . . . . . . . . . . . . . . 43 118 10.6.2. Attack Prevention in Group Mode . . . . . . . . . . 44 119 10.7. Group OSCORE for Unicast Requests . . . . . . . . . . . 45 120 10.8. End-to-end Protection . . . . . . . . . . . . . . . . . 46 121 10.9. Master Secret . . . . . . . . . . . . . . . . . . . . . 46 122 10.10. Replay Protection . . . . . . . . . . . . . . . . . . . 47 123 10.11. Client Aliveness . . . . . . . . . . . . . . . . . . . . 48 124 10.12. Cryptographic Considerations . . . . . . . . . . . . . . 48 125 10.13. Message Segmentation . . . . . . . . . . . . . . . . . . 49 126 10.14. Privacy Considerations . . . . . . . . . . . . . . . . . 49 127 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 50 128 11.1. OSCORE Flag Bits Registry . . . . . . . . . . . . . . . 50 129 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 50 130 12.1. Normative References . . . . . . . . . . . . . . . . . . 50 131 12.2. Informative References . . . . . . . . . . . . . . . . . 52 132 Appendix A. Assumptions and Security Objectives . . . . . . . . 54 133 A.1. Assumptions . . . . . . . . . . . . . . . . . . . . . . . 55 134 A.2. Security Objectives . . . . . . . . . . . . . . . . . . . 56 135 Appendix B. List of Use Cases . . . . . . . . . . . . . . . . . 57 136 Appendix C. Example of Group Identifier Format . . . . . . . . . 60 137 Appendix D. Set-up of New Endpoints . . . . . . . . . . . . . . 60 138 Appendix E. Examples of Synchronization Approaches . . . . . . . 61 139 E.1. Best-Effort Synchronization . . . . . . . . . . . . . . . 61 140 E.2. Baseline Synchronization . . . . . . . . . . . . . . . . 62 141 E.3. Challenge-Response Synchronization . . . . . . . . . . . 62 142 Appendix F. No Verification of Signatures in Group Mode . . . . 65 143 Appendix G. Example Values with COSE Capabilities . . . . . . . 66 144 Appendix H. Document Updates . . . . . . . . . . . . . . . . . . 67 145 H.1. Version -09 to -10 . . . . . . . . . . . . . . . . . . . 67 146 H.2. Version -08 to -09 . . . . . . . . . . . . . . . . . . . 68 147 H.3. Version -07 to -08 . . . . . . . . . . . . . . . . . . . 69 148 H.4. Version -06 to -07 . . . . . . . . . . . . . . . . . . . 70 149 H.5. Version -05 to -06 . . . . . . . . . . . . . . . . . . . 71 150 H.6. Version -04 to -05 . . . . . . . . . . . . . . . . . . . 72 151 H.7. Version -03 to -04 . . . . . . . . . . . . . . . . . . . 72 152 H.8. Version -02 to -03 . . . . . . . . . . . . . . . . . . . 73 153 H.9. Version -01 to -02 . . . . . . . . . . . . . . . . . . . 74 154 H.10. Version -00 to -01 . . . . . . . . . . . . . . . . . . . 74 155 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 75 156 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 75 158 1. Introduction 160 The Constrained Application Protocol (CoAP) [RFC7252] is a web 161 transfer protocol specifically designed for constrained devices and 162 networks [RFC7228]. Group communication for CoAP 163 [I-D.ietf-core-groupcomm-bis] addresses use cases where deployed 164 devices benefit from a group communication model, for example to 165 reduce latencies, improve performance and reduce bandwidth 166 utilization. Use cases include lighting control, integrated building 167 control, software and firmware updates, parameter and configuration 168 updates, commissioning of constrained networks, and emergency 169 multicast (see Appendix B). This specification defines the security 170 protocol for Group communication for CoAP 171 [I-D.ietf-core-groupcomm-bis]. 173 Object Security for Constrained RESTful Environments (OSCORE) 174 [RFC8613] describes a security protocol based on the exchange of 175 protected CoAP messages. OSCORE builds on CBOR Object Signing and 176 Encryption (COSE) 177 [I-D.ietf-cose-rfc8152bis-struct][I-D.ietf-cose-rfc8152bis-algs] and 178 provides end-to-end encryption, integrity, replay protection and 179 binding of response to request between a sender and a recipient, 180 independent of transport also in the presence of intermediaries. To 181 this end, a CoAP message is protected by including its payload (if 182 any), certain options, and header fields in a COSE object, which 183 replaces the authenticated and encrypted fields in the protected 184 message. 186 This document defines Group OSCORE, providing the same end-to-end 187 security properties as OSCORE in the case where CoAP requests have 188 multiple recipients. In particular, the described approach defines 189 how OSCORE is used in a group communication setting to provide source 190 authentication for CoAP group requests, sent by a client to multiple 191 servers, and for protection of the corresponding CoAP responses. 193 Just like OSCORE, Group OSCORE is independent of transport layer and 194 works wherever CoAP does. Group communication for CoAP 195 [I-D.ietf-core-groupcomm-bis] uses UDP/IP multicast as the underlying 196 data transport. 198 As with OSCORE, it is possible to combine Group OSCORE with 199 communication security on other layers. One example is the use of 200 transport layer security, such as DTLS 201 [RFC6347][I-D.ietf-tls-dtls13], between one client and one proxy (and 202 vice versa), or between one proxy and one server (and vice versa), in 203 order to protect the routing information of packets from observers. 204 Note that DTLS does not define how to secure messages sent over IP 205 multicast. 207 Group OSCORE defines two modes of operation: 209 o In the group mode, Group OSCORE requests and responses are 210 digitally signed with the private key of the sender and the 211 signature is embedded in the protected CoAP message. The group 212 mode supports all COSE algorithms as well as signature 213 verification by intermediaries. This mode is defined in Section 8 214 and MUST be supported. 216 o In the pairwise mode, two group members exchange Group OSCORE 217 requests and responses over unicast, and the messages are 218 protected with symmetric keys. These symmetric keys are derived 219 from Diffie-Hellman shared secrets, calculated with the asymmetric 220 keys of the sender and recipient, allowing for shorter integrity 221 tags and therefore lower message overhead. This mode is defined 222 in Section 9 and is OPTIONAL to support. 224 Both modes provide source authentication of CoAP messages. The 225 application decides what mode to use, potentially on a per-message 226 basis. Such decisions can be based, for instance, on pre-configured 227 policies or dynamic assessing of the target recipient and/or 228 resource, among other things. One important case is when requests 229 are protected with the group mode, and responses with the pairwise 230 mode. Since such responses convey shorter integrity tags instead of 231 bigger, full-fledged signatures, this significantly reduces the 232 message overhead in case of many responses to one request. 234 A special deployment of Group OSCORE is to use pairwise mode only. 235 For example, consider the case of a constrained-node network 236 [RFC7228] with a large number of CoAP endpoints and the objective to 237 establish secure communication between any pair of endpoints with a 238 small provisioning effort and message overhead. Since the total 239 number of security associations that needs to be established grows 240 with the square of the number of nodes, it is desirable to restrict 241 the provisioned keying material. Moreover, a key establishment 242 protocol would need to be executed for each security association. 243 One solution to this is to deploy Group OSCORE, with the endpoints 244 being part of a group, and use the pairwise mode. This solution 245 assumes a trusted third party called Group Manager (see Section 3), 246 but has the benefit of restricting the symmetric keying material 247 while distributing only the public key of each group member. After 248 that, a CoAP endpoint can locally derive the OSCORE Security Context 249 for the other endpoint in the group, and protect CoAP communications 250 with very low overhead [I-D.ietf-lwig-security-protocol-comparison]. 252 1.1. Terminology 254 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 255 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 256 "OPTIONAL" in this document are to be interpreted as described in BCP 257 14 [RFC2119] [RFC8174] when, and only when, they appear in all 258 capitals, as shown here. 260 Readers are expected to be familiar with the terms and concepts 261 described in CoAP [RFC7252] including "endpoint", "client", "server", 262 "sender" and "recipient"; group communication for CoAP 263 [I-D.ietf-core-groupcomm-bis]; CBOR [I-D.ietf-cbor-7049bis]; COSE 264 [I-D.ietf-cose-rfc8152bis-struct][I-D.ietf-cose-rfc8152bis-algs] and 265 related counter signatures [I-D.ietf-cose-countersign]. 267 Readers are also expected to be familiar with the terms and concepts 268 for protection and processing of CoAP messages through OSCORE, such 269 as "Security Context" and "Master Secret", defined in [RFC8613]. 271 Terminology for constrained environments, such as "constrained 272 device" and "constrained-node network", is defined in [RFC7228]. 274 This document refers also to the following terminology. 276 o Keying material: data that is necessary to establish and maintain 277 secure communication among endpoints. This includes, for 278 instance, keys and IVs [RFC4949]. 280 o Group: a set of endpoints that share group keying material and 281 security parameters (Common Context, see Section 2). Unless 282 specified otherwise, the term group used in this specification 283 refers thus to a "security group" (see Section 2.1 of 284 [I-D.ietf-core-groupcomm-bis]), not to be confused with "CoAP 285 group" or "application group". 287 o Group Manager: entity responsible for a group. Each endpoint in a 288 group communicates securely with the respective Group Manager, 289 which is neither required to be an actual group member nor to take 290 part in the group communication. The full list of 291 responsibilities of the Group Manager is provided in Section 3.2. 293 o Silent server: member of a group that never sends protected 294 responses in reply to requests. For CoAP group communications, 295 requests are normally sent without necessarily expecting a 296 response. A silent server may send unprotected responses, as 297 error responses reporting an OSCORE error. Note that an endpoint 298 can implement both a silent server and a client, i.e. the two 299 roles are independent. An endpoint acting only as a silent server 300 performs only Group OSCORE processing on incoming requests. 301 Silent servers maintain less keying material and in particular do 302 not have a Sender Context for the group. Since silent servers do 303 not have a Sender ID, they cannot support the pairwise mode. 305 o Group Identifier (Gid): identifier assigned to the group, unique 306 within the set of groups of a given Group Manager. 308 o Group request: CoAP request message sent by a client in the group 309 to all servers in that group. 311 o Source authentication: evidence that a received message in the 312 group originated from a specific identified group member. This 313 also provides assurance that the message was not tampered with by 314 anyone, be it a different legitimate group member or an endpoint 315 which is not a group member. 317 2. Security Context 319 This specification refers to a group as a set of endpoints sharing 320 keying material and security parameters for executing the Group 321 OSCORE protocol (see Section 1.1). Each endpoint which is member of 322 a group maintains a Security Context as defined in Section 3 of 323 [RFC8613], extended as follows (see Figure 1): 325 o One Common Context, shared by all the endpoints in the group. Two 326 new parameters are included in the Common Context, namely Counter 327 Signature Algorithm and Counter Signature Parameters. These 328 relate to the computation of counter signatures, when messages are 329 protected using the group mode (see Section 8). 331 If the pairwise mode is supported, the Common Context is further 332 extended with two new parameters, namely Secret Derivation 333 Algorithm and Secret Derivation Parameters. These relate to the 334 derivation of a static-static Diffie-Hellman shared secret, from 335 which pairwise keys are derived (see Section 2.3.1) to protect 336 messages with the pairwise mode (see Section 9). 338 o One Sender Context, extended with the endpoint's private key. The 339 private key is used to sign the message in group mode, and for 340 deriving the pairwise keys in pairwise mode (see Section 2.3). If 341 the pairwise mode is supported, the Sender Context is also 342 extended with the Pairwise Sender Keys associated to the other 343 endpoints (see Section 2.3). The Sender Context is omitted if the 344 endpoint is configured exclusively as silent server. 346 o One Recipient Context for each endpoint from which messages are 347 received. It is not necessary to maintain Recipient Contexts 348 associated to endpoints from which messages are not (expected to 349 be) received. The Recipient Context is extended with the public 350 key of the associated endpoint, used to verify the signature in 351 group mode and for deriving the pairwise keys in pairwise mode 352 (see Section 2.3). If the pairwise mode is supported, then the 353 Recipient Context is also extended with the Pairwise Recipient Key 354 associated to the other endpoint (see Section 2.3). 356 +-------------------+-----------------------------------------------+ 357 | Context Component | New Information Elements | 358 +-------------------+-----------------------------------------------+ 359 | Common Context | Counter Signature Algorithm | 360 | | Counter Signature Parameters | 361 | | *Secret Derivation Algorithm | 362 | | *Secret Derivation Parameters | 363 +-------------------+-----------------------------------------------+ 364 | Sender Context | Endpoint's own private key | 365 | | *Pairwise Sender Keys for the other endpoints | 366 +-------------------+-----------------------------------------------+ 367 | Each | Public key of the other endpoint | 368 | Recipient Context | *Pairwise Recipient Key of the other endpoint | 369 +-------------------+-----------------------------------------------+ 371 Figure 1: Additions to the OSCORE Security Context. Optional 372 additions are labeled with an asterisk. 374 Further details about the Security Context of Group OSCORE are 375 provided in the remainder of this section. How the Security Context 376 is established by the group members is out of scope for this 377 specification, but if there is more than one Security Context 378 applicable to a message, then the endpoints MUST be able to tell 379 which Security Context was latest established. 381 The default setting for how to manage information about the group is 382 described in terms of a Group Manager (see Section 3). 384 2.1. Common Context 386 The Common Context may be acquired from the Group Manager (see 387 Section 3). The following sections define how the Common Context is 388 extended, compared to [RFC8613]. 390 2.1.1. ID Context 392 The ID Context parameter (see Sections 3.3 and 5.1 of [RFC8613]) in 393 the Common Context SHALL contain the Group Identifier (Gid) of the 394 group. The choice of the Gid format is application specific. An 395 example of specific formatting of the Gid is given in Appendix C. 396 The application needs to specify how to handle potential collisions 397 between Gids (see Section 10.5). 399 2.1.2. Counter Signature Algorithm 401 Counter Signature Algorithm identifies the digital signature 402 algorithm used to compute a counter signature on the COSE object (see 403 Sections 3.2 and 3.3 of [I-D.ietf-cose-countersign]), when messages 404 are protected using the group mode (see Section 8). 406 This parameter is immutable once the Common Context is established. 407 Counter Signature Algorithm MUST take value from the "Value" column 408 of the "COSE Algorithms" Registry [COSE.Algorithms]. The value is 409 associated to a COSE key type, as specified in the "Capabilities" 410 column of the "COSE Algorithms" Registry [COSE.Algorithms]. COSE 411 capabilities for algorithms are defined in Section 8 of 412 [I-D.ietf-cose-rfc8152bis-algs]. 414 The EdDSA signature algorithm and the elliptic curve Ed25519 415 [RFC8032] are mandatory to implement. If elliptic curve signatures 416 are used, it is RECOMMENDED to implement deterministic signatures 417 with additional randomness as specified in 418 [I-D.mattsson-cfrg-det-sigs-with-noise]. 420 2.1.3. Counter Signature Parameters 422 Counter Signature Parameters identifies the parameters associated to 423 the digital signature algorithm specified in Counter Signature 424 Algorithm. This parameter is immutable once the Common Context is 425 established. 427 This parameter is a CBOR array including the following two elements, 428 whose exact structure and value depend on the value of Counter 429 Signature Algorithm: 431 o The first element is the array of COSE capabilities for Counter 432 Signature Algorithm, as specified for that algorithm in the 433 "Capabilities" column of the "COSE Algorithms" Registry 434 [COSE.Algorithms] (see Section 8.1 of 435 [I-D.ietf-cose-rfc8152bis-algs]). 437 o The second element is the array of COSE capabilities for the COSE 438 key type associated to Counter Signature Algorithm, as specified 439 for that key type in the "Capabilities" column of the "COSE Key 440 Types" Registry [COSE.Key.Types] (see Section 8.2 of 441 [I-D.ietf-cose-rfc8152bis-algs]). 443 Examples of Counter Signature Parameters are in Appendix G. 445 2.1.4. Secret Derivation Algorithm 447 Secret Derivation Algorithm identifies the elliptic curve Diffie- 448 Hellman algorithm used to derive a static-static Diffie-Hellman 449 shared secret, from which pairwise keys are derived (see 450 Section 2.3.1) to protect messages with the pairwise mode (see 451 Section 9). 453 This parameter is immutable once the Common Context is established. 454 Secret Derivation Algorithm MUST take value from the "Value" column 455 of the "COSE Algorithms" Registry [COSE.Algorithms]. The value is 456 associated to a COSE key type, as specified in the "Capabilities" 457 column of the "COSE Algorithms" Registry [COSE.Algorithms]. COSE 458 capabilities for algorithms are defined in Section 8 of 459 [I-D.ietf-cose-rfc8152bis-algs]. 461 For endpoints that support the pairwise mode, the ECDH-SS + HKDF-256 462 algorithm specified in Section 6.3.1 of 463 [I-D.ietf-cose-rfc8152bis-algs] and the X25519 curve [RFC7748] are 464 mandatory to implement. 466 2.1.5. Secret Derivation Parameters 468 Secret Derivation Parameters identifies the parameters associated to 469 the elliptic curve Diffie-Hellman algorithm specified in Secret 470 Derivation Algorithm. This parameter is immutable once the Common 471 Context is established. 473 This parameter is a CBOR array including the following two elements, 474 whose exact structure and value depend on the value of Secret 475 Derivation Algorithm: 477 o The first element is the array of COSE capabilities for Secret 478 Derivation Algorithm, as specified for that algorithm in the 479 "Capabilities" column of the "COSE Algorithms" Registry 480 [COSE.Algorithms] (see Section 8.1 of 481 [I-D.ietf-cose-rfc8152bis-algs]). 483 o The second element is the array of COSE capabilities for the COSE 484 key type associated to Secret Derivation Algorithm, as specified 485 for that key type in the "Capabilities" column of the "COSE Key 486 Types" Registry [COSE.Key.Types] (see Section 8.2 of 487 [I-D.ietf-cose-rfc8152bis-algs]). 489 Examples of Secret Derivation Parameters are in Appendix G. 491 2.2. Sender Context and Recipient Context 493 OSCORE specifies the derivation of Sender Context and Recipient 494 Context, specifically of Sender/Recipient Keys and Common IV, from a 495 set of input parameters (see Section 3.2 of [RFC8613]). This 496 derivation applies also to Group OSCORE, and the mandatory-to- 497 implement HKDF and AEAD algorithms are the same as in [RFC8613]. The 498 Sender ID SHALL be unique for each endpoint in a group with a fixed 499 Master Secret, Master Salt and Group Identifier (see Section 3.3 of 500 [RFC8613]). 502 For Group OSCORE, the Sender Context and Recipient Context 503 additionally contain asymmetric keys, as described previously in 504 Section 2. The private/public key pair of the sender can, for 505 example, be generated by the endpoint or provisioned during 506 manufacturing. 508 With the exception of the public key of the sender endpoint, a 509 receiver endpoint can derive a complete Security Context from a 510 received Group OSCORE message and the Common Context. The public 511 keys in the Recipient Contexts can be retrieved from the Group 512 Manager (see Section 3) upon joining the group. A public key can 513 alternatively be acquired from the Group Manager at a later time, for 514 example the first time a message is received from a particular 515 endpoint in the group (see Section 8.2 and Section 8.4). 517 For severely constrained devices, it may be not feasible to 518 simultaneously handle the ongoing processing of a recently received 519 message in parallel with the retrieval of the sender endpoint's 520 public key. Such devices can be configured to drop a received 521 message for which there is no (complete) Recipient Context, and 522 retrieve the sender endpoint's public key in order to have it 523 available to verify subsequent messages from that endpoint. 525 Furthermore, sufficiently large replay windows should be considered, 526 to handle Partial IV values moving forward fast. This can happen 527 when a client engages in frequent or long sequences of one-to-one 528 exchanges with servers in the group, such as a large number of block- 529 wise transfers to a single server. When receiving following group 530 requests from that client, other servers in the group may believe to 531 have lost synchronization with the client's Sender Sequence Number. 532 If these servers use an Echo exchange to re-gain synchronization (see 533 Appendix E.3), this in itself may consume a considerable amount of 534 client's Sender Sequence Numbers, hence later resulting in the 535 servers possibly performing a new Echo exchange. 537 2.3. Pairwise Keys 539 Certain signature schemes, such as EdDSA and ECDSA, support a secure 540 combined signature and encryption scheme. This section specifies the 541 derivation of "pairwise keys", for use in the pairwise mode of Group 542 OSCORE defined in Section 9. 544 2.3.1. Derivation of Pairwise Keys 546 Using the Group OSCORE Security Context (see Section 2), a group 547 member can derive AEAD keys to protect point-to-point communication 548 between itself and any other endpoint in the group. The same AEAD 549 algorithm as in the group mode is used. The key derivation of these 550 so-called pairwise keys follows the same construction as in 551 Section 3.2.1 of [RFC8613]: 553 Pairwise Recipient Key = HKDF(Recipient Key, Shared Secret, info, L) 554 Pairwise Sender Key = HKDF(Sender Key, Shared Secret, info, L) 556 where: 558 o The Pairwise Recipient Key is the AEAD key for processing incoming 559 messages from endpoint X. 561 o The Pairwise Sender Key is the AEAD key for processing outgoing 562 messages addressed to endpoint X. 564 o HKDF is the HKDF algorithm specified by Secret Derivation 565 Algorithm from the Common Context (see Section 2.1.4). 567 o The Shared Secret is computed as a static-static Diffie-Hellman 568 shared secret [NIST-800-56A], where the endpoint uses its private 569 key and the public key of the other endpoint X. 571 o The Recipient Key and the public key are from the Recipient 572 Context associated to endpoint X. 574 o The Sender Key and private key are from the Sender Context. 576 o info and L are defined as in Section 3.2.1 of [RFC8613]. 578 If EdDSA asymmetric keys are used, the Edward coordinates are mapped 579 to Montgomery coordinates using the maps defined in Sections 4.1 and 580 4.2 of [RFC7748], before using the X25519 and X448 functions defined 581 in Section 5 of [RFC7748]. 583 After establishing a partially or completely new Security Context 584 (see Section 3.1 and Section 2.4), the old pairwise keys MUST be 585 deleted. Since new Sender/Recipient Keys are derived from the new 586 group keying material (see Section 2.2), every group member MUST use 587 the new Sender/Recipient Keys when deriving new pairwise keys. 589 As long as any two group members preserve the same asymmetric keys, 590 their Diffie-Hellman shared secret does not change across updates of 591 the group keying material. 593 2.3.2. Usage of Sequence Numbers 595 When using any of its Pairwise Sender Keys, a sender endpoint 596 including the 'Partial IV' parameter in the protected message MUST 597 use the current fresh value of the Sender Sequence Number from its 598 Sender Context (see Section 2.2). That is, the same Sender Sequence 599 Number space is used for all outgoing messages protected with Group 600 OSCORE, thus limiting both storage and complexity. 602 On the other hand, when combining group and pairwise communication 603 modes, this may result in the Partial IV values moving forward more 604 often. This can happen when a client engages in frequent or long 605 sequences of one-to-one exchanges with servers in the group, by 606 sending requests over unicast. 608 2.3.3. Security Context for Pairwise Mode 610 If the pairwise mode is supported, the Security Context additionally 611 includes Secret Derivation Algorithm, Secret Derivation Parameters 612 and the pairwise keys, as described at the beginning of Section 2. 614 The pairwise keys as well as the shared secrets used in their 615 derivation (see Section 2.3.1) may be stored in memory or recomputed 616 every time they are needed. The shared secret changes only when a 617 public/private key pair used for its derivation changes, which 618 results in the pairwise keys also changing. Additionally, the 619 pairwise keys change if the Sender ID changes or if a new Security 620 Context is established for the group (see Section 2.4.3). In order 621 to optimize protocol performance, an endpoint may store the derived 622 pairwise keys for easy retrieval. 624 In the pairwise mode, the Sender Context includes the Pairwise Sender 625 Keys to use with the other endpoints (see Figure 1). In order to 626 identify the right key to use, the Pairwise Sender Key for endpoint X 627 may be associated to the Recipient ID of endpoint X, as defined in 628 the Recipient Context (i.e. the Sender ID from the point of view of 629 endpoint X). In this way, the Recipient ID can be used to lookup for 630 the right Pairwise Sender Key. This association may be implemented in 631 different ways, e.g. by storing the pair (Recipient ID, Pairwise 632 Sender Key) or linking a Pairwise Sender Key to a Recipient Context. 634 2.4. Update of Security Context 636 It is RECOMMENDED that the immutable part of the Security Context is 637 stored in non-volatile memory, or that it can otherwise be reliably 638 accessed throughout the operation of the group, e.g. after a device 639 reboots. However, also immutable parts of the Security Context may 640 need to be updated, for example due to scheduled key renewal, new or 641 re-joining members in the group, or the fact that the endpoint 642 changes Sender ID (see Section 2.4.3). 644 On the other hand, the mutable parts of the Security Context are 645 updated by the endpoint when executing the security protocol, but may 646 nevertheless become outdated, e.g. due to loss of the mutable 647 Security Context (see Section 2.4.1) or exhaustion of Sender Sequence 648 Numbers (see Section 2.4.2). 650 If it is not feasible or practically possible to store and maintain 651 up-to-date the mutable part in non-volatile memory (e.g., due to 652 limited number of write operations), the endpoint MUST be able to 653 detect a loss of the mutable Security Context. 655 When a loss of mutable Security Context is detected (e.g., following 656 a reboot), the endpoint MUST NOT protect further messages using this 657 Security Context to avoid reusing a nonce with the same AEAD key, and 658 SHOULD instead retrieve new security parameters from the Group 659 Manager (see Section 2.4.1). 661 2.4.1. Loss of Mutable Security Context 663 An endpoint that has lost its mutable Security Context, e.g. due to a 664 reboot, needs to prevent the re-use of a nonce with the same AEAD 665 key, and to handle incoming replayed messages. 667 To this end, after a loss of mutable Security Context, the endpoint 668 SHOULD inform the Group Manager, retrieve new Security Context 669 parameters from the Group Manager (see Section 2.4.3), and use them 670 to derive a new Sender Context (see Section 2.2). In particular, 671 regardless the exact actions taken by the Group Manager, the endpoint 672 resets its Sender Sequence Number to 0, and derives a new Sender Key. 673 This is in turn used to possibly derive new Pairwise Sender Keys. 675 From then on, the endpoint MUST use its latest installed Sender 676 Context to protect outgoing messages. 678 If an endpoint is not able to establish an updated Sender Context, 679 e.g. because of lack of connectivity with the Group Manager, the 680 endpoint MUST NOT protect further messages using the current Security 681 Context. 683 In order to handle the update of Replay Window in Recipient Contexts, 684 three approaches are discussed in Appendix E. In particular, the 685 approach specified in Appendix E.3 and based on the Echo Option 686 [I-D.ietf-core-echo-request-tag] is a variant of the approach defined 687 in Appendix B.1.2 of [RFC8613] as applicable to Group OSCORE. 689 2.4.2. Exhaustion of Sender Sequence Number 691 An endpoint can eventually exhaust the Sender Sequence Number, which 692 is incremented for each new outgoing message including a Partial IV. 693 This is the case for group requests, Observe notifications [RFC7641] 694 and, optionally, any other response. 696 Implementations MUST be able to detect an exhaustion of Sender 697 Sequence Number, after the endpoint has consumed the largest usable 698 value. If an implementation's integers support wrapping addition, 699 the implementation MUST treat Sender Sequence Number as exhausted 700 when a wrap-around is detected. 702 Upon exhausting the Sender Sequence Numbers, the endpoint MUST NOT 703 use this Security Context to protect further messages including a 704 Partial IV. 706 The endpoint SHOULD inform the Group Manager, retrieve new Security 707 Context parameters from the Group Manager (see Section 2.4.3), and 708 use them to derive a new Sender Context (see Section 2.2). In 709 particular, regardless the exact actions taken by the Group Manager, 710 the endpoint resets its Sender Sequence Number to 0, and derives a 711 new Sender Key. This is in turn used to possibly derive new Pairwise 712 Sender Keys. 714 From then on, the endpoint MUST use its latest installed Sender 715 Context to protect outgoing messages. 717 2.4.3. Retrieving New Security Context Parameters 719 The Group Manager can assist an endpoint with an incomplete Sender 720 Context to retrieve missing data of the Security Context and thereby 721 become fully operational in the group again. The two main options 722 for the Group Manager are described in this section: i) assignment of 723 a new Sender ID to the endpoint (see Section 2.4.3.1); and ii) 724 establishment of a new Security Context for the group (see 725 Section 2.4.3.2). Update of Replay Window in Recipient Contexts is 726 discussed in Section 6.1. 728 As group membership changes, or as group members get new Sender IDs 729 (see Section 2.4.3.1) so do the relevant Recipient IDs that the other 730 endpoints need to keep track of. As a consequence, group members may 731 end up retaining stale Recipient Contexts, that are no longer useful 732 to verify incoming secure messages. 734 The Recipient ID ('kid') SHOULD NOT be considered as a persistent and 735 reliable indicator of a group member. Such an indication can be 736 achieved only by using that member's public key, when verifying 737 countersignatures of received messages (in group mode), or when 738 verifying messages integrity-protected with pairwise keying material 739 derived from asymmetric keys (in pairwise mode). 741 Furthermore, applications MAY define policies to: i) delete 742 (long-)unused Recipient Contexts and reduce the impact on storage 743 space; as well as ii) check with the Group Manager that a public key 744 is currently the one associated to a 'kid' value, after a number of 745 consecutive failed verifications. 747 2.4.3.1. New Sender ID for the Endpoint 749 The Group Manager may assign a new Sender ID to an endpoint, while 750 leaving the Gid, Master Secret and Master Salt unchanged in the 751 group. In this case, the Group Manager MUST assign a Sender ID that 752 has never been assigned before in the group. 754 Having retrieved the new Sender ID, and potentially other missing 755 data of the immutable Security Context, the endpoint can derive a new 756 Sender Context (see Section 2.2). When doing so, the endpoint re- 757 initilizes the Sender Sequence Number in its Sender Context to 0. 759 From then on, the endpoint MUST use its latest installed Sender 760 Context to protect outgoing messages. 762 The assignment of a new Sender ID may be the result of different 763 processes. The endpoint may request a new Sender ID, e.g. because of 764 exhaustion of Sender Sequence Numbers (see Section 2.4.2). An 765 endpoint may request to re-join the group, e.g. because of losing its 766 mutable Security Context (see Section 2.4.1), and receive as response 767 a new Sender ID together with the latest immutable Security Context. 769 For the other group members, the Recipient Context corresponding to 770 the old Sender ID becomes stale (see Section 3.1). 772 2.4.3.2. New Security Context for the Group 774 The Group Manager may establish a new Security Context for the group 775 (see Section 3.1). The Group Manager does not necessarily establish 776 a new Security Context for the group if one member has an outdated 777 Security Context (see Section 2.4.3.1), unless that was already 778 planned or required for other reasons. 780 All the group members need to acquire new Security Context parameters 781 from the Group Manager. Once having acquired new Security Context 782 parameters, each group member performs the following actions. 784 o From then on, it MUST NOT use the current Security Context to 785 start processing new messages for the considered group. 787 o It completes any ongoing message processing for the considered 788 group. 790 o It derives and install a new Security Context. In particular: 792 * It re-derives the keying material stored in its Sender Context 793 and Recipient Contexts (see Section 2.2). The Master Salt used 794 for the re-derivations is the updated Master Salt parameter if 795 provided by the Group Manager, or the empty byte string 796 otherwise. 798 * It resets to 0 its Sender Sequence Number in its Sender 799 Context. 801 * It re-initializes the Replay Window of each Recipient Context. 803 * It resets to 0 the sequence number of each ongoing observation 804 where it is an observer client and that it wants to keep 805 active. 807 From then on, it can resume processing new messages for the 808 considered group. In particular: 810 o It MUST use its latest installed Sender Context to protect 811 outgoing messages. 813 o It SHOULD use its latest installed Recipient Contexts to process 814 incoming messages, unless application policies admit to 815 temporarily retain and use the old, recent, Security Context (see 816 Section 10.4.1). 818 The distribution of a new Gid and Master Secret may result in 819 temporarily misaligned Security Contexts among group members. In 820 particular, this may result in a group member not being able to 821 process messages received right after a new Gid and Master Secret 822 have been distributed. A discussion on practical consequences and 823 possible ways to address them, as well as on how to handle the old 824 Security Context, is provided in Section 10.4. 826 3. The Group Manager 828 As with OSCORE, endpoints communicating with Group OSCORE need to 829 establish the relevant Security Context. Group OSCORE endpoints need 830 to acquire OSCORE input parameters, information about the group(s) 831 and about other endpoints in the group(s). This specification is 832 based on the existence of an entity called Group Manager which is 833 responsible for the group, but does not mandate how the Group Manager 834 interacts with the group members. The responsibilities of the Group 835 Manager are compiled in Section 3.2. 837 It is RECOMMENDED to use a Group Manager as described in 838 [I-D.ietf-ace-key-groupcomm-oscore], where the join process is based 839 on the ACE framework for authentication and authorization in 840 constrained environments [I-D.ietf-ace-oauth-authz]. 842 The Group Manager assigns unique Group Identifiers (Gids) to 843 different groups under its control, as well as unique Sender IDs (and 844 thereby Recipient IDs) to the members of those groups. The Group 845 Manager MUST NOT reassign a Sender ID within the same group, and MUST 846 NOT reassign a Gid value to the same group. According to a 847 hierarchical approach, the Gid value assigned to a group is 848 associated to a dedicated space for the values of Sender ID and 849 Recipient ID of the members of that group. 851 In addition, the Group Manager maintains records of the public keys 852 of endpoints in a group, and provides information about the group and 853 its members to other members and selected roles. Upon nodes' 854 joining, the Group Manager collects such public keys and MUST verify 855 proof-of-possession of the respective private key. 857 An endpoint acquires group data such as the Gid and OSCORE input 858 parameters including its own Sender ID from the Group Manager, and 859 provides information about its public key to the Group Manager, for 860 example upon joining the group. 862 A group member can retrieve from the Group Manager the public key and 863 other information associated to another group member, with which it 864 can generate the corresponding Recipient Context. An application can 865 configure a group member to asynchronously retrieve information about 866 Recipient Contexts, e.g. by Observing [RFC7641] a resource at the 867 Group Manager to get updates on the group membership. 869 The Group Manager MAY serve additional entities acting as signature 870 checkers, e.g. intermediary gateways. These entities do not join a 871 group as members, but can retrieve public keys of group members from 872 the Group Manager, in order to verify counter signatures of group 873 messages. A signature checker MUST be authorized for retrieving 874 public keys of members in a specific group from the Group Manager. 875 To this end, the same method mentioned above based on the ACE 876 framework [I-D.ietf-ace-oauth-authz] can be used. 878 3.1. Management of Group Keying Material 880 In order to establish a new Security Context for a group, a new Group 881 Identifier (Gid) for that group and a new value for the Master Secret 882 parameter MUST be generated. When distributing the new Gid and 883 Master Secret, the Group Manager MAY distribute also a new value for 884 the Master Salt parameter, and SHOULD preserve the current value of 885 the Sender ID of each group member. 887 The Group Manager MUST NOT reassign a Gid value to the same group. 888 That is, each group can have a given Gid at most once during its 889 lifetime. An example of Gid format supporting this operation is 890 provided in Appendix C. 892 The Group Manager MUST NOT reassign a previously used Sender ID 893 ('kid') with the same Gid, Master Secret and Master Salt. Even if 894 Gid and Master Secret are renewed as described in this section, the 895 Group Manager MUST NOT reassign an endpoint's Sender ID ('kid') 896 within a same group (see Section 2.4.3.1). 898 If required by the application (see Appendix A.1), it is RECOMMENDED 899 to adopt a group key management scheme, and securely distribute a new 900 value for the Gid and for the Master Secret parameter of the group's 901 Security Context, before a new joining endpoint is added to the group 902 or after a currently present endpoint leaves the group. This is 903 necessary to preserve backward security and forward security in the 904 group, if the application requires it. 906 The specific approach used to distribute new group data is out of the 907 scope of this document. However, it is RECOMMENDED that the Group 908 Manager supports the distribution of the new Gid and Master Secret 909 parameter to the group according to the Group Rekeying Process 910 described in [I-D.ietf-ace-key-groupcomm-oscore]. 912 3.2. Responsibilities of the Group Manager 914 The Group Manager is responsible for performing the following tasks: 916 1. Creating and managing OSCORE groups. This includes the 917 assignment of a Gid to every newly created group, as well as 918 ensuring uniqueness of Gids within the set of its OSCORE groups. 920 2. Defining policies for authorizing the joining of its OSCORE 921 groups. 923 3. Handling the join process to add new endpoints as group members. 925 4. Establishing the Common Context part of the Security Context, 926 and providing it to authorized group members during the join 927 process, together with the corresponding Sender Context. 929 5. Generating and managing Sender IDs within its OSCORE groups, as 930 well as assigning and providing them to new endpoints during the 931 join process, or to current group members upon request of 932 renewal. This includes ensuring that each Sender ID is unique 933 within each of the OSCORE groups, and that it is not reassigned 934 within the same group. 936 6. Defining communication policies for each of its OSCORE groups, 937 and signalling them to new endpoints during the join process. 939 7. Renewing the Security Context of an OSCORE group upon membership 940 change, by revoking and renewing common security parameters and 941 keying material (rekeying). 943 8. Providing the management keying material that a new endpoint 944 requires to participate in the rekeying process, consistently 945 with the key management scheme used in the group joined by the 946 new endpoint. 948 9. Updating the Gid of its OSCORE groups, upon renewing the 949 respective Security Context. This includes ensuring that the 950 same Gid value is not reassigned to the same group. 952 10. Acting as key repository, in order to handle the public keys of 953 the members of its OSCORE groups, and providing such public keys 954 to other members of the same group upon request. The actual 955 storage of public keys may be entrusted to a separate secure 956 storage device or service. 958 11. Validating that the format and parameters of public keys of 959 group members are consistent with the countersignature algorithm 960 and related parameters used in the respective OSCORE group. 962 The Group Manager described in [I-D.ietf-ace-key-groupcomm-oscore] 963 provides these functionalities. 965 4. The COSE Object 967 Building on Section 5 of [RFC8613], this section defines how to use 968 COSE [I-D.ietf-cose-rfc8152bis-struct] to wrap and protect data in 969 the original message. OSCORE uses the untagged COSE_Encrypt0 970 structure with an Authenticated Encryption with Associated Data 971 (AEAD) algorithm. Unless otherwise specified, the following 972 modifications apply for both the group mode and the pairwise mode of 973 Group OSCORE. 975 4.1. Counter Signature 977 For the group mode only, the 'unprotected' field MUST additionally 978 include the following parameter: 980 o COSE_CounterSignature0: its value is set to the counter signature 981 of the COSE object, computed by the sender as described in 982 Sections 3.2 and 3.3 of [I-D.ietf-cose-countersign], by using its 983 private key and according to the Counter Signature Algorithm and 984 Counter Signature Parameters in the Security Context. 986 In particular, the Countersign_structure contains the context text 987 string "CounterSignature0", the external_aad as defined in 988 Section 4.3.2 of this specification, and the ciphertext of the 989 COSE object as payload. 991 4.2. The 'kid' and 'kid context' parameters 993 The value of the 'kid' parameter in the 'unprotected' field of 994 response messages MUST be set to the Sender ID of the endpoint 995 transmitting the message. That is, unlike in [RFC8613], the 'kid' 996 parameter is always present in all messages, both requests and 997 responses. 999 The value of the 'kid context' parameter in the 'unprotected' field 1000 of requests messages MUST be set to the ID Context, i.e. the Group 1001 Identifier value (Gid) of the group. That is, unlike in [RFC8613], 1002 the 'kid context' parameter is always present in requests. 1004 4.3. external_aad 1006 The external_aad of the Additional Authenticated Data (AAD) is 1007 different compared to OSCORE. In particular, there is one 1008 external_aad used for encryption (both in group mode and pairwise 1009 mode), and another external_aad used for signing (only in group 1010 mode). 1012 4.3.1. external_aad for Encryption 1014 The external_aad for encryption (see Section 4.3 of 1015 [I-D.ietf-cose-rfc8152bis-struct]), used both in group mode and 1016 pairwise mode, includes also the counter signature algorithm and 1017 related signature parameters, as well as the value of the 'kid 1018 context' in the COSE object of the request (see Figure 2). 1020 external_aad = bstr .cbor aad_array 1022 aad_array = [ 1023 oscore_version : uint, 1024 algorithms : [alg_aead : int / tstr, 1025 alg_countersign : int / tstr, 1026 par_countersign : [countersign_alg_capab, 1027 countersign_key_type_capab], 1028 par_countersign_key : countersign_key_type_capab], 1029 request_kid : bstr, 1030 request_piv : bstr, 1031 options : bstr, 1032 request_kid_context : bstr 1033 ] 1035 Figure 2: external_aad for Encryption 1037 Compared with Section 5.4 of [RFC8613], the aad_array has the 1038 following differences. 1040 o The 'algorithms' array in the aad_array additionally includes: 1042 * 'alg_countersign', which specifies Counter Signature Algorithm 1043 from the Common Context (see Section 2.1.2). This parameter 1044 MUST encode the value of Counter Signature Algorithm as a CBOR 1045 integer or text string, consistently with the "Value" field in 1046 the "COSE Algorithms" Registry for this counter signature 1047 algorithm. 1049 * 'par_countersign', which specifies the CBOR array Counter 1050 Signature Parameters from the Common Context (see 1051 Section 2.1.3). In particular: 1053 + 'countersign_alg_capab' is the array of COSE capabilities 1054 for the countersignature algorithm indicated in 1055 'alg_countersign'. This is the first element of the CBOR 1056 array Counter Signature Parameters from the Common Context. 1058 + 'countersign_key_type_capab' is the array of COSE 1059 capabilities for the COSE key type used by the 1060 countersignature algorithm indicated in 'alg_countersign'. 1061 This is the second element of the CBOR array Counter 1062 Signature Parameters from the Common Context. 1064 * 'par_countersign_key', which specifies the parameters 1065 associated to the keys used with the countersignature algorithm 1066 indicated in 'alg_countersign'. These parameters are encoded 1067 as a CBOR array 'countersign_key_type_capab', whose exact 1068 structure and value depend on the value of 'alg_countersign'. 1070 In particular, 'countersign_key_type_capab' is the array of 1071 COSE capabilities for the COSE key type of the keys used with 1072 the countersignature algorithm. This is the second element of 1073 the CBOR array Counter Signature Parameters from the Common 1074 Context. 1076 Examples of 'par_countersign_key' are in Appendix G. 1078 o The new element 'request_kid_context' contains the value of the 1079 'kid context' in the COSE object of the request (see Section 4.2). 1081 4.3.2. external_aad for Signing 1083 The external_aad for signing (see Section 4.3 of 1084 [I-D.ietf-cose-rfc8152bis-struct]) used in group mode is identical to 1085 the external_aad for encryption (see Section 4.3.1) with the addition 1086 of the OSCORE option (see Figure 3). 1088 external_aad = bstr .cbor aad_array 1090 aad_array = [ 1091 oscore_version : uint, 1092 algorithms : [alg_aead : int / tstr, 1093 alg_countersign : int / tstr, 1094 par_countersign : [countersign_alg_capab, 1095 countersign_key_type_capab], 1096 par_countersign_key : countersign_key_type_capab], 1097 request_kid : bstr, 1098 request_piv : bstr, 1099 options : bstr, 1100 request_kid_context : bstr, 1101 OSCORE_option: bstr 1102 ] 1104 Figure 3: external_aad for Signing 1106 Compared with Section 5.4 of [RFC8613] the aad_array additionally 1107 includes: 1109 o the 'algorithms' array, as defined in the external_aad for 1110 encryption (see Section 4.3.1); 1112 o the 'request_kid_context' element, as defined in the external_aad 1113 for encryption (see Section 4.3.1); 1115 o the value of the OSCORE Option present in the protected message, 1116 encoded as a binary string. 1118 Note for implementation: this construction requires the OSCORE option 1119 of the message to be generated before calculating the signature. 1120 Also, the aad_array needs to be large enough to contain the largest 1121 possible OSCORE option. 1123 5. OSCORE Header Compression 1125 The OSCORE header compression defined in Section 6 of [RFC8613] is 1126 used, with the following differences. 1128 o The payload of the OSCORE message SHALL encode the ciphertext of 1129 the COSE_Encrypt0 object. In the group mode, the ciphertext above 1130 is concatenated with the value of the COSE_CounterSignature0 of 1131 the COSE object, computed as described in Section 4.1. 1133 o This specification defines the usage of the sixth least 1134 significant bit, called the "Group Flag", in the first byte of the 1135 OSCORE option containing the OSCORE flag bits. This flag bit is 1136 specified in Section 11.1. 1138 o The Group Flag MUST be set to 1 if the OSCORE message is protected 1139 using the group mode (see Section 8). 1141 o The Group Flag MUST be set to 0 if the OSCORE message is protected 1142 using the pairwise mode (see Section 9). The Group Flag MUST also 1143 be set to 0 for ordinary OSCORE messages processed according to 1144 [RFC8613]. 1146 5.1. Examples of Compressed COSE Objects 1148 This section covers a list of OSCORE Header Compression examples of 1149 Group OSCORE used in group mode (see Section 5.1.1) or in pairwise 1150 mode (see Section 5.1.2). 1152 The examples assume that the COSE_Encrypt0 object is set (which means 1153 the CoAP message and cryptographic material is known). Note that the 1154 examples do not include the full CoAP unprotected message or the full 1155 Security Context, but only the input necessary to the compression 1156 mechanism, i.e. the COSE_Encrypt0 object. The output is the 1157 compressed COSE object as defined in Section 5 and divided into two 1158 parts, since the object is transported in two CoAP fields: OSCORE 1159 option and payload. 1161 The examples assume that the plaintext (see Section 5.3 of [RFC8613]) 1162 is 6 bytes long, and that the AEAD tag is 8 bytes long, hence 1163 resulting in a ciphertext which is 14 bytes long. When using the 1164 group mode, COUNTERSIGN denotes the COSE_CounterSignature0 byte 1165 string as described in Section 4, and is 64 bytes long. 1167 5.1.1. Examples in Group Mode 1169 o Request with ciphertext = 0xaea0155667924dff8a24e4cb35b9, kid = 1170 0x25, Partial IV = 5 and kid context = 0x44616c 1172 Before compression (96 bytes): 1174 [ 1175 h'', 1176 { 4:h'25', 6:h'05', 10:h'44616c', 11:COUNTERSIGN }, 1177 h'aea0155667924dff8a24e4cb35b9' 1178 ] 1179 After compression (85 bytes): 1181 Flag byte: 0b00111001 = 0x39 1183 Option Value: 39 05 03 44 61 6c 25 (7 bytes) 1185 Payload: ae a0 15 56 67 92 4d ff 8a 24 e4 cb 35 b9 COUNTERSIGN 1186 (14 bytes + size of COUNTERSIGN) 1188 o Response with ciphertext = 0x60b035059d9ef5667c5a0710823b, kid = 1189 0x52 and no Partial IV. 1191 Before compression (88 bytes): 1193 [ 1194 h'', 1195 { 4:h'52', 11:COUNTERSIGN }, 1196 h'60b035059d9ef5667c5a0710823b' 1197 ] 1199 After compression (80 bytes): 1201 Flag byte: 0b00101000 = 0x28 1203 Option Value: 28 52 (2 bytes) 1205 Payload: 60 b0 35 05 9d 9e f5 66 7c 5a 07 10 82 3b COUNTERSIGN 1206 (14 bytes + size of COUNTERSIGN) 1208 5.1.2. Examples in Pairwise Mode 1210 o Request with ciphertext = 0xaea0155667924dff8a24e4cb35b9, kid = 1211 0x25, Partial IV = 5 and kid context = 0x44616c 1213 Before compression (32 bytes): 1215 [ 1216 h'', 1217 { 4:h'25', 6:h'05', 10:h'44616c' }, 1218 h'aea0155667924dff8a24e4cb35b9' 1219 ] 1220 After compression (21 bytes): 1222 Flag byte: 0b00011001 = 0x19 1224 Option Value: 19 05 03 44 61 6c 25 (7 bytes) 1226 Payload: ae a0 15 56 67 92 4d ff 8a 24 e4 cb 35 b9 (14 bytes) 1228 o Response with ciphertext = 0x60b035059d9ef5667c5a0710823b, kid = 1229 0x52 and no Partial IV. 1231 Before compression (24 bytes): 1233 [ 1234 h'', 1235 { 4:h'52'}, 1236 h'60b035059d9ef5667c5a0710823b' 1237 ] 1239 After compression (16 bytes): 1241 Flag byte: 0b00001000 = 0x08 1243 Option Value: 08 52 (2 bytes) 1245 Payload: 60 b0 35 05 9d 9e f5 66 7c 5a 07 10 82 3b (14 bytes) 1247 6. Message Binding, Sequence Numbers, Freshness and Replay Protection 1249 The requirements and properties described in Section 7 of [RFC8613] 1250 also apply to OSCORE used in group communication. In particular, 1251 Group OSCORE provides message binding of responses to requests, which 1252 enables absolute freshness of responses that are not notifications, 1253 relative freshness of requests and notification responses, and replay 1254 protection of requests. 1256 6.1. Update of Replay Window 1258 A new server joining a group may not be aware of the current Partial 1259 IVs (Sender Sequence Numbers of the clients). Hence, when receiving 1260 a request from a particular client for the first time, the new server 1261 is not able to verify if that request is a replay. The same holds 1262 when a server loses its mutable Security Context (see Section 2.4.1), 1263 for instance after a device reboot. 1265 The exact way to address this issue is application specific, and 1266 depends on the particular use case and its replay requirements. The 1267 list of methods to handle the update of a Replay Window is part of 1268 the group communication policy, and different servers can use 1269 different methods. Appendix E describes three possible approaches 1270 that can be considered to address the issue discussed above. 1272 Furthermore, when the Group Manager establishes a new Security 1273 Context for the group (see Section 2.4.3.2), every server re- 1274 initializes the Replay Window in each of its Recipient Contexts. 1276 7. Message Reception 1278 Upon receiving a protected message, a recipient endpoint retrieves a 1279 Security Context as in [RFC8613]. An endpoint MUST be able to 1280 distinguish between a Security Context to process OSCORE messages as 1281 in [RFC8613] and a Security Context to process Group OSCORE messages 1282 as defined in this specification. 1284 To this end, an endpoint can take into account the different 1285 structure of the Security Context defined in Section 2, for example 1286 based on the presence of Counter Signature Algorithm in the Common 1287 Context. Alternatively implementations can use an additional 1288 parameter in the Security Context, to explicitly signal that it is 1289 intended for processing Group OSCORE messages. 1291 If either of the following two conditions holds, a recipient endpoint 1292 MUST discard the incoming protected message: 1294 o The Group Flag is set to 1, and the recipient endpoint can not 1295 retrieve a Security Context which is both valid to process the 1296 message and also associated to an OSCORE group. 1298 o The Group Flag is set to 0, and the recipient endpoint retrieves a 1299 Security Context which is both valid to process the message and 1300 also associated to an OSCORE group, but the endpoint does not 1301 support the pairwise mode. 1303 Otherwise, if a Security Context associated to an OSCORE group and 1304 valid to process the message is retrieved, the recipient endpoint 1305 processes the message with Group OSCORE, using the group mode (see 1306 Section 8) if the Group Flag is set to 1, or the pairwise mode (see 1307 Section 9) if the Group Flag is set to 0. 1309 Note that, if the Group Flag is set to 0, and the recipient endpoint 1310 retrieves a Security Context which is valid to process the message 1311 but is not associated to an OSCORE group, then the message is 1312 processed according to [RFC8613]. 1314 8. Message Processing in Group Mode 1316 When using the group mode, messages are protected and processed as 1317 specified in [RFC8613], with the modifications described in this 1318 section. The security objectives of the group mode are discussed in 1319 Appendix A.2. The group mode MUST be supported. 1321 During all the steps of the message processing, an endpoint MUST use 1322 the same Security Context for the considered group. That is, an 1323 endpoint MUST NOT install a new Security Context for that group (see 1324 Section 2.4.3.2) until the message processing is completed. 1326 The group mode MUST be used to protect group requests intended for 1327 multiple recipients or for the whole group. This includes both 1328 requests directly addressed to multiple recipients, e.g. sent by the 1329 client over multicast, as well as requests sent by the client over 1330 unicast to a proxy, that forwards them to the intended recipients 1331 over multicast [I-D.ietf-core-groupcomm-bis]. 1333 As per [RFC7252][I-D.ietf-core-groupcomm-bis], group requests sent 1334 over multicast MUST be Non-Confirmable, and thus are not 1335 retransmitted by the CoAP messaging layer. Instead, applications 1336 should store such outgoing messages for a pre-defined, sufficient 1337 amount of time, in order to correctly perform possible 1338 retransmissions at the application layer. According to Section 5.2.3 1339 of [RFC7252], responses to Non-Confirmable group requests SHOULD also 1340 be Non-Confirmable, but endpoints MUST be prepared to receive 1341 Confirmable responses in reply to a Non-Confirmable group request. 1342 Confirmable group requests are acknowledged in non-multicast 1343 environments, as specified in [RFC7252]. 1345 Furthermore, endpoints in the group locally perform error handling 1346 and processing of invalid messages according to the same principles 1347 adopted in [RFC8613]. However, a recipient MUST stop processing and 1348 silently reject any message which is malformed and does not follow 1349 the format specified in Section 4, or which is not cryptographically 1350 validated in a successful way. In either case, it is RECOMMENDED 1351 that the recipient does not send back any error message. This 1352 prevents servers from replying with multiple error messages to a 1353 client sending a group request, so avoiding the risk of flooding and 1354 possibly congesting the network. 1356 8.1. Protecting the Request 1358 A client transmits a secure group request as described in Section 8.1 1359 of [RFC8613], with the following modifications. 1361 o In step 2, the Additional Authenticated Data is modified as 1362 described in Section 4 of this document. 1364 o In step 4, the encryption of the COSE object is modified as 1365 described in Section 4 of this document. The encoding of the 1366 compressed COSE object is modified as described in Section 5 of 1367 this document. In particular, the Group Flag MUST be set to 1. 1369 o In step 5, the counter signature is computed and the format of the 1370 OSCORE message is modified as described in Section 4 and Section 5 1371 of this document. In particular, the payload of the OSCORE 1372 message includes also the counter signature. 1374 8.1.1. Supporting Observe 1376 If Observe [RFC7641] is supported, the following holds for each newly 1377 started observation. 1379 o If the client intends to keep the observation active beyond a 1380 possible change of Sender ID, the client MUST store the value of 1381 the 'kid' parameter from the original Observe request, and retain 1382 it for the whole duration of the observation. Even in case the 1383 client is individually rekeyed and receives a new Sender ID from 1384 the Group Manager (see Section 2.4.3.1), the client MUST NOT 1385 update the stored value associated to a particular Observe 1386 request. 1388 o If the client intends to keep the observation active beyond a 1389 possible change of ID Context following a group rekeying (see 1390 Section 3.1), then the following applies. 1392 * The client MUST store the value of the 'kid context' parameter 1393 from the original Observe request, and retain it for the whole 1394 duration of the observation. Upon establishing a new Security 1395 Context with a new ID Context as Gid (see Section 2.4.3.2), the 1396 client MUST NOT update the stored value associated to a 1397 particular Observe request. 1399 * The client MUST store an invariant identifier of the group, 1400 which is immutable even in case the Security Context of the 1401 group is re-established. For example, this invariant 1402 identifier can be the "group name" in 1403 [I-D.ietf-ace-key-groupcomm-oscore], where it is used for 1404 joining the group and retrieving the current group keying 1405 material from the Group Manager. 1407 After a group rekeying, such an invariant information makes it 1408 simpler for the observer client to retrieve the current group 1409 keying material from the Group Manager, in case the client has 1410 missed both the rekeying messages and the first observe 1411 notification protected with the new Security Context (see 1412 Section 8.3.1). 1414 8.2. Verifying the Request 1416 Upon receiving a secure group request with the Group Flag set to 1, 1417 following the procedure in Section 7, a server proceeds as described 1418 in Section 8.2 of [RFC8613], with the following modifications. 1420 o In step 2, the decoding of the compressed COSE object follows 1421 Section 5 of this document. In particular: 1423 * If the server discards the request due to not retrieving a 1424 Security Context associated to the OSCORE group, the server MAY 1425 respond with a 4.02 (Bad Option) error. When doing so, the 1426 server MAY set an Outer Max-Age option with value zero, and MAY 1427 include a descriptive string as diagnostic payload. 1429 * If the received 'kid context' matches an existing ID Context 1430 (Gid) but the received 'kid' does not match any Recipient ID in 1431 this Security Context, then the server MAY create a new 1432 Recipient Context for this Recipient ID and initialize it 1433 according to Section 3 of [RFC8613], and also retrieve the 1434 associated public key. Such a configuration is application 1435 specific. If the application does not specify dynamic 1436 derivation of new Recipient Contexts, then the server SHALL 1437 stop processing the request. 1439 o In step 4, the Additional Authenticated Data is modified as 1440 described in Section 4 of this document. 1442 o In step 6, the server also verifies the counter signature using 1443 the public key of the client from the associated Recipient 1444 Context. In particular: 1446 * If the server does not have the public key of the client yet, 1447 the server MUST stop processing the request and MAY respond 1448 with a 5.03 (Service Unavailable) response. The response MAY 1449 include a Max-Age Option, indicating to the client the number 1450 of seconds after which to retry. If the Max-Age Option is not 1451 present, a retry time of 60 seconds will be assumed by the 1452 client, as default value defined in Section 5.10.5 of 1453 [RFC7252]. 1455 * If the signature verification fails, the server SHALL stop 1456 processing the request and MAY respond with a 4.00 (Bad 1457 Request) response. If the verification fails, the same steps 1458 are taken as if the decryption had failed. In particular, the 1459 Replay Window is only updated if both the signature 1460 verification and the decryption succeed. 1462 o Additionally, if the used Recipient Context was created upon 1463 receiving this group request and the message is not verified 1464 successfully, the server MAY delete that Recipient Context. Such 1465 a configuration, which is specified by the application, mitigates 1466 attacks that aim at overloading the server's storage. 1468 A server SHOULD NOT process a request if the received Recipient ID 1469 ('kid') is equal to its own Sender ID in its own Sender Context. For 1470 an example where this is not fulfilled, see Section 6.2.1 in 1471 [I-D.tiloca-core-observe-multicast-notifications]. 1473 8.2.1. Supporting Observe 1475 If Observe [RFC7641] is supported, the following holds for each newly 1476 started observation. 1478 o The server MUST store the value of the 'kid' parameter from the 1479 original Observe request, and retain it for the whole duration of 1480 the observation. The server MUST NOT update the stored value of a 1481 'kid' parameter associated to a particular Observe request, even 1482 in case the observer client is individually rekeyed and starts 1483 using a new Sender ID received from the Group Manager (see 1484 Section 2.4.3.1). 1486 o The server MUST store the value of the 'kid context' parameter 1487 from the original Observe request, and retain it for the whole 1488 duration of the observation, beyond a possible change of ID 1489 Context following a group rekeying (see Section 3.1). That is, 1490 upon establishing a new Security Context with a new ID Context as 1491 Gid (see Section 2.4.3.2), the server MUST NOT update the stored 1492 value associated to the ongoing observation. 1494 8.3. Protecting the Response 1496 If a server generates a CoAP message in response to a Group OSCORE 1497 request, then the server SHALL follow the description in Section 8.3 1498 of [RFC8613], with the modifications described in this section. 1500 Note that the server always protects a response with the Sender 1501 Context from its latest Security Context, and that establishing a new 1502 Security Context resets the Sender Sequence Number to 0 (see 1503 Section 3.1). 1505 o In step 2, the Additional Authenticated Data is modified as 1506 described in Section 4 of this document. 1508 o In step 3, if the server is using a different Security Context for 1509 the response compared to what was used to verify the request (see 1510 Section 3.1), then the server MUST include its Sender Sequence 1511 Number as Partial IV in the response and use it to build the AEAD 1512 nonce to protect the response. This prevents the AEAD nonce from 1513 the request from being reused. 1515 o In step 4, the encryption of the COSE object is modified as 1516 described in Section 4 of this document. The encoding of the 1517 compressed COSE object is modified as described in Section 5 of 1518 this document. In particular, the Group Flag MUST be set to 1. 1519 If the server is using a different ID Context (Gid) for the 1520 response compared to what was used to verify the request (see 1521 Section 3.1), then the new ID Context MUST be included in the 'kid 1522 context' parameter of the response. 1524 o In step 5, the counter signature is computed and the format of the 1525 OSCORE message is modified as described in Section 5 of this 1526 document. In particular, the payload of the OSCORE message 1527 includes also the counter signature. 1529 8.3.1. Supporting Observe 1531 If Observe [RFC7641] is supported, the following holds when 1532 protecting notifications for an ongoing observation. 1534 o The server MUST use the stored value of the 'kid' parameter from 1535 the original Observe request (see Section 8.2.1), as value for the 1536 'request_kid' parameter in the two external_aad structures (see 1537 Section 4.3.1 and Section 4.3.2). 1539 o The server MUST use the stored value of the 'kid context' 1540 parameter from the original Observe request (see Section 8.2.1), 1541 as value for the 'request_kid_context' parameter in the two 1542 external_aad structures (see Section 4.3.1 and Section 4.3.2). 1544 Furthermore, the server may have ongoing observations started by 1545 Observe requests protected with an old Security Context. After 1546 completing the establishment of a new Security Context, the server 1547 MUST protect the following notifications with the Sender Context of 1548 the new Security Context. 1550 For each ongoing observation, the server MUST include in the first 1551 notification protected with the new Security Context also the 'kid 1552 context' parameter, which is set to the ID Context (Gid) of the new 1553 Security Context. It is OPTIONAL for the server to include the ID 1554 Context (Gid) in the 'kid context' parameter also in further 1555 following notifications for those observations. 1557 8.4. Verifying the Response 1559 Upon receiving a secure response message with the Group Flag set to 1560 1, following the procedure in Section 7, the client proceeds as 1561 described in Section 8.4 of [RFC8613], with the following 1562 modifications. 1564 Note that a client may receive a response protected with a Security 1565 Context different from the one used to protect the corresponding 1566 group request, and that, upon the establishment of a new Security 1567 Context, the client re-initializes its replay windows in its 1568 Recipient Contexts (see Section 3.1). 1570 o In step 2, the decoding of the compressed COSE object is modified 1571 as described in Section 5 of this document. If the received 'kid 1572 context' matches an existing ID Context (Gid) but the received 1573 'kid' does not match any Recipient ID in this Security Context, 1574 then the client MAY create a new Recipient Context for this 1575 Recipient ID and initialize it according to Section 3 of 1576 [RFC8613], and also retrieve the associated public key. If the 1577 application does not specify dynamic derivation of new Recipient 1578 Contexts, then the client SHALL stop processing the response. 1580 o In step 3, the Additional Authenticated Data is modified as 1581 described in Section 4 of this document. 1583 o In step 5, the client also verifies the counter signature using 1584 the public key of the server from the associated Recipient 1585 Context. If the verification fails, the same steps are taken as 1586 if the decryption had failed. 1588 o Additionally, if the used Recipient Context was created upon 1589 receiving this response and the message is not verified 1590 successfully, the client MAY delete that Recipient Context. Such 1591 a configuration, which is specified by the application, mitigates 1592 attacks that aim at overloading the client's storage. 1594 8.4.1. Supporting Observe 1596 If Observe [RFC7641] is supported, the following holds when verifying 1597 notifications for an ongoing observation. 1599 o The client MUST use the stored value of the 'kid' parameter from 1600 the original Observe request (see Section 8.1.1), as value for the 1601 'request_kid' parameter in the two external_aad structures (see 1602 Section 4.3.1 and Section 4.3.2). 1604 o The client MUST use the stored value of the 'kid context' 1605 parameter from the original Observe request (see Section 8.1.1), 1606 as value for the 'request_kid_context' parameter in the two 1607 external_aad structures (see Section 4.3.1 and Section 4.3.2). 1609 This ensures that the client can correctly verify notifications, even 1610 in case it is individually rekeyed and starts using a new Sender ID 1611 received from the Group Manager (see Section 2.4.3.1), as well as 1612 when it establishes a new Security Context with a new ID Context 1613 (Gid) following a group rekeying (see Section 3.1). 1615 9. Message Processing in Pairwise Mode 1617 When using the pairwise mode of Group OSCORE, messages are protected 1618 and processed as in Section 8, with the modifications described in 1619 this section. The security objectives of the pairwise mode are 1620 discussed in Appendix A.2. 1622 The pairwise mode takes advantage of an existing Security Context for 1623 the group mode to establish a Security Context shared exclusively 1624 with any other member. In order to use the pairwise mode, the 1625 signature scheme of the group mode MUST support a combined signature 1626 and encryption scheme. This can be, for example, signature using 1627 ECDSA, and encryption using AES-CCM with a key derived with ECDH. 1629 The pairwise mode does not support the use of additional entities 1630 acting as verifiers of source authentication and integrity of group 1631 messages, such as intermediary gateways (see Section 3). 1633 The pairwise mode MAY be supported. An endpoint implementing only a 1634 silent server does not support the pairwise mode. 1636 If the signature algorithm used in the group supports ECDH (e.g., 1637 ECDSA, EdDSA), the pairwise mode MUST be supported by endpoints that 1638 use the CoAP Echo Option [I-D.ietf-core-echo-request-tag] and/or 1639 block-wise transfers [RFC7959], for instance for responses after the 1640 first block-wise request, which possibly targets all servers in the 1641 group and includes the CoAP Block2 option (see Section 2.3.6 of 1642 [I-D.ietf-core-groupcomm-bis]). This prevents the attack described 1643 in Section 10.7, which leverages requests sent over unicast to a 1644 single group member and protected with the group mode. 1646 The pairwise mode protects messages between two members of a group, 1647 essentially following [RFC8613], but with the following notable 1648 differences: 1650 o The 'kid' and 'kid context' parameters of the COSE object are used 1651 as defined in Section 4.2 of this document. 1653 o The external_aad defined in Section 4.3.1 of this document is used 1654 for the encryption process. 1656 o The Pairwise Sender/Recipient Keys used as Sender/Recipient keys 1657 are derived as defined in Section 2.3 of this document. 1659 Senders MUST NOT use the pairwise mode to protect a message intended 1660 for multiple recipients. The pairwise mode is defined only between 1661 two endpoints and the keying material is thus only available to one 1662 recipient. 1664 The Group Manager MAY indicate that the group uses also the pairwise 1665 mode, as part of the group data provided to candidate group members 1666 when joining the group. 1668 9.1. Pre-Conditions 1670 In order to protect an outgoing message in pairwise mode, the sender 1671 needs to know the public key and the Recipient ID for the recipient 1672 endpoint, as stored in the Recipient Context associated to that 1673 endpoint (see Pairwise Sender Context of Section 2.3.3). 1675 Furthermore, the sender needs to know the individual address of the 1676 recipient endpoint. This information may not be known at any given 1677 point in time. For instance, right after having joined the group, a 1678 client may know the public key and Recipient ID for a given server, 1679 but not the addressing information required to reach it with an 1680 individual, one-to-one request. 1682 To make addressing information of individual endpoints available, 1683 servers in the group MAY expose a resource to which a client can send 1684 a group request targeting a server or a set of servers, identified by 1685 their 'kid' value(s). The specified set may be empty, hence 1686 identifying all the servers in the group. Further details of such an 1687 interface are out of scope for this document. 1689 9.2. Protecting the Request 1691 When using the pairwise mode, the request is protected as defined in 1692 Section 8.1, with the following differences. 1694 o The Group Flag MUST be set to 0. 1696 o The used Sender Key is the Pairwise Sender Key (see Section 2.3). 1698 o The counter signature is not computed and therefore not included 1699 in the message. The payload of the protected request thus 1700 terminates with the encoded ciphertext of the COSE object, just 1701 like in [RFC8613]. 1703 Note that, like in the group mode, the external_aad for encryption is 1704 generated as in Section 4.3.1, and the Partial IV is the current 1705 fresh value of the client's Sender Sequence Number (see 1706 Section 2.3.2). 1708 9.3. Verifying the Request 1710 Upon receiving a request with the Group Flag set to 0, following the 1711 procedure in Section 7, the server MUST process it as defined in 1712 Section 8.2, with the following differences. 1714 o If the server discards the request due to not retrieving a 1715 Security Context associated to the OSCORE group or to not 1716 supporting the pairwise mode, the server MAY respond with a 4.02 1717 (Bad Option) error. When doing so, the server MAY set an Outer 1718 Max-Age option with value zero, and MAY include a descriptive 1719 string as diagnostic payload. 1721 o If a new Recipient Context is created for this Recipient ID, new 1722 Pairwise Sender/Recipient Keys are also derived (see 1723 Section 2.3.1). The new Pairwise Sender/Recipient Keys are 1724 deleted if the Recipient Context is deleted as a result of the 1725 message not being successfully verified. 1727 o The used Recipient Key is the Pairwise Recipient Key (see 1728 Section 2.3). 1730 o No verification of counter signature occurs, as there is none 1731 included in the message. 1733 9.4. Protecting the Response 1735 When using the pairwise mode, a response is protected as defined in 1736 Section 8.3, with the following differences. 1738 o The Group Flag MUST be set to 0. 1740 o The used Sender Key is the Pairwise Sender Key (see Section 2.3). 1742 o The counter signature is not computed and therefore not included 1743 in the message. The payload of the protected response thus 1744 terminates with the encoded ciphertext of the COSE object, just 1745 like in [RFC8613]. 1747 9.5. Verifying the Response 1749 Upon receiving a response with the Group Flag set to 0, following the 1750 procedure in Section 7, the client MUST process it as defined in 1751 Section 8.4, with the following differences. 1753 o If a new Recipient Context is created for this Recipient ID, new 1754 Pairwise Sender/Recipient Keys are also derived (see 1755 Section 2.3.1). The new Pairwise Sender/Recipient Keys are 1756 deleted if the Recipient Context is deleted as a result of the 1757 message not being successfully verified. 1759 o The used Recipient Key is the Pairwise Recipient Key (see 1760 Section 2.3). 1762 o No verification of counter signature occurs, as there is none 1763 included in the message. 1765 10. Security Considerations 1767 The same threat model discussed for OSCORE in Appendix D.1 of 1768 [RFC8613] holds for Group OSCORE. In addition, when using the group 1769 mode, source authentication of messages is explicitly ensured by 1770 means of counter signatures, as discussed in Section 10.1. 1772 The same considerations on supporting Proxy operations discussed for 1773 OSCORE in Appendix D.2 of [RFC8613] hold for Group OSCORE. 1775 The same considerations on protected message fields for OSCORE 1776 discussed in Appendix D.3 of [RFC8613] hold for Group OSCORE. 1778 The same considerations on uniqueness of (key, nonce) pairs for 1779 OSCORE discussed in Appendix D.4 of [RFC8613] hold for Group OSCORE. 1780 This is further discussed in Section 10.2 of this document. 1782 The same considerations on unprotected message fields for OSCORE 1783 discussed in Appendix D.5 of [RFC8613] hold for Group OSCORE, with 1784 the following difference. The counter signature included in a Group 1785 OSCORE message protected in group mode is computed also over the 1786 value of the OSCORE option, which is part of the Additional 1787 Authenticated Data used in the signing process. This is further 1788 discussed in Section 10.6 of this document. 1790 As discussed in Section 6.2.3 of [I-D.ietf-core-groupcomm-bis], Group 1791 OSCORE addresses security attacks against CoAP listed in Sections 1792 11.2-11.6 of [RFC7252], especially when run over IP multicast. 1794 The rest of this section first discusses security aspects to be taken 1795 into account when using Group OSCORE. Then it goes through aspects 1796 covered in the security considerations of OSCORE (see Section 12 of 1797 [RFC8613]), and discusses how they hold when Group OSCORE is used. 1799 10.1. Group-level Security 1801 The group mode described in Section 8 relies on commonly shared group 1802 keying material to protect communication within a group. This has 1803 the following implications. 1805 o Messages are encrypted at a group level (group-level data 1806 confidentiality), i.e. they can be decrypted by any member of the 1807 group, but not by an external adversary or other external 1808 entities. 1810 o The AEAD algorithm provides only group authentication, i.e. it 1811 ensures that a message sent to a group has been sent by a member 1812 of that group, but not necessarily by the alleged sender. This is 1813 why source authentication of messages sent to a group is ensured 1814 through a counter signature, which is computed by the sender using 1815 its own private key and then appended to the message payload. 1817 Instead, the pairwise mode described in Section 9 protects messages 1818 by using pairwise symmetric keys, derived from the static-static 1819 Diffie-Hellman shared secret computed from the asymmetric keys of the 1820 sender and recipient endpoint (see Section 2.3). Therefore, in the 1821 parwise mode, the AEAD algorithm provides both pairwise data- 1822 confidentiality and source authentication of messages, without using 1823 counter signatures. 1825 The long-term storing of the Diffie-Hellman shared secret is a 1826 potential security issue. In fact, if the shared secret of two group 1827 members is leaked, a third group member can exploit it to impersonate 1828 any of those two group members, by deriving and using their pairwise 1829 key. The possibility of such leakage should be contemplated, as more 1830 likely to happen than the leakage of a private key, which could be 1831 rather protected at a significantly higher level than generic memory, 1832 e.g. by using a Trusted Platform Module. Therefore, there is a 1833 trade-off between the maximum amount of time a same shared secret is 1834 stored and the frequency of its re-computing. 1836 Note that, even if an endpoint is authorized to be a group member and 1837 to take part in group communications, there is a risk that it behaves 1838 inappropriately. For instance, it can forward the content of 1839 messages in the group to unauthorized entities. However, in many use 1840 cases, the devices in the group belong to a common authority and are 1841 configured by a commissioner (see Appendix B), which results in a 1842 practically limited risk and enables a prompt detection/reaction in 1843 case of misbehaving. 1845 10.2. Uniqueness of (key, nonce) 1847 The proof for uniqueness of (key, nonce) pairs in Appendix D.4 of 1848 [RFC8613] is also valid in group communication scenarios. That is, 1849 given an OSCORE group: 1851 o Uniqueness of Sender IDs within the group is enforced by the Group 1852 Manager, which never reassigns the same Sender ID within the same 1853 group. 1855 o The case A in Appendix D.4 of [RFC8613] concerns all group 1856 requests and responses including a Partial IV (e.g. Observe 1857 notifications). In this case, same considerations from [RFC8613] 1858 apply here as well. 1860 o The case B in Appendix D.4 of [RFC8613] concerns responses not 1861 including a Partial IV (e.g. single response to a group request). 1862 In this case, same considerations from [RFC8613] apply here as 1863 well. 1865 As a consequence, each message encrypted/decrypted with the same 1866 Sender Key is processed by using a different (ID_PIV, PIV) pair. 1867 This means that nonces used by any fixed encrypting endpoint are 1868 unique. Thus, each message is processed with a different (key, 1869 nonce) pair. 1871 10.3. Management of Group Keying Material 1873 The approach described in this specification should take into account 1874 the risk of compromise of group members. In particular, this 1875 document specifies that a key management scheme for secure revocation 1876 and renewal of Security Contexts and group keying material should be 1877 adopted. 1879 [I-D.ietf-ace-key-groupcomm-oscore] provides a simple rekeying scheme 1880 for renewing the Security Context in a group. 1882 Alternative rekeying schemes which are more scalable with the group 1883 size may be needed in dynamic, large-scale groups where endpoints can 1884 join and leave at any time, in order to limit the impact on 1885 performance due to the Security Context and keying material update. 1887 10.4. Update of Security Context and Key Rotation 1889 A group member can receive a message shortly after the group has been 1890 rekeyed, and new security parameters and keying material have been 1891 distributed by the Group Manager. 1893 This may result in a client using an old Security Context to protect 1894 a group request, and a server using a different new Security Context 1895 to protect a corresponding response. As a consequence, clients may 1896 receive a response protected with a Security Context different from 1897 the one used to protect the corresponding group request. 1899 In particular, a server may first get a group request protected with 1900 the old Security Context, then install the new Security Context, and 1901 only after that produce a response to send back to the client. In 1902 such a case, as specified in Section 8.3, the server MUST protect the 1903 potential response using the new Security Context. Specifically, the 1904 server MUST include its Sender Sequence Number as Partial IV in the 1905 response and use it to build the AEAD nonce to protect the response. 1906 This prevents the AEAD nonce from the request from being reused with 1907 the new Security Context. 1909 The client will process that response using the new Security Context, 1910 provided that it has installed the new security parameters and keying 1911 material before the message processing. 1913 In case block-wise transfer [RFC7959] is used, the same 1914 considerations from Section 7.2 of [I-D.ietf-ace-key-groupcomm] hold. 1916 Furthermore, as described below, a group rekeying may temporarily 1917 result in misaligned Security Contexts between the sender and 1918 recipient of a same message. 1920 10.4.1. Late Update on the Sender 1922 In this case, the sender protects a message using the old Security 1923 Context, i.e. before having installed the new Security Context. 1924 However, the recipient receives the message after having installed 1925 the new Security Context, and is thus unable to correctly process it. 1927 A possible way to ameliorate this issue is to preserve the old, 1928 recent, Security Context for a maximum amount of time defined by the 1929 application. By doing so, the recipient can still try to process the 1930 received message using the old retained Security Context as second 1931 attempt. This makes particular sense when the recipient is a client, 1932 that would hence be able to process incoming responses protected with 1933 the old, recent, Security Context used to protect the associated 1934 group request. Instead, a recipient server would better and more 1935 simply discard an incoming group request which is not successfully 1936 processed with the new Security Context. 1938 This tolerance preserves the processing of secure messages throughout 1939 a long-lasting key rotation, as group rekeying processes may likely 1940 take a long time to complete, especially in large scale groups. On 1941 the other hand, a former (compromised) group member can abusively 1942 take advantage of this, and send messages protected with the old 1943 retained Security Context. Therefore, a conservative application 1944 policy should not admit the retention of old Security Contexts. 1946 10.4.2. Late Update on the Recipient 1948 In this case, the sender protects a message using the new Security 1949 Context, but the recipient receives that message before having 1950 installed the new Security Context. Therefore, the recipient would 1951 not be able to correctly process the message and hence discards it. 1953 If the recipient installs the new Security Context shortly after that 1954 and the sender endpoint retransmits the message, the former will 1955 still be able to receive and correctly process the message. 1957 In any case, the recipient should actively ask the Group Manager for 1958 an updated Security Context according to an application-defined 1959 policy, for instance after a given number of unsuccessfully decrypted 1960 incoming messages. 1962 10.5. Collision of Group Identifiers 1964 In case endpoints are deployed in multiple groups managed by 1965 different non-synchronized Group Managers, it is possible for Group 1966 Identifiers of different groups to coincide. 1968 This does not impair the security of the AEAD algorithm. In fact, as 1969 long as the Master Secret is different for different groups and this 1970 condition holds over time, AEAD keys are different among different 1971 groups. 1973 The entity assigning an IP multicast address may help limiting the 1974 chances to experience such collisions of Group Identifiers. In 1975 particular, it may allow the Group Managers of groups using the same 1976 IP multicast address to share their respective list of assigned Group 1977 Identifiers currently in use. 1979 10.6. Cross-group Message Injection 1981 A same endpoint is allowed to and would likely use the same public/ 1982 private key pair in multiple OSCORE groups, possibly administered by 1983 different Group Managers. 1985 When a sender endpoint sends a message protected in pairwise mode to 1986 a recipient endpoint in an OSCORE group, a malicious group member may 1987 attempt to inject the message to a different OSCORE group also 1988 including the same endpoints (see Section 10.6.1). 1990 This practically relies on altering the content of the OSCORE option, 1991 and having the same MAC in the ciphertext still correctly validating, 1992 which has a success probability depending on the size of the MAC. 1994 As discussed in Section 10.6.2, the attack is practically infeasible 1995 if the message is protected in group mode, since the counter 1996 signature is bound also to the OSCORE option, through the Additional 1997 Authenticated Data used in the signing process (see Section 4.3.2). 1999 10.6.1. Attack Description 2001 Let us consider: 2003 o Two OSCORE groups G1 and G2, with ID Context (Group ID) Gid1 and 2004 Gid2, respectively. Both G1 and G2 use the AEAD cipher AES-CCM- 2005 16-64-128, i.e. the MAC of the ciphertext is 8 bytes in size. 2007 o A sender endpoint X which is member of both G1 and G2, and uses 2008 the same public/private key pair in both groups. The endpoint X 2009 has Sender ID Sid1 in G1 and Sender ID Sid2 in G2. The pairs 2010 (Sid1, Gid1) and (Sid2, Gid2) identify the same public key of X in 2011 G1 and G2, respectively. 2013 o A recipient endpoint Y which is member of both G1 and G2, and uses 2014 the same public/private key pair in both groups. The endpoint Y 2015 has Sender ID Sid3 in G1 and Sender ID Sid4 in G2. The pairs 2016 (Sid3, Gid1) and (Sid4, Gid2) identify the same public key of Y in 2017 G1 and G2, respectively. 2019 o A malicious endpoint Z is also member of both G1 and G2. Hence, Z 2020 is able to derive the symmetric keys associated to X in G1 and G2. 2022 When X sends a message M1 addressed to Y in G1 and protected in 2023 pairwise mode, Z can intercept M1, and forge a valid message M2 to be 2024 injected in G2, making it appear as still sent by X to Y and valid to 2025 be accepted. 2027 More in detail, Z intercepts and stops message M1, and forges a 2028 message M2 by changing the value of the OSCORE option from M1 as 2029 follows: the 'kid context' is changed from G1 to G2; and the 'kid' is 2030 changed from Sid1 to Sid2. Then, Z injects message M2 as addressed 2031 to Y in G2. 2033 Upon receiving M2, there is a probability equal to 2^-64 that Y 2034 successfully verifies the same unchanged MAC by using Sid2 as 2035 'request_kid' and using the Pairwise Recipient Key associated to X in 2036 G2. 2038 Note that Z does not know the pairwise keys of X and Y, since it does 2039 not know and is not able to compute their shared Diffie-Hellman 2040 secret. Therefore, Z is not able to check offline if a performed 2041 forgery is actually valid, before sending the forged message to G2. 2043 10.6.2. Attack Prevention in Group Mode 2045 When a Group OSCORE message is protected with the group mode, the 2046 counter signature is computed also over the value of the OSCORE 2047 option, which is part of the Additional Authenticated Data used in 2048 the signing process (see Section 4.3.2). 2050 That is, the countersignature is computed also over: the ID Context 2051 (Group ID) and the Partial IV, which are always present in group 2052 requests; as well as the Sender ID of the message originator, which 2053 is always present in all group requests and responses. 2055 Since the signing process takes as input also the ciphertext of the 2056 COSE_Encrypt0 object, the countersignature is bound not only to the 2057 intended OSCORE group, hence to the triplet (Master Secret, Master 2058 Salt, ID Context), but also to a specific Sender ID in that group and 2059 to its specific symmetric key used for AEAD encryption, hence to the 2060 quartet (Master Secret, Master Salt, ID Context, Sender ID). 2062 This makes it practically infeasible to perform the attack described 2063 in Section 10.6.1, since it would require the adversary to 2064 additionally forge a valid countersignature that replaces the 2065 original one in the forged message M2. 2067 If the countersignature did not cover the OSCORE option, the attack 2068 would be possible also in group mode, since the same unchanged 2069 countersignature from messsage M1 would be also valid in message M2. 2070 Also, the following attack simplifications would hold, since Z is 2071 able to derive the Sender/Recipient Keys of X and Y in G1 and G2. 2073 o If M2 is used as a request, Z can check offline if a performed 2074 forgery is actually valid before sending the forged message to G2. 2076 That is, this attack would have a complexity of 2^64 offline 2077 calculations. 2079 o If M2 is used as a response, Z can also change the response 2080 Partial IV, until the same unchanged MAC is successfully verified 2081 by using Sid2 as 'request_kid' and the symmetric key associated to 2082 X in G2. Since the Partial IV is 5 bytes in size, this requires 2083 2^40 operations to test all the Partial IVs, which can be done in 2084 real-time. Also, the probability that a single given message M1 2085 can be used to forge a response M2 for a given request would be 2086 equal to 2^-24, since there are more MAC values (8 bytes in size) 2087 than Partial IV values (5 bytes in size). 2089 Note that, by changing the Partial IV as discussed above, any 2090 member of G1 would also be able to forge a valid signed response 2091 message M2 to be injected in G1. 2093 10.7. Group OSCORE for Unicast Requests 2095 If a request is intended to be sent over unicast as addressed to a 2096 single group member, it is NOT RECOMMENDED for the client to protect 2097 the request by using the group mode as defined in Section 8.1. 2099 This does not include the case where the client sends a request over 2100 unicast to a proxy, to be forwarded to multiple intended recipients 2101 over multicast [I-D.ietf-core-groupcomm-bis]. In this case, the 2102 client MUST protect the request with the group mode, even though it 2103 is sent to the proxy over unicast (see Section 8). 2105 If the client uses the group mode with its own Sender Key to protect 2106 a unicast request to a group member, an on-path adversary can, right 2107 then or later on, redirect that request to one/many different group 2108 member(s) over unicast, or to the whole OSCORE group over multicast. 2109 By doing so, the adversary can induce the target group member(s) to 2110 perform actions intended for one group member only. Note that the 2111 adversary can be external, i.e. (s)he does not need to also be a 2112 member of the OSCORE group. 2114 This is due to the fact that the client is not able to indicate the 2115 single intended recipient in a way which is secure and possible to 2116 process for Group OSCORE on the server side. In particular, Group 2117 OSCORE does not protect network addressing information such as the IP 2118 address of the intended recipient server. It follows that the 2119 server(s) receiving the redirected request cannot assert whether that 2120 was the original intention of the client, and would thus simply 2121 assume so. 2123 The impact of such an attack depends especially on the REST method of 2124 the request, i.e. the Inner CoAP Code of the OSCORE request message. 2125 In particular, safe methods such as GET and FETCH would trigger 2126 (several) unintended responses from the targeted server(s), while not 2127 resulting in destructive behavior. On the other hand, non safe 2128 methods such as PUT, POST and PATCH/iPATCH would result in the target 2129 server(s) taking active actions on their resources and possible 2130 cyber-physical environment, with the risk of destructive consequences 2131 and possible implications for safety. 2133 A client can instead use the pairwise mode as defined in Section 9.2, 2134 in order to protect a request sent to a single group member by using 2135 pairwise keying material (see Section 2.3). This prevents the attack 2136 discussed above by construction, as only the intended server is able 2137 to derive the pairwise keying material used by the client to protect 2138 the request. A client supporting the pairwise mode SHOULD use it to 2139 protect requests sent to a single group member over unicast, instead 2140 of using the group mode. For an example where this is not fulfilled, 2141 see Section 6.2.1 in 2142 [I-D.tiloca-core-observe-multicast-notifications]. 2144 With particular reference to block-wise transfers [RFC7959], 2145 Section 2.3.6 of [I-D.ietf-core-groupcomm-bis] points out that, while 2146 an initial request including the CoAP Block2 option can be sent over 2147 multicast, any other request in a transfer has to occur over unicast, 2148 individually addressing the servers in the group. 2150 Additional considerations are discussed in Appendix E.3, with respect 2151 to requests including a CoAP Echo Option 2152 [I-D.ietf-core-echo-request-tag] that has to be sent over unicast, as 2153 a challenge-response method for servers to achieve synchronization of 2154 clients' Sender Sequence Number. 2156 10.8. End-to-end Protection 2158 The same considerations from Section 12.1 of [RFC8613] hold for Group 2159 OSCORE. 2161 Additionally, (D)TLS and Group OSCORE can be combined for protecting 2162 message exchanges occurring over unicast. However, it is not 2163 possible to combine (D)TLS and Group OSCORE for protecting message 2164 exchanges where messages are (also) sent over multicast. 2166 10.9. Master Secret 2168 Group OSCORE derives the Security Context using the same construction 2169 as OSCORE, and by using the Group Identifier of a group as the 2170 related ID Context. Hence, the same required properties of the 2171 Security Context parameters discussed in Section 3.3 of [RFC8613] 2172 hold for this document. 2174 With particular reference to the OSCORE Master Secret, it has to be 2175 kept secret among the members of the respective OSCORE group and the 2176 Group Manager responsible for that group. Also, the Master Secret 2177 must have a good amount of randomness, and the Group Manager can 2178 generate it offline using a good random number generator. This 2179 includes the case where the Group Manager rekeys the group by 2180 generating and distributing a new Master Secret. Randomness 2181 requirements for security are described in [RFC4086]. 2183 10.10. Replay Protection 2185 As in OSCORE, also Group OSCORE relies on sender sequence numbers 2186 included in the COSE message field 'Partial IV' and used to build 2187 AEAD nonces. 2189 Note that the Partial IV of an endpoint does not necessarily grow 2190 monotonically. For instance, upon exhaustion of the endpoint Sender 2191 Sequence Number, the Partial IV also gets exhausted. As discussed in 2192 Section 2.4.3, this results either in the endpoint being individually 2193 rekeyed and getting a new Sender ID, or in the establishment of a new 2194 Security Context in the group. Therefore, uniqueness of (key, nonce) 2195 pairs (see Section 10.2) is preserved also when a new Security 2196 Context is established. 2198 As discussed in Section 6.1, an endpoint that has just joined a group 2199 is exposed to replay attack, as it is not aware of the Sender 2200 Sequence Numbers currently used by other group members. Appendix E 2201 describes how endpoints can synchronize with others' Sender Sequence 2202 Number. 2204 Unless exchanges in a group rely only on unicast messages, Group 2205 OSCORE cannot be used with reliable transport. Thus, unless only 2206 unicast messages are sent in the group, it cannot be defined that 2207 only messages with sequence numbers that are equal to the previous 2208 sequence number + 1 are accepted. 2210 The processing of response messages described in Section 2.3.1 of 2211 [I-D.ietf-core-groupcomm-bis] also ensures that a client accepts a 2212 single valid response to a given request from each replying server, 2213 unless CoAP observation is used. 2215 10.11. Client Aliveness 2217 As discussed in Section 12.5 of [RFC8613], a server may use the CoAP 2218 Echo Option [I-D.ietf-core-echo-request-tag] to verify the aliveness 2219 of the client that originated a received request. This would also 2220 allow the server to (re-)synchronize with the client's Sender 2221 Sequence Number, as well as to ensure that the request is fresh and 2222 has not been replayed or (purposely) delayed, if it is the first one 2223 received from that client after having joined the group or rebooted 2224 (see Appendix E.3). 2226 10.12. Cryptographic Considerations 2228 The same considerations from Section 12.6 of [RFC8613] about the 2229 maximum Sender Sequence Number hold for Group OSCORE. 2231 As discussed in Section 2.4.2, an endpoint that experiences an 2232 exhaustion of its own Sender Sequence Numbers MUST NOT protect 2233 further messages including a Partial IV, until it has derived a new 2234 Sender Context. This prevents the endpoint to reuse the same AEAD 2235 nonces with the same Sender Key. 2237 In order to renew its own Sender Context, the endpoint SHOULD inform 2238 the Group Manager, which can either renew the whole Security Context 2239 by means of group rekeying, or provide only that endpoint with a new 2240 Sender ID value. In either case, the endpoint derives a new Sender 2241 Context, and in particular a new Sender Key. 2243 Additionally, the same considerations from Section 12.6 of [RFC8613] 2244 hold for Group OSCORE, about building the AEAD nonce and the secrecy 2245 of the Security Context parameters. 2247 The EdDSA signature algorithm and the elliptic curve Ed25519 2248 [RFC8032] are mandatory to implement. For endpoints that support the 2249 pairwise mode, the ECDH-SS + HKDF-256 algorithm specified in 2250 Section 6.3.1 of [I-D.ietf-cose-rfc8152bis-algs] and the X25519 curve 2251 [RFC7748] are also mandatory to implement. 2253 Constrained IoT devices may alternatively represent Montgomery curves 2254 and (twisted) Edwards curves [RFC7748] in the short-Weierstrass form 2255 Wei25519, with which the algorithms ECDSA25519 and ECDH25519 can be 2256 used for signature operations and Diffie-Hellman secret calculation, 2257 respectively [I-D.ietf-lwig-curve-representations]. 2259 For many constrained IoT devices, it is problematic to support more 2260 than one signature algorithm or multiple whole cipher suites. As a 2261 consequence, some deployments using, for instance, ECDSA with NIST 2262 P-256 may not support the mandatory signature algorithm but that 2263 should not be an issue for local deployments. 2265 The derivation of pairwise keys defined in Section 2.3.1 is 2266 compatible with ECDSA and EdDSA asymmetric keys, but is not 2267 compatible with RSA asymmetric keys. The security of using the same 2268 key pair for Diffie-Hellman and for signing is demonstrated in 2269 [Degabriele]. 2271 10.13. Message Segmentation 2273 The same considerations from Section 12.7 of [RFC8613] hold for Group 2274 OSCORE. 2276 10.14. Privacy Considerations 2278 Group OSCORE ensures end-to-end integrity protection and encryption 2279 of the message payload and all options that are not used for proxy 2280 operations. In particular, options are processed according to the 2281 same class U/I/E that they have for OSCORE. Therefore, the same 2282 privacy considerations from Section 12.8 of [RFC8613] hold for Group 2283 OSCORE. 2285 Furthermore, the following privacy considerations hold, about the 2286 OSCORE option that may reveal information on the communicating 2287 endpoints. 2289 o The 'kid' parameter, which is intended to help a recipient 2290 endpoint to find the right Recipient Context, may reveal 2291 information about the Sender Endpoint. Since both requests and 2292 responses always include the 'kid' parameter, this may reveal 2293 information about both a client sending a group request and all 2294 the possibly replying servers sending their own individual 2295 response. 2297 o The 'kid context' parameter, which is intended to help a recipient 2298 endpoint to find the right Security Context, reveals information 2299 about the sender endpoint. In particular, it reveals that the 2300 sender endpoint is a member of a particular OSCORE group, whose 2301 current Group ID is indicated in the 'kid context' parameter. 2303 When receiving a group request, each of the recipient endpoints can 2304 reply with a response that includes its Sender ID as 'kid' parameter. 2305 All these responses will be matchable with the request through the 2306 Token. Thus, even if these responses do not include a 'kid context' 2307 parameter, it becomes possible to understand that the responder 2308 endpoints are in the same group of the requester endpoint. 2310 Furthermore, using the mechanisms described in Appendix E.3 to 2311 achieve sequence number synchronization with a client may reveal when 2312 a server device goes through a reboot. This can be mitigated by the 2313 server device storing the precise state of the replay window of each 2314 known client on a clean shutdown. 2316 Finally, the mechanism described in Section 10.5 to prevent 2317 collisions of Group Identifiers from different Group Managers may 2318 reveal information about events in the respective OSCORE groups. In 2319 particular, a Group Identifier changes when the corresponding group 2320 is rekeyed. Thus, Group Managers might use the shared list of Group 2321 Identifiers to infer the rate and patterns of group membership 2322 changes triggering a group rekeying, e.g. due to newly joined members 2323 or evicted (compromised) members. In order to alleviate this privacy 2324 concern, it should be hidden from the Group Managers which exact 2325 Group Manager has currently assigned which Group Identifiers in its 2326 OSCORE groups. 2328 11. IANA Considerations 2330 Note to RFC Editor: Please replace all occurrences of "[This 2331 Document]" with the RFC number of this specification and delete this 2332 paragraph. 2334 This document has the following actions for IANA. 2336 11.1. OSCORE Flag Bits Registry 2338 IANA is asked to add the following value entry to the "OSCORE Flag 2339 Bits" subregistry defined in Section 13.7 of [RFC8613] as part of the 2340 "CoRE Parameters" registry. 2342 +--------------+------------+----------------------------+-----------+ 2343 | Bit Position | Name | Description | Reference | 2344 +--------------+------------+----------------------------+-----------+ 2345 | 2 | Group Flag | Set to 1 if the message is | [This | 2346 | | | protected with the group | Document] | 2347 | | | mode of Group OSCORE | | 2348 +--------------+------------+----------------------------+-----------+ 2350 12. References 2352 12.1. Normative References 2354 [COSE.Algorithms] 2355 IANA, "COSE Algorithms", 2356 . 2359 [COSE.Key.Types] 2360 IANA, "COSE Key Types", 2361 . 2364 [I-D.ietf-cbor-7049bis] 2365 Bormann, C. and P. Hoffman, "Concise Binary Object 2366 Representation (CBOR)", draft-ietf-cbor-7049bis-16 (work 2367 in progress), September 2020. 2369 [I-D.ietf-core-groupcomm-bis] 2370 Dijk, E., Wang, C., and M. Tiloca, "Group Communication 2371 for the Constrained Application Protocol (CoAP)", draft- 2372 ietf-core-groupcomm-bis-02 (work in progress), November 2373 2020. 2375 [I-D.ietf-cose-countersign] 2376 Schaad, J. and R. Housley, "CBOR Object Signing and 2377 Encryption (COSE): Countersignatures", draft-ietf-cose- 2378 countersign-01 (work in progress), October 2020. 2380 [I-D.ietf-cose-rfc8152bis-algs] 2381 Schaad, J., "CBOR Object Signing and Encryption (COSE): 2382 Initial Algorithms", draft-ietf-cose-rfc8152bis-algs-12 2383 (work in progress), September 2020. 2385 [I-D.ietf-cose-rfc8152bis-struct] 2386 Schaad, J., "CBOR Object Signing and Encryption (COSE): 2387 Structures and Process", draft-ietf-cose-rfc8152bis- 2388 struct-14 (work in progress), September 2020. 2390 [NIST-800-56A] 2391 Barker, E., Chen, L., Roginsky, A., Vassilev, A., and R. 2392 Davis, "Recommendation for Pair-Wise Key-Establishment 2393 Schemes Using Discrete Logarithm Cryptography - NIST 2394 Special Publication 800-56A, Revision 3", April 2018, 2395 . 2398 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2399 Requirement Levels", BCP 14, RFC 2119, 2400 DOI 10.17487/RFC2119, March 1997, 2401 . 2403 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 2404 "Randomness Requirements for Security", BCP 106, RFC 4086, 2405 DOI 10.17487/RFC4086, June 2005, 2406 . 2408 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 2409 Application Protocol (CoAP)", RFC 7252, 2410 DOI 10.17487/RFC7252, June 2014, 2411 . 2413 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 2414 for Security", RFC 7748, DOI 10.17487/RFC7748, January 2415 2016, . 2417 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 2418 Signature Algorithm (EdDSA)", RFC 8032, 2419 DOI 10.17487/RFC8032, January 2017, 2420 . 2422 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2423 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2424 May 2017, . 2426 [RFC8613] Selander, G., Mattsson, J., Palombini, F., and L. Seitz, 2427 "Object Security for Constrained RESTful Environments 2428 (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019, 2429 . 2431 12.2. Informative References 2433 [Degabriele] 2434 Degabriele, J., Lehmann, A., Paterson, K., Smart, N., and 2435 M. Strefler, "On the Joint Security of Encryption and 2436 Signature in EMV", December 2011, 2437 . 2439 [I-D.ietf-ace-key-groupcomm] 2440 Palombini, F. and M. Tiloca, "Key Provisioning for Group 2441 Communication using ACE", draft-ietf-ace-key-groupcomm-10 2442 (work in progress), November 2020. 2444 [I-D.ietf-ace-key-groupcomm-oscore] 2445 Tiloca, M., Park, J., and F. Palombini, "Key Management 2446 for OSCORE Groups in ACE", draft-ietf-ace-key-groupcomm- 2447 oscore-09 (work in progress), November 2020. 2449 [I-D.ietf-ace-oauth-authz] 2450 Seitz, L., Selander, G., Wahlstroem, E., Erdtman, S., and 2451 H. Tschofenig, "Authentication and Authorization for 2452 Constrained Environments (ACE) using the OAuth 2.0 2453 Framework (ACE-OAuth)", draft-ietf-ace-oauth-authz-35 2454 (work in progress), June 2020. 2456 [I-D.ietf-core-echo-request-tag] 2457 Amsuess, C., Mattsson, J., and G. Selander, "CoAP: Echo, 2458 Request-Tag, and Token Processing", draft-ietf-core-echo- 2459 request-tag-10 (work in progress), July 2020. 2461 [I-D.ietf-lwig-curve-representations] 2462 Struik, R., "Alternative Elliptic Curve Representations", 2463 draft-ietf-lwig-curve-representations-12 (work in 2464 progress), August 2020. 2466 [I-D.ietf-lwig-security-protocol-comparison] 2467 Mattsson, J., Palombini, F., and M. Vucinic, "Comparison 2468 of CoAP Security Protocols", draft-ietf-lwig-security- 2469 protocol-comparison-04 (work in progress), March 2020. 2471 [I-D.ietf-tls-dtls13] 2472 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 2473 Datagram Transport Layer Security (DTLS) Protocol Version 2474 1.3", draft-ietf-tls-dtls13-38 (work in progress), May 2475 2020. 2477 [I-D.mattsson-cfrg-det-sigs-with-noise] 2478 Mattsson, J., Thormarker, E., and S. Ruohomaa, 2479 "Deterministic ECDSA and EdDSA Signatures with Additional 2480 Randomness", draft-mattsson-cfrg-det-sigs-with-noise-02 2481 (work in progress), March 2020. 2483 [I-D.somaraju-ace-multicast] 2484 Somaraju, A., Kumar, S., Tschofenig, H., and W. Werner, 2485 "Security for Low-Latency Group Communication", draft- 2486 somaraju-ace-multicast-02 (work in progress), October 2487 2016. 2489 [I-D.tiloca-core-observe-multicast-notifications] 2490 Tiloca, M., Hoeglund, R., Amsuess, C., and F. Palombini, 2491 "Observe Notifications as CoAP Multicast Responses", 2492 draft-tiloca-core-observe-multicast-notifications-04 (work 2493 in progress), November 2020. 2495 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 2496 "Transmission of IPv6 Packets over IEEE 802.15.4 2497 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 2498 . 2500 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2501 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2502 . 2504 [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 2505 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, 2506 DOI 10.17487/RFC6282, September 2011, 2507 . 2509 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 2510 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 2511 January 2012, . 2513 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 2514 Constrained-Node Networks", RFC 7228, 2515 DOI 10.17487/RFC7228, May 2014, 2516 . 2518 [RFC7641] Hartke, K., "Observing Resources in the Constrained 2519 Application Protocol (CoAP)", RFC 7641, 2520 DOI 10.17487/RFC7641, September 2015, 2521 . 2523 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 2524 the Constrained Application Protocol (CoAP)", RFC 7959, 2525 DOI 10.17487/RFC7959, August 2016, 2526 . 2528 Appendix A. Assumptions and Security Objectives 2530 This section presents a set of assumptions and security objectives 2531 for the approach described in this document. The rest of this 2532 section refers to three types of groups: 2534 o Application group, i.e. a set of CoAP endpoints that share a 2535 common pool of resources. 2537 o Security group, as defined in Section 1.1 of this specification. 2538 There can be a one-to-one or a one-to-many relation between 2539 security groups and application groups, and vice versa. 2541 o CoAP group, as defined in [I-D.ietf-core-groupcomm-bis] i.e. a set 2542 of CoAP endpoints, where each endpoint is configured to receive 2543 CoAP multicast requests that are sent to the group's associated IP 2544 multicast address and UDP port. An endpoint may be a member of 2545 multiple CoAP groups. There can be a one-to-one or a one-to-many 2546 relation between application groups and CoAP groups. Note that a 2547 device sending a CoAP request to a CoAP group is not necessarily 2548 itself a member of that group: it is a member only if it also has 2549 a CoAP server endpoint listening to requests for this CoAP group, 2550 sent to the associated IP multicast address and port. In order to 2551 provide secure group communication, all members of a CoAP group as 2552 well as all further endpoints configured only as clients sending 2553 CoAP (multicast) requests to the CoAP group have to be member of a 2554 security group. There can be a one-to-one or a one-to-many 2555 relation between security groups and CoAP groups, and vice versa. 2557 A.1. Assumptions 2559 The following assumptions are assumed to be already addressed and are 2560 out of the scope of this document. 2562 o Multicast communication topology: this document considers both 2563 1-to-N (one sender and multiple recipients) and M-to-N (multiple 2564 senders and multiple recipients) communication topologies. The 2565 1-to-N communication topology is the simplest group communication 2566 scenario that would serve the needs of a typical Low-power and 2567 Lossy Network (LLN). Examples of use cases that benefit from 2568 secure group communication are provided in Appendix B. 2570 In a 1-to-N communication model, only a single client transmits 2571 data to the CoAP group, in the form of request messages; in an 2572 M-to-N communication model (where M and N do not necessarily have 2573 the same value), M clients transmit data to the CoAP group. 2574 According to [I-D.ietf-core-groupcomm-bis], any possible proxy 2575 entity is supposed to know about the clients and to not perform 2576 aggregation of response messages from multiple servers. Also, 2577 every client expects and is able to handle multiple response 2578 messages associated to a same request sent to the CoAP group. 2580 o Group size: security solutions for group communication should be 2581 able to adequately support different and possibly large security 2582 groups. The group size is the current number of members in a 2583 security group. In the use cases mentioned in this document, the 2584 number of clients (normally the controlling devices) is expected 2585 to be much smaller than the number of servers (i.e. the controlled 2586 devices). A security solution for group communication that 2587 supports 1 to 50 clients would be able to properly cover the group 2588 sizes required for most use cases that are relevant for this 2589 document. The maximum group size is expected to be in the range 2590 of 2 to 100 devices. Security groups larger than that should be 2591 divided into smaller independent groups. 2593 o Communication with the Group Manager: an endpoint must use a 2594 secure dedicated channel when communicating with the Group 2595 Manager, also when not registered as a member of the security 2596 group. 2598 o Provisioning and management of Security Contexts: a Security 2599 Context must be established among the members of the security 2600 group. A secure mechanism must be used to generate, revoke and 2601 (re-)distribute keying material, communication policies and 2602 security parameters in the security group. The actual 2603 provisioning and management of the Security Context is out of the 2604 scope of this document. 2606 o Multicast data security ciphersuite: all members of a security 2607 group must agree on a ciphersuite to provide authenticity, 2608 integrity and confidentiality of messages in the group. The 2609 ciphersuite is specified as part of the Security Context. 2611 o Backward security: a new device joining the security group should 2612 not have access to any old Security Contexts used before its 2613 joining. This ensures that a new member of the security group is 2614 not able to decrypt confidential data sent before it has joined 2615 the security group. The adopted key management scheme should 2616 ensure that the Security Context is updated to ensure backward 2617 confidentiality. The actual mechanism to update the Security 2618 Context and renew the group keying material in the security group 2619 upon a new member's joining has to be defined as part of the group 2620 key management scheme. 2622 o Forward security: entities that leave the security group should 2623 not have access to any future Security Contexts or message 2624 exchanged within the security group after their leaving. This 2625 ensures that a former member of the security group is not able to 2626 decrypt confidential data sent within the security group anymore. 2627 Also, it ensures that a former member is not able to send 2628 protected messages to the security group anymore. The actual 2629 mechanism to update the Security Context and renew the group 2630 keying material in the security group upon a member's leaving has 2631 to be defined as part of the group key management scheme. 2633 A.2. Security Objectives 2635 The approach described in this document aims at fulfilling the 2636 following security objectives: 2638 o Data replay protection: group request messages or response 2639 messages replayed within the security group must be detected. 2641 o Data confidentiality: messages sent within the security group 2642 shall be encrypted. 2644 o Group-level data confidentiality: the group mode provides group- 2645 level data confidentiality since messages are encrypted at a group 2646 level, i.e. in such a way that they can be decrypted by any member 2647 of the security group, but not by an external adversary or other 2648 external entities. 2650 o Pairwise data confidentiality: the pairwise mode especially 2651 provides pairwise data confidentiality, since messages are 2652 encrypted using pairwise keying material shared between any two 2653 group members, hence they can be decrypted only by the intended 2654 single recipient. 2656 o Source message authentication: messages sent within the security 2657 group shall be authenticated. That is, it is essential to ensure 2658 that a message is originated by a member of the security group in 2659 the first place, and in particular by a specific, identifiable 2660 member of the security group. 2662 o Message integrity: messages sent within the security group shall 2663 be integrity protected. That is, it is essential to ensure that a 2664 message has not been tampered with, either by a group member, or 2665 by an external adversary or other external entities which are not 2666 members of the security group. 2668 o Message ordering: it must be possible to determine the ordering of 2669 messages coming from a single sender. In accordance with OSCORE 2670 [RFC8613], this results in providing absolute freshness of 2671 responses that are not notifications, as well as relative 2672 freshness of group requests and notification responses. It is not 2673 required to determine ordering of messages from different senders. 2675 Appendix B. List of Use Cases 2677 Group Communication for CoAP [I-D.ietf-core-groupcomm-bis] provides 2678 the necessary background for multicast-based CoAP communication, with 2679 particular reference to low-power and lossy networks (LLNs) and 2680 resource constrained environments. The interested reader is 2681 encouraged to first read [I-D.ietf-core-groupcomm-bis] to understand 2682 the non-security related details. This section discusses a number of 2683 use cases that benefit from secure group communication, and refers to 2684 the three types of groups from Appendix A. Specific security 2685 requirements for these use cases are discussed in Appendix A. 2687 o Lighting control: consider a building equipped with IP-connected 2688 lighting devices, switches, and border routers. The lighting 2689 devices acting as servers are organized into application groups 2690 and CoAP groups, according to their physical location in the 2691 building. For instance, lighting devices in a room or corridor 2692 can be configured as members of a single application group and 2693 corresponding CoAP group. Those ligthing devices together with 2694 the switches acting as clients in the same room or corridor can be 2695 configured as members of the corresponding security group. 2696 Switches are then used to control the lighting devices by sending 2697 on/off/dimming commands to all lighting devices in the CoAP group, 2698 while border routers connected to an IP network backbone (which is 2699 also multicast-enabled) can be used to interconnect routers in the 2700 building. Consequently, this would also enable logical groups to 2701 be formed even if devices with a role in the lighting application 2702 may be physically in different subnets (e.g. on wired and wireless 2703 networks). Connectivity between lighting devices may be realized, 2704 for instance, by means of IPv6 and (border) routers supporting 2705 6LoWPAN [RFC4944][RFC6282]. Group communication enables 2706 synchronous operation of a set of connected lights, ensuring that 2707 the light preset (e.g. dimming level or color) of a large set of 2708 luminaires are changed at the same perceived time. This is 2709 especially useful for providing a visual synchronicity of light 2710 effects to the user. As a practical guideline, events within a 2711 200 ms interval are perceived as simultaneous by humans, which is 2712 necessary to ensure in many setups. Devices may reply back to the 2713 switches that issue on/off/dimming commands, in order to report 2714 about the execution of the requested operation (e.g. OK, failure, 2715 error) and their current operational status. In a typical 2716 lighting control scenario, a single switch is the only entity 2717 responsible for sending commands to a set of lighting devices. In 2718 more advanced lighting control use cases, a M-to-N communication 2719 topology would be required, for instance in case multiple sensors 2720 (presence or day-light) are responsible to trigger events to a set 2721 of lighting devices. Especially in professional lighting 2722 scenarios, the roles of client and server are configured by the 2723 lighting commissioner, and devices strictly follow those roles. 2725 o Integrated building control: enabling Building Automation and 2726 Control Systems (BACSs) to control multiple heating, ventilation 2727 and air-conditioning units to pre-defined presets. Controlled 2728 units can be organized into application groups and CoAP groups in 2729 order to reflect their physical position in the building, e.g. 2730 devices in the same room can be configured as members of a single 2731 application group and corresponding CoAP group. As a practical 2732 guideline, events within intervals of seconds are typically 2733 acceptable. Controlled units are expected to possibly reply back 2734 to the BACS issuing control commands, in order to report about the 2735 execution of the requested operation (e.g. OK, failure, error) 2736 and their current operational status. 2738 o Software and firmware updates: software and firmware updates often 2739 comprise quite a large amount of data. This can overload a Low- 2740 power and Lossy Network (LLN) that is otherwise typically used to 2741 deal with only small amounts of data, on an infrequent base. 2742 Rather than sending software and firmware updates as unicast 2743 messages to each individual device, multicasting such updated data 2744 to a larger set of devices at once displays a number of benefits. 2745 For instance, it can significantly reduce the network load and 2746 decrease the overall time latency for propagating this data to all 2747 devices. Even if the complete whole update process itself is 2748 secured, securing the individual messages is important, in case 2749 updates consist of relatively large amounts of data. In fact, 2750 checking individual received data piecemeal for tampering avoids 2751 that devices store large amounts of partially corrupted data and 2752 that they detect tampering hereof only after all data has been 2753 received. Devices receiving software and firmware updates are 2754 expected to possibly reply back, in order to provide a feedback 2755 about the execution of the update operation (e.g. OK, failure, 2756 error) and their current operational status. 2758 o Parameter and configuration update: by means of multicast 2759 communication, it is possible to update the settings of a set of 2760 similar devices, both simultaneously and efficiently. Possible 2761 parameters are related, for instance, to network load management 2762 or network access controls. Devices receiving parameter and 2763 configuration updates are expected to possibly reply back, to 2764 provide a feedback about the execution of the update operation 2765 (e.g. OK, failure, error) and their current operational status. 2767 o Commissioning of Low-power and Lossy Network (LLN) systems: a 2768 commissioning device is responsible for querying all devices in 2769 the local network or a selected subset of them, in order to 2770 discover their presence, and be aware of their capabilities, 2771 default configuration, and operating conditions. Queried devices 2772 displaying similarities in their capabilities and features, or 2773 sharing a common physical location can be configured as members of 2774 a single application group and corresponding CoAP group. Queried 2775 devices are expected to reply back to the commissioning device, in 2776 order to notify their presence, and provide the requested 2777 information and their current operational status. 2779 o Emergency multicast: a particular emergency related information 2780 (e.g. natural disaster) is generated and multicast by an emergency 2781 notifier, and relayed to multiple devices. The latter may reply 2782 back to the emergency notifier, in order to provide their feedback 2783 and local information related to the ongoing emergency. This kind 2784 of setups should additionally rely on a fault tolerance multicast 2785 algorithm, such as Multicast Protocol for Low-Power and Lossy 2786 Networks (MPL). 2788 Appendix C. Example of Group Identifier Format 2790 This section provides an example of how the Group Identifier (Gid) 2791 can be specifically formatted. That is, the Gid can be composed of 2792 two parts, namely a Group Prefix and a Group Epoch. 2794 For each group, the Group Prefix is constant over time and is 2795 uniquely defined in the set of all the groups associated to the same 2796 Group Manager. The choice of the Group Prefix for a given group's 2797 Security Context is application specific. The size of the Group 2798 Prefix directly impact on the maximum number of distinct groups under 2799 the same Group Manager. 2801 The Group Epoch is set to 0 upon the group's initialization, and is 2802 incremented by 1 each time new keying material, together with a new 2803 Gid, is distributed to the group in order to establish a new Security 2804 Context (see Section 3.1). 2806 As an example, a 3-byte Gid can be composed of: i) a 1-byte Group 2807 Prefix '0xb1' interpreted as a raw byte string; and ii) a 2-byte 2808 Group Epoch interpreted as an unsigned integer ranging from 0 to 2809 65535. Then, after having established the Common Context 61532 times 2810 in the group, its Gid will assume value '0xb1f05c'. 2812 Using an immutable Group Prefix for a group assumes that enough time 2813 elapses before all possible Group Epoch values are used, since the 2814 Group Manager does not reassign the same Gid to the same group. 2815 Thus, the expected highest rate for addition/removal of group members 2816 and consequent group rekeying should be taken into account for a 2817 proper dimensioning of the Group Epoch size. 2819 As discussed in Section 10.5, if endpoints are deployed in multiple 2820 groups managed by different non-synchronized Group Managers, it is 2821 possible that Group Identifiers of different groups coincide at some 2822 point in time. In this case, a recipient has to handle coinciding 2823 Group Identifiers, and has to try using different Security Contexts 2824 to process an incoming message, until the right one is found and the 2825 message is correctly verified. Therefore, it is favourable that 2826 Group Identifiers from different Group Managers have a size that 2827 result in a small probability of collision. How small this 2828 probability should be is up to system designers. 2830 Appendix D. Set-up of New Endpoints 2832 An endpoint joins a group by explicitly interacting with the 2833 responsible Group Manager. When becoming members of a group, 2834 endpoints are not required to know how many and what endpoints are in 2835 the same group. 2837 Communications between a joining endpoint and the Group Manager rely 2838 on the CoAP protocol and must be secured. Specific details on how to 2839 secure communications between joining endpoints and a Group Manager 2840 are out of the scope of this document. 2842 The Group Manager must verify that the joining endpoint is authorized 2843 to join the group. To this end, the Group Manager can directly 2844 authorize the joining endpoint, or expect it to provide authorization 2845 evidence previously obtained from a trusted entity. Further details 2846 about the authorization of joining endpoints are out of scope. 2848 In case of successful authorization check, the Group Manager 2849 generates a Sender ID assigned to the joining endpoint, before 2850 proceeding with the rest of the join process. That is, the Group 2851 Manager provides the joining endpoint with the keying material and 2852 parameters to initialize the Security Context (see Section 2). The 2853 actual provisioning of keying material and parameters to the joining 2854 endpoint is out of the scope of this document. 2856 It is RECOMMENDED that the join process adopts the approach described 2857 in [I-D.ietf-ace-key-groupcomm-oscore] and based on the ACE framework 2858 for Authentication and Authorization in constrained environments 2859 [I-D.ietf-ace-oauth-authz]. 2861 Appendix E. Examples of Synchronization Approaches 2863 This section describes three possible approaches that can be 2864 considered by server endpoints to synchronize with Sender Sequence 2865 Numbers of client endpoints sending group requests. 2867 The Group Manager MAY indicate which of such approaches are used in 2868 the group, as part of the group communication policies signalled to 2869 candidate group members upon their group joining. 2871 If a server has recently lost the mutable Security Context, e.g. due 2872 to a reboot, the server has also to establish an updated Security 2873 Context before resuming to send protected messages to the group (see 2874 Section 2.4.1). Since this results in deriving a new Sender Key for 2875 its Sender Context, the server does not reuse the same pair (key, 2876 nonce), even when using the Partial IV of (old re-injected) requests 2877 to build the AEAD nonce for protecting the corresponding responses. 2879 E.1. Best-Effort Synchronization 2881 Upon receiving a group request from a client, a server does not take 2882 any action to synchronize with the Sender Sequence Number of that 2883 client. This provides no assurance at all as to message freshness, 2884 which can be acceptable in non-critical use cases. 2886 With the notable exception of Observe notifications and responses 2887 following a group rekeying, it is optional for the server to use its 2888 Sender Sequence Number as Partial IV when protecting a response. 2889 Instead, for efficiency reasons, the server may rather use the 2890 request's Partial IV when protecting a response to that request. 2892 E.2. Baseline Synchronization 2894 Upon receiving a group request from a given client for the first 2895 time, a server initializes the last-seen Sender Sequence Number 2896 associated to that client in its corresponding Recipient Context. 2897 The server may also drop the group request without delivering it to 2898 the application. This method provides a reference point to identify 2899 if future group requests from the same client are fresher than the 2900 last one received. 2902 A replay time interval exists, between when a possibly replayed or 2903 delayed message is originally transmitted by a given client and the 2904 first authentic fresh message from that same client is received. 2905 This can be acceptable for use cases where servers admit such a 2906 trade-off between performance and assurance of message freshness. 2908 With the notable exception of Observe notifications and responses 2909 following a group rekeying, it is optional for the server to use its 2910 Sender Sequence Number as Partial IV when protecting a response. 2911 Instead, for efficiency reasons, the server may rather use the 2912 request's Partial IV when protecting a response to that request. 2914 E.3. Challenge-Response Synchronization 2916 A server performs a challenge-response exchange with a client, by 2917 using the Echo Option for CoAP described in Section 2 of 2918 [I-D.ietf-core-echo-request-tag] and according to Appendix B.1.2 of 2919 [RFC8613]. 2921 That is, upon receiving a group request from a particular client for 2922 the first time, the server processes the message as described in this 2923 specification, but, even if valid, does not deliver it to the 2924 application. Instead, the server replies to the client with an 2925 OSCORE protected 4.01 (Unauthorized) response message, including only 2926 the Echo Option and no diagnostic payload. The server MUST NOT set 2927 the Echo Option to a value which is both predictable and reusable. 2928 Since this response is protected with the Security Context used in 2929 the group, the client will consider the response valid upon 2930 successfully decrypting and verifying it. 2932 The server stores the Echo Option value included therein, together 2933 with the pair (gid,kid), where 'gid' is the Group Identifier of the 2934 OSCORE group and 'kid' is the Sender ID of the client in the group, 2935 as specified in the 'kid context' and 'kid' fields of the OSCORE 2936 Option of the group request, respectively. After a group rekeying 2937 has been completed and a new Security Context has been established in 2938 the group, which results also in a new Group Identifier (see 2939 Section 3.1), the server MUST delete all the stored Echo values 2940 associated to members of that group. 2942 Upon receiving a 4.01 (Unauthorized) response that includes an Echo 2943 Option and originates from a verified group member, a client sends a 2944 request as a unicast message addressed to the same server, echoing 2945 the Echo Option value. The client MUST NOT send the request 2946 including the Echo Option over multicast. 2948 In particular, the client does not necessarily resend the same group 2949 request, but can instead send a more recent one, if the application 2950 permits it. This makes it possible for the client to not retain 2951 previously sent group requests for full retransmission, unless the 2952 application explicitly requires otherwise. In either case, the 2953 client uses a fresh Sender Sequence Number value from its own Sender 2954 Context. If the client stores group requests for possible 2955 retransmission with the Echo Option, it should not store a given 2956 request for longer than a pre-configured time interval. Note that 2957 the unicast request echoing the Echo Option is correctly treated and 2958 processed as a message, since the 'kid context' field including the 2959 Group Identifier of the OSCORE group is still present in the OSCORE 2960 Option as part of the COSE object (see Section 4). 2962 Upon receiving the unicast request including the Echo Option, the 2963 server performs the following verifications. 2965 o If the server does not store an Echo Option value for the pair 2966 (gid,kid), it considers: i) the time t1 when it has established 2967 the Security Context used to protect the received request; and ii) 2968 the time t2 when the request has been received. Since a valid 2969 request cannot be older than the Security Context used to protect 2970 it, the server verifies that (t2 - t1) is less than the largest 2971 amount of time acceptable to consider the request fresh. 2973 o If the server stores an Echo Option value for the pair (gid,kid) 2974 associated to that same client in the same group, the server 2975 verifies that the option value equals that same stored value 2976 previously sent to that client. 2978 If the verifications above fail, the server MUST NOT process the 2979 request further and MAY send a 4.01 (Unauthorized) response including 2980 an Echo Option. 2982 In case of positive verification, the request is further processed 2983 and verified. Finally, the server updates the Recipient Context 2984 associated to that client, by setting the Replay Window according to 2985 the Sender Sequence Number from the unicast request conveying the 2986 Echo Option. The server either delivers the request to the 2987 application if it is an actual retransmission of the original one, or 2988 discards it otherwise. Mechanisms to signal whether the resent 2989 request is a full retransmission of the original one are out of the 2990 scope of this specification. 2992 A server should not deliver group requests from a given client to the 2993 application until one valid request from that same client has been 2994 verified as fresh, as conveying an echoed Echo Option 2995 [I-D.ietf-core-echo-request-tag]. Also, a server may perform the 2996 challenge-response described above at any time, if synchronization 2997 with Sender Sequence Numbers of clients is (believed to be) lost, for 2998 instance after a device reboot. A client has to be always ready to 2999 perform the challenge-response based on the Echo Option in case a 3000 server starts it. 3002 It is the role of the server application to define under what 3003 circumstances Sender Sequence Numbers lose synchronization. This can 3004 include experiencing a "large enough" gap D = (SN2 - SN1), between 3005 the Sender Sequence Number SN1 of the latest accepted group request 3006 from a client and the Sender Sequence Number SN2 of a group request 3007 just received from that client. However, a client may send several 3008 unicast requests to different group members as protected with the 3009 pairwise mode (see Section 9.2), which may result in the server 3010 experiencing the gap D in a relatively short time. This would induce 3011 the server to perform more challenge-response exchanges than actually 3012 needed. 3014 To ameliorate this, the server may rather rely on a trade-off between 3015 the Sender Sequence Number gap D and a time gap T = (t2 - t1), where 3016 t1 is the time when the latest group request from a client was 3017 accepted and t2 is the time when the latest group request from that 3018 client has been received, respectively. Then, the server can start a 3019 challenge-response when experiencing a time gap T larger than a 3020 given, pre-configured threshold. Also, the server can start a 3021 challenge-response when experiencing a Sender Sequence Number gap D 3022 greater than a different threshold, computed as a monotonically 3023 increasing function of the currently experienced time gap T. 3025 The challenge-response approach described in this appendix provides 3026 an assurance of absolute message freshness. However, it can result 3027 in an impact on performance which is undesirable or unbearable, 3028 especially in large groups where many endpoints at the same time 3029 might join as new members or lose synchronization. 3031 Note that endpoints configured as silent servers are not able to 3032 perform the challenge-response described above, as they do not store 3033 a Sender Context to secure the 4.01 (Unauthorized) response to the 3034 client. Therefore, silent servers should adopt alternative 3035 approaches to achieve and maintain synchronization with sender 3036 sequence numbers of clients. 3038 Since requests including the Echo Option are sent over unicast, a 3039 server can be a victim of the attack discussed in Section 10.7, when 3040 such requests are protected with the group mode of Group OSCORE, as 3041 described in Section 8.1. 3043 Instead, protecting requests with the Echo Option by using the 3044 pairwise mode of Group OSCORE as described in Section 9.2 prevents 3045 the attack in Section 10.7. In fact, only the exact server involved 3046 in the Echo exchange is able to derive the correct pairwise key used 3047 by the client to protect the request including the Echo Option. 3049 In either case, an internal on-path adversary would not be able to 3050 mix up the Echo Option value of two different unicast requests, sent 3051 by a same client to any two different servers in the group. In fact, 3052 if the group mode was used, this would require the adversary to forge 3053 the client's counter signature in both such requests. As a 3054 consequence, each of the two servers remains able to selectively 3055 accept a request with the Echo Option only if it is waiting for that 3056 exact integrity-protected Echo Option value, and is thus the intended 3057 recipient. 3059 Appendix F. No Verification of Signatures in Group Mode 3061 There are some application scenarios using group communication that 3062 have particularly strict requirements. One example of this is the 3063 requirement of low message latency in non-emergency lighting 3064 applications [I-D.somaraju-ace-multicast]. For those applications 3065 which have tight performance constraints and relaxed security 3066 requirements, it can be inconvenient for some endpoints to verify 3067 digital signatures in order to assert source authenticity of received 3068 messages protected with the group mode. In other cases, the 3069 signature verification can be deferred or only checked for specific 3070 actions. For instance, a command to turn a bulb on where the bulb is 3071 already on does not need the signature to be checked. In such 3072 situations, the counter signature needs to be included anyway as part 3073 of a message protected with the group mode, so that an endpoint that 3074 needs to validate the signature for any reason has the ability to do 3075 so. 3077 In this specification, it is NOT RECOMMENDED that endpoints do not 3078 verify the counter signature of received messages protected with the 3079 group mode. However, it is recognized that there may be situations 3080 where it is not always required. The consequence of not doing the 3081 signature validation in messages protected with the group mode is 3082 that security in the group is based only on the group-authenticity of 3083 the shared keying material used for encryption. That is, endpoints 3084 in the group would have evidence that the received message has been 3085 originated by a group member, although not specifically identifiable 3086 in a secure way. This can violate a number of security requirements, 3087 as the compromise of any element in the group means that the attacker 3088 has the ability to control the entire group. Even worse, the group 3089 may not be limited in scope, and hence the same keying material might 3090 be used not only for light bulbs but for locks as well. Therefore, 3091 extreme care must be taken in situations where the security 3092 requirements are relaxed, so that deployment of the system will 3093 always be done safely. 3095 Appendix G. Example Values with COSE Capabilities 3097 The table below provides examples of values for Counter Signature 3098 Parameters in the Common Context (see Section 2.1.3), for different 3099 values of Counter Signature Algorithm. 3101 +-------------------+---------------------------------------------+ 3102 | Counter Signature | Example Values for Counter | 3103 | Algorithm | Signature Parameters | 3104 +-------------------+---------------------------------------------+ 3105 | (-8) // EdDSA | [1], [1, 6] // 1: OKP ; 1: OKP, 6: Ed25519 | 3106 | (-8) // EdDSA | [1], [1, 6] // 1: OKP ; 1: OKP, 7: Ed448 | 3107 | (-7) // ES256 | [2], [2, 1] // 2: EC2 ; 2: EC2, 1: P-256 | 3108 | (-35) // ES384 | [2], [2, 2] // 2: EC2 ; 2: EC2, 2: P-384 | 3109 | (-36) // ES512 | [2], [2, 3] // 2: EC2 ; 2: EC2, 3: P-512 | 3110 | (-37) // PS256 | [], [3] // empty ; 3: RSA | 3111 | (-38) // PS384 | [], [3] // empty ; 3: RSA | 3112 | (-39) // PS512 | [], [3] // empty ; 3: RSA | 3113 +-------------------+---------------------------------------------+ 3115 Figure 4: Examples of Counter Signature Parameters 3117 The table below provides examples of values for Secret Derivation 3118 Parameters in the Common Context (see Section 2.1.5), for different 3119 values of Secret Derivation Algorithm. 3121 +-----------------------+--------------------------------------------+ 3122 | Secret Derivation | Example Values for Secret | 3123 | Algorithm | Derivation Parameters | 3124 +-----------------------+--------------------------------------------+ 3125 | (-27) // ECDH-SS | [1], [1, 6] // 1: OKP ; 1: OKP, 4: X25519 | 3126 | // + HKDF-256 | | 3127 | (-27) // ECDH-SS | [1], [1, 6] // 1: OKP ; 1: OKP, 5: X448 | 3128 | // + HKDF-256 | | 3129 | (-27) // ECDH-SS | [2], [2, 1] // 2: EC2 ; 2: EC2, 1: P-256 | 3130 | // + HKDF-256 | | 3131 | (-27) // ECDH-SS | [2], [2, 2] // 2: EC2 ; 2: EC2, 2: P-384 | 3132 | // + HKDF-256 | | 3133 | (-27) // ECDH-SS | [2], [2, 3] // 2: EC2 ; 2: EC2, 3: P-512 | 3134 | // + HKDF-256 | | 3135 +-----------------------+--------------------------------------------+ 3137 Figure 5: Examples of Secret Derivation Parameters 3139 The table below provides examples of values for the 3140 'par_countersign_key' element of the 'algorithms' array used in the 3141 two external_aad structures (see Section 4.3.1 and Section 4.3.2), 3142 for different values of Counter Signature Algorithm. 3144 +-------------------+---------------------------------+ 3145 | Counter Signature | Example Values for | 3146 | Algorithm | 'par_countersign_key' | 3147 +-------------------+---------------------------------+ 3148 | (-8) // EdDSA | [1, 6] // 1: OKP , 6: Ed25519 | 3149 | (-8) // EdDSA | [1, 6] // 1: OKP , 7: Ed448 | 3150 | (-7) // ES256 | [2, 1] // 2: EC2 , 1: P-256 | 3151 | (-35) // ES384 | [2, 2] // 2: EC2 , 2: P-384 | 3152 | (-36) // ES512 | [2, 3] // 2: EC2 , 3: P-512 | 3153 | (-37) // PS256 | [3] // 3: RSA | 3154 | (-38) // PS384 | [3] // 3: RSA | 3155 | (-39) // PS512 | [3] // 3: RSA | 3156 +-------------------+---------------------------------+ 3158 Figure 6: Examples of 'par_countersign_key' 3160 Appendix H. Document Updates 3162 RFC EDITOR: PLEASE REMOVE THIS SECTION. 3164 H.1. Version -09 to -10 3166 o Removed 'Counter Signature Key Parameters' from the Common 3167 Context. 3169 o New parameters in the Common Context covering the DH secret 3170 derivation. 3172 o New counter signature header parameter from draft-ietf-cose- 3173 countersign. 3175 o Stronger policies non non-recycling of Sender IDs and Gid. 3177 o The Sender Sequence Number is reset when establishing a new 3178 Security Context. 3180 o Added 'request_kid_context' in the aad_array. 3182 o The server can respond with 5.03 if the client's public key is not 3183 available. 3185 o The observer client stores an invariant identifier of the group. 3187 o Relaxed storing of original 'kid' for observer clients. 3189 o Both client and server store the 'kid_context' of the original 3190 observation request. 3192 o The server uses a fresh PIV if protecting the response with a 3193 Security Context different from the one used to protect the 3194 request. 3196 o Clarifications on MTI algorithms and curves. 3198 o Removed optimized requests. 3200 o Overall clarifications and editorial revision. 3202 H.2. Version -08 to -09 3204 o Pairwise keys are discarded after group rekeying. 3206 o Signature mode renamed to group mode. 3208 o The parameters for countersignatures use the updated COSE 3209 registries. Newly defined IANA registries have been removed. 3211 o Pairwise Flag bit renamed as Group Flag bit, set to 1 in group 3212 mode and set to 0 in pairwise mode. 3214 o Dedicated section on updating the Security Context. 3216 o By default, sender sequence numbers and replay windows are not 3217 reset upon group rekeying. 3219 o An endpoint implementing only a silent server does not support the 3220 pairwise mode. 3222 o Separate section on general message reception. 3224 o Pairwise mode moved to the document body. 3226 o Considerations on using the pairwise mode in non-multicast 3227 settings. 3229 o Optimized requests are moved as an appendix. 3231 o Normative support for the signature and pairwise mode. 3233 o Revised methods for synchronization with clients' sender sequence 3234 number. 3236 o Appendix with example values of parameters for countersignatures. 3238 o Clarifications and editorial improvements. 3240 H.3. Version -07 to -08 3242 o Clarified relation between pairwise mode and group communication 3243 (Section 1). 3245 o Improved definition of "silent server" (Section 1.1). 3247 o Clarified when a Recipient Context is needed (Section 2). 3249 o Signature checkers as entities supported by the Group Manager 3250 (Section 2.3). 3252 o Clarified that the Group Manager is under exclusive control of Gid 3253 and Sender ID values in a group, with Sender ID values under each 3254 Gid value (Section 2.3). 3256 o Mitigation policies in case of recycled 'kid' values 3257 (Section 2.4). 3259 o More generic exhaustion (not necessarily wrap-around) of sender 3260 sequence numbers (Sections 2.5 and 10.11). 3262 o Pairwise key considerations, as to group rekeying and Sender 3263 Sequence Numbers (Section 3). 3265 o Added reference to static-static Diffie-Hellman shared secret 3266 (Section 3). 3268 o Note for implementation about the external_aad for signing 3269 (Sectino 4.3.2). 3271 o Retransmission by the application for group requests over 3272 multicast as Non-Confirmable (Section 7). 3274 o A server MUST use its own Partial IV in a response, if protecting 3275 it with a different context than the one used for the request 3276 (Section 7.3). 3278 o Security considerations: encryption of pairwise mode as 3279 alternative to group-level security (Section 10.1). 3281 o Security considerations: added approach to reduce the chance of 3282 global collisions of Gid values from different Group Managers 3283 (Section 10.5). 3285 o Security considerations: added implications for block-wise 3286 transfers when using the signature mode for requests over unicast 3287 (Section 10.7). 3289 o Security considerations: (multiple) supported signature algorithms 3290 (Section 10.13). 3292 o Security considerations: added privacy considerations on the 3293 approach for reducing global collisions of Gid values 3294 (Section 10.15). 3296 o Updates to the methods for synchronizing with clients' sequence 3297 number (Appendix E). 3299 o Simplified text on discovery services supporting the pairwise mode 3300 (Appendix G.1). 3302 o Editorial improvements. 3304 H.4. Version -06 to -07 3306 o Updated abstract and introduction. 3308 o Clarifications of what pertains a group rekeying. 3310 o Derivation of pairwise keying material. 3312 o Content re-organization for COSE Object and OSCORE header 3313 compression. 3315 o Defined the Pairwise Flag bit for the OSCORE option. 3317 o Supporting CoAP Observe for group requests and responses. 3319 o Considerations on message protection across switching to new 3320 keying material. 3322 o New optimized mode based on pairwise keying material. 3324 o More considerations on replay protection and Security Contexts 3325 upon key renewal. 3327 o Security considerations on Group OSCORE for unicast requests, also 3328 as affecting the usage of the Echo option. 3330 o Clarification on different types of groups considered 3331 (application/security/CoAP). 3333 o New pairwise mode, using pairwise keying material for both 3334 requests and responses. 3336 H.5. Version -05 to -06 3338 o Group IDs mandated to be unique under the same Group Manager. 3340 o Clarifications on parameter update upon group rekeying. 3342 o Updated external_aad structures. 3344 o Dynamic derivation of Recipient Contexts made optional and 3345 application specific. 3347 o Optional 4.00 response for failed signature verification on the 3348 server. 3350 o Removed client handling of duplicated responses to multicast 3351 requests. 3353 o Additional considerations on public key retrieval and group 3354 rekeying. 3356 o Added Group Manager responsibility on validating public keys. 3358 o Updates IANA registries. 3360 o Reference to RFC 8613. 3362 o Editorial improvements. 3364 H.6. Version -04 to -05 3366 o Added references to draft-dijk-core-groupcomm-bis. 3368 o New parameter Counter Signature Key Parameters (Section 2). 3370 o Clarification about Recipient Contexts (Section 2). 3372 o Two different external_aad for encrypting and signing 3373 (Section 3.1). 3375 o Updated response verification to handle Observe notifications 3376 (Section 6.4). 3378 o Extended Security Considerations (Section 8). 3380 o New "Counter Signature Key Parameters" IANA Registry 3381 (Section 9.2). 3383 H.7. Version -03 to -04 3385 o Added the new "Counter Signature Parameters" in the Common Context 3386 (see Section 2). 3388 o Added recommendation on using "deterministic ECDSA" if ECDSA is 3389 used as counter signature algorithm (see Section 2). 3391 o Clarified possible asynchronous retrieval of keying material from 3392 the Group Manager, in order to process incoming messages (see 3393 Section 2). 3395 o Structured Section 3 into subsections. 3397 o Added the new 'par_countersign' to the aad_array of the 3398 external_aad (see Section 3.1). 3400 o Clarified non reliability of 'kid' as identity indicator for a 3401 group member (see Section 2.1). 3403 o Described possible provisioning of new Sender ID in case of 3404 Partial IV wrap-around (see Section 2.2). 3406 o The former signature bit in the Flag Byte of the OSCORE option 3407 value is reverted to reserved (see Section 4.1). 3409 o Updated examples of compressed COSE object, now with the sixth 3410 less significant bit in the Flag Byte of the OSCORE option value 3411 set to 0 (see Section 4.3). 3413 o Relaxed statements on sending error messages (see Section 6). 3415 o Added explicit step on computing the counter signature for 3416 outgoing messages (see Setions 6.1 and 6.3). 3418 o Handling of just created Recipient Contexts in case of 3419 unsuccessful message verification (see Sections 6.2 and 6.4). 3421 o Handling of replied/repeated responses on the client (see 3422 Section 6.4). 3424 o New IANA Registry "Counter Signature Parameters" (see 3425 Section 9.1). 3427 H.8. Version -02 to -03 3429 o Revised structure and phrasing for improved readability and better 3430 alignment with draft-ietf-core-object-security. 3432 o Added discussion on wrap-Around of Partial IVs (see Section 2.2). 3434 o Separate sections for the COSE Object (Section 3) and the OSCORE 3435 Header Compression (Section 4). 3437 o The countersignature is now appended to the encrypted payload of 3438 the OSCORE message, rather than included in the OSCORE Option (see 3439 Section 4). 3441 o Extended scope of Section 5, now titled " Message Binding, 3442 Sequence Numbers, Freshness and Replay Protection". 3444 o Clarifications about Non-Confirmable messages in Section 5.1 3445 "Synchronization of Sender Sequence Numbers". 3447 o Clarifications about error handling in Section 6 "Message 3448 Processing". 3450 o Compacted list of responsibilities of the Group Manager in 3451 Section 7. 3453 o Revised and extended security considerations in Section 8. 3455 o Added IANA considerations for the OSCORE Flag Bits Registry in 3456 Section 9. 3458 o Revised Appendix D, now giving a short high-level description of a 3459 new endpoint set-up. 3461 H.9. Version -01 to -02 3463 o Terminology has been made more aligned with RFC7252 and draft- 3464 ietf-core-object-security: i) "client" and "server" replace the 3465 old "multicaster" and "listener", respectively; ii) "silent 3466 server" replaces the old "pure listener". 3468 o Section 2 has been updated to have the Group Identifier stored in 3469 the 'ID Context' parameter defined in draft-ietf-core-object- 3470 security. 3472 o Section 3 has been updated with the new format of the Additional 3473 Authenticated Data. 3475 o Major rewriting of Section 4 to better highlight the differences 3476 with the message processing in draft-ietf-core-object-security. 3478 o Added Sections 7.2 and 7.3 discussing security considerations 3479 about uniqueness of (key, nonce) and collision of group 3480 identifiers, respectively. 3482 o Minor updates to Appendix A.1 about assumptions on multicast 3483 communication topology and group size. 3485 o Updated Appendix C on format of group identifiers, with practical 3486 implications of possible collisions of group identifiers. 3488 o Updated Appendix D.2, adding a pointer to draft-palombini-ace-key- 3489 groupcomm about retrieval of nodes' public keys through the Group 3490 Manager. 3492 o Minor updates to Appendix E.3 about Challenge-Response 3493 synchronization of sequence numbers based on the Echo option from 3494 draft-ietf-core-echo-request-tag. 3496 H.10. Version -00 to -01 3498 o Section 1.1 has been updated with the definition of group as 3499 "security group". 3501 o Section 2 has been updated with: 3503 * Clarifications on etablishment/derivation of Security Contexts. 3505 * A table summarizing the the additional context elements 3506 compared to OSCORE. 3508 o Section 3 has been updated with: 3510 * Examples of request and response messages. 3512 * Use of CounterSignature0 rather than CounterSignature. 3514 * Additional Authenticated Data including also the signature 3515 algorithm, while not including the Group Identifier any longer. 3517 o Added Section 6, listing the responsibilities of the Group 3518 Manager. 3520 o Added Appendix A (former section), including assumptions and 3521 security objectives. 3523 o Appendix B has been updated with more details on the use cases. 3525 o Added Appendix C, providing an example of Group Identifier format. 3527 o Appendix D has been updated to be aligned with draft-palombini- 3528 ace-key-groupcomm. 3530 Acknowledgments 3532 The authors sincerely thank Christian Amsuess, Stefan Beck, Rolf 3533 Blom, Carsten Bormann, Esko Dijk, Klaus Hartke, Rikard Hoeglund, 3534 Richard Kelsey, John Mattsson, Dave Robin, Jim Schaad, Ludwig Seitz, 3535 Peter van der Stok and Erik Thormarker for their feedback and 3536 comments. 3538 The work on this document has been partly supported by VINNOVA and 3539 the Celtic-Next project CRITISEC; the H2020 project SIFIS-Home (Grant 3540 agreement 952652); the SSF project SEC4Factory under the grant 3541 RIT17-0032; and the EIT-Digital High Impact Initiative ACTIVE. 3543 Authors' Addresses 3545 Marco Tiloca 3546 RISE AB 3547 Isafjordsgatan 22 3548 Kista SE-16440 Stockholm 3549 Sweden 3551 Email: marco.tiloca@ri.se 3552 Goeran Selander 3553 Ericsson AB 3554 Torshamnsgatan 23 3555 Kista SE-16440 Stockholm 3556 Sweden 3558 Email: goran.selander@ericsson.com 3560 Francesca Palombini 3561 Ericsson AB 3562 Torshamnsgatan 23 3563 Kista SE-16440 Stockholm 3564 Sweden 3566 Email: francesca.palombini@ericsson.com 3568 Jiye Park 3569 Universitaet Duisburg-Essen 3570 Schuetzenbahn 70 3571 Essen 45127 3572 Germany 3574 Email: ji-ye.park@uni-due.de