Skip to main content

Kibo Audit Ledger

Kibo keeps two complementary audit surfaces over a project's key material. The signed ledger described here is a per-project, append-only, cryptographically chained, platform-signed, offline-verifiable record of every custody-lifecycle operation — key rotation and re-wrap, custody-mode transitions, BYOK/HYOK attach and detach, key revocation, attestation and measurement events, and de-provisioning. Alongside it, every key access — every encrypt, decrypt, wrap, unwrap, and data-key generation — is captured in the identity-attributed key-access audit: fully audited, bound to the Gate-verified calling subject, carrying the operation's attested trust tier, and metered. The signed ledger is a tamper-evident subset of that broader audit stream, reserved for the custody-lifecycle events where cryptographic chaining earns its cost. Together they are the forensic backbone the platform's compliance posture and customer-side incident-response workflows rely on.

The ledger answers questions a regular log cannot answer with the same certainty: not just "did operation X happen at time T," but "is the record of operation X cryptographically attributable to Kibo's signing key, and has it been modified, backdated, or removed since it was written."

1. Structure​

The ledger is an append-only sequence of signed entries. Each entry carries enough metadata to identify the operation forensically:

  • A monotonic position in the project's ledger (no gaps, no rewrites)
  • A hash chain link referencing the previous entry's payload — the structural integrity proof
  • An event timestamp recorded by Kibo
  • The project context the entry belongs to
  • A request identifier correlating with the platform API access log
  • The Gate-verified calling subject (detailed in §4)
  • The operation type — a custody-lifecycle event: key rotation / re-wrap, custody-mode transition, BYOK/HYOK attach or detach, key revocation, attestation or measurement, de-provisioning
  • The resource the operation touched
  • The outcome (success, failure, rejected) and reason
  • The Kibo workload that emitted the entry (each entry is bound to the emitting workload's verified identity)
  • A platform signature (RSA-2048) over the entry payload

The full field-level schema is canonical per the platform's API specification. Each entry's chain-link references the previous entry's full payload: a tampered entry breaks the hash linkage with the next entry, and the break is detectable on verification.

2. What the signed ledger records​

The signed hash-chain is reserved for custody-lifecycle operations — the events that change key state or custody, each independently security-load-bearing and forensically of record:

OperationWhen
rotate / rewrapA DEK rotation, or a CEK-rotation-driven re-wrap (rare; scheduled cryptoperiod or suspected compromise)
custody_mode_transitionA change of custody mode (e.g. Platform-Managed → HYOK)
byok_attach / hyok_attach (and detach)Attaching or detaching a customer key provider
key_revokedRevocation of a key version
attest / measurementAn attestation or measurement lifecycle event
deprovision / tombstoneKey destruction / de-provisioning, including purge of a historical wrapped-DEK ciphertext after re-wrap

Key-access audit — every encrypt, decrypt, wrap, unwrap, generate-data-key​

Routine key accesses are not written to the signed hash-chain — a signed, serialised chain-append for every per-workload DEK operation would not scale. They are instead recorded in the identity-attributed key-access audit: every access is captured, bound to the Gate-verified calling subject, carries the per-operation attested trust tier (the tier the operation actually ran under), and is metered. This is a full, identity-aware compliance record of every key access — it is simply not cryptographically chained. The tamper-evident signed ledger above is a subset of this broader audit stream.

What does not get logged in either surface:

  • Administrative no-ops — unchanged settings reads, list operations that returned zero entries, dashboard polls. These would flood the ledger without forensic value.
  • Failed-at-edge requests — requests rejected at the API gateway before reaching the Kibo enclave (auth failures, malformed payloads, rate-limit rejections) are recorded in the platform access log, not in the cryptographic ledger.
  • In-memory cache operations — in-process DEK cache hits (no fresh KMS round-trip) do not produce a ledger entry per cached use; the original unwrap_key operation that loaded the cache is the audit record. This is a deliberate scope choice: the ledger is the record of key-state changes and key-material accesses across the cryptographic boundary, not an in-process operation counter.

The retention default is 90 days hot (queryable from the Console and the SDK), up to 7 years cold (downloadable via export), and per-project configurable for stricter compliance regimes.

3. Hash-chain integrity​

The ledger is hash-chained: each entry's prev_hash covers the serialised payload of the previous entry. Verification walks the chain from genesis (or a known checkpoint) forward, recomputing each entry's payload hash and checking it matches the next entry's prev_hash:

entry[i].prev_hash == SHA-256(serialise(entry[i-1]))
genesisverification keyworkload measurementsignatureentry[i-1]positionprev_hashpayloadsignatureentry[i]positionprev_hashpayloadsignatureentry[i+1]positionprev_hashpayloadsignatureentry[i].prev_hash == SHA-256(serialise(entry[i-1]))a modified, reordered or dropped entry breaks the link at that position
Each entry's prev_hash covers the full payload of the entry before it, back to the genesis entry, so tampering breaks the chain where it happens.

A tampered entry — content modified, ordering swapped, an entry dropped — breaks the chain at the point of tampering. The break is detected at verification; the ledger surfaces the position and the diverged hash, making the manipulation visible.

The chain is rooted in a per-project genesis entry signed at project creation, whose contents include the project's public verification key and the Kibo workload measurement that produced it.

3.1 Formal verification of the chain-walk verifier​

The audit-ledger tamper-evidence logic is formally proven. The chain-walk verifier is machine-checked by deductive verification (Creusot/Why3), establishing that any accepted ledger is a contiguous, gap-free, correctly hash-linked chain from a valid genesis, with every event's hash consistent. The machine-checked proof covers:

  • total panic-freedom — the verifier cannot crash on any input
  • empty-ledger rejection
  • the genesis invariants
  • gap-free monotonic sequencing
  • previousHash → hash linkage
  • per-event hash-recompute consistency

The proof is modulo two trusted primitives: the SHA-256 hash function and the JSON canonicalization are trusted-under-test — validated by exhaustive known-answer and conformance suites, not by the deductive proof. The verification logic is proven; the underlying cryptographic and serialization primitives are trusted. This is the standard, explicit boundary for any verified system.

4. Human-level forensic attribution​

Most key-management systems log that "a service account" or "a service key" performed an operation. That is operationally useless when investigating a forensic question of the form "who actually did this." Kibo's ledger integrates directly with Gate so that every entry's subject carries the Gate-verified identity that initiated the operation, not just the service account that proxied the call.

The subject metadata includes:

  • The actor type — platform user, end-user, extension, or platform-internal system actor
  • The actor identifier — the cryptographic identity Gate established for the calling subject
  • The project context Gate established for the calling session
  • The MFA state at the time of the operation
  • A reference to the Gate session the call arrived through
  • A reference to the Gate workload attestation chain that signed the session token

The end-user identity is not a string the caller can set freely — it is the Gate-verified identity established when the session was issued, propagated through the request context, and re-verified by Kibo before the operation runs. An attacker who somehow caused a forged identity to reach Kibo could not present a valid Gate session whose signature verifies, so the forgery would not appear in the ledger under the impersonated identity.

The forensic value: when investigating a question like "who decrypted record R at 03:47:23 UTC on Tuesday," the ledger answers not "the encryption service" but the specific authenticated end-user, the project they were acting in, the MFA claim state at the time of the operation, and the Gate session that issued their credentials. The attribution is cryptographically signed by Kibo's platform signing key, and Gate's attestation chain is preserved end-to-end.

5. Out-of-band verification​

The ledger is offline-verifiable. Customers and external auditors can verify ledger integrity without trusting the platform's runtime — the verification operates against the platform's published public verification key and the customer's downloaded ledger export.

The verification protocol:

  1. Obtain the project's public verification key. Published per the platform's documented verification-key surface. The key itself is chain-of-trust-rooted to Kibo's verified workload identity per Security → Identity-Aware Kernel §2.
  2. Download the ledger export via the Console's bulk-export surface or the CLI's audit-export command.
  3. Run the verification tool against the downloaded ledger and the published public key. Before it trusts anything in the file, the tool checks the artifact's type: the platform signs more than one kind of record under the same key — audit exports, transparency anchors, and gate receipts — and each signed artifact carries a typ header naming which kind it is (k9o.transparency.audit-export.v1 for an audit export). The tool requires the exact type the operation expects; a missing, differently-cased, or different type fails with ARTIFACT_TYP_MISMATCH and verification stops, so a genuine record of one kind can't be passed off as another. The structural check on each entry's required fields is a second line of defence, never a substitute for this one.
  4. The tool then walks the hash chain, verifies each entry's signature, and reports either a clean verification or — if any entry was modified, removed, or inserted out of order — the exact position of the chain break.

The verification tool is open source and runs entirely offline; no network calls to the platform are required after the public key and the ledger export are obtained.

6. External transparency anchor​

For customers with the strictest compliance regimes, the ledger's hash chain is also periodically anchored against an external transparency log — a Merkle-tree-based public log that the platform commits the project's ledger checkpoint hash to on a configured cadence. The transparency anchor provides:

  • Cross-platform verification — a third party can verify the ledger against the transparency log without trusting either the platform or the customer's local export
  • Backdating prevention — once a checkpoint hash is anchored, any later modification to an entry before the checkpoint is detectable by comparing the anchored hash against the current ledger state
  • Independent witnessing — the transparency log is operated separately from the platform; an attacker who compromises Kibo cannot also compromise the external log

6.1 Anchor URL surface​

Anchors live at a project-scoped, tenant-bound subdomain following the platform's URL grammar:

https://<orgSlug>.transparency.k9o.io/@<projectSlug>/anchors (per-project anchor log)
https://<orgSlug>.transparency.k9o.io/@<projectSlug>/anchors/anc_<base62> (specific anchor)

The anchor surface is anonymous-allowed — any external verifier can fetch an anchor by ID without authentication. This is the structural property the transparency anchor depends on: a third party that obtained the ledger export from the customer can independently retrieve the anchor and verify it against the export's checkpoint hashes, without trusting the platform to provide a verification API.

The same grammar applies across the three routing modes — subdomain mode (Cloud default; per the URL form above), path-prefix mode (LAN multi-tenant; the org subdomain compresses into a path segment), and single-org mode (Private Perimeter; the org is implicit per K9O_DEFAULT_ORG).

Customers can map a custom domain to the transparency subdomain — transparency.acme-corp.com → acme.transparency.k9o.io via CNAME — so external verifiers see the customer's brand on the verification URL rather than the platform's.

6.2 External verifier flow​

A third-party verifier flow against an anchor:

  1. Verifier obtains the customer's ledger export (the customer's audit-evidence package; see §7 Exporting for compliance)
  2. Verifier extracts the anchor IDs from the export's checkpoint section
  3. Verifier fetches each anchor from the project's transparency surface — anonymous-allowed GET request to https://<orgSlug>.transparency.k9o.io/@<projectSlug>/anchors/anc_<id>
  4. Verifier computes the expected hash by traversing the ledger export's hash chain up to the checkpoint
  5. Verifier compares the computed hash against the anchor's recorded commitment; mismatch indicates tampering between the anchored point and the present ledger state

