The Sensor Measurement Lists (SenML) media type supports multiple types of values, from numbers to text strings and arbitrary binary <del> data values.  In order to simplify processing of the data values this document proposes to specify a new SenML field for indicating the Content-Format of the data. </del>  1. <del> The Sensor Measurement Lists (SenML) media type RFC8428 can be used </del>  to send various kinds of data.  In the example given in ex-1, a temperature value, an indication whether a lock is open, and a data value (with SenML field "vd") read from an NFC reader is sent in a not always be easily available to entities processing the SenML pack. To facilitate automatic interpretation it is useful to be able to indicate an Internet media type and content-coding right in the SenML <del> Record.  The CoAP Content-Format (Section 12.3 in RFC7252) provides just this information; enclosing a Content-Format number (in this case number 60 as defined for content-type application/cbor in RFC7049) in the Record is illustrated in ex-2.  All registered CoAP Content-Formats are listed in the Content-Formats subregistry of the CoRE Parameters registry IANA.core-parameters. In this example SenML Record the data value contains a string "foo" and a number 42 encoded in a CBOR RFC7049 array.  Since the example </del>  above uses the JSON format of SenML, the data value containing the <del> binary CBOR value is base64-encoded.  The data value after base64 decoding is shown with CBOR diagnostic notation in ex-2-cbor. </del>  2. capitals, as shown here. Readers should also be familiar with the terms and concepts discussed <del> in RFC8428.  Awareness of terminology issues discussed in I- D.bormann-core-media-content-type-format can also be very helpful. </del>  3. When a SenML Record contains a Data Value field ("vd"), the Record MAY also include a Content-Format indication field, using label "ct". <del> The value of this field is a string value, one of: </del>  a CoAP Content-Format identifier in decimal form with no leading zeros (except for the value "0" itself).  This value represents an unsigned integer in the range of 0-65535, similar to the CoRE Link Format RFC6690 "ct" attribute). <del> or a Content-Format-String I-D.bormann-core-media-content-type- format containing a Content-Type and optionally a Content-Coding (see below). </del>  <del> The CoAP Content-Format identifier provides a simple and efficient way to indicate the type of the data.  Since some Internet media types and their content coding and parameter alternatives do not have assigned CoAP Content-Format identifiers, using Content-Type and Content-Coding is also allowed.  Both methods use a string value in the "ct" field to keep its data type consistent across uses.  When the "ct" field contains only digits, it is interpreted as a CoAP Content-Format identifier. </del>  To indicate that a Content-Coding is used with a Content-Type, the Content-Coding value (e.g., "deflate" RFC7230) is appended to the Content-Type value (media type and parameters, if any), separated by a "@" sign.  For example: "text/plain; charset=utf-8@deflate".  If no "@" sign is present outside the media type parameters, the Content- <del> Coding is not specified and the "identity" Content-Coding is used - </del>  no encoding transformation is employed. 4. for the Content-Format Field (label "ct") within its range.  The range of the base field includes the Record containing it, up to (but not including) the next Record containing a "bct" field, if any, or <del> up to the end of the pack otherwise.  Resolution (Section 4.6 of RFC8428) of this base field is performed by adding its value with the label "ct" to all Records in this range that carry a "vd" field but do not already contain a Content-Format ("ct") field. </del>  5. 6.  The indication of a media type in the data does not exempt a consuming application from properly checking its inputs.  Also, the ability for an attacker to supply crafted SenML data that specify "decompression bombs", compressed data that is crafted to decompress to extremely large data items. <del> 7. </del>  (Note to RFC Editor: Please replace all occurrences of "RFC-AAAA" with the RFC number of this specification and remove this note.) IANA is requested to assign new labels in the "SenML Labels" <del> subregistry of the SenML registry IANA.senml (as defined in RFC8428) </del>  for the Content-Format indication as per tbl-senml-reg:

Alexey notes (Archived-At: ): Since data-ct needs almost all of the “normative” ABNF in media-content-type-format, I think the right thing to do would be to fully develop media-content-type-format and make it a normative reference. (Note that media-content-type-format probably needs to be run by httpbis and emailcore [?] soon and when it is nearing WGLC, and there may be surprises there.) This course of action would probably delay data-ct a bit; we might counteract the damage by early registration. Since data-ct only needs an “Expert Review” registration, we could decide to do this when we have processed the reviews that are now incoming.
I didn't do thorough review of the ABNF but otherwise looks good to me Hi all, Sorry for the belated review. I think the document is nearly ready for progression. I have a couple of minor related issues: Terminology Readers should also be familiar with the terms and concepts discussed in [RFC8428]. Awareness of terminology issues discussed in [I-D.bormann-core-media-content-type-format] can also be very It is expired and it is currently not a WG document. At minimum it should be revived. (Or see below) helpful. SenML Content-Format ("ct") Field I wish the document has ABNF for the "ct" field. If you want to use ABNF from draft-bormann-core-media-content-type-format-01, it should be Normative reference. If not, I think you should just cut & paste the ABNF into this document. Best Regards, Alexey

The Sensor Measurement Lists (SenML) media type supports multiple types of values, from numbers to text strings and arbitrary binary  <ins> data values.  In order to simplify processing of the data values, this document proposes to specify a new SenML field for indicating the Content-Format of the data. </ins> 1.  <ins> The Sensor Measurement Lists (SenML) media types RFC8428 can be used </ins> to send various kinds of data.  In the example given in ex-1, a temperature value, an indication whether a lock is open, and a data value (with SenML field "vd") read from an NFC reader is sent in a not always be easily available to entities processing the SenML pack. To facilitate automatic interpretation it is useful to be able to indicate an Internet media type and content-coding right in the SenML  <ins> Record.  The CoAP Content-Format (RFC7252) provides just this information; enclosing a Content-Format number (in this case number 60 as defined for content-type application/cbor in RFC8949) in the Record is illustrated in ex-2.  All registered CoAP Content-Formats are listed in the Content-Formats IANA.core-parameters of the CoRE Parameters registry IANA.core-parameters. In this example SenML Record, the data value contains a string "foo" and a number 42 encoded in a CBOR RFC8949 array.  Since the example </ins> above uses the JSON format of SenML, the data value containing the  <ins> binary CBOR value is base64-encoded (RFC4648).  The data value after base64 decoding is shown with CBOR diagnostic notation in ex-2-cbor. </ins> 2. capitals, as shown here. Readers should also be familiar with the terms and concepts discussed  <ins> in RFC8428. </ins> 3. When a SenML Record contains a Data Value field ("vd"), the Record MAY also include a Content-Format indication field, using label "ct".  <ins> The value of this field is a Content-Format-Spec, i.e., one of: </ins> a CoAP Content-Format identifier in decimal form with no leading zeros (except for the value "0" itself).  This value represents an unsigned integer in the range of 0-65535, similar to the CoRE Link Format RFC6690 "ct" attribute).  <ins> or a Content-Format-String containing a Content-Type and optionally a Content-Coding (see below). </ins>  <ins> The syntax of this field is formally defined in abnf. The CoAP Content-Format number provides a simple and efficient way to indicate the type of the data.  Since some Internet media types and their content coding and parameter alternatives do not have assigned CoAP Content-Format numbers, using Content-Type and Content-Coding is also allowed.  Both methods use a string value in the "ct" field to keep its data type consistent across uses.  When the "ct" field contains only digits, it is interpreted as a CoAP Content-Format identifier. </ins> To indicate that a Content-Coding is used with a Content-Type, the Content-Coding value (e.g., "deflate" RFC7230) is appended to the Content-Type value (media type and parameters, if any), separated by a "@" sign.  For example: "text/plain; charset=utf-8@deflate".  If no "@" sign is present outside the media type parameters, the Content-  <ins> Coding is not specified and the "identity" Content-Coding is used -- </ins> no encoding transformation is employed. 4. for the Content-Format Field (label "ct") within its range.  The range of the base field includes the Record containing it, up to (but not including) the next Record containing a "bct" field, if any, or  <ins> up to the end of the pack otherwise.  Resolution (RFC8428) of this base field is performed by adding its value with the label "ct" to all Records in this range that carry a "vd" field but do not already contain a Content-Format ("ct") field. </ins> 5. 6. <ins> This specification provides a formal definition of the syntax of Content-Format-Spec strings using ABNF notation RFC5234, which contains three new rules and a number of rules collected and adapted from various RFCs RFC7231 RFC6838 RFC5234 RFC8866. 7. </ins> The indication of a media type in the data does not exempt a consuming application from properly checking its inputs.  Also, the ability for an attacker to supply crafted SenML data that specify "decompression bombs", compressed data that is crafted to decompress to extremely large data items.  <ins> 8. </ins> (Note to RFC Editor: Please replace all occurrences of "RFC-AAAA" with the RFC number of this specification and remove this note.) IANA is requested to assign new labels in the "SenML Labels"  <ins> IANA.senml of the SenML registry IANA.senml (as defined in RFC8428) </ins> for the Content-Format indication as per tbl-senml-reg:


