Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polish for initial submit #5

Merged
merged 6 commits into from
Oct 12, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions draft-ftbs-rats-msg-wrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,24 @@ defined in {{-rats-arch}}.

# Conceptual Message Wrapper Encodings

Two different RATS Conceptual Message Wrapper (CMW) data types are
defined: one using a CBOR or JSON array ({{type-n-val}}), another using
CBOR tags ({{cbor-tag}}).
Two types of RATS Conceptual Message Wrapper (CMW) are specified in this
document:

## Type and Value Array {#type-n-val}
1.) a CMW using a CBOR or a JSON array ({{type-n-val}})
thomas-fossati marked this conversation as resolved.
Show resolved Hide resolved

The CMW described in {{fig-cddl}} is a CDDL array of two elements:
2.) a CMW based on CBOR tags ({{cbor-tag}}).
thomas-fossati marked this conversation as resolved.
Show resolved Hide resolved

* type: a string encoding a media type {{-media-types}} or an
## CMW Array {#type-n-val}

The CMW Array illustrated in {{fig-cddl}} is composed of two members:
thomas-fossati marked this conversation as resolved.
Show resolved Hide resolved

* type: ether a text string representing a media-type {{-media-types}} or an
unsigned integer corresponding to a CoAP Content-Format {{-coap}}

* value: the RATS conceptual message serialisation according to the
specified type.
* value: the RATS conceptual message serialized according to the
thomas-fossati marked this conversation as resolved.
Show resolved Hide resolved
value defined in the type member.

This kind of CMW can be encoded as CBOR {{-cbor}} or JSON {{-json}}.
A CMW Array can be encoded as CBOR {{-cbor}} or JSON {{-json}}.
thomas-fossati marked this conversation as resolved.
Show resolved Hide resolved

When using JSON, the value field is encoded as Base64 using the URL and
filename safe alphabet (Section 5 of {{-base64}}) without padding.
Expand All @@ -100,15 +103,16 @@ When using CBOR, the value field is serialized as a CBOR bytes string.
{: #fig-cddl artwork-align="left"
title="CDDL definition"}

## CBOR Tags derived from CoAP Content Formats {#cbor-tag}
## CMW CBOR Tags {#cbor-tag}

If a CoAP Content Format exists for the RATS conceptual message, the
CBOR Tags used as CMW are derived from CoAP Content Format values.
If a CoAP Content Format exists for a RATS conceptual message, the
thomas-fossati marked this conversation as resolved.
Show resolved Hide resolved
TN() transform defined in {{Appendix B of RFC9277}} can be used to
derive a CBOR tag in range [1668546817, 1668612095].

# Examples

The (equivalent) examples below assume the media type
The (equivalent) examples below assume the media-type
`application/vnd.example.rats-conceptual-msg` has been registered
alongside a corresponding CoAP content format `30001`. The CBOR tag
`1668576818` is derived applying the TN transform as described in
Expand Down Expand Up @@ -144,8 +148,6 @@ syntactical description, the author SHOULD provide a public and stable
description of the signing and appraisal procedures associated with
the data format.



--- back

# Acknowledgments
Expand Down