The flow does not require the verifier to authenticate against the platform, hold an API key, or maintain an account — the customer's audit-evidence package combined with the anonymous anchor fetch is sufficient.

7. Exporting for compliance​

The ledger supports two export shapes:

ExportFormatUse case
Compliance bundleSigned PDF + JSON manifestPre-formatted for SOC 2, HIPAA, FedRAMP evidence packages; contains the chain summary, signature verification report, and selected entry detail
Raw ledger exportJSONL streamFull entry-by-entry export for customer-side SIEM ingestion, internal auditing, or long-term cold storage

Compliance bundles are produced through the platform's Compliance Attestation surface. The signed bundle includes role-separation evidence per Security → Isolation & Privilege §2 alongside the Kibo ledger summary.

8. Tamper-detection and chain-break response​

If a chain-break is detected — either by the platform's continuous internal verification or by a customer's offline verification — the platform's response is automated:

  1. The project's ledger is marked "integrity-violated" in the operational metadata; the Console surfaces a banner
  2. The affected entries (sequence range around the break) are flagged for forensic review
  3. The platform's security team is paged with the project context, the diverged sequence, and the observed/expected hash divergence
  4. Customers with attestation-bundle subscriptions receive a notification

A chain break is treated as a security event, not an operational error. The investigation determines whether the divergence is the result of a storage-layer corruption (recoverable from cross-region replication), a deployment artifact (rare; would also surface in deployment-verification gates), or evidence of an integrity attack.

A break is exceptionally rare in practice — the chain is signed by the platform's signing key, and the storage layer is replicated and checksum-verified. The platform's integrity story is: the chain holds, and if it ever does not, the violation is detectable.

9. See also​

  • Overview — Kibo's four custody modes and the cryptographic boundary.
  • BYOK — the rotation events, re-wrap operations, and tombstone discipline that produce ledger entries.
  • CLI — terminal-side offline ledger verification.
  • Security → Identity-Aware Kernel — the attestation chain that Kibo's ledger preserves end-to-end.
  • Security → Compliance — how the ledger fits into broader compliance evidence.