idnits 2.17.1 draft-bormann-cbor-notable-tags-04.txt: -(3): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == There are 3 instances of lines with non-ascii characters in the document. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 68 instances of too long lines in the document, the longest one being 31 characters in excess of 72. == There are 9 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (15 August 2021) is 982 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'ECMA262' is mentioned on line 227, but not defined == Unused Reference: 'I-D.clarke-cbor-crs' is defined on line 845, but no explicit reference was found in the text == Unused Reference: 'RFC4122' is defined on line 891, but no explicit reference was found in the text == Outdated reference: A later version (-20) exists of draft-ietf-core-yang-cbor-16 ** Obsolete normative reference: RFC 8152 (Obsoleted by RFC 9052, RFC 9053) ** Obsolete normative reference: RFC 8782 (Obsoleted by RFC 9132) == Outdated reference: A later version (-12) exists of draft-ietf-cbor-time-tag-00 -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) Summary: 3 errors (**), 0 flaws (~~), 8 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group C. Bormann 3 Internet-Draft Universität Bremen TZI 4 Intended status: Informational 15 August 2021 5 Expires: 16 February 2022 7 Notable CBOR Tags 8 draft-bormann-cbor-notable-tags-04 10 Abstract 12 The Concise Binary Object Representation (CBOR, RFC 8949) is a data 13 format whose design goals include the possibility of extremely small 14 code size, fairly small message size, and extensibility without the 15 need for version negotiation. 17 In CBOR, one point of extensibility is the definition of CBOR tags. 18 RFC 8949's original edition, RFC 7049, defined a basic set of tags as 19 well as a registry that can be used to contribute additional tag 20 definitions [IANA.cbor-tags]. Since RFC 7049 was published, some 80 21 tag definitions have been added to that registry. 23 The present document provides a roadmap to a large subset of these 24 tag definitions. Where applicable, it points to a IETF standards or 25 standard development document that specifies the tag. Where no such 26 document exists, the intention is to collect specification 27 information from the sources of the registrations. After some more 28 development, the present document is intended to be useful as a 29 reference document for the IANA registrations of the CBOR tags the 30 definitions of which have been collected. 32 Note to Readers 34 This is an individual submission to the CBOR working group of the 35 IETF, https://datatracker.ietf.org/wg/cbor/about/ 36 (https://datatracker.ietf.org/wg/cbor/about/). Discussion currently 37 takes places on the github repository https://github.com/cabo/ 38 notable-tags (https://github.com/cabo/notable-tags). If the CBOR WG 39 believes this is a useful document, discussion is likely to move to 40 the CBOR WG mailing list and a github repository at the CBOR WG 41 github organization, https://github.com/cbor-wg (https://github.com/ 42 cbor-wg). 44 The current version is true work in progress; some of the sections 45 haven't been filled in yet, and in particular, permission has not 46 been obtained from tag definition authors to copy over their text. 48 Status of This Memo 50 This Internet-Draft is submitted in full conformance with the 51 provisions of BCP 78 and BCP 79. 53 Internet-Drafts are working documents of the Internet Engineering 54 Task Force (IETF). Note that other groups may also distribute 55 working documents as Internet-Drafts. The list of current Internet- 56 Drafts is at https://datatracker.ietf.org/drafts/current/. 58 Internet-Drafts are draft documents valid for a maximum of six months 59 and may be updated, replaced, or obsoleted by other documents at any 60 time. It is inappropriate to use Internet-Drafts as reference 61 material or to cite them other than as "work in progress." 63 This Internet-Draft will expire on 16 February 2022. 65 Copyright Notice 67 Copyright (c) 2021 IETF Trust and the persons identified as the 68 document authors. All rights reserved. 70 This document is subject to BCP 78 and the IETF Trust's Legal 71 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 72 license-info) in effect on the date of publication of this document. 73 Please review these documents carefully, as they describe your rights 74 and restrictions with respect to this document. Code Components 75 extracted from this document must include Simplified BSD License text 76 as described in Section 4.e of the Trust Legal Provisions and are 77 provided without warranty as described in the Simplified BSD License. 79 Table of Contents 81 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 82 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 83 2. RFC 7049 (original CBOR specification) . . . . . . . . . . . 4 84 2.1. Tags Related to Those Defined in RFC 7049 . . . . . . . . 5 85 2.2. Tags from RFC 7049 not listed in RFC 8949 . . . . . . . . 5 86 3. Security . . . . . . . . . . . . . . . . . . . . . . . . . . 6 87 3.1. RFC 8152 (COSE) . . . . . . . . . . . . . . . . . . . . . 6 88 3.2. RFC 8392 (CWT) . . . . . . . . . . . . . . . . . . . . . 7 89 4. CBOR-based Representation Formats . . . . . . . . . . . . . . 7 90 4.1. YANG-CBOR . . . . . . . . . . . . . . . . . . . . . . . . 8 91 5. Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . 8 92 5.1. DOTS . . . . . . . . . . . . . . . . . . . . . . . . . . 8 93 5.2. RAINS . . . . . . . . . . . . . . . . . . . . . . . . . . 9 94 6. Datatypes . . . . . . . . . . . . . . . . . . . . . . . . . . 9 95 6.1. Advanced arithmetic . . . . . . . . . . . . . . . . . . . 9 96 6.2. Variants of undefined . . . . . . . . . . . . . . . . . . 11 97 6.3. Typed and Homogeneous Arrays . . . . . . . . . . . . . . 11 98 7. Domain-Specific . . . . . . . . . . . . . . . . . . . . . . . 13 99 7.1. Extended Time Formats . . . . . . . . . . . . . . . . . . 14 100 8. Platform-oriented . . . . . . . . . . . . . . . . . . . . . . 15 101 8.1. Perl . . . . . . . . . . . . . . . . . . . . . . . . . . 16 102 8.2. JSON . . . . . . . . . . . . . . . . . . . . . . . . . . 16 103 8.3. Weird text encodings . . . . . . . . . . . . . . . . . . 17 104 9. Application-specific . . . . . . . . . . . . . . . . . . . . 17 105 10. Implementation aids . . . . . . . . . . . . . . . . . . . . . 18 106 10.1. Invalid Tag . . . . . . . . . . . . . . . . . . . . . . 18 107 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 108 12. Security Considerations . . . . . . . . . . . . . . . . . . . 19 109 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 110 13.1. Normative References . . . . . . . . . . . . . . . . . . 19 111 13.2. Informative References . . . . . . . . . . . . . . . . . 20 112 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 23 113 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 23 114 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 23 116 1. Introduction 118 (TO DO, expand on text from abstract here; move references here and 119 neuter them in the abstract as per Section 4.3 of [RFC7322].) 121 The selection of the tags presented here is somewhat arbitrary; 122 considerations such as how wide the scope and area of application of 123 a tag definition is combine with an assessment how "ready to use" the 124 tag definition is (i.e., is the tag specification in a state where it 125 can be used). 127 This document can only be a snapshot of a subset of the current 128 registrations. The most up to date set of registrations is always 129 available in the registry "CBOR Tags" [IANA.cbor-tags]. 131 1.1. Terminology 133 The definitions of [RFC8949] apply. The term "byte" is used in its 134 now customary sense as a synonym for "octet". Where bit arithmetic 135 is explained, this document uses the notation familiar from the 136 programming language C ([C], including C++14's "0bnnn" binary 137 literals [Cplusplus20]), except that superscript notation (example 138 for two to the power of 64: 2^64) denotes exponentiation; in the 139 plain text version of this document, superscript notation is rendered 140 in paragraph text by C-incompatible surrogate notation as seen in 141 this example. Ranges expressed using ".." are inclusive of the 142 limits given. Type names such as "int", "bigint" or "decfrac" are 143 taken from Appendix D of [RFC8610], the Concise Data Definition 144 Language (CDDL). 146 2. RFC 7049 (original CBOR specification) 148 [RFC7049] defines a number of tags that are listed here for 149 convenience only. 151 +============+=============+=======================+============+ 152 | Tag number | Tag content | Short Description | Section of | 153 | | | | RFC 7049 | 154 +============+=============+=======================+============+ 155 | 0 | UTF-8 | Standard date/time | 2.4.1 | 156 | | string | string | | 157 +------------+-------------+-----------------------+------------+ 158 | 1 | multiple | Epoch-based date/time | 2.4.1 | 159 +------------+-------------+-----------------------+------------+ 160 | 2 | byte string | Positive bignum | 2.4.2 | 161 +------------+-------------+-----------------------+------------+ 162 | 3 | byte string | Negative bignum | 2.4.2 | 163 +------------+-------------+-----------------------+------------+ 164 | 4 | array | Decimal fraction | 2.4.3 | 165 +------------+-------------+-----------------------+------------+ 166 | 5 | array | Bigfloat | 2.4.3 | 167 +------------+-------------+-----------------------+------------+ 168 | 21 | multiple | Expected conversion | 2.4.4.2 | 169 | | | to base64url encoding | | 170 +------------+-------------+-----------------------+------------+ 171 | 22 | multiple | Expected conversion | 2.4.4.2 | 172 | | | to base64 encoding | | 173 +------------+-------------+-----------------------+------------+ 174 | 23 | multiple | Expected conversion | 2.4.4.2 | 175 | | | to base16 encoding | | 176 +------------+-------------+-----------------------+------------+ 177 | 24 | byte string | Encoded CBOR data | 2.4.4.1 | 178 | | | item | | 179 +------------+-------------+-----------------------+------------+ 180 | 32 | UTF-8 | URI | 2.4.4.3 | 181 | | string | | | 182 +------------+-------------+-----------------------+------------+ 183 | 33 | UTF-8 | base64url | 2.4.4.3 | 184 | | string | | | 185 +------------+-------------+-----------------------+------------+ 186 | 34 | UTF-8 | base64 | 2.4.4.3 | 187 | | string | | | 188 +------------+-------------+-----------------------+------------+ 189 | 35 | UTF-8 | Regular expression | 2.4.4.3 | 190 | | string | | | 191 +------------+-------------+-----------------------+------------+ 192 | 36 | UTF-8 | MIME message | 2.4.4.3 | 193 | | string | | | 194 +------------+-------------+-----------------------+------------+ 195 | 55799 | multiple | Self-describe CBOR | 2.4.5 | 196 +------------+-------------+-----------------------+------------+ 198 Table 1: Tag numbers defined in RFC 7049 200 2.1. Tags Related to Those Defined in RFC 7049 202 Separately registered tags that are directly related to the tags 203 predefined in RFC 7049 include: 205 * Tag 63, registered by this document, is a parallel to tag 24, with 206 the single difference that its byte string tag content carries a 207 CBOR Sequence [RFC8742] instead of a single CBOR data item. 209 * Tag 257, registered by Peter Occil with a specification in 210 http://peteroupc.github.io/CBOR/binarymime.html 211 (http://peteroupc.github.io/CBOR/binarymime.html), is a parallel 212 to tag 36, except that the tag content is a byte string, which 213 therefore can also carry binary MIME messages as per [RFC2045]. 215 2.2. Tags from RFC 7049 not listed in RFC 8949 217 Section G.3 of [RFC8949] states: 219 | Tag 35 is not defined by this document; the registration based on 220 | the definition in RFC 7049 remains in place. 222 The reason for this exclusion is that the definition of Tag 35 in 223 Section 2.4.4.3 of [RFC7049], leaves too much open to ensure 224 interoperability: 226 | Tag 35 is for regular expressions in Perl Compatible Regular 227 | Expressions (PCRE) / JavaScript syntax [ECMA262]. 229 Not only are two partially incompatible specifications given for the 230 semantics, JavaScript regular expressions have also developed 231 significantly within the decade since JavaScript 5.1 (which was 232 referenced by [RFC7049]), making it less reliable to assume that a 233 producing application will manage to stay within that 2011 subset. 235 Nonetheless, the registration is in place, so it is available for 236 applications that simply want to mark a text string as being a 237 regular expression roughly of the PCRE/Javascript flavor families. 239 3. Security 241 A number of CBOR tags are defined in security specifications that 242 make use of CBOR. 244 3.1. RFC 8152 (COSE) 246 [RFC8152] defines CBOR Object Signing and Encryption (COSE). A 247 revision is in process that splits this specification into the data 248 structure definitions [I-D.ietf-cose-rfc8152bis-struct], which will 249 define another tag for COSE standalone counter signature, and the 250 algorithms employed [I-D.ietf-cose-rfc8152bis-algs]. 252 +============+===============+=======================+ 253 | Tag number | Tag content | Short Description | 254 +============+===============+=======================+ 255 | 16 | COSE_Encrypt0 | COSE Single Recipient | 256 | | | Encrypted Data Object | 257 +------------+---------------+-----------------------+ 258 | 17 | COSE_Mac0 | COSE Mac w/o | 259 | | | Recipients Object | 260 +------------+---------------+-----------------------+ 261 | 18 | COSE_Sign1 | COSE Single Signer | 262 | | | Data Object | 263 +------------+---------------+-----------------------+ 264 | 96 | COSE_Encrypt | COSE Encrypted Data | 265 | | | Object | 266 +------------+---------------+-----------------------+ 267 | 97 | COSE_Mac | COSE MACed Data | 268 | | | Object | 269 +------------+---------------+-----------------------+ 270 | 98 | COSE_Sign | COSE Signed Data | 271 | | | Object | 272 +------------+---------------+-----------------------+ 274 Table 2: Tag numbers defined in RFC 8152, COSE 276 3.2. RFC 8392 (CWT) 278 [RFC8392] defines the CBOR Web Token (CWT), making use of COSE to 279 define a CBOR variant of the JOSE Web Token (JWT), [RFC7519], a 280 standardized security token that has found use in the area of web 281 applications, but is not technically limited to those. 283 +============+======================+======================+ 284 | Tag number | Tag content | Short Description | 285 +============+======================+======================+ 286 | 61 | CBOR Web Token (CWT) | CBOR Web Token (CWT) | 287 +------------+----------------------+----------------------+ 289 Table 3: Tag number defined for RFC 8392 CBOR Web Token 290 (CWT) 292 4. CBOR-based Representation Formats 294 Representation formats can be built on top of CBOR. 296 4.1. YANG-CBOR 298 YANG [RFC7950] is a data modeling language originally designed in the 299 context of the Network Configuration Protocol (NETCONF) [RFC6241], 300 now widely used for modeling management and configuration 301 information. [RFC7950] defines an XML-based representation format, 302 and [RFC7951] defines a JSON-based [RFC8259] representation format 303 for YANG. 305 YANG-CBOR [I-D.ietf-core-yang-cbor] is a representation format for 306 YANG data in CBOR. 308 +========+======================+=====================+============+ 309 | Tag | Tag content | Short Description | Section of | 310 | number | | | YANG-CBOR | 311 +========+======================+=====================+============+ 312 | 43 | byte string | YANG bits datatype | 6.7 | 313 +--------+----------------------+---------------------+------------+ 314 | 44 | unsigned integer | YANG enumeration | 6.6 | 315 | | | datatype | | 316 +--------+----------------------+---------------------+------------+ 317 | 45 | unsigned integer or | YANG identityref | 6.10 | 318 | | text string | datatype | | 319 +--------+----------------------+---------------------+------------+ 320 | 46 | unsigned integer or | YANG instance- | 6.13 | 321 | | text string or array | identifier datatype | | 322 +--------+----------------------+---------------------+------------+ 323 | 47 | unsigned integer | YANG Schema Item | 3.2 | 324 | | | iDentifier (sid) | | 325 +--------+----------------------+---------------------+------------+ 327 Table 4: Tag number defined for YANG-CBOR 329 5. Protocols 331 Protocols may want to allocate CBOR tag numbers to identify specific 332 protocol elements. 334 5.1. DOTS 336 DDoS Open Threat Signaling (DOTS) defines tag number 271 for the DOTS 337 signal channel object in [RFC8782]. 339 5.2. RAINS 341 As an example for how experimental protocols can make use of CBOR tag 342 definitions, the RAINS (Another Internet Naming Service) Protocol 343 Specification defines tag number 15309736 for a RAINS Message 344 [I-D.trammell-rains-protocol]. (The seemingly random tag number was 345 chosen so that, when represented as an encoded CBOR tag argument, it 346 contains the Unicode character "雨" (U+96E8) in UTF-8, which 347 represents rain in a number of languages.) 349 6. Datatypes 351 6.1. Advanced arithmetic 353 A number of tags have been registered for arithmetic representations 354 beyond those built into CBOR and defined by tags in [RFC7049]. These 355 are all documented under "http://peteroupc.github.io/CBOR/"; the last 356 pathname component is given in Table 5. 358 +============+=============+=======================+===============+ 359 | Tag number | Tag content | Short Description | Reference | 360 +============+=============+=======================+===============+ 361 | 30 | array | Rational number | rational.html | 362 +------------+-------------+-----------------------+---------------+ 363 | 264 | array | Decimal fraction with | bigfrac.html | 364 | | | arbitrary exponent | | 365 +------------+-------------+-----------------------+---------------+ 366 | 265 | array | Bigfloat with | bigfrac.html | 367 | | | arbitrary exponent | | 368 +------------+-------------+-----------------------+---------------+ 369 | 268 | array | Extended decimal | extended.html | 370 | | | fraction | | 371 +------------+-------------+-----------------------+---------------+ 372 | 269 | array | Extended bigfloat | extended.html | 373 +------------+-------------+-----------------------+---------------+ 374 | 270 | array | Extended rational | extended.html | 375 | | | number | | 376 +------------+-------------+-----------------------+---------------+ 378 Table 5: Tags for advanced arithmetic 380 CBOR's basic generic data model (Section 2 of [RFC8949]) has a number 381 system with limited-range integers (major types 0 and 1: 382 -2^64..2^64-1) and floating point numbers that cover binary16, 383 binary32, and binary64 (including non-finites) from [IEEE754]. With 384 the tags defined with [RFC7049], the extended generic data model 385 (Section 2.1 of [RFC8949]) adds unlimited-range integers (tag numbers 386 2 and 3, "bigint" in CDDL) as well as floating point values using the 387 bases 2 (tag number 5, "bigfloat") and 10 (tag number 4, "decfrac"). 389 This pre-defined number system has a number of limitations that are 390 addressed in three of the tags discussed here: 392 * Tag number 30 allows the representation of rational numbers as a 393 ratio of two integers: a numerator (usually written as the top 394 part of a fraction), and a denominator (the bottom part), where 395 both integers can be limited-range basic and unlimited-range 396 integers. The mathematical value of a rational number is the 397 numerator divided by the denominator. This tag can express all 398 numbers that the extended generic data model of [RFC7049] can 399 express, except for non-finites [IEEE754]; it also can express 400 rational numbers that cannot be expressed with denominators that 401 are a power of 2 or a power of 10. 403 For example, the rational number 1/3 is encoded: 405 d8 1e ---- Tag 30 406 82 ---- Array length 2 407 01 ---- 1 408 03 ---- 3 410 Many programming languages have built-in support for rational 411 numbers or support for them is included in their standard 412 libraries; tag number 30 is a way for these platforms to 413 interchange these rational numbers in CBOR. 415 * Tag numbers 4 and 5 are limited in the range of the (base 10 or 416 base 2) exponents by the limited-range integers in the basic 417 generic data model. Tag numbers 264 and 265 are exactly 418 equivalent to 4 and 5, respectively, but also allow unlimited- 419 range integers as exponents. While applications for floating 420 point numbers with exponents outside the CBOR basic integer range 421 are limited, tags 264 and 265 allow unlimited roundtripping with 422 other formats that allow very large or very small exponents, such 423 as those JSON [RFC8259] can provide if the limitations of I-JSON 424 [RFC7493] do not apply. 426 The tag numbers 268..270 extend these tags further by providing a way 427 to express non-finites within a tag with this number. This does not 428 increase the expressiveness of the data model (the non-finites can 429 already be expressed using major type 7 floating point numbers), but 430 does allow both finite and non-finite values to carry the same tag. 431 In most applications, a choice that includes some of the three tags 432 30, 264, 265 for finite values and major type 7 floating point values 433 for non-finites (as well as possibly other parts of the CBOR number 434 system) will be the preferred solution. 436 This document suggests using the CDDL typenames defined in Figure 1 437 for the three most useful tag numbers in this section. 439 rational = #6.30([numerator: integer, denominator: integer .ne 0]) 440 rational_of = #6.30([numerator: N, denominator: D]) 441 ; the value 1/3 can be notated as rational_of<1, 3> 443 extended_decfrac = #6.264([e10: integer, m: integer]) 444 extended_bigfloat = #6.265([e2: integer, m: integer]) 446 Figure 1: CDDL for extended arithmetic tags 448 6.2. Variants of undefined 450 "https://github.com/svaarala/cbor-specs/blob/master/cbor-absent- 451 tag.rst" defines tag 31 to be applied to the CBOR value Undefined 452 (0xf7), slightly modifying its semantics to stand for an absent value 453 in a CBOR Array. 455 (TO DO: Obtain permission to copy the definitions here.) 457 6.3. Typed and Homogeneous Arrays 459 [RFC8746] defines tags for various kinds of arrays. A summary is 460 reproduced in Table 6. 462 +======+=============+=============================================+ 463 | Tag | Data Item | Semantics | 464 +======+=============+=============================================+ 465 | 64 | byte string | uint8 Typed Array | 466 +------+-------------+---------------------------------------------+ 467 | 65 | byte string | uint16, big endian, Typed Array | 468 +------+-------------+---------------------------------------------+ 469 | 66 | byte string | uint32, big endian, Typed Array | 470 +------+-------------+---------------------------------------------+ 471 | 67 | byte string | uint64, big endian, Typed Array | 472 +------+-------------+---------------------------------------------+ 473 | 68 | byte string | uint8 Typed Array, clamped arithmetic | 474 +------+-------------+---------------------------------------------+ 475 | 69 | byte string | uint16, little endian, Typed Array | 476 +------+-------------+---------------------------------------------+ 477 | 70 | byte string | uint32, little endian, Typed Array | 478 +------+-------------+---------------------------------------------+ 479 | 71 | byte string | uint64, little endian, Typed Array | 480 +------+-------------+---------------------------------------------+ 481 | 72 | byte string | sint8 Typed Array | 482 +------+-------------+---------------------------------------------+ 483 | 73 | byte string | sint16, big endian, Typed Array | 484 +------+-------------+---------------------------------------------+ 485 | 74 | byte string | sint32, big endian, Typed Array | 486 +------+-------------+---------------------------------------------+ 487 | 75 | byte string | sint64, big endian, Typed Array | 488 +------+-------------+---------------------------------------------+ 489 | 76 | byte string | (reserved) | 490 +------+-------------+---------------------------------------------+ 491 | 77 | byte string | sint16, little endian, Typed Array | 492 +------+-------------+---------------------------------------------+ 493 | 78 | byte string | sint32, little endian, Typed Array | 494 +------+-------------+---------------------------------------------+ 495 | 79 | byte string | sint64, little endian, Typed Array | 496 +------+-------------+---------------------------------------------+ 497 | 80 | byte string | IEEE 754 binary16, big endian, Typed Array | 498 +------+-------------+---------------------------------------------+ 499 | 81 | byte string | IEEE 754 binary32, big endian, Typed Array | 500 +------+-------------+---------------------------------------------+ 501 | 82 | byte string | IEEE 754 binary64, big endian, Typed Array | 502 +------+-------------+---------------------------------------------+ 503 | 83 | byte string | IEEE 754 binary128, big endian, Typed Array | 504 +------+-------------+---------------------------------------------+ 505 | 84 | byte string | IEEE 754 binary16, little endian, Typed | 506 | | | Array | 507 +------+-------------+---------------------------------------------+ 508 | 85 | byte string | IEEE 754 binary32, little endian, Typed | 509 | | | Array | 510 +------+-------------+---------------------------------------------+ 511 | 86 | byte string | IEEE 754 binary64, little endian, Typed | 512 | | | Array | 513 +------+-------------+---------------------------------------------+ 514 | 87 | byte string | IEEE 754 binary128, little endian, Typed | 515 | | | Array | 516 +------+-------------+---------------------------------------------+ 517 | 40 | array of | Multi-dimensional Array, row-major order | 518 | | two arrays* | | 519 +------+-------------+---------------------------------------------+ 520 | 1040 | array of | Multi-dimensional Array, column-major order | 521 | | two arrays* | | 522 +------+-------------+---------------------------------------------+ 523 | 41 | array | Homogeneous Array | 524 +------+-------------+---------------------------------------------+ 526 Table 6: Tag numbers defined for Arrays 528 7. Domain-Specific 530 (TO DO: Obtain permission to copy the definitions here; explain how 531 tags 52 and 54 essentially obsolete 260/261.) 532 +======+=======+=================+=================================+========+ 533 |Tag |Tag |Short Description|Reference |Author | 534 |number|content| | | | 535 +======+=======+=================+=================================+========+ 536 |37 |byte |Binary UUID |https://github.com/lucas- |Lucas | 537 | |string |(Section 4.1.2 of|clemente/cbor-specs/blob/master/ |Clemente| 538 | | |[RFC4122]) |uuid.md | | 539 +------+-------+-----------------+---------------------------------+--------+ 540 |38 |array |Language-tagged |http://peteroupc.github.io/CBOR/ |Peter | 541 | | |string |langtags.html |Occil | 542 +------+-------+-----------------+---------------------------------+--------+ 543 |257 |byte |Binary MIME |http://peteroupc.github.io/CBOR/ |Peter | 544 | |string |message |binarymime.html |Occil | 545 +------+-------+-----------------+---------------------------------+--------+ 546 |260 |byte |Network Address |http://www.employees.org/~ravir/ |Ravi | 547 | |string |(IPv4 or IPv6 or |cbor-network.txt |Raju | 548 | | |MAC Address) | | | 549 +------+-------+-----------------+---------------------------------+--------+ 550 |261 |map |Network Address |https://github.com/toravir/CBOR- |Ravi | 551 | | |Prefix (IPv4 or |Tag-Specs/blob/master/ |Raju | 552 | | |IPv6 Address + |networkPrefix.md | | 553 | | |Mask Length) | | | 554 +------+-------+-----------------+---------------------------------+--------+ 555 |263 |byte |Hexadecimal |https://github.com/toravir/CBOR- |Ravi | 556 | |string |string |Tag-Specs/blob/master/ |Raju | 557 | | | |hexString.md | | 558 +------+-------+-----------------+---------------------------------+--------+ 559 |266 |text |Internationalized|https://peteroupc.github.io/CBOR/|Peter | 560 | |string |resource |iri.html |Occil | 561 | | |identifier (IRI) | | | 562 +------+-------+-----------------+---------------------------------+--------+ 563 |267 |text |Internationalized|https://peteroupc.github.io/CBOR/|Peter | 564 | |string |resource |iri.html |Occil | 565 | | |identifier | | | 566 | | |reference (IRI | | | 567 | | |reference) | | | 568 +------+-------+-----------------+---------------------------------+--------+ 570 Table 7 572 7.1. Extended Time Formats 574 Additional tag definitions have been provided for date and time 575 values. 577 +======+===========+===================+==========================+ 578 | Tag | Data Item | Semantics | Reference | 579 +======+===========+===================+==========================+ 580 | 100 | integer | date in number of | [RFC8943] | 581 | | | days since epoch | | 582 +------+-----------+-------------------+--------------------------+ 583 | 1004 | text | RFC 3339 full- | [RFC8943] | 584 | | string | date string | | 585 +------+-----------+-------------------+--------------------------+ 586 | 1001 | map | extended time | [I-D.ietf-cbor-time-tag] | 587 +------+-----------+-------------------+--------------------------+ 588 | 1002 | map | duration | [I-D.ietf-cbor-time-tag] | 589 +------+-----------+-------------------+--------------------------+ 590 | 1003 | map | period | [I-D.ietf-cbor-time-tag] | 591 +------+-----------+-------------------+--------------------------+ 593 Table 8: Tag numbers for date and time 595 Note that tags 100 and 1004 are for calendar dates that are not 596 anchored to a specific time zone; they are meant to specify calendar 597 dates as perceived by humans, e.g. for use in personal identification 598 documents. Converting such a calendar date into a specific point in 599 time needs the addition of a time-of-day (for which a CBOR tag is 600 outstanding) and timezone information (also outstanding). 601 Alternatively, a calendar date plus timezone information can be 602 converted into a time period (range of time values given by the 603 starting and the ending time); note that these time periods are not 604 always exactly 24 h (86400 s) long. 606 [RFC8943] does not suggest CDDL [RFC8610] type names for the two 607 tags. We suggest copying the definitions in Figure 2 into 608 application-specific CDDL as needed. 610 caldate = #6.100(int) ; calendar date as a number of days from 1970-01-01 611 tcaldate = #6.1004(tstr) ; calendar date as an RFC 3339 full-date string 613 Figure 2: CDDL for calendar date tags (RFC8943) 615 Tag 1001 extends tag 1 by additional information (such as picosecond 616 resolution) and allows the use of Decimal and Bigfloat numbers for 617 the time. 619 8. Platform-oriented 620 8.1. Perl 622 (These are actually not as Perl-specific as the title of this section 623 suggests. See also the penultimate paragraph of Section 3.4 of 624 [RFC8949].) 626 These are all documented under "http://cbor.schmorp.de/"; the last 627 pathname component is given in Table 9. 629 (TO DO: Obtain permission to copy the definitions here.) 631 +=======+==========+========================+================+ 632 | Tag | Data | Semantics | Reference | 633 | | Item | | | 634 +=======+==========+========================+================+ 635 | 256 | multiple | mark value as having | stringref | 636 | | | string references | | 637 +-------+----------+------------------------+----------------+ 638 | 25 | unsigned | reference the nth | stringref | 639 | | integer | previously seen string | | 640 +-------+----------+------------------------+----------------+ 641 | 26 | array | Serialised Perl object | perl-object | 642 | | | with classname and | | 643 | | | constructor arguments | | 644 +-------+----------+------------------------+----------------+ 645 | 27 | array | Serialised language- | generic-object | 646 | | | independent object | | 647 | | | with type name and | | 648 | | | constructor arguments | | 649 +-------+----------+------------------------+----------------+ 650 | 28 | multiple | mark value as | value-sharing | 651 | | | (potentially) shared | | 652 +-------+----------+------------------------+----------------+ 653 | 29 | unsigned | reference nth marked | value-sharing | 654 | | integer | value | | 655 +-------+----------+------------------------+----------------+ 656 | 22098 | multiple | hint that indicates an | indirection | 657 | | | additional level of | | 658 | | | indirection | | 659 +-------+----------+------------------------+----------------+ 661 Table 9: Tag numbers that aid the Perl platform 663 8.2. JSON 665 (TO DO: Obtain permission to copy the definitions here.) 666 Tag number 262 has been registered to identify byte strings that 667 carry embedded JSON text ("https://github.com/toravir/CBOR-Tag- 668 Specs/blob/master/embeddedJSON.md"). 670 Tag number 275 can be used to identify maps that contain keys that 671 are all of type Text String, as they would occur in JSON 672 ("https://github.com/ecorm/cbor-tag-text-key-map"). 674 8.3. Weird text encodings 676 (TO DO: Obtain permission to copy the definitions here.) 678 Some variants of UTF-8 are in use in specific areas of application. 679 Tags have been registered to be able to carry around strings in these 680 variants in case they are not also valid UTF-8 and can therefore not 681 be represented as a CBOR text string ("https://github.com/svaarala/ 682 cbor-specs/blob/master/cbor-nonutf8-string-tags.rst"). 684 +============+=============+=========================+ 685 | Tag Number | Data Item | Semantics | 686 +============+=============+=========================+ 687 | 272 | byte string | Non-UTF-8 CESU-8 string | 688 +------------+-------------+-------------------------+ 689 | 273 | byte string | Non-UTF-8 WTF-8 string | 690 +------------+-------------+-------------------------+ 691 | 274 | byte string | Non-UTF-8 MUTF-8 string | 692 +------------+-------------+-------------------------+ 694 Table 10: Tag numbers for UTF-8 variants 696 9. Application-specific 698 (TO DO: Obtain permission to copy the definitions here.) 699 +======+========+=====================+===================================================+========+ 700 |Tag |Tag |Short Description |Reference |Author | 701 |number|content | | | | 702 +======+========+=====================+===================================================+========+ 703 |39 |multiple|Identifier |[https://github.com/lucas-clemente/cbor- |Lucas | 704 | | | |specs/blob/master/id.md |Clemente| 705 +------+--------+---------------------+---------------------------------------------------+--------+ 706 |42 |byte |IPLD content |[https://github.com/ipld/cid-cbor/ |Volker | 707 | |string |identifier | |Mische | 708 +------+--------+---------------------+---------------------------------------------------+--------+ 709 |103 |array |Geographic |[https://github.com/allthingstalk/cbor/blob/master/|Danilo | 710 | | |Coordinates |CBOR-Tag103-Geographic-Coordinates.md |Vidovic | 711 +------+--------+---------------------+---------------------------------------------------+--------+ 712 |104 |multiple|Geographic Coordinate|[I-D.clarke-cbor-crs] | | 713 | | |Reference System WKT | | | 714 | | |or EPSG number | | | 715 +------+--------+---------------------+---------------------------------------------------+--------+ 716 |120 |multiple|Internet of Things |[https://github.com/allthingstalk/cbor/blob/master/|Danilo | 717 | | |Data Point |CBOR-Tag120-Internet-of-Things-Data-Points.md |Vidovic | 718 +------+--------+---------------------+---------------------------------------------------+--------+ 719 |258 |array |Mathematical finite |[https://github.com/input-output-hk/cbor-sets- |Alfredo | 720 | | |set |spec/blob/master/CBOR_SETS.md |Di | 721 | | | | |Napoli | 722 +------+--------+---------------------+---------------------------------------------------+--------+ 723 |259 |map |Map datatype with |[https://github.com/shanewholloway/js-cbor- |Shane | 724 | | |key-value operations |codec/blob/master/docs/CBOR-259-spec--explicit- |Holloway| 725 | | |(e.g. ".get |maps.md | | 726 | | |()/.set()/.delete()")| | | 727 +------+--------+---------------------+---------------------------------------------------+--------+ 729 Table 11 731 10. Implementation aids 733 10.1. Invalid Tag 735 The present document registers tag numbers 65535, 4294967295, and 736 18446744073709551615 (16-bit 0xffff, 32-bit 0xffffffff, and 64-bit 737 0xffffffffffffffff) as Invalid Tags, tags that are always invalid, 738 independent of the tag content provided. The purpose of these tag 739 number registrations is to enable the tag numbers to be reserved for 740 internal use by implementations to note the absence of a tag on a 741 data item where a tag could also be expected with that data item as 742 tag content. 744 The Invalid Tags are not intended to ever occur in interchanged CBOR 745 data items. Generic CBOR decoder implementations are encouraged to 746 raise an error if an Invalid Tag occurs in a CBOR data item even if 747 there is no validity checking implemented otherwise. 749 11. IANA Considerations 751 In the registry "CBOR Tags" [IANA.cbor-tags], IANA has allocated the 752 first to third tag in Table 12 from the FCFS space, with the present 753 document as the specification reference. IANA has allocated the 754 fourth tag from the Specification Required space, with the present 755 document as the specification reference. 757 +======================+========+==============+====================+ 758 | Tag | Data | Semantics | Reference | 759 | | Item | | | 760 +======================+========+==============+====================+ 761 | 65535 | (none | always | draft-bormann- | 762 | | valid) | invalid | cbor-notable-tags, | 763 | | | | Section 10.1 | 764 +----------------------+--------+--------------+--------------------+ 765 | 4294967295 | (none | always | draft-bormann- | 766 | | valid) | invalid | cbor-notable-tags, | 767 | | | | Section 10.1 | 768 +----------------------+--------+--------------+--------------------+ 769 | 18446744073709551615 | (none | always | draft-bormann- | 770 | | valid) | invalid | cbor-notable-tags, | 771 | | | | Section 10.1 | 772 +----------------------+--------+--------------+--------------------+ 773 | 63 | byte | Encoded | draft-bormann- | 774 | | string | CBOR | cbor-notable-tags, | 775 | | | Sequence | Section 2.1 | 776 | | | [RFC8742] | | 777 +----------------------+--------+--------------+--------------------+ 779 Table 12: Values for Tags 781 12. Security Considerations 783 The security considerations of [RFC8949] apply; the tags discussed 784 here may also have specific security considerations that are 785 mentioned in their specific sections above. 787 13. References 789 13.1. Normative References 791 [I-D.ietf-core-yang-cbor] 792 Veillette, M., Petrov, I., Pelov, A., and C. Bormann, 793 "CBOR Encoding of Data Modeled with YANG", Work in 794 Progress, Internet-Draft, draft-ietf-core-yang-cbor-16, 24 795 June 2021, . 798 [IANA.cbor-tags] 799 IANA, "Concise Binary Object Representation (CBOR) Tags", 800 . 802 [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", 803 RFC 8152, DOI 10.17487/RFC8152, July 2017, 804 . 806 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 807 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 808 May 2018, . 810 [RFC8610] Birkholz, H., Vigano, C., and C. Bormann, "Concise Data 811 Definition Language (CDDL): A Notational Convention to 812 Express Concise Binary Object Representation (CBOR) and 813 JSON Data Structures", RFC 8610, DOI 10.17487/RFC8610, 814 June 2019, . 816 [RFC8746] Bormann, C., Ed., "Concise Binary Object Representation 817 (CBOR) Tags for Typed Arrays", RFC 8746, 818 DOI 10.17487/RFC8746, February 2020, 819 . 821 [RFC8782] Reddy.K, T., Ed., Boucadair, M., Ed., Patil, P., 822 Mortensen, A., and N. Teague, "Distributed Denial-of- 823 Service Open Threat Signaling (DOTS) Signal Channel 824 Specification", RFC 8782, DOI 10.17487/RFC8782, May 2020, 825 . 827 [RFC8949] Bormann, C. and P. Hoffman, "Concise Binary Object 828 Representation (CBOR)", STD 94, RFC 8949, 829 DOI 10.17487/RFC8949, December 2020, 830 . 832 13.2. Informative References 834 [C] International Organization for Standardization, 835 "Information technology - Programming languages - C", ISO/ 836 IEC 9899:2018, June 2018, 837 . 839 [Cplusplus20] 840 International Organization for Standardization, 841 "Programming languages - C++", ISO/IEC ISO/IEC JTC1 SC22 842 WG21 N 4860, March 2020, 843 . 845 [I-D.clarke-cbor-crs] 846 Clarke, T. R., "Concise Binary Object Representation 847 (CBOR) Tag for Coordinate Reference System (CRS) 848 Specification", Work in Progress, Internet-Draft, draft- 849 clarke-cbor-crs-02, 17 March 2020, 850 . 853 [I-D.ietf-cbor-time-tag] 854 Bormann, C., Gamari, B., and H. Birkholz, "Concise Binary 855 Object Representation (CBOR) Tags for Time, Duration, and 856 Period", Work in Progress, Internet-Draft, draft-ietf- 857 cbor-time-tag-00, 19 May 2021, 858 . 861 [I-D.ietf-cose-rfc8152bis-algs] 862 Schaad, J., "CBOR Object Signing and Encryption (COSE): 863 Initial Algorithms", Work in Progress, Internet-Draft, 864 draft-ietf-cose-rfc8152bis-algs-12, 24 September 2020, 865 . 868 [I-D.ietf-cose-rfc8152bis-struct] 869 Schaad, J., "CBOR Object Signing and Encryption (COSE): 870 Structures and Process", Work in Progress, Internet-Draft, 871 draft-ietf-cose-rfc8152bis-struct-15, 1 February 2021, 872 . 875 [I-D.trammell-rains-protocol] 876 Trammell, B. and C. Fehlmann, "RAINS (Another Internet 877 Naming Service) Protocol Specification", Work in Progress, 878 Internet-Draft, draft-trammell-rains-protocol-05, 29 879 January 2019, . 882 [IEEE754] IEEE, "IEEE Standard for Floating-Point Arithmetic", IEEE 883 Std 754-2019, DOI 10.1109/IEEESTD.2019.8766229, 884 . 886 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 887 Extensions (MIME) Part One: Format of Internet Message 888 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 889 . 891 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 892 Unique IDentifier (UUID) URN Namespace", RFC 4122, 893 DOI 10.17487/RFC4122, July 2005, 894 . 896 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 897 and A. Bierman, Ed., "Network Configuration Protocol 898 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 899 . 901 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 902 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 903 October 2013, . 905 [RFC7322] Flanagan, H. and S. Ginoza, "RFC Style Guide", RFC 7322, 906 DOI 10.17487/RFC7322, September 2014, 907 . 909 [RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, 910 DOI 10.17487/RFC7493, March 2015, 911 . 913 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 914 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 915 . 917 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 918 RFC 7950, DOI 10.17487/RFC7950, August 2016, 919 . 921 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 922 RFC 7951, DOI 10.17487/RFC7951, August 2016, 923 . 925 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 926 Interchange Format", STD 90, RFC 8259, 927 DOI 10.17487/RFC8259, December 2017, 928 . 930 [RFC8742] Bormann, C., "Concise Binary Object Representation (CBOR) 931 Sequences", RFC 8742, DOI 10.17487/RFC8742, February 2020, 932 . 934 [RFC8943] Jones, M., Nadalin, A., and J. Richter, "Concise Binary 935 Object Representation (CBOR) Tags for Date", RFC 8943, 936 DOI 10.17487/RFC8943, November 2020, 937 . 939 Acknowledgements 941 (Many, TBD) 943 Contributors 945 Peter Occil 947 Email: poccil14 at gmail dot com 949 Peter Occil registered tags 30, 264, 265, 268-270 (Section 6.1), 38, 950 257, 266 and 267 (Section 7), and contributed much of the text about 951 these tags in this document. 953 Jane Doe 954 To do 956 Further contributors will be listed here as text is added. 958 Plase stay tuned. 960 Author's Address 962 Carsten Bormann 963 Universität Bremen TZI 964 Postfach 330440 965 D-28359 Bremen 966 Germany 968 Phone: +49-421-218-63921 969 Email: cabo@tzi.org