types of values, from numbers to text strings and arbitrary binary data values.  In order to facilitate processing of binary data values, this document specifies a pair of new SenML fields for <del> indicating the Content-Format of those binary data values, i.e., their Internet media type including parameters as well as any Content-Coding applied. </del>  1. out-of-band knowledge of the application.  However, this context may not always be easily available to entities processing the SenML pack. To facilitate automatic interpretation it is useful to be able to <del> indicate an Internet media type and content-coding right in the SenML Record.  The CoAP Content-Format (RFC7252) provides this information in the form of a single unsigned integer; enclosing a Content-Format number (in this case number 60 as defined for content-type application/cbor in RFC8949) in the Record is illustrated in ex-2. All registered CoAP Content-Format numbers are listed in the IANA.core-parameters IANA.core-parameters as specified by RFC7252. </del>  In this example SenML Record, the data value contains a string "foo" and a number 42 encoded in a CBOR RFC8949 array.  Since the example MAY also include a Content-Format indication field, using label "ct". The value of this field is a Content-Format-Spec, i.e., one of: <del> a CoAP Content-Format identifier in decimal form with no leading zeros (except for the value "0" itself).  This value represents an </del>  unsigned integer in the range of 0-65535, similar to the CoRE Link Format RFC6690 "ct" attribute). or a Content-Format-String containing a Content-Type and <del> optionally a Content-Coding (see below). </del>  The syntax of this field is formally defined in abnf. The CoAP Content-Format number provides a simple and efficient way to indicate the type of the data.  Since some Internet media types and their content coding and parameter alternatives do not have assigned <del> CoAP Content-Format numbers, using Content-Type and Content-Coding is also allowed.  Both methods use a string value in the "ct" field to keep its data type consistent across uses.  When the "ct" field contains only digits, it is interpreted as a CoAP Content-Format identifier. To indicate that a Content-Coding is used with a Content-Type, the Content-Coding value is appended to the Content-Type value (media type and parameters, if any), separated by a "@" sign.  For example (using a Content-Coding value of "deflate" as defined in RFC7230): </del>  If no "@" sign is present after the media type and parameters, then <del> no Content-Coding has been specified, and the "identity" Content- Coding is used -- no encoding transformation is employed. </del>  4. The following examples are valid values for the "ct" and "bct" fields (explanation/comments in parentheses): <del> "60" (CoAP Content-Format for "application/cbor") </del>  <del> "0" (CoAP Content-Format for "text/plain" with parameter </del>  "charset=utf-8") "application/json" (JSON Content-Type - equivalent to "50" CoAP <del> Content-Format identifier) </del>  "application/json@deflate" (JSON Content-Type with "deflate" as <del> Content-Coding - equivalent to "11050" CoAP Content-Format identifier) </del>  "text/csv" (Comma-Separated Values (CSV) RFC4180 Content-Type) "text/csv;header=present@gzip" (CSV with header row, using "gzip" <del> as Content-Coding) </del>  6.

Address Ben Kaduk's DISCUSS by allowing multiple content codings. Use the opportunity to also address Christer Holmberg's comment that Ben offered some sympathy to -- but staying with the (now lower case) term "content format".
On 2020-08-19, at 04:29, Jim Schaad wrote: (Archived-At: ) Right, this would be what you easily get if you do a “naïve” resolution of “bct" base fields. (However, Section 4 says that you only copy them to records with “vd” fields.) I think that it would be good to do the same thing with “naïve” resolution, i.e., ignore “ct” if there is no “vd”. But I don’t have a strong opinion. Section 3 says: When a SenML Record contains a Data Value field ("vd"), the Record MAY also include a Content-Format indication field. In logic, it simply doesn’t say anything about records without “vd”. In English, it does seem to imply that the MAY does not apply to them. (But then it doesn’t say what is supposed to happen.)
I believe this is now covered by the text in Section 4. For the most part it looks good. However, I am not sure that I understand what the correct behavior for {"bn":"urn:dev:ow:10e2073a01080063:","n":"temp","u":"Cel","vs":"7.1","ct":"0"} {"bn":"urn:dev:ow:10e2073a01080063:","n":"temp","u":"Cel","v":7.1,"ct":"0"} Should the ct be ignored if the value is not "vd"? If it is present but does not make sense what should happen? Jim

types of values, from numbers to text strings and arbitrary binary data values.  In order to facilitate processing of binary data values, this document specifies a pair of new SenML fields for  <ins> indicating the content format of those binary data values, i.e., their Internet media type including parameters as well as any content codings applied. </ins> 1. out-of-band knowledge of the application.  However, this context may not always be easily available to entities processing the SenML pack. To facilitate automatic interpretation it is useful to be able to  <ins> indicate an Internet media type and, optionally, content codings right in the SenML Record. The CoAP Content-Format (RFC7252) provides this information in the form of a single unsigned integer; enclosing a Content-Format number (in this case number 60 as defined for content-type application/cbor in RFC8949) in the Record is illustrated in ex-2.  All registered CoAP Content-Format numbers are listed in the IANA.core-parameters IANA.core-parameters as specified by RFC7252.  Note that, at the time of writing, the structure of this registry only provides for zero or one content codings; nothing in the present document needs to change if the registry is extended to allow sequences of content codings. </ins> In this example SenML Record, the data value contains a string "foo" and a number 42 encoded in a CBOR RFC8949 array.  Since the example MAY also include a Content-Format indication field, using label "ct". The value of this field is a Content-Format-Spec, i.e., one of:  <ins> a CoAP Content-Format number in decimal form with no leading zeros (except for the value "0" itself).  This value represents an </ins> unsigned integer in the range of 0-65535, similar to the CoRE Link Format RFC6690 "ct" attribute). or a Content-Format-String containing a Content-Type and  <ins> optionally zero or more content codings (see below). </ins> The syntax of this field is formally defined in abnf. The CoAP Content-Format number provides a simple and efficient way to indicate the type of the data.  Since some Internet media types and their content coding and parameter alternatives do not have assigned  <ins> CoAP Content-Format numbers, using Content-Type and zero or more content codings is also allowed.  Both methods use a string value in the "ct" field to keep its data type consistent across uses.  When the "ct" field contains only digits, it is interpreted as a CoAP Content-Format number. To indicate that one or more content codings are used with a Content- Type, each of the content coding values is appended to the Content- Type value (media type and parameters, if any), separated by a "@" sign, in the order of the content codings were applied (the same order as in RFC7231).  For example (using a content coding value of "deflate" as defined in RFC7230): </ins> If no "@" sign is present after the media type and parameters, then  <ins> no content coding has been specified, and the "identity" content coding is used -- no encoding transformation is employed. </ins> 4. The following examples are valid values for the "ct" and "bct" fields (explanation/comments in parentheses):  <ins> "60" (CoAP Content-Format number for "application/cbor") </ins>  <ins> "0" (CoAP Content-Format number for "text/plain" with parameter </ins> "charset=utf-8") "application/json" (JSON Content-Type - equivalent to "50" CoAP  <ins> Content-Format number) </ins> "application/json@deflate" (JSON Content-Type with "deflate" as  <ins> content coding - equivalent to "11050" CoAP Content-Format number) "application/json@deflate@aes128gcm" (JSON Content-Type with "deflate" followed by "aes128gcm" as content codings) </ins> "text/csv" (Comma-Separated Values (CSV) RFC4180 Content-Type) "text/csv;header=present@gzip" (CSV with header row, using "gzip"  <ins> as content coding) </ins> 6.


Object Notation (JSON) RFC8259 and one using the Concise Binary Object Representation (CBOR) RFC7049, which can be used with the CoAP FETCH, PATCH, and iPATCH methods for resources represented with the <del> SenML data model.  The rest of the document uses term "(i)PATCH" when referring to both methods as the semantics of the new media types are the same for the CoAP PATCH and iPATCH methods. </del>  2. If no SenML Records match, empty SenML Pack (i.e., array with no elements) is returned as a response. <del> All other Fetch Record fields than name, base name, time, base time, unit, and base unit MUST be ignored. </del>  3.2. 5.  The security and privacy considerations of SenML apply also with the FETCH and (i)PATCH methods.  CoAP's security mechanisms are used to provide security for the FETCH and (i)PATCH methods. In FETCH and (i)PATCH requests, the client can pass arbitrary names to the target resource for manipulation.  The resource implementer must take care to only allow access to names that are actually part <del> of (or accessible through) the target resource. </del>  If the client is not allowed to do a GET or PUT on the full target resource (and thus all the names accessible through it), access control rules must be evaluated for each record in the pack. <del> 6. </del>  This document registers two new media types and CoAP Content-Format IDs for both media types. Note to RFC Editor: Please replace all occurrences of "RFC-AAAA" with the RFC number of this document. <del> 6.1. </del>  IANA is requested to assign CoAP Content-Format IDs for the SenML PATCH and FETCH media types in the "CoAP Content-Formats" sub- registry, within the "CoRE Parameters" registry RFC7252.  The assigned IDs are shown in tbl-coap-content-formats. <del> 6.2. </del>  Type name: application Change controller: IESG <del> 6.3. </del>  Type name: application Security considerations: See seccons of RFC-AAAA. <del> Interoperability considerations: Applications MUST ignore any key value pairs that they do not understand unless the key ends with the '_' character in which case an error MUST be generated.  This allows backwards compatible extensions to this specification. </del>  Published specification: RFC-AAAA

more details for security consideration on record names noted this applies to SenSML too updated extensibility mechanism
The CI checks fail because this PR has still year 2019 in the draft. The PR fixes that too.

