Chronicle.Integrity.Entry (chronicle v0.1.1)

Copy Markdown

Cryptographic commitment to one append-only audit ledger unit.

The digests and the material they were computed from travel together, which is what lets Chronicle.Integrity.verify_entry/5 recompute an entry from the original payload and compare, rather than take the stored digests on trust.

previous_digest is the one field outside @enforce_keys. The first entry in a ledger has no predecessor, and being a genesis entry is the only legitimate reason for it to be nil.

Summary

Types

t()

@type t() :: %Chronicle.Integrity.Entry{
  algorithm: String.t(),
  canonical_version: non_neg_integer(),
  content_digest: String.t(),
  digest: String.t(),
  key_id: String.t(),
  kind: :event | :group,
  ledger: String.t(),
  previous_digest: String.t() | nil,
  record_id: String.t(),
  sequence: pos_integer(),
  signature: String.t()
}