{"id":18519081,"url":"https://github.com/blockchaincommons/bc-envelope-rust","last_synced_at":"2025-04-09T08:31:55.615Z","repository":{"id":97337660,"uuid":"593528629","full_name":"BlockchainCommons/bc-envelope-rust","owner":"BlockchainCommons","description":"Rust implementation of Gordian Envelope.","archived":false,"fork":false,"pushed_at":"2025-04-03T09:28:27.000Z","size":772,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T09:38:20.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlockchainCommons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY-REVIEW.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["BlockchainCommons","ChristopherA"],"custom":"https://btcpay.blockchaincommons.com"}},"created_at":"2023-01-26T08:24:32.000Z","updated_at":"2025-04-03T09:24:43.000Z","dependencies_parsed_at":"2024-03-17T04:59:22.176Z","dependency_job_id":"1eaae955-6edc-4576-908c-a5408c9381a7","html_url":"https://github.com/BlockchainCommons/bc-envelope-rust","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockchainCommons%2Fbc-envelope-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockchainCommons%2Fbc-envelope-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockchainCommons%2Fbc-envelope-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockchainCommons%2Fbc-envelope-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlockchainCommons","download_url":"https://codeload.github.com/BlockchainCommons/bc-envelope-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248003206,"owners_count":21031747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T17:15:16.133Z","updated_at":"2025-04-09T08:31:55.602Z","avatar_url":"https://github.com/BlockchainCommons.png","language":"Rust","readme":"# Blockchain Commons Gordian Envelope for Rust\n\n### _by Wolf McNally and Blockchain Commons_\n\n---\n\n## Introduction\n\n[Gordian Envelope](https://www.blockchaincommons.com/introduction/Envelope-Intro/) is a structured format for hierarchical binary data focused on privacy. The Rust implementation provides a feature-rich, production-ready reference implementation.\n\nEnvelopes are designed to facilitate \"smart documents\" with a number of unique features:\n\n- **Hierarchical structure**: Easy representation of a variety of semantic structures, from simple key-value pairs to complex property graphs\n- **Merkle-like digest tree**: Built-in integrity verification at any level of the structure\n- **Deterministic representation**: Uses CBOR with deterministic encoding rules for consistent serialization\n- **Privacy-focused**: The holder of a document can selectively encrypt or elide specific parts without invalidating the structure, signatures, or digest tree\n- **Progressive trust**: Holders can reveal information incrementally to build trust with verifiers\n\n## Getting Started\n\n```toml\n[dependencies]\nbc-envelope = \"0.25.1\"\n```\n\nBasic usage examples:\n\n```rust\nuse bc_envelope::prelude::*;\n\n// Create a simple envelope with a string subject\nlet envelope = Envelope::new(\"Hello, world!\");\n\n// Add assertions to an envelope\nlet envelope = envelope\n    .add_assertion(\"created\", \"2025-04-03\")\n    .add_assertion(\"author\", \"Alice\");\n\n// Selectively elide information\nlet elided = envelope.elide(|e| !e.extract_object_for_predicate::\u003cString\u003e(\"author\").unwrap().eq(\"Alice\"));\n\n// Sign an envelope\nlet signed = envelope.add_signature(\u0026private_key);\n\n// Verify a signature\nlet verified = signed.verify_signature_from(\u0026public_key)?;\n```\n\n## Features and Components\n\nGordian Envelope includes several powerful features, all configurable through Cargo features:\n\n| Feature       | Description                                           |\n| ------------- | ----------------------------------------------------- |\n| `base`        | Core envelope functionality and digest tree           |\n| `encrypt`     | Symmetric encryption of envelope parts                |\n| `signature`   | Digital signatures for authenticity and integrity     |\n| `compress`    | Compression for efficient storage/transmission        |\n| `known_value` | Registry of well-known semantic values                |\n| `expression`  | Support for representing function calls and requests  |\n| `recipient`   | Public key encryption to multiple recipients          |\n| `salt`        | Decorrelation of structurally similar envelopes       |\n| `sskr`        | Sharded Secret Key Reconstruction for social recovery |\n| `attachment`  | Vendor-specific extensions mechanism                  |\n\nBy default, all features are enabled. You can select a subset for your specific needs.\n\n## Specification\n\nGordian Envelope is formally specified in the [IETF Internet Draft](https://datatracker.ietf.org/doc/draft-mcnally-envelope/), which is currently in the community review stage.\n\nExtensions to the base specification are documented in the [Blockchain Commons Research repository](https://github.com/BlockchainCommons/bc-research):\n\n- [BCR-2023-003](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2023-003-envelope-known-value.md): Envelope Known Value\n- [BCR-2023-004](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2023-004-envelope-symmetric-encryption.md): Envelope Symmetric Encryption\n- [BCR-2023-005](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2023-005-envelope-compression.md): Envelope Compression\n- [BCR-2023-006](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2023-006-envelope-attachment.md): Envelope Attachment\n- [BCR-2023-012](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2023-012-envelope-expression.md): Envelope Expression\n- [BCR-2023-013](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2023-013-envelope-crypto.md): Envelope Crypto\n- [BCR-2024-003](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2024-003-envelope.md): Envelope (Full Specification)\n- [BCR-2024-006](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2024-006-envelope-graph.md): Envelope Graph\n- [BCR-2024-007](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2024-007-envelope-decorrelation.md): Envelope Decorrelation\n\n## Gordian Principles\n\nGordian Envelope implements the [Gordian Principles](https://github.com/BlockchainCommons/Gordian#gordian-principles):\n\n- **Independence**: Holders control their own data and can selectively disclose information without relying on third parties\n- **Privacy**: Built-in support for elision, encryption, and decorrelation allows precise information control\n- **Resilience**: Support for social recovery (SSKR), signatures, and encryption provides robust security\n- **Openness**: Fully open-source, well-documented, with open standards and test vectors\n\n## Status - Community Review\n\nGordian Envelope is currently in community review. We appreciate your testing and feedback on:\n\n- API usability\n- Integration with your use cases\n- Performance\n- Bug reports\n\nComments can be posted [to the Gordian Developer Community](https://github.com/BlockchainCommons/Gordian-Developer-Community/discussions/116).\n\nBecause this library is still in community review, it should not be used for production tasks until it has received further testing and auditing.\n\nSee [Blockchain Commons' Development Phases](https://github.com/BlockchainCommons/Community/blob/master/release-path.md).\n\n## Dependencies\n\n- [dcbor](https://crates.io/crates/dcbor): Deterministic CBOR for consistent serialization\n- [bc-crypto](https://crates.io/crates/bc-crypto): Cryptographic primitives\n- [bc-components](https://crates.io/crates/bc-components): Common cryptographic components\n- [bc-ur](https://crates.io/crates/bc-ur): Uniform Resources for encoding and decoding\n\n## Other Implementations\n\nGordian Envelope is also available in:\n\n- [Swift](https://github.com/BlockchainCommons/BCSwiftEnvelope)\n- [Command-line tool](https://crates.io/crates/bc-envelope-cli)\n\n## Contributing\n\nWe encourage public contributions through issues and pull requests! Please review [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our development process. All contributions to this repository require a GPG signed [Contributor License Agreement](./CLA.md).\n\n## Financial Support\n\nGordian Envelope is a project of [Blockchain Commons](https://www.blockchaincommons.com/), a \"not-for-profit\" social benefit corporation committed to open source \u0026 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.\n\nTo 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](https://github.com/sponsors/BlockchainCommons). You can also support Blockchain Commons with bitcoins at our [BTCPay Server](https://btcpay.blockchaincommons.com/).\n\n## Discussions\n\nThe best place to talk about Blockchain Commons and its projects is in our GitHub Discussions areas:\n\n- [Gordian Developer Community](https://github.com/BlockchainCommons/Gordian-Developer-Community/discussions): For developers working with Gordian specifications\n- [Blockchain Commons Discussions](https://github.com/BlockchainCommons/Community/discussions): For general Blockchain Commons topics\n\n## Credits\n\nThe following people directly contributed to this repository:\n\n| Name              | Role                | Github                                           | Email                               | GPG Fingerprint                                   |\n| ----------------- | ------------------- | ------------------------------------------------ | ----------------------------------- | ------------------------------------------------- |\n| Christopher Allen | Principal Architect | [@ChristopherA](https://github.com/ChristopherA) | \u003cChristopherA@LifeWithAlacrity.com\u003e | FDFE 14A5 4ECB 30FC 5D22 74EF F8D3 6C91 3574 05ED |\n| Wolf McNally      | Contributor         | [@WolfMcNally](https://github.com/wolfmcnally)   | \u003cWolf@WolfMcNally.com\u003e              | 9436 52EE 3844 1760 C3DC 3536 4B6C 2FCF 8947 80AE |\n\n## Responsible Disclosure\n\nWe 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](SECURITY.md) for details.\n\n## License\n\nGordian Envelope is licensed under the BSD-2-Clause-Patent license. See [LICENSE](./LICENSE.md) for details.\n","funding_links":["https://github.com/sponsors/BlockchainCommons","https://github.com/sponsors/ChristopherA","https://btcpay.blockchaincommons.com"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockchaincommons%2Fbc-envelope-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockchaincommons%2Fbc-envelope-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockchaincommons%2Fbc-envelope-rust/lists"}