| Crates.io | bc-envelope |
| lib.rs | bc-envelope |
| version | 0.34.0 |
| created_at | 2023-06-18 07:59:48.793749+00 |
| updated_at | 2025-09-16 10:49:58.346813+00 |
| description | Gordian Envelope for Rust. |
| homepage | |
| repository | https://github.com/BlockchainCommons/bc-envelope-rust |
| max_upload_size | |
| id | 893318 |
| size | 1,066,264 |
Gordian Envelope is a structured format for hierarchical binary data focused on privacy. The Rust implementation provides a feature-rich, production-ready reference implementation.
Envelopes are designed to facilitate "smart documents" with a number of unique features:
[dependencies]
bc-envelope = "0.34.0"
Basic usage examples:
use bc_envelope::prelude::*;
// Create a simple envelope with a string subject
let envelope = Envelope::new("Hello, world!");
// Add assertions to an envelope
let envelope = envelope
.add_assertion("created", "2025-04-03")
.add_assertion("author", "Alice");
// Selectively elide information
let elided = envelope.elide(|e| !e.extract_object_for_predicate::<String>("author").unwrap().eq("Alice"));
// Sign an envelope
let signed = envelope.add_signature(&private_key);
// Verify a signature
let verified = signed.verify_signature_from(&public_key)?;
Gordian Envelope includes several powerful features, all configurable through Cargo features:
| Feature | Description |
|---|---|
base |
Core envelope functionality and digest tree |
encrypt |
Symmetric encryption of envelope parts |
signature |
Digital signatures for authenticity and integrity |
compress |
Compression for efficient storage/transmission |
known_value |
Registry of well-known semantic values |
expression |
Support for representing function calls and requests |
recipient |
Public key encryption to multiple recipients |
salt |
Decorrelation of structurally similar envelopes |
sskr |
Sharded Secret Key Reconstruction for social recovery |
attachment |
Vendor-specific extensions mechanism |
By default, all features are enabled. You can select a subset for your specific needs.
Gordian Envelope is formally specified in the IETF Internet Draft, which is currently in the community review stage.
Extensions to the base specification are documented in the Blockchain Commons Research repository:
Gordian Envelope implements the Gordian Principles:
Gordian Envelope is currently in community review. We appreciate your testing and feedback on:
Comments can be posted to the Gordian Developer Community.
Because this library is still in community review, it should not be used for production tasks until it has received further testing and auditing.
See Blockchain Commons' Development Phases.
Gordian Envelope is also available in:
We encourage public contributions through issues and pull requests! Please review CONTRIBUTING.md for details on our development process. All contributions to this repository require a GPG signed Contributor License Agreement.
Gordian Envelope is a project of Blockchain Commons, a "not-for-profit" social benefit corporation committed to open source & open development. Our work is funded entirely by donations and collaborative partnerships with people like you. Every contribution will be spent on building open tools, technologies, and techniques that sustain and advance blockchain and internet security infrastructure and promote an open web.
To financially support further development of Gordian Envelope and other projects, please consider becoming a Patron of Blockchain Commons through ongoing monthly patronage as a GitHub Sponsor. You can also support Blockchain Commons with bitcoins at our BTCPay Server.
The best place to talk about Blockchain Commons and its projects is in our GitHub Discussions areas:
The following people directly contributed to this repository:
| Name | Role | Github | GPG Fingerprint | |
|---|---|---|---|---|
| Christopher Allen | Principal Architect | @ChristopherA | ChristopherA@LifeWithAlacrity.com | FDFE 14A5 4ECB 30FC 5D22 74EF F8D3 6C91 3574 05ED |
| Wolf McNally | Contributor | @WolfMcNally | Wolf@WolfMcNally.com | 9436 52EE 3844 1760 C3DC 3536 4B6C 2FCF 8947 80AE |
We want to keep all our software safe for everyone. If you have discovered a security vulnerability, we appreciate your help in disclosing it to us in a responsible manner. Please see our security policy for details.
Gordian Envelope is licensed under the BSD-2-Clause-Patent license. See LICENSE for details.