CBOR

Concise Binary Object Representation

Protocol
Introduced in Rel-15
CBOR is a compact binary data format designed for constrained environments like IoT devices. It provides efficient encoding of structured data with minimal overhead, enabling resource-efficient communication in 5G networks. Its importance lies in reducing bandwidth consumption and processing requirements for devices with limited capabilities.

Description

Concise Binary Object Representation (CBOR) is a binary data serialization format specified in RFC 7049 that has been adopted by 3GPP for various applications, particularly in IoT and constrained device environments. Unlike text-based formats like JSON, CBOR uses a compact binary encoding that significantly reduces message size while maintaining human-readable semantics. The format is self-describing through a simple type-length-value structure where each data item includes type information, optional length, and the actual value. This design allows for efficient parsing without requiring schema definitions while maintaining extensibility through tagging mechanisms.

CBOR's architecture employs a straightforward encoding scheme where the first byte (major type) indicates the data type (integer, byte string, text string, array, map, tag, or simple value) and additional information. The major type occupies the three most significant bits, while the five least significant bits contain additional information or a small integer value. For larger values, the additional information indicates whether following bytes contain the actual length or value. This variable-length encoding ensures compact representation for small values while supporting arbitrarily large data structures when needed.

Within 3GPP systems, CBOR serves as the underlying encoding format for various protocols and interfaces, particularly those involving constrained devices. It's used in the Lightweight M2M (LwM2M) protocol for device management, in security protocols for certificate encoding, and in service layer protocols for efficient data exchange. The format's deterministic encoding rules ensure that identical data structures produce identical byte sequences, which is crucial for cryptographic operations like digital signatures and message authentication codes.

Key components of CBOR include its tagging system that allows semantic annotation of data items, indefinite-length encoding for streaming applications, and simple values that include standard boolean, null, and undefined values along with reserved space for future extensions. The format supports floating-point numbers in half-precision (16-bit), single-precision (32-bit), and double-precision (64-bit) formats, making it suitable for scientific and measurement applications. CBOR's design emphasizes both compactness and processing efficiency, with parsers typically requiring minimal memory and processing power compared to text-based alternatives.

In 5G networks, CBOR plays a critical role in enabling efficient communication for massive IoT deployments where devices have severe constraints on power, memory, and processing capabilities. It's integrated into various 3GPP specifications for service layer protocols, security credential management, and device management interfaces. The format's extensibility through tags allows 3GPP to define domain-specific data types while maintaining interoperability with generic CBOR implementations.

Purpose & Motivation

CBOR was created to address the limitations of text-based data formats like JSON and XML in constrained environments typical of IoT and mobile applications. These text formats, while human-readable and widely supported, incur significant overhead in terms of bandwidth consumption and processing requirements. For battery-powered IoT devices with limited computational resources and operating over low-bandwidth connections, this overhead becomes prohibitive. CBOR provides a more efficient alternative that maintains the structural flexibility of JSON while dramatically reducing encoding size and parsing complexity.

The historical context for CBOR's adoption in 3GPP stems from the exponential growth of IoT devices and the need for efficient machine-to-machine communication in 5G networks. Previous approaches using XML or JSON required substantial processing power and memory for parsing and generation, which conflicted with the resource constraints of many IoT devices. Additionally, the verbose nature of text-based formats consumed excessive bandwidth, reducing battery life and increasing operational costs for cellular IoT deployments.

CBOR solves these problems through its compact binary encoding that eliminates the need for field names in every message, uses efficient numeric representations, and minimizes structural overhead. The format's design specifically considers the needs of constrained devices, with parsing algorithms that can operate with minimal memory and predictable processing time. This makes CBOR particularly suitable for 3GPP's massive machine-type communication (mMTC) use cases where thousands of devices need to communicate efficiently with network servers.

Key Features

  • Compact binary encoding with significantly smaller message sizes than text-based formats
  • Self-describing data format requiring no external schema for basic parsing
  • Deterministic encoding ensuring identical data produces identical byte sequences
  • Extensible tagging system for semantic annotation of data items
  • Support for streaming through indefinite-length arrays and maps
  • Efficient parsing algorithms suitable for constrained devices with limited memory

Evolution Across Releases

Rel-15 Initial

Initial adoption of CBOR in 3GPP specifications, primarily for IoT-related protocols and constrained device communication. Introduced as the encoding format for Lightweight M2M (LwM2M) device management and selected service layer protocols. Established baseline requirements for CBOR implementation in UE and network functions supporting massive IoT deployments.

Defining Specifications

SpecificationTitle
TS 26.841 3GPP TS 26.841
TS 29.890 3GPP TS 29.890
TS 33.220 3GPP TR 33.220
TS 33.535 3GPP TR 33.535
TS 33.938 3GPP TR 33.938