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