CBOR is a compact binary data serialization and messaging format. This specification defines CBOR-LD 1.0, a CBOR-based format to serialize Linked Data. The encoding is designed to leverage the existing JSON-LD ecosystem, which is deployed on hundreds of millions of systems today, to provide a compact serialization format for those seeking efficient encoding schemes for Linked Data. By utilizing semantic compression schemes, compression ratios in excess of 60% better than generalized compression schemes are possible. This format is primarily intended to be a way to use Linked Data in storage and bandwidth constrained programming environments, to build interoperable semantic wire-level protocols, and to efficiently store Linked Data in CBOR-based storage engines.
This document is experimental.
There is a reference implementation that is capable of demonstrating the features described in this document.
CBOR is a compact binary data serialization and messaging format. This specification defines CBOR-LD 1.0, a CBOR-based format to serialize Linked Data. The encoding is designed to leverage the existing JSON-LD ecosystem, which is deployed on hundreds of millions of systems today, to provide a compact serialization format for those seeking efficient encoding schemes for Linked Data. By utilizing semantic compression schemes, compression ratios in excess of 60% better than generalized compression schemes are possible. This format is primarily intended to be a way to use Linked Data in storage and bandwidth constrained programming environments, to build interoperable semantic wire-level protocols, and to efficiently store Linked Data in CBOR-based storage engines.
This document is a detailed specification for a serialization of Linked Data in CBOR. The document is primarily intended for the following audiences:
There are a number of ways that one may participate in the development of this specification:
CBOR-LD satisfies the following design goals:
Similarly, the following are non-goals.
The following minefields have been identified while working on this specification:
The general CBOR-LD encoding algorithm takes a JSON-LD Document and does the following:
This algorithm takes a JSON-LD object `jsonldDocument` and `options` as input.
This algorithm takes a JSON-LD object `jsonldDocument` and `options` as input.
This algorithm takes a JSON-LD object `jsonldDocument` and `options` as input. The `options` MUST contain:
This algorithm takes a list of URL strings `contextUrls` and returns a CBOR-LD term codec map that maps JSON-LD terms to their associated byte values and value compression functions.
The following is a registry of well-known term codecs. These will be registered on a first-come first-serve basis.
Value | Context URL | Context Name |
---|---|---|
0x00 - 0x0F |
RESERVED |
Reserved for future use. |
0x10 |
https://www.w3.org/ns/activitystreams |
ActivityStreams 2.0 |
0x11 |
https://www.w3.org/2018/credentials/v1 |
Verifiable Credentials Data Model v1 |
0x12 |
https://www.w3.org/ns/did/v1 |
Decentralized Identifiers (DID) Core Spec v1 |
0x13 |
https://w3id.org/security/suites/ed25519-2018/v1 |
Ed25519Signature2018 Suite |
0x14 |
https://w3id.org/security/suites/ed25519-2020/v1 |
Ed25519Signature2020 Suite |
0x15 |
https://w3id.org/cit/v1 |
Concealed Id Token |
0x16 |
https://w3id.org/age/v1 |
Age Verification |
0x17 |
https://w3id.org/security/suites/x25519-2020/v1 |
X25519KeyAgreementKey2020 Suite |
0x18 |
https://w3id.org/veres-one/v1 |
Veres One DID Method |
0x19 |
https://w3id.org/webkms/v1 |
WebKMS (Key Management System) |
0x1A |
https://w3id.org/zcap/v1 |
Authorization Capabilities (zCap) |
0x1B |
https://w3id.org/security/suites/hmac-2019/v1 |
Sha256HmacKey2019 Crypto Suite |
0x1C |
https://w3id.org/security/suites/aes-2019/v1 |
AesKeyWrappingKey2019 Crypto Suite |
0x1D |
https://w3id.org/vaccination/v1 |
Vaccination Certificate Vocabulary v0.1 |
0x1E |
https://w3id.org/vc-revocation-list-2020/v1 |
Verifiable Credentials Revocation List 2020 |
0x1F |
https://w3id.org/dcc/v1 |
DCC (Decentralized Credentials Consortium) Core Context |
0x20 |
https://w3id.org/vc/status-list/v1 |
Verifiable Credentials Status List |
0x21 - 0x2F |
Available for use. | |
0x30 |
https://w3id.org/security/data-integrity/v1 |
Data Integrity v1.0 |
0x31 |
https://w3id.org/security/multikey/v1 |
Multikey v1.0 |
0x32 |
Reserved for future use. | |
0x33 |
https://w3id.org/security/data-integrity/v2 |
Data Integrity v2.0 |
0x34 |
ecdsa-rdfc-2019 |
Data Integrity ECDSA RDFC 2019 cryptosuite identifier |
0x35 |
ecdsa-sd-2023 |
Data Integrity ECDSA-SD 2023 cryptosuite identifier |
0x36 |
eddsa-rdfc-2022 |
Data Integrity EDDSA RDFC 2022 cryptosuite identifier |