Overview

dCBOR is deterministic CBOR, a profile for CBOR as specified in RFC 8949. dCBOR itself is specified in an IETF Internet-Draft.

Why is dCBOR Important?

Determinism ensures that the same data is always encoded in the same way. It has strict rules for how data is represented and ensures that edge cases are always represented in the same way. For dCBOR, for example, this required the reduction of numbers to a canonical encoding: 10.00, 10.0, and 10 must be the same thing.

Determinism is important for a wide variety of applications that require data to remain consistent, usually across multiple platforms. This includes data signatures, reproducible software builds, hashing functions, version control, consensus algorithms, secure multi-party computation, and zero-knowledge proofs. It can also fulfill legal and compliance requirements.

dCBOR doesn’t automatically produce determnism, but it supports it, as does Gordian Envelope.

How Does dCBOR Work?

Though RFC 8949 includes some requirements for dCBOR, it leaves other options up to encoder developers. This results in dCBOR usage that is not necessarily consistent across multiple encoders. As a result, Blockchain Commons has produced an Internet-Draft of a dCBOR profile, which narrows the range of what can be considered valid dCBOR.

All dCBOR is decodable by generic CBOR encoders, and generic CBOR encoders can produce valid dCBOR, but not all CBOR is valid dCBOR.

We have also released libraries for dCBOR in Rust and Swift as well as a command line application for testing encoding and decoding that all follow the specifications laid out in this Draft.

dCBOR Videos

Why CBOR?
dCBOR Library from Blockchain Commons

Libraries

dCBOR Libraries

Language Repo Contributor Status
Ruby cbor-dcbor gem @cabo  
Rust bc-dcbor-rust Blockchain Commons  
Swift BCSwiftDCBOR Blockchain Commons  
TypeScript bc-dcbor-ts Blockchain Commons  

Intro:

Developer Resources:

Developer Resource Apps:

dCBOR Discussions