Skip to content

Commit 99e5887

Browse files
committed
Explain tag 201
1 parent e3e8f78 commit 99e5887

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

draft-mcnally-deterministic-cbor.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -180,23 +180,20 @@ dCBOR decoders:
180180
2. MUST reject any encoded major type 7 values other than `false`, `true`, `null`, and the floating point values.
181181
{:start="2"}
182182

183-
# CDDL support
183+
# CDDL support, Declarative Tag
184184

185185
Similar to the CDDL {{-CDDL}} support in CDE {{CDE}}, this specification adds two CDDL control operators that can be used to specify that the data items should be encoded in CBOR Common Deterministic Encoding (CDE), with the dCBOR application profile applied as well.
186186

187187
The control operators `.dcbor` and `.dcborseq` are exactly like `.cde` and `.cdeseq` except that they also require the encoded data item(s) to conform to the dCBOR application profile.
188188

189-
For example, the normative comment in Section 3 of {{GordianEnvelope}}:
190-
191-
~~~ cddl
192-
leaf = #6.24(bytes) ; MUST be dCBOR
193-
~~~
194-
195-
...can now be formalized as:
196-
197-
~~~ cddl
198-
leaf = #6.24(bytes .dcbor any)
199-
~~~
189+
Tag 201 ({{tag201}}) is defined in this specification as a way to declare its tag
190+
content to conform to the dCBOR application profile at the data model level.
191+
As a result, when this data item is encoded using CDE rules, the encoded
192+
result will conform to dCBOR also at the encoded data item level.
193+
(In conjunction with this semantics, tag 201 may also be employed as a
194+
boundary marker leading from an overall structure to specific
195+
application data items; see {{Section 3 of GordianEnvelope}} for an
196+
example of this usage.)
200197

201198
# Implementation Status
202199
{:removeinrfc}
@@ -250,7 +247,7 @@ This document inherits the security considerations of CBOR {{-CBOR}}.
250247

251248
Vulnerabilities regarding dCBOR will revolve around whether an attacker can find value in producing semantically equivalent documents that are nonetheless serialized into non-identical byte streams. Such documents could be used to contain malicious payloads or exfiltrate sensitive data. The ability to create such documents could indicate the failure of a dCBOR decoder to correctly validate according to this document, or the failure of the developer to properly specify or implement application protocol requirements using dCBOR. Whether these possibilities present an identifiable attack surface is a question that developers should consider.
252249

253-
# IANA Considerations
250+
# IANA Considerations {#tag201}
254251

255252
RFC Editor: please replace RFCXXXX with the RFC number of this RFC and remove this note.
256253

0 commit comments

Comments
 (0)