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§
- Integrity
Proof - A self-contained integrity proof bundle for independent verification.
- Proof
Builder - Builder for constructing an
IntegrityProof. - Proof
Verification - Detailed verification results for an
IntegrityProof. - Signed
Tree Head - A signed Merkle tree head — commits to the chain state at a point in time.
Functions§
- to_
proof_ json - Serialize an
IntegrityProofas pretty-printed JSON.