Object Notation (JSON) RFC8259 and one using the Concise Binary Object Representation (CBOR) RFC7049, which can be used with the CoAP FETCH, PATCH, and iPATCH methods for resources represented with the  <ins> SenML data model (i.e., for both SenML and Sensor Streaming Measurement Lists (SenSML) data).  The rest of the document uses term "(i)PATCH" when referring to both methods as the semantics of the new media types are the same for the CoAP PATCH and iPATCH methods. </ins> 2. If no SenML Records match, empty SenML Pack (i.e., array with no elements) is returned as a response.  <ins> Fetch Records MUST NOT contain other fields than name, base name, time, base time, unit, and base unit.  Implementations MUST reject and generate an error for a Fetch Pack with other fields. </ins> 3.2. 5. <ins> The SenML mandatory to understand fields extensibility mechanism (see section 4.4 in RFC8428) does not apply to Patch Packs, i.e., unknown fields MUST NOT generate an error but such fields are treated like any other field (e.g., added to Patch target records where applicable). This specification allows only a small subset of SenML fields in Fetch Records but future specifications may enable new fields for Fetch Records and possibly also new fields for selecting targets for Patch Records. 6. </ins> The security and privacy considerations of SenML apply also with the FETCH and (i)PATCH methods.  CoAP's security mechanisms are used to provide security for the FETCH and (i)PATCH methods. In FETCH and (i)PATCH requests, the client can pass arbitrary names to the target resource for manipulation.  The resource implementer must take care to only allow access to names that are actually part  <ins> of (or accessible through) the target resource.  In particular the receiver needs to ensure that any input does not lead to uncontrolled special interpretation by the system. </ins> If the client is not allowed to do a GET or PUT on the full target resource (and thus all the names accessible through it), access control rules must be evaluated for each record in the pack.  <ins> 7. </ins> This document registers two new media types and CoAP Content-Format IDs for both media types. Note to RFC Editor: Please replace all occurrences of "RFC-AAAA" with the RFC number of this document.  <ins> 7.1. </ins> IANA is requested to assign CoAP Content-Format IDs for the SenML PATCH and FETCH media types in the "CoAP Content-Formats" sub- registry, within the "CoRE Parameters" registry RFC7252.  The assigned IDs are shown in tbl-coap-content-formats.  <ins> 7.2. </ins> Type name: application Change controller: IESG  <ins> 7.3. </ins> Type name: application Security considerations: See seccons of RFC-AAAA.  <ins> Interoperability considerations: N/A </ins> Published specification: RFC-AAAA


resolved time value and name are matched.  Similarly, when unit is given, only the SenML Records with equal resolved unit and name are matched.  If both time and unit are given in the Fetch Record, both <del> MUST to match for the SenML Record to match. </del>  For example, if the IPSO resource "5850" would have multiple sensor readings (SenML Records) with different time values, the following Records, to add new Records, and to remove existing Records.  The names, times, and units of the Patch Records are given and matched in same way as for the Fetch Records, except each Patch Record MUST <del> match at most one Target Record.  Patch Packs can also include new values and other SenML fields for the Records.  Application of Patch Packs is idempotent; hence PATCH and iPATCH methods for SenML Packs are equivalent. </del>  When the name in a Patch Record matches with the name in an existing Record, the resolved time values and units (if any) are compared.  If the time values and units either do not exist in both Records or are equal, the Target Record is replaced with the contents of the Patch Record.  All Patch Records MUST contain at least a SenML Value or Sum <del> field.  A Patch Pack with invalid Records MUST be rejected. </del>  If a Patch Record contains a name, or combination of a time value, unit, and a name, that do not exist in any existing Record in the NOT be added but the matched Record (if any) is removed from the Target Pack.  For example, the following document could be given as an (i)PATCH payload to change/set values of two SenML Records for the example in intro:

Patch records must match only one Target record Invalid records result in error No Pack state is changed if any invalid records Also: Noted Fetch response must contain each target only once Updated author info

resolved time value and name are matched.  Similarly, when unit is given, only the SenML Records with equal resolved unit and name are matched.  If both time and unit are given in the Fetch Record, both  <ins> MUST to match for the SenML Record to match.  Each Target Record MUST be included in the response only once, even if multiple Fetch Records match with the same Target Record. </ins> For example, if the IPSO resource "5850" would have multiple sensor readings (SenML Records) with different time values, the following Records, to add new Records, and to remove existing Records.  The names, times, and units of the Patch Records are given and matched in same way as for the Fetch Records, except each Patch Record MUST  <ins> match at most one Target Record.  A Patch Record matching more than one Target Record is considered invalid.  Patch Packs can also include new values and other SenML fields for the Records. Application of Patch Packs is idempotent; hence PATCH and iPATCH methods for SenML Packs are equivalent. </ins> When the name in a Patch Record matches with the name in an existing Record, the resolved time values and units (if any) are compared.  If the time values and units either do not exist in both Records or are equal, the Target Record is replaced with the contents of the Patch Record.  All Patch Records MUST contain at least a SenML Value or Sum  <ins> field. </ins> If a Patch Record contains a name, or combination of a time value, unit, and a name, that do not exist in any existing Record in the NOT be added but the matched Record (if any) is removed from the Target Pack. <ins> The Patch Records MUST be applied in the same sequence they are in the Patch Pack. Implementations MUST reject and generate an error for Patch Packs with invalid Records.  If a Patch Pack is rejected, the state of the Target Pack is not changed, i.e., either all or none of the Patch Records are applied. </ins> For example, the following document could be given as an (i)PATCH payload to change/set values of two SenML Records for the example in intro:


or configuration parameters.  The CoAP iPATCH, PATCH, and FETCH methods enable accessing and updating parts of a resource or multiple resources with one request.  This document defines new media types <del> for the CoAP iPATCH, and FETCH methods for resources represented with the SenML data model. </del>  1. model can be used to transmit collections of resources, such as batches of sensor data or configuration parameters. <del> Example of a SenML collection is shown below: </del>  Here three resources "3306/0/5850", "3306/0/5851", and "3306/0/5750", of an IPSO dimmable light smart object IPSO are represented using a same base name "2001:db8::2/3306/0/", hence full names for resources are "2001:db8::2/3306/0/5850", etc. <del> The CoAP RFC7252 iPATCH and FETCH methods RFC8132 enable accessing and updating parts of a resource or multiple resources with one request. </del>  This document defines two new media types, one using the JavaScript Object Notation (JSON) RFC8259 and one using the Concise Binary Object Representation (CBOR) RFC7049, that can be used with the CoAP iPATCH, PATCH, and FETCH methods for resources represented with the SenML data model.  The semantics of the new media types are the same <del> for the CoAP PATCH and iPATCH methods. </del>  2. of a Fetch or Patch Record and hence is a target for a Fetch or Patch operation.  3. <del> The FETCH/iPATCH media types for SenML are modeled as extensions to </del>  the SenML media type to enable re-use of existing SenML parsers and generators, in particular on constrained devices.  Unless mentioned otherwise, FETCH and PATCH Packs are constructed with the same rules <del> and constraints as SenML Packs.  The only difference to SenML media type is allowing the use of "null" value for removing records with the iPATCH method. </del>  3.1. <del> The FETCH method can be used to select and return parts of one or more SenML Packs.  The SenML Records are selected by giving the name(s) of the resources using the SenML "name" and/or "base name" Fields. </del>  <del> For example, to select resources "5850" and "5851" from the example in intro, the following Fetch Pack can be used: </del>  The result to a FETCH request with the example above would be: When SenML Records contain also time values, a name may no longer uniquely identify a single Record.  When no time is given in a Fetch <del> Record, all SenML Records with the given name are matched.  When time is given in the Fetch Record, only a SenML Record (if any) with equal time value and name is matched. </del>  The resolved form of records (Section 4.6 of RFC8428) is used when comparing the names and times of the Target and Fetch Records to 3.2. <del> The iPATCH method can be used to change the values of SenML Records, to add new Records, and to remove existing Records.  The names and times of the Patch Records are given and matched in same way as for the Fetch Records, except each Patch Record can match at most one Target Record.  Patch Packs can also include new values and other SenML Fields for the Records. </del>  When the name in a Patch Record matches with the name in an existing <del> Record, the time values are compared.  If the time values do not exist or are equal in both Records, the Target Record is replaced with the contents of the Patch Record. </del>  If a Patch Record contains a name, or combination of a time value and a name, that do not exist in any existing Record in the Pack, the If a Patch Record has a value field with value null, the matched Record (if any) is removed from the Pack. <del> For example, the following document could be given as iPATCH payload to change/set values of two SenML Records for the example in intro: </del>  If the request is successful, the resulting representation of the example SenML Pack would be as follows: 4. The security and privacy considerations of SenML apply also with the <del> FETCH and iPATCH methods. </del>  <del> In FETCH and iPATCH requests, the client can pass arbitrary names to the target resource for manipulation.  The resource implementer must take care to only allow access to names that are actually part of (or accessible through) the target resource. </del>  If the client is not allowed to do a GET or PUT on the full target resource (and thus all the names accessible through it), access Optional parameters: none Encoding considerations: Must be encoded as using a subset of the <del> encoding allowed in RFC8259.  See RFC-AAAA for details.  This simplifies implementation of very simple system and does not impose any significant limitations as all this data is meant for machine to machine communications and is not meant to be human readable. </del>  Security considerations: See seccons of RFC-AAAA. Optional parameters: none <del> Encoding considerations: Must be encoded as using RFC7049.  See RFC- AAAA for details. </del>  Security considerations: See seccons of RFC-AAAA.

using "(i)PATCH" to refer to both PATCH methods Clarified defaulting rules Clarified name resolving rules Clarified use of "resource" Added note that application of Patch Packs is idempotent Removed "more details in RFC-AAA" from media type encoding considerations (there are no more details actually)

