hide-transparency
Append-only Merkle log for the HIDE protocol, with RFC 6962-style inclusion and consistency proofs and a compact signed-checkpoint encoding. It is the witness layer: two copies of an identity log are each internally valid, and only a transparency log lets a verifier notice that they were shown different histories.
Proof lengths are bounded before any work is done, so a hostile proof cannot make a verifier allocate or loop unboundedly.
use ;
let mut log = new;
let index = log.append;
log.append;
let old_root = log.root;
let old_size = log.len;
log.append;
let new_root = log.root;
// The entry is in the log of size `old_size`...
let inclusion = log.prove_inclusion?;
verify_inclusion?;
// ...and the newer log is an extension of the older one, not a rewrite.
let consistency = log.prove_consistency?;
verify_consistency?;
let checkpoint = encode_checkpoint;
assert_eq!;
# Ok::
No cryptography beyond SHA-256 is used; the crate owns only the tree shape.
Experimental and unaudited. Licensed Apache-2.0.