Concise Binary Object Representation (CBOR)
draft-ietf-cbor-7049bis-16

Document Type Active Internet-Draft (cbor WG)
Authors Carsten Bormann  , Paul Hoffman 
Last updated 2020-11-03 (latest revision 2020-09-30)
Stream IETF
Intended RFC status Internet Standard
Formats plain text html xml pdf htmlized (tools) htmlized bibtex
Reviews
Stream WG state Submitted to IESG for Publication
Document shepherd Francesca Palombini
Shepherd write-up Show (last changed 2020-06-17)
IESG IESG state RFC Ed Queue
Consensus Boilerplate Yes
Telechat date
Responsible AD Barry Leiba
Send notices to Francesca Palombini <francesca.palombini@ericsson.com>
IANA IANA review state Version Changed - Review Needed
IANA action state RFC-Ed-Ack
RFC Editor RFC Editor state AUTH48
Details
Network Working Group                                         C. Bormann
Internet-Draft                                   Universitaet Bremen TZI
Obsoletes: 7049 (if approved)                                 P. Hoffman
Intended status: Standards Track                                   ICANN
Expires: 3 April 2021                                  30 September 2020

              Concise Binary Object Representation (CBOR)
                       draft-ietf-cbor-7049bis-16

Abstract

   The Concise Binary Object Representation (CBOR) 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.  These design goals make it different from
   earlier binary serializations such as ASN.1 and MessagePack.

   This document is a revised edition of RFC 7049, with editorial
   improvements, added detail, and fixed errata.  This revision formally
   obsoletes RFC 7049, while keeping full compatibility of the
   interchange format from RFC 7049.  It does not create a new version
   of the format.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 3 April 2021.

Copyright Notice

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

Bormann & Hoffman         Expires 3 April 2021                  [Page 1]
Internet-Draft                    CBOR                    September 2020

   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  . . . . . . . . . . . . . . . . . . . . . . . .   4
     1.1.  Objectives  . . . . . . . . . . . . . . . . . . . . . . .   4
     1.2.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   6
   2.  CBOR Data Models  . . . . . . . . . . . . . . . . . . . . . .   8
     2.1.  Extended Generic Data Models  . . . . . . . . . . . . . .   9
     2.2.  Specific Data Models  . . . . . . . . . . . . . . . . . .   9
   3.  Specification of the CBOR Encoding  . . . . . . . . . . . . .  10
     3.1.  Major Types . . . . . . . . . . . . . . . . . . . . . . .  11
     3.2.  Indefinite Lengths for Some Major Types . . . . . . . . .  14
       3.2.1.  The "break" Stop Code . . . . . . . . . . . . . . . .  14
       3.2.2.  Indefinite-Length Arrays and Maps . . . . . . . . . .  14
       3.2.3.  Indefinite-Length Byte Strings and Text Strings . . .  16
       3.2.4.  Summary of indefinite-length use of major types . . .  17
     3.3.  Floating-Point Numbers and Values with No Content . . . .  18
     3.4.  Tagging of Items  . . . . . . . . . . . . . . . . . . . .  20
       3.4.1.  Standard Date/Time String . . . . . . . . . . . . . .  23
       3.4.2.  Epoch-based Date/Time . . . . . . . . . . . . . . . .  23
       3.4.3.  Bignums . . . . . . . . . . . . . . . . . . . . . . .  24
       3.4.4.  Decimal Fractions and Bigfloats . . . . . . . . . . .  25
       3.4.5.  Content Hints . . . . . . . . . . . . . . . . . . . .  26
         3.4.5.1.  Encoded CBOR Data Item  . . . . . . . . . . . . .  27
         3.4.5.2.  Expected Later Encoding for CBOR-to-JSON
                 Converters  . . . . . . . . . . . . . . . . . . . .  27
         3.4.5.3.  Encoded Text  . . . . . . . . . . . . . . . . . .  28
       3.4.6.  Self-Described CBOR . . . . . . . . . . . . . . . . .  29
   4.  Serialization Considerations  . . . . . . . . . . . . . . . .  29
     4.1.  Preferred Serialization . . . . . . . . . . . . . . . . .  29
     4.2.  Deterministically Encoded CBOR  . . . . . . . . . . . . .  31
       4.2.1.  Core Deterministic Encoding Requirements  . . . . . .  31
       4.2.2.  Additional Deterministic Encoding Considerations  . .  32
       4.2.3.  Length-first Map Key Ordering . . . . . . . . . . . .  34
   5.  Creating CBOR-Based Protocols . . . . . . . . . . . . . . . .  35
Show full document text