---
# System prepended metadata

title: DCBOR and Gordian Envelope Porting Guide

---

# DCBOR and Gordian Envelope Porting Guide

Wolf McNally, Blockchain Commons

## Reference Documentation

- **Envelope Executive Summary:** https://developer.blockchaincommons.com/envelope/summary/
- **Envelope Feature List:** https://developer.blockchaincommons.com/envelope/features/
- **dCBOR Internet Draft:** https://datatracker.ietf.org/doc/draft-mcnally-deterministic-cbor/
- **Envelope Internet Draft:** https://datatracker.ietf.org/doc/draft-mcnally-envelope/
- **Blockchain Commons Research Repo:** https://github.com/blockchaincommons/research
    - **BCR-2020-005:** Uniform Resources (UR)
    - **BCR-2020-006:** Registry of Uniform Resource (UR) Types
    - **BCR-2020-011:** UR Type Definition for Sharded Secret Key Reconstruction (SSKR)
    - **BCR-2020-012:** Bytewords: Encoding binary data as English words
    - **BCR-2022-001:** Encrypted Message
    - **BCR-2022-002:** ARID: Apparently Random Identifier
    - **BCR-2023-001:** Compressed Message
    - **BCR-2023-002:** Known Values: A Compact, Deterministic Representation for Ontological Concepts
    - **BCR-2023-003:** Gordian Envelope Extension: Known Values
    - **BCR-2023-004:** Gordian Envelope Extension: Symmetric Encryption
    - **BCR-2023-005:** Gordian Envelope Extension: Compression
    - **BCR-2023-006:** Gordian Envelope: Attachments
    - **BCR-2023-008:** dCBOR: Preferred Encoding of Dates
    - **BCR-2023-009:** Gordian Envelope: Cryptographic Seeds
    - **BCR-2023-010:** Bitcoin Output Descriptor (Version 3)
    - **BCR-2023-011:** UR Type Definitions for Public Key Cryptography
    - **BCR-2023-012:** Gordian Envelope Expressions
    - **BCR-2023-013:** Gordian Envelope Cryptography
    - **BCR-2023-014:** Gordian Sealed Transaction Protocol (GSTP)
    - **BCR-2023-015:** UR Type Definition for Cryptographic Nonce
    - **BCR-2023-016:** UR Type Definition for Scrypt-Hashed Password
    - **BCR-2023-017:** UR Type Definition for Random Salt
    - **BCR-2023-018:** Gordian Depository API
    - **BCR-2024-001:** Multipart UR (MUR) Implementation Guide
    - **BCR-2024-004:** Gordian Transport Protocol Implementation Guide/Envelope Request & Response Implementation Guide	Shannon Appelcline
    - **BCR-2024-005:** CBOR Encodings for Cryptographic Keys and Signatures
    - **BCR-2024-006:** Representing Graphs using Gordian Envelope
- **Library Listing:** https://developer.blockchaincommons.com/dcbor/#libraries

## Reference codebases

### Swift

```mermaid
graph TB
    BCSwiftDCBOR --> BCSwiftFloat16
    BCSwiftDCBOR --> BCSwiftTags
    BCSwiftEnvelope --> BCSwiftKnownValues
    BCSwiftEnvelope --> BCSwiftSecureComponents
    BCSwiftEnvelope --> EnvelopeDiffing([EnvelopeDiffing])
    BCSwiftSecureComponents --> BCSwiftCrypto
    BCSwiftSecureComponents --> URKit
    EnvelopeDiffing --> Graph
    EnvelopeDiffing --> TreeDistance
    TreeDistance --> Graph
    URKit --> BCSwiftDCBOR
```

- https://github.com/BlockchainCommons/
    - BCSwiftDCBOR
    - BCSwiftEnvelope
    - BCSwiftFloat16
    - BCSwiftKnownValues
    - BCSwiftSecureComponents
    - URKit
- https://github.com/WolfMcNally/
    - Graph
    - TreeDistance

### Rust

```mermaid
graph TB
    bc-components --> bc-crypto
    bc-components --> bc-ur
    bc-components --> sskr
    bc-crypto --> bc-rand
    bc-envelope --> bc-components
    bc-shamir --> bc-crypto
    bc-ur --> dcbor
    bc-ur --> ur
    sskr --> bc-shamir
```

- https://github.com/BlockchainCommons/
    - bc-components-rust
    - bc-crypto-rust
    - bc-envelope-rust
    - bc-rand-rust
    - bc-shamir-rust
    - bc-ur-rust
    - dcbor-rust
    - sskr-rust

#### Rust dCBOR Features

- **no_std:** Compile without standard library
- **multithreaded:** Multithreaded processing

#### Rust Envelope Features

```mermaid
graph TB
    attachment --> known_value
    attachment --> types
    compress
    encrypt --> known_value
    expression --> known_value
    known_value
    multithreaded --> dcbor/multithreaded
    proof
    recipient --> encrypt
    salt --> known_value
    signature --> known_value
    sskr --> encrypt
    transaction --> expression
    transaction --> signature
    transaction --> recipient
    types --> known_value
```


- **attachment:** Stadardized attachment for Gordian Envelopes
- **compress:** Compression of data
- **encrypt:** Symmetric encryption
- **expression:** Expression format (function/parameters)
- **known_value:** Known values
- **multithreaded:** Multithreaded processing
- **proof:** Inclusion proofs
- **recipient:** Public key encryption
- **salt:** Hash decorrelation using random salt
- **signature:** Digital signatures
- **sskr:** Sharding of envelopes
- **transaction:** Gordian Sealed Transaction Protocol (GSTP)
- **types:** Typed envelopes
