Skip to main content

Crate vouch_core

Crate vouch_core 

Source
Expand description

Vouch Protocol canonical core.

One byte-exact Rust implementation of the protocol primitives (JCS canonicalization, Ed25519 and ML-DSA proofs, did:key/multikey, Data Integrity eddsa-jcs-2022, credentials, delegation, revocation), shared by every language SDK through WASM and UniFFI/C-FFI so that no primitive is re-derived per language. Behavior MUST match the TypeScript reference SDK byte-for-byte and pass the shared interop vectors in test-vectors/.

With the default std feature this is the full core. Built with --no-default-features --features alloc it is no_std (it needs only a heap), for microcontrollers: see docs/microcontrollers.md for what that build covers.

Re-exports§

pub use error::CoreError;
pub use error::Result;
pub use serde_json;

Modules§

attenuation
v1.7 capability attenuation: the non-expansion rule over the six delegation dimensions, verifier cost budgets, and chain-cascade revocation (Specification 9.3 to 9.6).
authority_state
Authority Freshness: authority state as a first-class input to trust freshness.
collections
The set and map types in the public API. With std they are the standard hash collections. Without std there is no hasher seeded from the OS, so they are the ordered B-tree collections, which have the same methods for everything the core does with them.
credentials
Vouch Credential build and verify.
data_integrity
Data Integrity proofs, cryptosuite eddsa-jcs-2022.
decision
The verifier’s decision, with no I/O: accept or refuse a Vouch Credential, and why, exactly as the Python reference vouch.verifier decides it.
delegation
Delegation links and time-bound chain validation.
did_document
Choosing a DID’s assertion key from its DID document, with the rules of the Python reference (vouch.did_web.DIDDocument.assertion_key and publishes_mldsa44_assertion_key).
did_web
did:web identifiers and trusted-root shorthand, parsed strictly and the same way as the Python reference (vouch.did_web.parse_did_web and vouch.trusted_roots.normalize_root).
did_webvh
did:webvh v1.0 resolution, offline (DIF did:webvh v1.0, identity.foundation/didwebvh/v1.0).
error
Error type for the Vouch core.
fleet
Fleet chains: credentials presented one by one, root first.
grant_chain
Flat delegation chains: grant digests, grant chains, and the rule that binds every grant to the grant above it.
hybrid
Post-quantum credentials as a Data Integrity proof set.
issuance
Issuing a Vouch Credential, as the Python reference vouch.signer.Signer issues one: sign (one eddsa-jcs-2022 proof) and sign_hybrid (the post-quantum proof set of an eddsa-jcs-2022 proof and an mldsa44-jcs-2024 proof, two separate proofs over the same document).
jcs
JSON Canonicalization Scheme (JCS) per RFC 8785.
keys
Ed25519 key generation, signing, verification, and did:key encoding.
lineage
Heartbeat session lineage: the equivocation proof (Specification §11.10).
mldsa_check
Check that an ML-DSA-44 private key belongs to a public key (FIPS 204).
multikey
Multikey encoding for verification methods.
nesting
How deeply JSON may nest, checked before anything recursive touches it.
pq
Post-quantum ML-DSA-44 (FIPS 204) keygen, sign, and verify.
proof_json
Data Integrity proofs and key formats for the language SDKs, as JSON.
reasoning
Reasoned Action Proofs and event-triggered intent recheck.
reasoning_json
The reasoned-action and intent-recheck rules as one JSON entry, for every binding (the C ABI’s vouch_reasoning_rules, WASM, PyO3): {"fn", ...} in, JSON out. See rules_at for the functions.
recovery
Root-identity recovery by Shamir secret sharing.
recovery_json
JSON facade for crate::recovery (Shamir root-identity recovery).
robotics
Robotics primitives (Phase 5), one byte-exact implementation in the core.
robotics_call
One JSON entry point for every robotics facade.
robotics_domain
Operating-domain (ODD) conformance and robot-to-human handover.
robotics_dtn
Disconnected-edge / DTN trust primitives (PAD-106 to PAD-124), one byte-exact implementation in the core so the disconnected-edge surface verifies across every language wrapper, mirroring the Python vouch.robotics disconnected-edge modules.
robotics_json
JSON facades for the robotics primitives.
robotics_prepare
Robotics builders for a signer the core does not hold.
robotics_segment
Segmented verification of long robotics logs and embodiment histories.
robotics_verify
Shared verification for robotics credentials, the port of the Python reference vouch/robotics/_verify.py.
root_of_trust
Root of Trust for Machine Identity (Vouch Protocol).
session_voucher
SessionVoucher verification and the guard’s freshness checks, as the Python reference decides them (vouch.heartbeat.voucher, vouch.heartbeat.trust, vouch.guard._freshness).
slh
Post-quantum SLH-DSA-SHA2-128s (FIPS 205) keygen, sign, and verify.
status_list
BitstringStatusList revocation/suspension checks.
threshold
FROST(Ed25519, SHA-512) threshold signing (RFC 9591).
threshold_json
JSON facade for crate::threshold (FROST threshold signing).
time
One strict grammar for every protocol time.
time_json
The protocol time rules for the language SDKs, as JSON.
zdeflate
DEFLATE (RFC 1951) that writes the same bytes as zlib at level 9.