Skip to main content

Crate confium_wasm

Crate confium_wasm 

Source
Expand description

Browser/Node.js verifier package for Confium.

wasm-bindgen surface, wasm32-unknown-unknown target, verifier-only by design. Browsers verify; servers sign.

Each subsystem is gated by a verify-* Cargo feature so consumers can tree-shake aggressively. All features are on by default for out-of-the-box ergonomics.

Modules§

signatif
Browser/Node.js verification of SIGNATIF trusted artifacts.

Structs§

Certificate
Parsed X.509 v3 certificate. Construct via Certificate::from_der or Certificate::from_pem; inspect validity window, fingerprint, serial.
Cmp20Signer
CMP20 in-process threshold-ECDSA signer.
CompositeSignature
A composite signature — multiple algorithm components over the same message. Construct via CompositeSignature::from_json (the canonical wire format) and verify with CompositeSignature::verify.
CompositeVerificationResult
Per-component + aggregate verification outcome.
Gg18Signer
GG18 in-process threshold-ECDSA signer. Prefer Cmp20Signer for new deployments.
InclusionProof
RFC 6962 inclusion proof: list of (sibling_hash, side) steps from the leaf to the root.
MerkleTree
Append-only Merkle tree mirroring confium_transparency::MerkleTree.
Predicate
Parsed DSL predicate. Construct via Predicate::parse and evaluate via Predicate::satisfied_by.
SignedData
CMS SignedData JSON model — wraps confium_pki::cms::SignedData.

Functions§

canonicalize_exclusive_xml
Canonicalize XML per Exclusive C14N (RFC 3741).
canonicalize_xml
Canonicalize XML per RFC 3076 (Canonical XML 1.0).
compute_artifact_hash
Compute the SHA-256 of an artifact’s bytes. Useful when a client only has the artifact (e.g. a cert DER) and needs the leaf hash input for the inclusion-proof verifier.
compute_leaf_hash
Compute the Merkle leaf hash for an entry. The leaf hash is SHA-256(0x01 || entry_hash) where entry_hash is SHA-256(sequence_le_bytes || timestamp_micros_le_bytes || artifact_hash).
core_version
Confium-core crate version this WASM blob was built against.
tree_head_from_json
Parse a tree head from JSON. Returns a JSON string with { size, root_hex } (root as hex string because wasm-bindgen doesn’t natively marshal Vec in return position of free functions easily).
verify_inclusion_with_head
Verify an inclusion proof against a tree head, without needing to build the tree. Caller supplies the leaf’s entry hash (the digest of the artifact being proven present), the proof itself (JSON form as produced by MerkleTree::inclusion_proof + serde), and the tree head (root + size).
version
Package version (mirrors the Cargo version).