acdp_crypto/lib.rs
1//! # acdp-crypto — cryptographic primitives for the Agent Context Distribution Protocol
2//!
3//! Content-hashing ([`hash`]), signing ([`sign`]), byte-level signature
4//! verification ([`verify`]), key fingerprinting ([`fingerprint`]), and
5//! the transparency-log Merkle machinery ([`merkle`]) per
6//! RFC-ACDP-0001/0003/0008/0012. JCS canonicalization is re-exported
7//! from [`acdp-jcs`](https://docs.rs/acdp-jcs) as [`jcs`].
8//!
9//! The high-level, resolver-backed verification pipeline (`Verifier`,
10//! `verify_body`, …) lives in the separate `acdp-verify` crate — it
11//! depends on structural validation, which sits above this layer.
12
13pub mod fingerprint;
14pub mod hash;
15pub mod merkle;
16pub mod sign;
17pub mod verify;
18
19// JCS canonicalization lives in its own crate; re-export under the
20// historical `crypto::jcs` path.
21pub use acdp_jcs as jcs;
22
23pub use fingerprint::{
24 fingerprint_did_key_material, fingerprint_ed25519, fingerprint_p256_sec1,
25 fingerprint_verification_method,
26};
27pub use hash::{
28 canonical_preimage, compute_content_hash, derive_lineage_id, explain_hash_mismatch,
29 verify_content_hash,
30};
31pub use jcs::{canonicalize, canonicalize_value, try_canonicalize_value};
32pub use merkle::{
33 consistency_proof, inclusion_path, leaf_hash, merkle_tree_hash, node_hash, verify_consistency,
34 verify_inclusion,
35};
36pub use sign::{AcdpSigningKey, P256SigningKey, SigningKey};
37pub use verify::{verify_ecdsa_p256, verify_ed25519};