or configuration parameters.  The CoAP iPATCH, PATCH, and FETCH methods enable accessing and updating parts of a resource or multiple resources with one request.  This document defines new media types  <ins> for the CoAP iPATCH, PATCH, and FETCH methods for resources represented with the SenML data model. </ins> 1. model can be used to transmit collections of resources, such as batches of sensor data or configuration parameters.  <ins> An example of a SenML collection is shown below: </ins> Here three resources "3306/0/5850", "3306/0/5851", and "3306/0/5750", of an IPSO dimmable light smart object IPSO are represented using a same base name "2001:db8::2/3306/0/", hence full names for resources are "2001:db8::2/3306/0/5850", etc.  <ins> The CoAP RFC7252 iPATCH, PATCH, and FETCH methods RFC8132 enable accessing and updating parts of a resource or multiple resources with one request. </ins> This document defines two new media types, one using the JavaScript Object Notation (JSON) RFC8259 and one using the Concise Binary Object Representation (CBOR) RFC7049, that can be used with the CoAP iPATCH, PATCH, and FETCH methods for resources represented with the SenML data model.  The semantics of the new media types are the same  <ins> for the CoAP PATCH and iPATCH methods.  The rest of the document uses term "(i)PATCH" when referring to both methods. </ins> 2. of a Fetch or Patch Record and hence is a target for a Fetch or Patch operation. <ins> A term that refers to both CoAP "PATCH" and "iPATCH" methods when there is no difference in this specification in which one is used. </ins> 3.  <ins> The FETCH/(i)PATCH media types for SenML are modeled as extensions to </ins> the SenML media type to enable re-use of existing SenML parsers and generators, in particular on constrained devices.  Unless mentioned otherwise, FETCH and PATCH Packs are constructed with the same rules  <ins> and constraints as SenML Packs. The key difference to the SenML media type is allowing the use of a "null" value for removing records with the (i)PATCH method.  Also the Fetch and Patch Records do not have default time or base version when the fields are omitted. </ins> 3.1.  <ins> The FETCH method can be used to select and return a subset of records, in sequence, of one or more SenML Packs.  The SenML Records are selected by giving a set of names that, when resolved, match resolved names in a SenML Pack.  The names for a Fetch Pack are given using the SenML "name" and/or "base name" Fields.  The names are resolved by concatenating the base name with the name field as defined in RFC8428. </ins>  <ins> For example, to select the IPSO resources "5850" and "5851" from the example in intro, the following Fetch Pack can be used: </ins> The result to a FETCH request with the example above would be: When SenML Records contain also time values, a name may no longer uniquely identify a single Record.  When no time is given in a Fetch  <ins> Record, all SenML Records with the given name are matched (i.e., unlike with SenML Records, lack of time field in a Fetch Record does not imply time value zero).  When time is given in the Fetch Record, only a SenML Record (if any) with equal resolved time value and name is matched. </ins> The resolved form of records (Section 4.6 of RFC8428) is used when comparing the names and times of the Target and Fetch Records to 3.2.  <ins> The (i)PATCH method can be used to change the values of SenML Records, to add new Records, and to remove existing Records.  The names and times of the Patch Records are given and matched in same way as for the Fetch Records, except each Patch Record can match at most one Target Record.  Patch Packs can also include new values and other SenML Fields for the Records.  Application of Patch Packs is idempotent. </ins> When the name in a Patch Record matches with the name in an existing  <ins> Record, the resolved time values are compared.  If the time values either do not exist in both Records or are equal, the Target Record is replaced with the contents of the Patch Record. </ins> If a Patch Record contains a name, or combination of a time value and a name, that do not exist in any existing Record in the Pack, the If a Patch Record has a value field with value null, the matched Record (if any) is removed from the Pack.  <ins> For example, the following document could be given as (i)PATCH payload to change/set values of two SenML Records for the example in intro: </ins> If the request is successful, the resulting representation of the example SenML Pack would be as follows: 4. The security and privacy considerations of SenML apply also with the  <ins> FETCH and (i)PATCH methods. </ins>  <ins> In FETCH and (i)PATCH requests, the client can pass arbitrary names to the target resource for manipulation.  The resource implementer must take care to only allow access to names that are actually part of (or accessible through) the target resource. </ins> If the client is not allowed to do a GET or PUT on the full target resource (and thus all the names accessible through it), access Optional parameters: none Encoding considerations: Must be encoded as using a subset of the  <ins> encoding allowed in RFC8259.  This simplifies implementation of a very simple system and does not impose any significant limitations as all this data is meant for machine to machine communications and is not meant to be human readable. </ins> Security considerations: See seccons of RFC-AAAA. Optional parameters: none  <ins> Encoding considerations: Must be encoded as using RFC7049. </ins> Security considerations: See seccons of RFC-AAAA.


a name, that do not exist in any existing Record in the Pack, the given Record, with all the fields it contains, is added to the Pack. <del> If a Patch Record has a value field with value null, the matched Record (if any) is removed from the Pack. </del>  <del> For example, the following document could be given as (i)PATCH </del>  payload to change/set values of two SenML Records for the example in intro: If the request is successful, the resulting representation of the example SenML Pack would be as follows:  4. The security and privacy considerations of SenML apply also with the IANA is requested to assign CoAP Content-Format IDs for the SenML PATCH and FETCH media types in the "CoAP Content-Formats" sub- <del> registry, within the "CoRE Parameters" registry RFC7252.  All IDs are assigned from the "IETF Review or IESG Approval" range.  The assigned IDs are show in tbl-coap-content-formats. </del>  5.2.

“Are show”
Should clarify that null value for deleting records should always be in "v" field regardless of the value type used in the Record.
Also example of deleting would be useful

a name, that do not exist in any existing Record in the Pack, the given Record, with all the fields it contains, is added to the Pack.  <ins> If a Patch Record has a value ("v") field with value null, the matched Record (if any) is removed from the Pack. </ins>  <ins> For example, the following document could be given as an (i)PATCH </ins> payload to change/set values of two SenML Records for the example in intro: If the request is successful, the resulting representation of the example SenML Pack would be as follows: <ins> As another example, the following document could be given as an (i)PATCH payload to remove the two SenML Records: </ins> 4. The security and privacy considerations of SenML apply also with the IANA is requested to assign CoAP Content-Format IDs for the SenML PATCH and FETCH media types in the "CoAP Content-Formats" sub-  <ins> registry, within the "CoRE Parameters" registry RFC7252.  The assigned IDs are shown in tbl-coap-content-formats. </ins> 5.2.


9.2. In addition to the SenML Fragment Identifiers described above, with <del> the XML SenML formats also the syntax defined in XPointerFramework can be used, as recommended by RFC7303. </del>  10.

EXI is XML so for consistency we should allow anything that is allowed for (character) XML for EXI as well. Make Klaus' point about content negotiation possibly leading to a format where xpointer does not apply and add the Accept workaround.
LGTM

9.2. In addition to the SenML Fragment Identifiers described above, with  <ins> the XML and EXI SenML formats also the syntax defined in XPointerFramework can be used.  (This is required by RFC7303 for media types using the "+xml" structured syntax suffix.  SenML allows this for the EXI formats as well for consistency.) Note that fragment identifiers are available to the client side only; they are not provided in transfer protocols such as CoAP or HTTP. Thus, they cannot be used by the server in deciding which media type to send.  Where a server has multiple representations available for a resource identified by a URI, it might send a JSON or CBOR representation when the client was directed to use an XML/EXI fragment identifier with this.  Clients can prevent running into this problem by explicitly requesting an XML or EXI media type (e.g., using the CoAP Accept option) when XML/EXI-only fragment identifier syntax is in use in the URI. </ins> 10.


using SenML need to look at the overall context of how these formats will be used to decide if the security is adequate.  In particular for sensitive sensor data and actuation use it is important to ensure <del> that proper security mechanisms are used. </del>  The SenML formats defined by this specification do not contain any executable content.  However, future extensions could potentially

The RFC editor will add in the missing comma. Maybe use the usual sequence (confidentiality first). But all this is motherhood and apple pie anyway...
LGTM - thanks

using SenML need to look at the overall context of how these formats will be used to decide if the security is adequate.  In particular for sensitive sensor data and actuation use it is important to ensure  <ins> that proper security mechanisms are used to provide, e.g., confidentiality, data integrity, and authentication as appropriate for the usage. </ins> The SenML formats defined by this specification do not contain any executable content.  However, future extensions could potentially


value is used to indicate the number of seconds, excluding leap seconds, since the start of the year 1970 in UTC.  Representing the statistical characteristics of measurements, such as accuracy, can be very complex.  Future specification may add new attributes to provide better information about the statistical

Clarify semantics of base time 0 ("now")
For base time, draft already has If either the Base Time or Time value is missing, the missing attribute is considered to have a value of zero.

value is used to indicate the number of seconds, excluding leap seconds, since the start of the year 1970 in UTC. <ins> If only one of the Base Sum or Sum value is present, the missing attribute is considered to have a value of zero.  The Base Sum and Sum values are added together to get the sum of measurement.  If neither the Base Sum or Sum are present, then the measurement does not have a sum value. </ins> Representing the statistical characteristics of measurements, such as accuracy, can be very complex.  Future specification may add new attributes to provide better information about the statistical


Only the UTF-8 form of JSON is allowed.  Characters in the String Value are encoded using the escape sequences defined in RFC7159. <del> Characters in the Data Value are base64 encoded with URL safe alphabet as defined in Section 5 of RFC4648. </del>  Systems receiving measurements MUST be able to process the range of floating point numbers that are representable as an IEEE double value, it has exactly the same value as the original Number.  For the version number, only an unsigned integer is allowed.  For compactness, the CBOR representation uses integers for the map keys defined in tbl-cbor-labels.  This table is conclusive, i.e., there is no intention to define any additional integer map keys; 7. A SenML Pack or Stream can also be represented in XML format as <del> defined in this section.  The following example shows an XML example for the same sensor measurement as in co-ex. </del>  The SenML Stream is represented as a sensml tag that contains a series of senml tags for each SenML Record.  The SenML Fields are

