Concise Binary Object Representation (CBOR) Tags for Typed Arrays
RFC 8746

Document Type RFC - Proposed Standard (February 2020; No errata)
Author Carsten Bormann 
Last updated 2020-02-28
Replaces draft-jroatch-cbor-tags
Stream IETF
Formats plain text html xml pdf htmlized bibtex
Reviews
Stream WG state Submitted to IESG for Publication
Document shepherd Francesca Palombini
Shepherd write-up Show (last changed 2019-08-22)
IESG IESG state RFC 8746 (Proposed Standard)
Consensus Boilerplate Yes
Telechat date
Responsible AD Alexey Melnikov
Send notices to Francesca Palombini <francesca.palombini@ericsson.com>
IANA IANA review state IANA OK - Actions Needed
IANA action state RFC-Ed-Ack
´╗┐

Internet Engineering Task Force (IETF)                   C. Bormann, Ed.
Request for Comments: 8746                        Universit├Ąt Bremen TZI
Category: Standards Track                                  February 2020
ISSN: 2070-1721

   Concise Binary Object Representation (CBOR) Tags for Typed Arrays

Abstract

   The Concise Binary Object Representation (CBOR), as defined in RFC
   7049, is a data format whose design goals include the possibility of
   extremely small code size, fairly small message size, and
   extensibility without the need for version negotiation.

   This document makes use of this extensibility to define a number of
   CBOR tags for typed arrays of numeric data, as well as additional
   tags for multi-dimensional and homogeneous arrays.  It is intended as
   the reference document for the IANA registration of the CBOR tags
   defined.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8746.

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction
     1.1.  Terminology
   2.  Typed Arrays
     2.1.  Types of Numbers
   3.  Additional Array Tags
     3.1.  Multi-dimensional Array
       3.1.1.  Row-Major Order
       3.1.2.  Column-Major Order
     3.2.  Homogeneous Array
   4.  Discussion
   5.  CDDL Typenames
   6.  IANA Considerations
   7.  Security Considerations
   8.  References
     8.1.  Normative References
     8.2.  Informative References
   Acknowledgements
   Contributors
   Author's Address

1.  Introduction

   The Concise Binary Object Representation (CBOR) [RFC7049] provides
   for the interchange of structured data without a requirement for a
   pre-agreed schema.  [RFC7049] defines a basic set of data types as
   well as a tagging mechanism that enables extending the set of data
   types supported via an IANA registry.

   Recently, a simple form of typed arrays of numeric data has received
   interest both in the Web graphics community [TypedArray] and in the
   JavaScript specification (see Section 22.2 (https://www.ecma-
   international.org/ecma-262/10.0/index.html#sec-typedarray-objects) of
   [ECMA-ES10]) as well as in corresponding implementations
   [ArrayBuffer].

   Since these typed arrays may carry significant amounts of data, there
   is interest in interchanging them in CBOR without the need of lengthy
   conversion of each number in the array.  This can also save space
   overhead with encoding a type for each element of an array.

   This document defines a number of interrelated CBOR tags that cover
   these typed arrays, as well as additional tags for multi-dimensional
   and homogeneous arrays.  It is intended as the reference document for
   the IANA registration of the tags defined.

   Note that an application that generates CBOR with these tags has
   considerable freedom in choosing variants (e.g., with respect to
   endianness, embedded type (signed vs. unsigned), and number of bits
   per element) or whether a tag defined in this specification is used
   at all instead of more basic CBOR.  In contrast to representation
   variants of single CBOR numbers, there is no representation that
   could be identified as "preferred".  If deterministic encoding is
   desired in a CBOR-based protocol making use of these tags, the
   protocol has to define which of the encoding variants are used for
   each individual case.

1.1.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   The term "byte" is used in its now-customary sense as a synonym for
   "octet".  Where bit arithmetic is explained, this document uses
Show full document text