dCBOR is deterministic CBOR, a optional variant of CBOR described in RFC 8949.
A deterministic version of CBOR is critical when an application requires the same data to always be encoded in the same way. This is true for Gordian Envelope, which uses CBOR to arrange data that is identified by hashes. The hashes only remain the same if the same data is always encoded in the exact same way, hence the need for determinism.
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 to fully codify dCBOR practices.
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.
Why CBOR? | dCBOR Library from Blockchain Commons |
- dCBOR IETF I-D — https://datatracker.ietf.org/doc/draft-mcnally-deterministic-cbor/
- Editor's Draft (Repo) — https://github.com/BlockchainCommons/WIPs-IETF-draft-deterministic-cbor
- bc-dcbor-rust Library - https://github.com/BlockchainCommons/bc-dcbor-rust
- BCSwiftDCBOR Library - https://github.com/BlockchainCommons/BCSwiftDCBOR
- dcbor-cli Parser/Validator - https://github.com/BlockchainCommons/dcbor-cli
- 6/30/23: cbor - Requested session has been scheduled for IETF 117
- 5/31/23: draft-mcnally-deterministic-cbor: rationale for not going with pre-encoded data
- 5/8/23: Updated Drafts for dCBOR I-D and Gordian Envelope Structured Data Format I-D & IANA Tag Registration
- 5/8/23: Proposal for Deterministic CBOR (dCBOR) discussion at May 17th meeting
- 3/12/23: dCBOR moving from numerically-typeless systems
- 3/10/23: Decoding numbers and compliance verification in dCBOR
- 3/10/23: New IETF Internet-Draft draft-mcnally-deterministic-cbor-00
- 3/5/23: Deterministic CBOR as a possible DISPATCH item
- 2/16/23: Fwd: New deterministic CBOR Libraries (Rust & Swift) from Blockchain Commons