Skip to main content

Module proof

Module proof 

Source
Expand description

Integrity proof export for independent auditor verification.

Produces a self-contained IntegrityProof bundle that an auditor can verify without access to the original chain or storage backend. The bundle includes a signed Merkle tree head, entry data, inclusion proofs, and optional consistency proofs linking to a previous state.

§Usage

use libro::proof::IntegrityProof;
use libro::{AuditChain, EventSeverity};

let mut chain = AuditChain::new();
chain.append(EventSeverity::Info, "src", "act", serde_json::json!({}));

// With signing (feature = "signing")
let key = libro::signing::SigningKey::generate();
let proof = IntegrityProof::builder(&chain, &key)
    .unwrap()
    .with_all_inclusions()
    .build();

let result = proof.verify(&key.verifying_key());
assert!(result.is_valid());

Structs§

IntegrityProof
A self-contained integrity proof bundle for independent verification.
ProofBuilder
Builder for constructing an IntegrityProof.
ProofVerification
Detailed verification results for an IntegrityProof.
SignedTreeHead
A signed Merkle tree head — commits to the chain state at a point in time.

Functions§

to_proof_json
Serialize an IntegrityProof as pretty-printed JSON.