I think that the current SenML draft is missing a note on JSON/CBOR differences in Data Value: While it is explicitly stated that vd is a base64 string in JSON and a binary-value in CBOR, the supposedly exhaustive list of differences in 6. fails to mention that no base64 encoding is done in CBOR. Suggested addition: o For Data Values, no base64url-encoding is done, as the data can be directly expressed as binary-value. Furthermore, I suggest that "Characters in the Data Value are base64 encoded" be expressed as "Bytes [...]" or "Octets are encoded [...]", to make the distinction to the character-based strings and binary data clearer. (The only context in which I'd name bytes of binary data "Character" are when speaking of a "char" in C). Best regards Christian
Indeed, characters should be called characters, and bytes should be called bytes. (In C, bytes are represented as uint8_t :-). s/can be/are/ (they are!)
Have a read of the PR I put in for this. I think it resolves the issue
Looks good to me (with the one typo fix)
typo fix

Only the UTF-8 form of JSON is allowed.  Characters in the String Value are encoded using the escape sequences defined in RFC7159.  <ins> Octets in the Data Value are base64 encoded with URL safe alphabet as defined in Section 5 of RFC4648. </ins> Systems receiving measurements MUST be able to process the range of floating point numbers that are representable as an IEEE double value, it has exactly the same value as the original Number.  For the version number, only an unsigned integer is allowed. <ins> Characters in the String Value are encoded using a definite length text string (type 3).  Octets in the Data Value are encoded using a definite length byte string (type 2) . </ins> For compactness, the CBOR representation uses integers for the map keys defined in tbl-cbor-labels.  This table is conclusive, i.e., there is no intention to define any additional integer map keys; 7. A SenML Pack or Stream can also be represented in XML format as  <ins> defined in this section. Only the UTF-8 form of XML is allowed.  Characters in the String Value are encoded using the escape sequences defined in RFC7159. Octets in the Data Value are base64 encoded with URL safe alphabet as defined in Section 5 of RFC4648. The following example shows an XML example for the same sensor measurement as in co-ex. </ins> The SenML Stream is represented as a sensml tag that contains a series of senml tags for each SenML Record.  The SenML Fields are


The SenML Stream is represented as a sensml tag that contains a series of senml tags for each SenML Record.  The SenML Fields are represents as XML attributes.  The following table shows the mapping <del> of the SenML labels to the attribute names and types used in the XML senml tags. </del>  The RelaxNG schema for the XML is: 11.2. IANA will create a new registry for SenML labels.  The initial <del> content of the registry are shown in tbl-json-labels and tbl-xml- labels. </del>  New entries can be added to the registration by either Expert Review or IESG Approval as defined in RFC5226.  Experts should exercise their own good judgment but need to consider that shorter labels should have more strict review. <del> All new SenML labels that have "base" semantics (see senml-base) must start with character 'b'.  Regular labels must not start with that </del>  character. <del> All new entries must define the Label Name, Label, JSON Type, and XML Type. </del>  11.3.

From EMAIL - aug 31 Hello Ari, I'm just putting the finishing touches on an IETF draft to introduce the base time offset attribute that we discussed in Berlin. One thing I noticed was that the IANA considerations section (11.2) that describes the SenML label registry mentions the need to define the label name, label, json type and xml type for the new attribute. However the SenML draft also defines the CBOR representation and EXI representation. I assume updates to these will also be needed in order to register a new SenML label? For the XML representation the IANA text mentions the need to define the XML type. However section 7 "XML representation" includes the RelaxNG compact schema. Does this also need to be updated? and if so how? Should the entire schema be listed or should a new schema be defined using an "include" construct? The schema in the SenML draft doesn't have a name (e.g. URL) so I'm not sure how this would be done? The other issue is that the current compact RelaxSchema enforces ordering of the labels. If I define a new bto attribute I take it that bto should be associated with the base attributes and come after bver and before the regular attributes. I'm not familiar enough with RelaxNG to detail that without re-including the entire schema. It also leads to the question of what happens with ordering if someone else defines another base attribute. Should bto or the other attribute take precedence after bver? I think the syntax and draft needs to take this into account. The EXI representation clause 8 in the SenML draft includes an XSD generated from the RelaxNG. Would the generation of the complete schema be required for the addition of an new attribute? There seems to be similar issues to the RelaxNG schema. For CBOR there's also the CDDL specification in section 10. I'm not that familiar with CDDL but it seems to define an extension mechanism that group the base and regular attributes. There's no text associated with this section as to the need to define extensions and whether the defining the JSON label and type is enough for the CDDL. It seems to me that the schemes need to be updated to include some extension points to enable new attributes to be added without having to update the schemas. Also given that we have to define these various different representations I wonder if the registry should instead be called the SenML attribute registry? The reasoning is that the registry would have to include not only JSON labels but the CBOR mapping key etc. Regards, Christian

The SenML Stream is represented as a sensml tag that contains a series of senml tags for each SenML Record.  The SenML Fields are represents as XML attributes.  The following table shows the mapping  <ins> of the SenML labels, which are used for the attribute name, to the attribute types used in the XML senml tags. </ins> The RelaxNG schema for the XML is: 11.2. IANA will create a new registry for SenML labels.  The initial  <ins> content of the registry is: Note to RFC Editor.  Please replace RFCXXXX with the number for this RFC. All new entries must define the Label Name, Label, and XML Type but the CBOR labels SHOULD be left empty as CBOR will use the string encoding for any new labels.  The ID fields contains the EXI schemaID of the first Schema which includes this label or is empty if this label was not intended for use with EXI.  The Note field SHOULD contain information about where to find out more information about this label. The JSON, CBOR, and EXI types are derived from the XML type.  All XML numeric types such as double, float, integer and int become a JSON Number.  XML boolean and string become a JSON Boolean and String respectively.  CBOR representes numeric values with a CBOR type that does not loose any information from the JSON value.  EXI uses the XML types. </ins> New entries can be added to the registration by either Expert Review or IESG Approval as defined in RFC5226.  Experts should exercise their own good judgment but need to consider that shorter labels should have more strict review.  <ins> All new SenML labels that have "base" semantics (see senml-base) MUST start with character 'b'.  Regular labels MUST NOT start with that </ins> character.  <ins> Extensions that add a label that is intended for use with XML need to create a new RelaxNG scheme that includes all the labels in the IANA registry. Extensions that add a label that is intended for use with EXI need to create a new XSD Schema that includes all the labels in the IANA registry then allocate a new EXI schemaID.  Moving to the next letter in the alphabet is the suggested way to create the new EXI schemaID. Any labels with previously blank ID values SHOULD be updated in the IANA table to have their ID set to this new schemaID value. </ins> 11.3.


and has gotten two separate values as a result, a temperature and humidity measurement.  6. The CBOR RFC7049 representation is equivalent to the JSON

Current text hints that you can use SenML also with actuators, but there is not much details about this yet.
+1 For actuators. But the ability to set any arbitrary value would be preferred - for example the coefficients of an analog sensor, or a flag to initiate a sensor update.
I did not get this into the -03 update but still plan to add it.
I did not get this into the -03 update but still plan to add it.
Comments on the examples

and has gotten two separate values as a result, a temperature and humidity measurement. <ins> 5.1.7. The following example show the SenML that could be used to set the current set point of a typical residential thermostat which has a temperature set point, a switch to turn on and off the heat, and a switch to turn on the fan override. In the following example two different lights are turned on.  It is assumed that the lights are on a 802.1BA network that can guarantee delivery of the messages to the two lights within 15 ms and uses 802.1AS for time synchronization.  The controller has set the time of the lights coming on to 20 ms in the future from the current time. This allows both lights to receive the message, wait till that time, then apply the switch command so that both lights come on at the same time. The following shows two lights being turned off using a non deterministic network that has a high odds of delivering a message in less than 100 ms and uses NTP for time synchronization.  The curent time is 1320078429.  The user has just turned off a light switch which is turning off two lights.  Both lights are dimmed to 50% brightness immediately to give the user instant feedback that something is changing.  However given the network, the lights will probably dim at somewhat different times.  Then 100 ms in the future, both lights will go off at the same time.  The instant but not synchronized dimming gives the user the sensation of quick responses and the timed off 100 ms in the future gives the perception of both lights going off at the same time. </ins> 6. The CBOR RFC7049 representation is equivalent to the JSON


in the encoding.  For uses where extensions need to be preserved in EXI, the non-strict schema mode of EXI MAY be used. <del> The EXI header option MUST be included.  An EXI schemaID options MUST be set to the value of "a" indicating the scheme provided in this specification.  Future revisions to the schema can change this schemaID to allow for backwards compatibility.  When the data will be transported over CoAP or HTTP, an EXI Cookie SHOULD NOT be used as it simply makes things larger and is redundant to information provided in the Content-Type header. </del>  The following is the XSD Schema to be used for strict schema guided EXI processing.  It is generated from the RelaxNG. All new entries must define the Label Name, Label, and XML Type but the CBOR labels SHOULD be left empty as CBOR will use the string <del> encoding for any new labels.  The ID fields contains the EXI schemaID of the first Schema which includes this label or is empty if this label was not intended for use with EXI.  The Note field SHOULD </del>  contain information about where to find out more information about this label. Extensions that add a label that is intended for use with EXI need to create a new XSD Schema that includes all the labels in the IANA <del> registry then allocate a new EXI schemaID.  Moving to the next letter in the alphabet is the suggested way to create the new EXI schemaID. Any labels with previously blank ID values SHOULD be updated in the IANA table to have their ID set to this new schemaID value. </del>  11.3.

Make sure the way we use schemaID match how it is defined in EXI. ( See email from Christian G - Oct 10, 2016 )

in the encoding.  For uses where extensions need to be preserved in EXI, the non-strict schema mode of EXI MAY be used.  <ins> The EXI header MUST include an "EXI Options", as defined in W3C.REC- exi-20140211, with an schemaId set to the value of "a" indicating the schema provided in this specification.  Future revisions to the schema can change the value of the schemaId to allow for backwards compatibility.  When the data will be transported over CoAP or HTTP, an EXI Cookie SHOULD NOT be used as it simply makes things larger and is redundant to information provided in the Content-Type header. </ins> The following is the XSD Schema to be used for strict schema guided EXI processing.  It is generated from the RelaxNG. All new entries must define the Label Name, Label, and XML Type but the CBOR labels SHOULD be left empty as CBOR will use the string  <ins> encoding for any new labels.  The ID fields contains the EXI schemaId value of the first Schema which includes this label or is empty if this label was not intended for use with EXI.  The Note field SHOULD </ins> contain information about where to find out more information about this label. Extensions that add a label that is intended for use with EXI need to create a new XSD Schema that includes all the labels in the IANA  <ins> registry then allocate a new EXI schemaId value.  Moving to the next letter in the alphabet is the suggested way to create the new value for the EXI schemaId.  Any labels with previously blank ID values SHOULD be updated in the IANA table to have their ID set to this new schemaId value. </ins> 11.3.


format in the first place.  The relevant media type indicator is included in the Content-Type (ct=) attribute.  5. The SenML labels (JSON object member names) shown in tbl-json-labels

Added descriptive text about configuration/actuation usage
Addressing issue
Should there be explanation of the configuration usage?
This looks good to me. Two little tweeks but if you don't like them, I can live with it as it is.

format in the first place.  The relevant media type indicator is included in the Content-Type (ct=) attribute. <ins> 4.6. SenML can also be used for configuring parameters and controlling actuators.  When a SenML Pack is sent (e.g., using a HTTP/CoAP POST or PUT method) and the semantics of the target are such that SenML is interpreted as configuration/actuation, SenML Records are interpreted as a request to change the values of given resources (names) to given values at the given time(s). </ins> 5. The SenML labels (JSON object member names) shown in tbl-json-labels


used with care or avoided as described in RFC7721. The resulting concatenated name MUST consist only of characters out <del> of the set "A" to "Z", "a" to "z", "0" to "9", "-", ":", ".", or "_" and it MUST start with a character out of the set "A" to "Z", "a" to "z", or "0" to "9".  This restricted character set was chosen so that these names can be directly used as in other types of URI including segments of an HTTP path with no special encoding and can be directly used in many databases and analytic systems.  RFC5952 contains advice on encoding an IPv6 address in a name. </del>  If the Record has no Unit, the Base Unit is used as the Unit.  Having no Unit and no Base Unit is allowed.

The actually change looks good to me and if we fail to get all the examples correctly generated, don't worry, we can clean that up during WGLC

used with care or avoided as described in RFC7721. The resulting concatenated name MUST consist only of characters out  <ins> of the set "A" to "Z", "a" to "z", "0" to "9", "-", ":", ".", "/", or "_" and it MUST start with a character out of the set "A" to "Z", "a" to "z", or "0" to "9".  This restricted character set was chosen so that these names can be directly used as in other types of URI including segments of an HTTP path with no special encoding and can be directly used in many databases and analytic systems.  RFC5952 contains advice on encoding an IPv6 address in a name. </ins> If the Record has no Unit, the Base Unit is used as the Unit.  Having no Unit and no Base Unit is allowed.


Magic number(s): none <del> File extension(s): senml </del>  Macintosh file type code(s): none Magic number(s): none <del> File extension(s): senml </del>  Macintosh file type code(s): none Magic number(s): none <del> File extension(s): senml </del>  Macintosh file type code(s): none Magic number(s): none <del> File extension(s): senml </del>  Macintosh file type code(s): none

Why is there no sensml+cbor? (I can't really find where sensml+json is actually defined.) Is that really TODO?
sensml+json is defined in "Multiple Datapoints". Perhaps could be improved. That TODO was fixed in URL
That is an example, no? Where is the definition?
(In CBOR, SensML would just be a CBOR sequence. No need even for an array around that.) See also RFC 7464...

Magic number(s): none  <ins> File extension(s): senml and sensml </ins> Macintosh file type code(s): none Magic number(s): none  <ins> File extension(s): senmlc </ins> Macintosh file type code(s): none Magic number(s): none  <ins> File extension(s): senmlx and sensmlx </ins> Macintosh file type code(s): none Magic number(s): none  <ins> File extension(s): senmle </ins> Macintosh file type code(s): none


strongly suggests a percentage (0..100) -- it is however NOT a percentage, but the absolute ratio! <del> New entries can be added to the registration by either Expert Review or IESG Approval as defined in RFC5226.  Experts should exercise their own good judgment but need to consider the following guidelines: </del>  There needs to be a real and compelling use for any new unit to be added. does not lose any information from the JSON value.  EXI uses the XML types. <del> New entries can be added to the registration by either Expert Review or IESG Approval as defined in RFC5226.  Experts should exercise their own good judgment but need to consider that shorter labels should have more strict review. </del>  All new SenML labels that have "base" semantics (see senml-base) MUST start with character 'b'.  Regular labels MUST NOT start with that

Is there a reason we keep it for label registrations?
NAME Good point; same considerations apply to both. Will fix.
From Peter's review: or IESG Approval as defined in [RFC5226]. confusion.
It means that if something needs to happen and AD can make it happen without firing the expert which creates so much bad will that an AD would much rather wit 6 months for the expert to respond. All it says if the AD can do this or the expert can. I don't care much.
NAME Our AD had preference to have just Expert review in order for people to not think there are two paths but show clear preference. If things are slow, the IESG is next on the appeal path, so ADs can do it anyway.
Addressed by PR
Note that even with we still have the dual policy on the labels. Bug or feature?
On the "Our AD had preference to have just Expert review " ... I'm fine with this.
NAME The dual policy was fixed with the latest commit. Although perhaps we want to have more guidelines for the expert to follow?

strongly suggests a percentage (0..100) -- it is however NOT a percentage, but the absolute ratio!  <ins> New entries can be added to the registration by Expert Review as defined in RFC8126.  Experts should exercise their own good judgment but need to consider the following guidelines: </ins> There needs to be a real and compelling use for any new unit to be added. does not lose any information from the JSON value.  EXI uses the XML types.  <ins> New entries can be added to the registration by Expert Review as defined in RFC8126.  Experts should exercise their own good judgment but need to consider that shorter labels should have more strict review. </ins> All new SenML labels that have "base" semantics (see senml-base) MUST start with character 'b'.  Regular labels MUST NOT start with that


mandatory to understand fields.  New version numbers can only be defined in an RFC that updates this specification or it successors. <del> The Name value is concatenated to the Base Name value to get the name of the sensor.  The resulting name needs to uniquely identify and differentiate the sensor from all others.  It is RECOMMENDED that the full names are represented as URIs RFC3986 or URNs RFC2141.  One way to create a unique name is to include some bit string that has guaranteed uniqueness (such as a 1-wire address) that is assigned to the device.  Some of the examples in this draft use the device URN type as specified in I-D.arkko-core-dev-urn.  UUIDs RFC4122 are another way to generate a unique name.  See sec-privacy for privacy considerations that apply to the use of long-term stable unique identifiers. The resulting concatenated name MUST consist only of characters out of the set "A" to "Z", "a" to "z", "0" to "9", "-", ":", ".", "/", or "_" and it MUST start with a character out of the set "A" to "Z", "a" to "z", or "0" to "9".  This restricted character set was chosen so that these names can be directly used in other types of URI including segments of an HTTP path with no special encoding and can be directly used in many databases and analytic systems.  RFC5952 contains advice on encoding an IPv6 address in a name. </del>  If the Record has no Unit, the Base Unit is used as the Unit.  Having no Unit and no Base Unit is allowed.

This PR should be merged only after PR
That looks good. Please note that RFC 2141 has been obsoleted by RFC 8141.
NAME Indeed, we fixed the RFC 2141 reference in -11. If you can have a look at URL and send some comments to the mailing list, that would be highly appreciated; we'd like to push this to the IESG now.
From Peter's review: characters allowed for URIs in general (RFC 3986) or URNs in particular (RFC 8141). At the least it would be helpful to point this out, because AFAICS it will limit the URI schemes or URN namespaces that can be used. characters allowed in URIs. The restricted set was chosen to enable efficient and safe use of names in various systems (e.g., as database keys)." care needs to be taken in the choice of URIs or URNs as SenML names." Furthermore, if someone wants to use a URI scheme that allows characters outside that set (e.g., the 'tag' scheme), then do those characters need to be encoded somehow? (Ick.) If not, then we should say so. One should not try to put "full URIs" into the names. Rather the names can be used as part of a URI. Perhaps something we should be more clear about.
Also ABNF of the set
Clarify that dev:urn URIs are OK because they match the charset
so I think we have dealt with this and can close it.
Peter's proposal for updated text is here: URL The PR applies the new text with slight modifications.
LGTM On 7/20/17 4:36 PM, Ari Keränen wrote: Excellent! So I'll repeat my concern: How do we handle such URLs? Are they forbidden? If they are not forbidden, do characters like brackets get escaped somehow? (I hope we don't go down that road.) If they are forbidden, then most URI schemes and URN namespaces won't be usable. For example, URIs schemes such as 'tag' (RFC 4151) and 'ni' (RFC 6920) don't conform to the restricted character set, and there are characters allowed in URN syntax (e.g., 'NAME '%', '?', '[', ']', '#', '~', '+', '=', '&') that don't conform either. Thus it might even be misleading to say that names are URIs because so few URI schemes or URN namespaces can be employed here. We might need to say something like this... OLD The Name value is concatenated to the Base Name value to get the name of the sensor. The resulting name needs to uniquely identify and differentiate the sensor from all others. It is RECOMMENDED that the full names are represented as URIs [RFC3986] or URNs [RFC2141]. One way to create a unique name is to include some bit string that has guaranteed uniqueness (such as a 1-wire address) that is assigned to the device. Some of the examples in this draft use the device URN type as specified in [I-D.arkko-core-dev-urn]. UUIDs [RFC4122] are another way to generate a unique name. Note that long-term stable unique identifiers are problematic for privacy reasons and should be used with care or avoided as described in [RFC7721]. The resulting concatenated name MUST consist only of characters out of the set "A" to "Z", "a" to "z", "0" to "9", "-", ":", ".", "/", or "" and it MUST start with a character out of the set "A" to "Z", "a" to "z", or "0" to "9". This restricted character set was chosen so that these names can be directly used as in other types of URI including segments of an HTTP path with no special encoding and can be directly used in many databases and analytic systems. [RFC5952] contains advice on encoding an IPv6 address in a name. NEW The Name value is concatenated to the Base Name value to yield the name of the sensor. The resulting concatenated name needs to uniquely identify and differentiate the sensor from all others. The concatenated name MUST consist only of characters out of the set "A" to "Z", "a" to "z", "0" to "9", "-", ":", ".", "/", and ""; furthermore, it MUST start with a character out of the set "A" to "Z", "a" to "z", or "0" to "9". This restricted character set was chosen so that concatenated names can be used directly within various URI schemes (including segments of an HTTP path with no special encoding) and can be used directly in many databases and analytic systems. [RFC5952] contains advice on encoding an IPv6 address in a name. Although it is RECOMMENDED that concatenated names are represented as URIs [RFC3986] or URNs [RFC8141], the restricted character set specified above puts strict limits on the URI schemes and URN namespaces that can be used. As a result, implementers need to take care in choosing the naming scheme for concatenated names, because such names both need to be unique and need to conform to the restricted character set. One approach is to include a bit string that has guaranteed uniqueness (such as a 1-wire address). Another, shown in some of the examples within this document, is to use the device URN namespace as specified in [I-D.arkko-core-dev-urn]. A third approach is to use UUIDs [RFC4122]. Unfortunately, the restricted character set does not allow the use of some URI schemes that might otherwise be attractive, such as the 'tag' scheme [RFC4151] and the 'ni' scheme [RFC6920]. Note also that long-term, stable, unique identifiers are problematic for privacy reasons and should be used with care or avoided entirely as described in [RFC7721]. See above for proposed text. OK, I will take a closer look at the text and propose some improvements. Peter

mandatory to understand fields.  New version numbers can only be defined in an RFC that updates this specification or it successors.  <ins> The Name value is concatenated to the Base Name value to yield the name of the sensor.  The resulting concatenated name needs to uniquely identify and differentiate the sensor from all others.  The concatenated name MUST consist only of characters out of the set "A" to "Z", "a" to "z", "0" to "9", "-", ":", ".", "/", and "_"; furthermore, it MUST start with a character out of the set "A" to "Z", "a" to "z", or "0" to "9".  This restricted character set was chosen so that concatenated names can be used directly within various URI schemes (including segments of an HTTP path with no special encoding) and can be used directly in many databases and analytic systems.  RFC5952 contains advice on encoding an IPv6 address in a name.  See sec-privacy for privacy considerations that apply to the use of long-term stable unique identifiers. Although it is RECOMMENDED that concatenated names are represented as URIs RFC3986 or URNs RFC2141, the restricted character set specified above puts strict limits on the URI schemes and URN namespaces that can be used.  As a result, implementers need to take care in choosing the naming scheme for concatenated names, because such names both need to be unique and need to conform to the restricted character set.  One approach is to include a bit string that has guaranteed uniqueness (such as a 1-wire address).  Some of the examples within this document use the device URN namespace as specified in I-D.arkko- core-dev-urn.  UUIDs RFC4122 are another way to generate a unique name.  However, the restricted character set does not allow the use of many URI schemes in names as such.  The use of URIs with characters incompatible with this set, and possible mapping rules between the two, are outside of the scope of the present document. </ins> If the Record has no Unit, the Base Unit is used as the Unit.  Having no Unit and no Base Unit is allowed.


or PUT method) and the semantics of the target are such that SenML is interpreted as configuration/actuation, SenML Records are interpreted as a request to change the values of given (sub)resources (given as <del> names) to given values at the given time(s). </del>  5.

target are such that SenML is interpreted as configuration/actuation"? And aren't configuration and actuation quite different use cases? These semantics need to be established out of band from SenML point of view. Could be something like CoRE interface type or LwM2M resource type that accepts SenML for this purpose. But we don't want to be prescriptive here. Perhaps giving example(s) is good approach
Addressed by PR

or PUT method) and the semantics of the target are such that SenML is interpreted as configuration/actuation, SenML Records are interpreted as a request to change the values of given (sub)resources (given as  <ins> names) to given values at the given time(s).  The semantics of the target resource supporting this usage can be described, e.g., using I-D.ietf-core-interfaces.  Examples of actuation usage are shown in thermo-ex. </ins> 5.


