Skip to main content

Crate acdp_crypto

Crate acdp_crypto 

Source
Expand description

§acdp-crypto — cryptographic primitives for the Agent Context Distribution Protocol

Content-hashing (hash), signing (sign), byte-level signature verification (verify), and key fingerprinting (fingerprint) per RFC-ACDP-0001/0003/0008. JCS canonicalization is re-exported from acdp-jcs as jcs.

The high-level, resolver-backed verification pipeline (Verifier, verify_body, …) lives in the separate acdp-verify crate — it depends on structural validation, which sits above this layer.

Re-exports§

pub use fingerprint::fingerprint_did_key_material;
pub use fingerprint::fingerprint_ed25519;
pub use fingerprint::fingerprint_p256_sec1;
pub use fingerprint::fingerprint_verification_method;
pub use hash::canonical_preimage;
pub use hash::compute_content_hash;
pub use hash::derive_lineage_id;
pub use hash::explain_hash_mismatch;
pub use hash::verify_content_hash;
pub use sign::AcdpSigningKey;
pub use sign::P256SigningKey;
pub use sign::SigningKey;
pub use verify::verify_ecdsa_p256;
pub use verify::verify_ed25519;
pub use acdp_jcs as jcs;

Modules§

fingerprint
Public-key fingerprints for registry receipts (ACDP 0.2, RFC-ACDP-0010).
hash
content_hash and lineage_id computation per RFC-ACDP-0001 §5.7 / §5.6.
sign
Producer-side signing — RFC-ACDP-0001 §5.8.
verify
Byte-level signature verification primitives.

Functions§

canonicalize
Canonicalize any serializable value to JCS bytes.
canonicalize_value
Canonicalize a pre-parsed serde_json::Value.
try_canonicalize_value
Canonicalize a pre-parsed serde_json::Value, returning an error if nesting exceeds the internal recursion ceiling (MAX_JCS_DEPTH). Prefer this on any path that may canonicalize untrusted / programmatically-built input.