Skip to main content

Crate libro

Crate libro 

Source
Expand description

§Libro — Cryptographic Audit Chain

Libro (Italian/Spanish: book, record) provides tamper-proof event logging with hash-linked entries. Every event is chained to the previous via SHA-256, making any modification detectable.

§Feature Flags

FlagDescription
sha256Use SHA-256 instead of BLAKE3 (for NIST FIPS 180-4 compliance)
sqliteSQLite-backed audit store with indexed queries
signingEd25519 digital signatures per entry
streamingReal-time pub/sub via majra

None are enabled by default. The default hash algorithm is BLAKE3.

§Modules

  • entry — Audit entries with hash linking
  • chain — The audit chain: append, verify, query, rotate, retain, paginate
  • store — Persistence backends (memory, file, custom)
  • file_store — Append-only JSON Lines file backend
  • query — Composable query filters
  • export — JSON Lines and CSV export
  • retention — Retention policies
  • review — Structured chain review and summary
  • merkle — Merkle tree for efficient partial verification
  • verify — Chain integrity verification
  • [signing] — Ed25519 per-entry signatures (feature: signing)
  • [streaming] — Real-time pub/sub (feature: streaming)
  • [sqlite_store] — SQLite persistence (feature: sqlite)

Re-exports§

pub use chain::AuditChain;
pub use chain::ChainArchive;
pub use entry::AuditEntry;
pub use entry::EventSeverity;
pub use export::to_csv;
pub use export::to_jsonl;
pub use file_store::FileStore;
pub use merkle::ConsistencyProof;
pub use merkle::MerkleProof;
pub use merkle::MerkleTree;
pub use merkle::ProofNode;
pub use merkle::Side;
pub use proof::IntegrityProof;
pub use proof::ProofVerification;
pub use proof::SignedTreeHead;
pub use query::QueryFilter;
pub use retention::RetentionPolicy;
pub use review::ChainReview;
pub use review::IntegrityStatus;
pub use verify::verify_chain;

Modules§

chain
The audit chain — append-only, hash-linked sequence of entries.
entry
Audit entries with hash linking.
export
Export audit entries to JSON Lines and CSV formats.
file_store
File-based audit store — append-only JSON Lines format.
merkle
Merkle tree for efficient partial verification of audit chains.
proof
Integrity proof export for independent auditor verification.
query
Query filters for audit entries.
retention
Retention policies for audit chains.
review
Chain review — structured summary and per-entry audit trail.
store
Persistence backends for the audit chain.
verify
Chain verification — validate integrity of an audit chain.

Enums§

LibroError
Errors that can occur during libro operations.

Type Aliases§

Result