Skip to main content

Crate jacs_core

Crate jacs_core 

Source
Expand description

JACS portable protocol layer.

jacs-core holds the protocol bits of JACS that must compile for both native and wasm32-unknown-unknown targets: canonical JSON, signing algorithm dispatch, encrypted-key envelopes, embedded schemas, and agreement payload logic. It performs no I/O, opens no files, makes no network calls, and pulls in no native-only crates. See docs/jacs/JACS_WASM_PRD.md for the full split rationale.

Re-exports§

pub use agent::CoreAgent;
pub use errors::CoreError;
pub use material::AgentMaterial;
pub use material::UnlockSecret;
pub use sign::DetachedSigner;
pub use sign::Ed25519DalekSigner;
pub use sign::Pq2025Signer;
pub use sign::SigningAlgorithm;
pub use verify::VerificationOutcome;

Modules§

agent
CoreAgent: protocol-layer agent state — no I/O, no schema validation.
agreements
Multi-party agreement payload manipulation: create, sign, verify.
canonical
Canonical JSON serialization per RFC 8785 (JSON Canonicalization Scheme).
envelope
Encrypted private-key envelope: AES-256-GCM + Argon2id (V2 writer) + legacy PBKDF2 raw-binary reader.
errors
jacs-core error type.
material
AgentMaterial and UnlockSecret: the inputs to CoreAgent::from_encrypted_material.
schema
Embedded JACS JSON schemas + a portable Retrieve resolver.
sign
Signing algorithms and the DetachedSigner trait.
verify
VerificationOutcome + the canonical signature payload helpers used by both CoreAgent::sign_message and CoreAgent::verify.

Functions§

ed25519_signer_for_tests
Test helper: generate a fresh Ed25519 signer for fixture builders. Kept inside the crate (not feature-gated) because integration tests under tests/ are external consumers and cannot reach private items. The underlying primitive is already pub through Ed25519DalekSigner:: generate; this re-export is purely a discoverability hint for test authors building encrypted-material fixtures.