1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Transparency log + OpenTimestamps + Evidence Records for Confium.
//!
//! Three layers of artifact provenance over time:
//!
//! - **Merkle tree transparency log**: every artifact (cert, signature,
//! revocation, re-share event) is appended. Tree roots periodically
//! anchored to Bitcoin via OpenTimestamps. Verifiers can prove any
//! artifact was in the publicly-visible tree as of a given Bitcoin block.
//! - **OpenTimestamps (OTS)**: anchors hashes to Bitcoin blockchain via
//! public calendar servers.
//! - **Evidence Records (RFC 4998 ERS)**: long-term archival protection
//! via periodic re-timestamping as hash algorithms age.
//!
//! See `TODO.roadmap/36-transparency-and-ots.md` and
//! `TODO.roadmap/37-long-term-archival.md` for full specs.
//!
//! # Example
//!
//! ```
//! use confium_transparency::{MerkleTree, entry::{ArtifactType, MerkleEntry}};
//!
//! let mut tree = MerkleTree::new();
//! let hash = [0u8; 32]; // sha256 of your artifact
//! let entry = MerkleEntry::new(0, ArtifactType::CertificateIssuance, hash);
//! let seq = tree.append(entry);
//! let root = tree.root();
//! let proof = tree.inclusion_proof(seq)?;
//! let entry_ref = tree.entry(seq)?;
//! MerkleTree::verify_inclusion(entry_ref, &proof, root)?;
//! # Ok::<(), confium_transparency::MerkleError>(())
//! ```
// TODO: document before 1.0
pub use *;
pub use *;
pub use *;