Technical Guide

Proving an LLM Audit Log Has Not Been Tampered With

You cannot prove a log is unaltered by trusting where it is stored. You make tampering detectable. Each entry is signed at the point of capture, linked to its neighbors so order and deletions can be checked, timestamped and anchored outside the administrators' control, and verified by a party that does not depend on the system under review. This proves recorded entries are unchanged and in sequence. It does not prove the record matches what actually occurred.

Evidence chain for an LLM or agent audit log

The approach has four stages. Each one is covered in more detail in the sections that follow.

  1. CapturePrompts, outputs, tool calls, and policy decisions are recorded at the runtime enforcement point.
  2. Sign and sequenceEach entry is signed and linked to the previous entry or to a tree of entries.
  3. Store and anchorEntries go to write-once storage, and periodic checkpoints go to an external party.
  4. VerifyAn independent verifier checks signatures, links, and checkpoints from exported evidence.

Tamper-resistant versus tamper-evident

A log cannot be proven unaltered by trusting where it is stored. Storage controls can make changes harder, but they leave the reader relying on whoever administers the storage.

A tamper-evident design takes a different approach. It makes tampering detectable, so that an altered, reordered, or deleted entry can be found by a party that does not need to trust the system holding the log. Write-once or append-only storage with retention controls supports this goal, because deletion is blocked or at least visible.

Where each technique applies in the pipeline

Integrity is a property of the whole path from capture to verification. Each stage has a technique suited to it, and a weakness at any stage undermines the rest.

  1. Capture point

    Record events where they are enforced, such as a gateway or runtime control layer, rather than relying on each application to log itself. Fewer capture paths mean fewer places for gaps.

  2. Entry signing

    Sign each entry with a key held outside the application and storage tiers, ideally in a hardware-backed or managed key service.

  3. Sequencing

    Add a monotonic sequence number and a hash link to the previous entry, or batch entries into a Merkle tree.

  4. Timestamping

    Obtain trusted timestamps from an independent authority so entry times do not rest on local clocks.

  5. Storage

    Write to write-once or append-only storage with retention controls so deletion is blocked or at least visible.

  6. Anchoring and verification

    Publish periodic checkpoints to a party outside your administrative domain, then verify from exported evidence.

What each technique detects and what it misses

Each technique answers a specific question for a verifier, and each depends on something outside itself. The table summarizes both.

Techniques for tamper-evident LLM audit logs
TechniqueWhat a verifier can checkWhat it depends on
Capture at the enforcement pointWhether events were recorded where they are enforced.Few capture paths; each additional path is another place for gaps.
Entry signingWhether an entry is unchanged since it was signed.A signing key held outside the application and storage tiers, with controlled generation, rotation, and revocation.
Sequence numbers and hash links, or Merkle treesWhether entries are in order and whether any are missing.Sequence gaps, deletions, and capture failures being detected and reported.
Trusted timestampingWhen an entry was recorded, without relying on local clocks.An independent timestamp authority.
Write-once or append-only storageWhether deletion was blocked or made visible.Retention controls on the storage.
External anchoringWhether the log matches checkpoints published outside the administrators' control.Periodic checkpoints sent to a party outside your administrative domain.

Limits that no technique removes

These techniques establish that recorded entries are unchanged and in sequence. They do not establish that the record is a complete or accurate account of events.

Because integrity depends on the whole path from capture to verification, a weakness at any stage undermines the rest. For example, an event that never reaches the capture point is never signed, linked, or anchored, which is why capture paths should be kept few and sequence gaps and capture failures should be detected and reported.

What an independent verifier needs

Verification should not depend on the system under review. A verifier works from exported evidence and public material, and checks the following:

  • Signatures on entries, to confirm they are unchanged.
  • Sequence numbers and links, to confirm order and detect deletions.
  • Checkpoints published to a party outside your administrative domain.
  • Trusted timestamps from an independent authority.

Roles matter as well. Administrator, key custodian, and verifier roles should be separated, and key use should itself be logged.

Criteria for evaluating logging and runtime governance tooling

Use these questions when assessing tooling that captures and logs LLM and agent activity.

  • Who holds the signing keys, and how are they generated, rotated, and revoked?
  • Can an independent party verify integrity using only exported evidence and public material?
  • Which AI-specific events are captured (prompts, outputs, tool calls, policy decisions, agent identity), and at what point in the runtime path?
  • How are sequence gaps, deletions, and capture failures detected and reported?
  • What evidence can be exported for auditors, in what format, and with what proof of integrity such as signatures, timestamps, or external anchors?
  • Are administrator, key custodian, and verifier roles separated, and is key use itself logged?

Review your AI audit log architecture

If you are assessing how LLM and agent activity is captured, attributed, and logged, speak with a Trussed AI expert about runtime governance and audit logging.

Talk to an Expert