Note to RFC Editor - please remove this paragraph.  Note that a request for media type review for senml+json was sent to the media- types@iana.org on Sept 21, 2010.  A second request for all the types <del> was sent on October 31, 2016. </del>  12.3.1. any significant limitations as all this data is meant for machine to machine communications and is not meant to be human readable. <del> Security considerations: Sensor data can contain a wide range of information ranging from information that is very public, such the outside temperature in a given city, to very private information that requires integrity and confidentiality protection, such as patient health information.  This format does not provide any security and instead relies on the transport protocol that carries it to provide security.  Given applications need to look at the overall context of how this media type will be used to decide if the security is adequate. </del>  Interoperability considerations: Applications should ignore any JSON key value pairs that they do not understand.  This allows backwards Encoding considerations: Must be encoded as using RFC7049.  See RFC- AAAA for details. <del> Security considerations: Sensor data can contain a wide range of information ranging from information that is very public, such the outside temperature in a given city, to very private information that requires integrity and confidentiality protection, such as patient health information.  This format does not provide any security and instead relies on the transport protocol that carries it to provide security.  Given applications need to look at the overall context of how this media type will be used to decide if the security is adequate. </del>  Interoperability considerations: Applications should ignore any key value pairs that they do not understand.  This allows backwards Encoding considerations: Must be encoded as using W3C.REC-xml- 20081126.  See RFC-AAAA for details. <del> Security considerations: Sensor data can contain a wide range of information ranging from information that is very public, such the outside temperature in a given city, to very private information that requires integrity and confidentiality protection, such as patient health information.  This format does not provide any security and instead relies on the transport protocol that carries it to provide security.  Given applications need to look at the overall context of how this media type will be used to decide if the security is adequate. </del>  Interoperability considerations: Applications should ignore any XML tags or attributes that they do not understand.  This allows Encoding considerations: Must be encoded as using W3C.REC-exi- 20140211.  See RFC-AAAA for details. <del> Security considerations: Sensor data can contain a wide range of information ranging from information that is very public, such the outside temperature in a given city, to very private information that requires integrity and confidentiality protection, such as patient health information.  This format does not provide any security and instead relies on the transport protocol that carries it to provide security.  Given applications need to look at the overall context of how this media type will be used to decide if the security is adequate. </del>  Interoperability considerations: Applications should ignore any XML tags or attributes that they do not understand.  This allows 13. <del> See sec-privacy.  Further discussion of security properties can be found in sec-iana-media. </del>  14.

Alternatively we can have the same text 9 times instead of 8
Alexey confirmed in the CoRE session that this is OK, so let's go forward with this.
The IANA types review list explicitly wanted all of this repeated because they don't read the draft on the email and each type needs it's own email. It is insane. So I would not make this change. LGTM

Note to RFC Editor - please remove this paragraph.  Note that a request for media type review for senml+json was sent to the media- types@iana.org on Sept 21, 2010.  A second request for all the types  <ins> was sent on October 31, 2016.  Please change all instances of RFC- AAAA with the RFC number of this document. </ins> 12.3.1. any significant limitations as all this data is meant for machine to machine communications and is not meant to be human readable.  <ins> Security considerations: See sec-sec of RFC-AAAA. </ins> Interoperability considerations: Applications should ignore any JSON key value pairs that they do not understand.  This allows backwards Encoding considerations: Must be encoded as using RFC7049.  See RFC- AAAA for details.  <ins> Security considerations: See sec-sec of RFC-AAAA. </ins> Interoperability considerations: Applications should ignore any key value pairs that they do not understand.  This allows backwards Encoding considerations: Must be encoded as using W3C.REC-xml- 20081126.  See RFC-AAAA for details.  <ins> Security considerations: See sec-sec of RFC-AAAA. </ins> Interoperability considerations: Applications should ignore any XML tags or attributes that they do not understand.  This allows Encoding considerations: Must be encoded as using W3C.REC-exi- 20140211.  See RFC-AAAA for details.  <ins> Security considerations: See sec-sec of RFC-AAAA. </ins> Interoperability considerations: Applications should ignore any XML tags or attributes that they do not understand.  This allows 13.  <ins> Sensor data can contain a wide range of information ranging from information that is very public, such as the outside temperature in a given city, to very private information that requires integrity and confidentiality protection, such as patient health information.  The SenML format does not provide any security and instead relies on the protocol that carries it to provide security.  Applications using SenML need to look at the overall context of how this media type will be used to decide if the security is adequate. See also sec-privacy. </ins> 14.


If X flag is 0, then the KID is in the range of 0-7 and the counter (CTR) is found in the next LEN bytes: <del> If X flag is 1 then KLEN is the length of the key (KID).  The KID is </del>  encoded in the KLEN bytes following the metadata byte, and the counter (CTR) is encoded in the next LEN bytes:

Feedback from URL In section 4.3, is KLEN the actual key id length, or key id length minus one, as LEN is?
My interpretation of the intent is to be key id length minus one.
URL Hey all, I know a couple folks here, but not many. My name is Bret. I am a SWE at Meta and have been working on calling E2EE for some time. Per Bobo’s request, I wanted to share my thoughts on the latest RFC draft ( https://sframe-URL). I think the doc makes sense generally, but have several thoughts, of both a technical and editorial nature: Technical: The notion and semantics of SFrame “streams” are alluded to throughout the document without being well defined. Does the RFC need to define the notion of an SFrame “stream”, consisting of media encrypted all with the same key and cipher suite? It seems like managing such streams is a requirement of the application, but the exact requirements are not spelled out. Here are examples where the notion of a stream comes up: In section 4.3 it describes a scenario where KIDs are unique to each sender, sort of implying that given an SFrame payload (including the SFrame header) a receiver should be able to decrypt it. Then in section 4.5 it describes how “In a session that uses multiple media streams, different ciphersuites might be configured for different media streams”, of course implying that if KIDs are per sender, there would need to be some other mechanism to demux from KID → stream, as there could be multiple cipher suites per stream. This is mentioned head on in section 5.1, where the draft states “In this scheme, it is assumed that receivers have a signal outside of SFrame for which client has sent a given frame, for example the RTP SSRC” It might be worth adding more details to section 5.1 to more clearly spell out how sender keys should (or could) work. For example, it states that “A receiver who receives from a sender with a new KID computes the new key as above [using an HKDF ratchet]”, yet later on says that “Evicting a participant requires each sender to send a fresh sender key to all receivers.”. Given both of these, it is not clear how a sender would signal a receiver that a frame is using a “fresh sender key” as opposed to a ratchet (or multiple) of a previously received key. Question: In section 4.3, is KLEN the actual key id length, or key id length minus one, as LEN is Editorial: Throughout the doc there are numerous sections (e.g. 4.4.3, 6) which are very RTP specific, despite a stated goal of the RFC being that SFrame is transport agnostic. Section 7.2 states that key exchange is out of scope for this doc, yet it states that clients “MUST change their keys when new clients joins or leaves the call”. IMO if this is an absolute requirement of the RFC, as per the definition of an all caps MUST, then the exact requirements of this should be spelled out more, and possibly a reference protocol given. Thanks, all. I am really excited for this RFC to land. I hope these notes are somewhat helpful. Best, Bret

If X flag is 0, then the KID is in the range of 0-7 and the counter (CTR) is found in the next LEN bytes:  <ins> If X flag is 1 then KLEN is the length of the key (KID) in bytes, minus one (the range of possible lengths is thus 1-8).  The KID is </ins> encoded in the KLEN bytes following the metadata byte, and the counter (CTR) is encoded in the next LEN bytes:


3.1.  Since each endpoint can send multiple media layers, each frame will have a unique frame counter that will be used to derive the encryption IV.  The frame counter must be unique and monodically (Variable length) The key id value up to 8 bytes long.  Frame counter (CTR): (Variable length) Frame counter value up to 8 bytes long. <del> 3.2. </del>  <del> 3.2.1. </del>  Each client creates a 32 bytes secret key K and share it with with other participants via an E2EE channel.  From K, we derive 3 secrets: The IV is 128 bits long and calculated from the CTR field of the Frame header: <del> 3.2.2. 3.2.2.1. SFrame supports two ciphers, the only difference is the length of the authentication tag, where 10 bytes is used for video and 4 bytes for audio 1- AES_CM_128_HMAC_SHA256_80 2- AES_CM_128_HMAC_SHA256_32 It uses AES counter mode for encryption with 128 bit key, SHA256 hash for the HKDF key derivation. 3.2.2.2. SRTP is used as an outer encryption, since the media payload is already encrypted, and SRTP only protects the RTP headers, one implementation could use 4 bytes outer auth tag to decrease the overhead, however it is up to the application to use other ciphers like AES-128-GCM with full authentication tag. It is possible that future versions of this draft will define other ciphers. 3.2.3. </del>  After encoding the frame and before packetizing it, the necessary media metadata will be moved out of the encoded frame buffer, to be construct the RTP packets and encrypts it using SRTP keys for the outer encryption to the media server. <del> 3.2.4. </del>  The receiving clients buffer all packets that belongs to the same frame using the frame beginning and ending marks in the generic RTP the client has the mapping ready, it can push it down to SFrame later.  For frames that are failed to decrypt because there is not key available yet, SFrame will buffer them and retries to decrypt them once a key is received. <del> 3.2.5. </del>  Unlike messaging application, in video calls, receiving a duplicate frame doesn't necessary mean the client is under a replay attack, there are other reasons that might cause this, for example the sender might just be sending them in case of packet loss.  SFrame decryptors <del> use the last received frame counter to protect against this.  It </del>  allows only older frame pithing a short interval to support out of order delivery. <del> 3.2.6. </del>  Because the E2EE keys could be rotated during the call when people join and leave, these new keys are exchanged using the same E2EE hash ratcheting for the join case, so no need to send a new key to the clients who are already on the call.  SFrame supports both modes <del> 3.2.6.1. </del>  When SFrame decryptor fails to decrypt one of the frames, it automatically ratchets the key forward and retries again until one If a new ratchet passed the decryption, all previous ratchets are deleted. <del> 3.2.6.2. </del>  Frame will set the key immediately on the decrypts when it is received and destroys the old key material, so if the key manager decryption failure.  It is up to the application and the key manager to define how long this period is. <del> 3.3. </del>  Every client in the call knows the secret key for all other clients so it can decrypt their traffic, it means a malicious client can The signature keys are exchanged out of band along the secret keys.  4. SFrame must be integrated with an E2EE key management framework to

Add SFrame payload format including the signature block Move Ciphersuites at the end Refer to the KeyId field in the decryption section

3.1. <ins> 3.2. </ins> Since each endpoint can send multiple media layers, each frame will have a unique frame counter that will be used to derive the encryption IV.  The frame counter must be unique and monodically (Variable length) The key id value up to 8 bytes long.  Frame counter (CTR): (Variable length) Frame counter value up to 8 bytes long.  <ins> 3.3. </ins>  <ins> 3.3.1. </ins> Each client creates a 32 bytes secret key K and share it with with other participants via an E2EE channel.  From K, we derive 3 secrets: The IV is 128 bits long and calculated from the CTR field of the Frame header:  <ins> 3.3.2. </ins> After encoding the frame and before packetizing it, the necessary media metadata will be moved out of the encoded frame buffer, to be construct the RTP packets and encrypts it using SRTP keys for the outer encryption to the media server.  <ins> 3.3.3. </ins> The receiving clients buffer all packets that belongs to the same frame using the frame beginning and ending marks in the generic RTP the client has the mapping ready, it can push it down to SFrame later. <ins> The KeyId field in the SFrame header is used to find the right key for that user, which is incremented by the sender when they change to a new key. </ins> For frames that are failed to decrypt because there is not key available yet, SFrame will buffer them and retries to decrypt them once a key is received.  <ins> 3.3.4. </ins> Unlike messaging application, in video calls, receiving a duplicate frame doesn't necessary mean the client is under a replay attack, there are other reasons that might cause this, for example the sender might just be sending them in case of packet loss.  SFrame decryptors  <ins> use the highest received frame counter to protect against this.  It </ins> allows only older frame pithing a short interval to support out of order delivery.  <ins> 3.3.5. </ins> Because the E2EE keys could be rotated during the call when people join and leave, these new keys are exchanged using the same E2EE hash ratcheting for the join case, so no need to send a new key to the clients who are already on the call.  SFrame supports both modes  <ins> 3.3.5.1. </ins> When SFrame decryptor fails to decrypt one of the frames, it automatically ratchets the key forward and retries again until one If a new ratchet passed the decryption, all previous ratchets are deleted.  <ins> 3.3.5.2. </ins> Frame will set the key immediately on the decrypts when it is received and destroys the old key material, so if the key manager decryption failure.  It is up to the application and the key manager to define how long this period is.  <ins> 3.4. </ins> Every client in the call knows the secret key for all other clients so it can decrypt their traffic, it means a malicious client can The signature keys are exchanged out of band along the secret keys. <ins> 3.5. 3.5.1. Each SFrame session uses a single ciphersuite that specifies the following primitives: o A hash function This is used for the Key derivation and frame hashes for signture.  We recommend using SHA256 hash function. o An AEAD encryption algorithm [RFC5116] While any AEAD algorithm can be used to encrypt the frame, we recommend using algorithms with safe MAC truncation like AES-CTR and HMAC to reduce the per-frame overhead.  In this case we can use 80 bits MAC for video frames and 32 bits for audio frames similar to DTLS-SRTP cipher suites: 1- AES_CM_128_HMAC_SHA256_80 2- AES_CM_128_HMAC_SHA256_32 o [Optional] A signature algorithm If signature is supported, we recommend using ed25519 3.5.2. SRTP is used as an outer encryption, since the media payload is already encrypted, and SRTP only protects the RTP headers, one implementation could use 4 bytes outer auth tag to decrease the overhead, however it is up to the application to use other ciphers like AES-128-GCM with full authentication tag. It is possible that future versions of this draft will define other ciphers. </ins> 4. SFrame must be integrated with an E2EE key management framework to