# Runback Evidence Record Format, version 1

| | |
|---|---|
| Document | `runback-evidence-format-v1` |
| Status | Draft for public review |
| Date | 2026-11-19 |
| Covers | `runback.audit/v2`, `runback.cassette/v1`, `runback.checkpoint/v3`, `runback.decision-proof/v3`, `runback.record-proof/v3`, `runback.pack/v1` |
| Reference verifier | `@runback/verify` 3.4.0, `packages/verify/index.js` in the Runback repository (see [Section 20](#20-test-vectors) on what is published where) |
| Licence | [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) |
| Editor | Runback Pty Ltd |

## Abstract

This document specifies the formats in which Runback records what AI agents
did and what was decided about them: run records, the organisation-wide
ledger, signed checkpoints over that ledger, proofs that one policy decision,
one approval, or one activity recorded by another vendor is sealed under a
checkpoint, and the signed PDF evidence pack. It defines every byte that is hashed or signed, so that a party who
does not trust Runback can write an independent verifier from this document
alone and reach the same verdicts as the reference verifier.

## Status of this document

This is a draft. It describes the formats exactly as Runback's code produces
and verifies them on the date above. Where the reference verifier, the
code that produces the artifacts, and the Python port do not agree, this
document says so in [Appendix A](#appendix-a-known-divergences-between-implementations)
rather than choosing silently.

The page at `https://runback.dev/verify/spec` (reached from
`https://runback.dev/spec`) is an explanatory page about run records. This
document is the normative specification for all seven formats. If the two
disagree, this document and the reference verifier govern.

## Licence

The text of this specification is licensed under the Creative Commons
Attribution 4.0 International licence (CC BY 4.0). You may copy, adapt and
redistribute it, including commercially, provided you give appropriate
credit. The licence covers this text. The reference verifier
(`@runback/verify`) is separately licensed under the MIT licence.

## Table of contents

1. [Conventions](#1-conventions)
2. [Terminology](#2-terminology)
3. [Artifacts and how to tell them apart](#3-artifacts-and-how-to-tell-them-apart)
4. [Canonical serialisation](#4-canonical-serialisation)
5. [Hashing](#5-hashing)
6. [Run records](#6-run-records-runbackauditv2-runbackcassettev1)
7. [The ledger](#7-the-ledger)
8. [Policy decisions and `decided_by`](#8-policy-decisions-and-decided_by)
9. [Approvals, overrides and reports](#9-approvals-overrides-and-reports)
10. [Merkle trees](#10-merkle-trees)
11. [Checkpoints](#11-checkpoints-runbackcheckpointv3)
12. [Proof documents](#12-proof-documents)
13. [Signatures](#13-signatures)
14. [Evidence packs](#14-evidence-packs-runbackpackv1)
15. [Key distribution and trust](#15-key-distribution-and-trust)
16. [Verification algorithms](#16-verification-algorithms)
17. [Versioning and extension](#17-versioning-and-extension)
18. [Security considerations](#18-security-considerations)
19. [Out of scope, and what is not guaranteed](#19-out-of-scope-and-what-is-not-guaranteed)
20. [Test vectors](#20-test-vectors)
- [Appendix A. Known divergences between implementations](#appendix-a-known-divergences-between-implementations)
- [Appendix B. Source map](#appendix-b-source-map)
- [References](#references)

---

## 1. Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY" and
"OPTIONAL" in this document are to be interpreted as described in BCP 14
[RFC 2119] [RFC 8174] when, and only when, they appear in all capitals, as
shown here.

Requirements are addressed either to a **producer** (software that creates an
artifact) or to a **verifier** (software that checks one). Where the reference
verifier's behaviour is narrower or looser than a requirement, the text says
"the reference verifier ..." and links the divergence in Appendix A.

Notation:

- `||` is string concatenation. Every operand is a string; no separator is
  inserted unless one is written.
- `"text"` is a literal string.
- `H(s)` is defined in [Section 5](#5-hashing).
- `C(v)` is the canonical serialisation of the JSON value `v`, defined in
  [Section 4](#4-canonical-serialisation).
- `hex64` means a string of exactly 64 characters from `0123456789abcdef`.
- An integer written into a string (for example `seq` in a checkpoint
  payload) is written in base 10 with no sign, leading zeros or separators.
- A "string" is a sequence of UTF-16 code units, as in ECMAScript. Strings
  are converted to bytes only when they are hashed or signed, and then always
  as UTF-8.

## 2. Terminology

**Run.** One execution of an AI agent, identified by a `run_id`.

**Event.** One element of a run's trace: a model call (`llm`), a tool call
(`tool`), an environment read (`env`), a reasoning note (`reasoning`), or the
start or end of the run (`run`). The wire schema is
`packages/schema/schema.json`.

**Run record.** A JSON document holding a run's events, each chained to the
one before it, plus a signed manifest. Also called an audit record or an
audit export.

**Oracle stream.** The ordered sequence of every non-deterministic value the
agent received: model responses, tool outputs and environment reads. Its
digest is the **cassette digest**.

**Ledger.** An organisation's append-only, hash-chained list of entries. Each
entry seals one run, one batch of policy decisions, or one approval, override
or report.

**Leaf hash.** The hash of what one ledger entry attests.

**Checkpoint.** A signed statement of the ledger's length (`seq`), its chain
head and the Merkle root over its leaf hashes.

**Policy decision.** One verdict by a policy on one proposed tool call.

**Decision batch.** The Merkle root over a window of policy decisions, sealed
as one ledger entry.

**Proof document.** A self-contained JSON document showing that one decision
or one record is under a signed checkpoint.

**Evidence pack.** A PDF report for a period, carrying its own signed
manifest.

**Pinned key.** A public key the verifier obtained out of band and trusts to
identify a signer. A key carried inside the artifact being verified is never
pinned by virtue of being there.

**Provenance (`decided_by`).** Which party made a policy decision, and which
party only recorded it.

## 3. Artifacts and how to tell them apart

Every JSON artifact declares its format in a top-level `$schema` member. A
verifier MUST select the verification algorithm from `$schema` and MUST NOT
verify an artifact against rules for a format it does not declare.

| `$schema` | Artifact | Section | Verified by (reference) |
|---|---|---|---|
| `runback.audit/v2` | Run record (current) | 6 | `verify` |
| `runback.cassette/v1` | Run record (name used before the rename; same rules) | 6 | `verify` |
| `runback.checkpoint/v3` | Signed ledger checkpoint | 11 | `verifyCheckpoint` |
| `runback.decision-proof/v3` | One policy decision, proven under a checkpoint | 12.1 | `verifyDecisionProof` |
| `runback.record-proof/v3` | One approval, override or report, proven under a checkpoint | 12.2 | `verifyRecordProof` |
| `runback.activity-proof/v1` | One activity recorded by another vendor, proven under a checkpoint | 12.3 | `verifyActivityProof` |
| `runback.pack/v1` | Evidence pack manifest, inside a PDF | 14 | `verifyPack` |

An evidence pack is a PDF. It is recognised by its first five bytes being
`%PDF-` (0x25 0x50 0x44 0x46 0x2D); its `$schema` is inside the embedded
manifest.

The reference command-line verifier also accepts a checkpoint or proof
wrapped as an API response, `{"checkpoint": {...}}` or `{"proof": {...}}`,
when the outer object has no `$schema`. This unwrapping is a convenience of
the command-line tool, not part of the formats.

A v3 ledger document is never a run record. A verifier MUST NOT accept a
document whose `$schema` is a v3 value as a run record, and MUST NOT accept a
run record as a v3 document.

## 4. Canonical serialisation

Every hash in this specification is computed over a canonical serialisation
of a JSON value, `C(v)`. The reference implementation is the function
`canonical` in `packages/verify/index.js`; the producer uses identical code
(`web/lib/canonical.ts`, `packages/replay/src/hash.ts`).

`C` is the JSON Canonicalization Scheme [RFC 8785] for every value that can
occur in a conforming artifact. Implementers MAY use an RFC 8785 library,
provided it also meets [Section 4.4](#44-input-domain) and
[Section 4.5](#45-lone-surrogates).

### 4.1 Algorithm

```
C(v):
  if v is null:            return "null"
  if v is true / false:    return "true" / "false"
  if v is a number:        return NumberToString(v)            (4.2)
  if v is a string:        return QuoteString(v)               (4.3)
  if v is an array:        return "[" || join(",", [C(x) for x in v]) || "]"
  if v is an object:
      keys = the object's member names, sorted in ascending order of their
             UTF-16 code units (ECMAScript Array.prototype.sort default)
      return "{" || join(",", [QuoteString(k) || ":" || C(v[k]) for k in keys]) || "}"
```

There is no whitespace anywhere in the output. Array order is preserved.
Object member order in the input is irrelevant.

Key sort order is by UTF-16 code unit, not by Unicode code point and not by
UTF-8 byte. The two differ for characters outside the Basic Multilingual
Plane: such a character is a surrogate pair (0xD800-0xDFFF) and therefore
sorts before a character in 0xE000-0xFFFF. Integer-like keys such as `"10"`
and `"9"` sort as strings (`"10"` before `"9"`); an implementation MUST NOT
let a host language's own property ordering reorder them.

### 4.2 Numbers

A number is serialised as ECMAScript `Number::toString` does for a finite
IEEE 754 binary64 value, which is what [RFC 8785] Section 3.2.2.3 specifies:

- Integers with magnitude below 10^21 are written in full with no exponent and
  no decimal point: `1e16` is written `10000000000000000`, `2.0` is written
  `2`.
- From 10^21 the exponential form is used: `1e+21`.
- Small magnitudes switch to exponential form below 10^-6: `0.000001` is
  written `0.000001`, `1e-7` is written `1e-7` (no zero padding of the
  exponent).
- Negative zero is written `0`.
- The shortest digit string that round-trips is used.

### 4.3 Strings

Strings, both values and member names, are serialised as ECMAScript
`JSON.stringify` serialises them:

- `"` and `\` are escaped as `\"` and `\\`.
- U+0008, U+0009, U+000A, U+000C and U+000D are escaped as `\b`, `\t`, `\n`,
  `\f` and `\r`.
- Every other code unit below U+0020 is escaped as `\u00` followed by two
  lowercase hexadecimal digits.
- Nothing else is escaped. In particular `<`, `>`, `&`, `/`, U+007F, U+2028,
  U+2029 and all non-ASCII characters are written as themselves.

### 4.4 Input domain

Producers MUST emit only values that survive a round trip through an IEEE 754
binary64 number unchanged. In particular, integers MUST lie in
[-(2^53 - 1), 2^53 - 1]. Hashed integers in this specification (`seq`,
`count`) are far below that bound.

Verifiers MUST parse JSON numbers as IEEE 754 binary64 values before
canonicalising them, as ECMAScript `JSON.parse` does. A verifier that keeps
arbitrary-precision integers will compute a different `C` for an integer
above 2^53 or at or above 10^21, and so a different hash, from the one the
producer computed (see [Appendix A, D2](#d2-python-port-integers-outside-binary64)).

Producers MUST NOT emit an object with duplicate member names. A verifier
SHOULD reject one; the reference verifier does not, and uses the last
occurrence, as `JSON.parse` does.

NaN and the infinities cannot occur in JSON text. The reference
serialises them as `null` if a caller passes them in-process.

### 4.5 Lone surrogates

[RFC 8785] requires its input to be I-JSON [RFC 7493], which excludes strings
containing unpaired surrogate code units. Producers MUST NOT emit such
strings. The reference verifier does not reject them: it escapes an unpaired
surrogate as `\u` followed by four lowercase hexadecimal digits, as
ECMAScript's well-formed `JSON.stringify` does. A verifier that wishes to
agree with the reference on such input MUST do the same.

### 4.6 Omitted members

When `C` is applied to an object built in memory, a member whose value is
*absent* (ECMAScript `undefined`) is omitted entirely; it is not written as
`null`. This matters in exactly one place in this specification: the oracle
entry of an event that has no `output` or `response` member
([Section 6.4](#64-oracle-stream-and-cassette-digest)). An absent member and a
member whose value is `null` serialise differently.

### 4.7 Dropping one top-level member

The event chain ([Section 6.3](#63-event-chain)) hashes each event without its
own `_hash` member. A verifier MUST serialise the event with the top-level
member named exactly `_hash` skipped, and every other member, including one
named `__proto__`, present. Members named `_hash` at deeper levels are not
skipped.

## 5. Hashing

`H(s)` is the SHA-256 digest [FIPS 180-4] of the UTF-8 encoding of the string
`s`, written as 64 lowercase hexadecimal characters.

All hashes in every artifact are written in this form. Producers MUST write
lowercase hexadecimal. Verifiers compare hashes as strings, so an uppercase
hash in an artifact does not match.

Every hash input in this specification begins with a fixed prefix that names
what is being hashed (`"decision:"`, `"record:"`, `"node:"` and so on), or is
a concatenation of fixed-length hashes. This domain separation is part of the
format.

## 6. Run records (`runback.audit/v2`, `runback.cassette/v1`)

### 6.1 Structure

```json
{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "...",
    "generated_at": "2026-07-01T09:14:22.000Z",
    "event_count": 6,
    "algorithm": "sha256-chain",
    "content_digest": "<hex64>",
    "replay": {
      "cassette_digest": "<hex64>",
      "entry_count": 3,
      "algorithm": "oracle-chain/sha256",
      "note": "..."
    },
    "signed": true,
    "signature": { "alg": "Ed25519", "value": "<hex>", "pubkey": "<SPKI PEM>" },
    "verify": "...",
    "spec_url": "https://runback.dev/spec",
    "verifier_url": "https://runback.dev/verify"
  },
  "run": { "...": "a summary of the run row" },
  "events": [ { "...": "event fields", "_hash": "<hex64>" } ]
}
```

| Member | Requirement |
|---|---|
| `$schema` | REQUIRED. `runback.audit/v2` or `runback.cassette/v1`. |
| `manifest` | REQUIRED object. |
| `manifest.content_digest` | REQUIRED. The terminal event-chain hash ([6.3](#63-event-chain)). |
| `manifest.replay.cassette_digest` | REQUIRED. The oracle-stream digest ([6.4](#64-oracle-stream-and-cassette-digest)). |
| `manifest.signature` | `null` when unsigned, otherwise a signature object ([13](#13-signatures)). |
| `manifest.run_id` | The run's id. Not signed; bound to the events by [6.6](#66-consistency-binding). |
| `run` | OPTIONAL summary of the run. Not signed; bound by [6.6](#66-consistency-binding). |
| `events` | REQUIRED array, in the order they were chained. |
| `events[i]._hash` | REQUIRED. The chain hash up to and including event `i`. |

`manifest.generated_at`, `event_count`, `algorithm`, `replay.entry_count`,
`replay.algorithm`, `replay.note`, `signed`, `verify`, `spec_url` and
`verifier_url` are informative. No verification step reads them, and the
signature does not cover them.

### 6.2 Events

Each event is a JSON object conforming to the trace-event schema in
`packages/schema/schema.json` (generated from `packages/schema/src/events.ts`).
That schema is incorporated by reference. The members this specification
relies on are:

| Member | Used by |
|---|---|
| `run_id` | Consistency binding ([6.6](#66-consistency-binding)). |
| `seq` | Oracle-stream ordering ([6.4](#64-oracle-stream-and-cassette-digest)). An integer. |
| `type` | `llm`, `tool`, `env`, `reasoning` or `run`. |
| `model.model_id`, `request`, `response`, `error` | `llm` oracle entries. |
| `tool_name`, `input`, `output`, `error` | `tool` oracle entries. |
| `kind`, `key`, `output` | `env` oracle entries. |
| `key_projection` | OPTIONAL `{keep?: string[], drop?: string[]}` on `llm` and `tool` events. |
| `phase`, `status`, `output`, `error` | The `run` event with `phase: "end"`, for consistency binding. |

The whole event, every member except the top-level `_hash`, is covered by the
event chain, whether or not this specification names the member.

### 6.3 Event chain

```
h_0 = ""                                  (the empty string, not H(""))
h_i = H( h_{i-1} || C(event_i without its top-level "_hash") )     for i = 1..n
content_digest = h_n, or H("") when there are no events
```

Events are chained in the order they appear in the `events` array. They are
not re-sorted for this chain.

A verifier MUST recompute `h_i` for every event and compare it with
`events[i-1]._hash`, and MUST compare `h_n` with `manifest.content_digest`.

### 6.4 Oracle stream and cassette digest

The oracle stream is computed from the same events, sorted by `seq`.

1. Sort the events in ascending order of `seq`. The sort MUST be stable, so
   events with equal `seq` keep their array order. The reference verifier
   treats a missing `seq` as 0.
2. Map each event to an oracle entry, or to nothing:

   | `type` | Entry |
   |---|---|
   | `llm` | `kind = "llm"`; `key = H("llm:" \|\| model.model_id \|\| ":" \|\| C(P(request, key_projection)))`; `output = {"error": error}` if `error` is present and truthy, otherwise `response` |
   | `tool` | `kind = "tool"`; `key = H("tool:" \|\| tool_name \|\| ":" \|\| C(P(input, key_projection)))`; `output = {"error": error}` if `error` is present and truthy, otherwise `output` |
   | `env` | `kind = event.kind`; `key = event.key`; `output = event.output` |
   | anything else | no entry |

3. Fold the entries:

   ```
   c_0 = ""
   c_j = H( c_{j-1} || C({"kind": kind_j, "key": key_j, "output": output_j}) )
   cassette_digest = c_m, or H("") when there are no entries
   ```

When an event has no `response` (for `llm`) or no `output` (for `tool` and
`env`) member at all, `output_j` is absent and the `"output"` member is
omitted from the object passed to `C` ([Section 4.6](#46-omitted-members)).
It is not written as `"output":null`. The trace schema does not require
`output` on `tool` or `env` events, so this case occurs in valid records.

`P(x, projection)` is the key projection. When `projection` is absent, or has
neither a non-empty `keep` nor a non-empty `drop`, `P(x, projection) = x`.
Otherwise, for an object `x`:

1. Deep-copy `x` (a JSON round trip).
2. If `keep` is non-empty: remove every top-level member whose name is not the
   first dot-separated segment of some entry in `keep`.
3. For each path in `drop`, split it on `.` and remove that path. Removal
   descends through objects by member name and, when it meets an array,
   applies the remaining path to every element.

For an `x` that is not an object or array, `P(x, projection) = x`. When `x` is
an array, step 3 applies to it: `drop` removes the path inside every
element. The producer (`packages/replay/src/cassette-enterprise.ts`), the
Python port and the reference verifier from 3.3.0 all do this; verifiers
before 3.3.0 returned `x` unchanged (see
[Appendix A, D1](#d1-key-projection-on-an-array-input)).

A verifier MUST compare `cassette_digest` with
`manifest.replay.cassette_digest`.

### 6.5 Signature payload

The run record's signature, when present, covers the UTF-8 bytes of:

```
content_digest || ":" || cassette_digest
```

taken from `manifest.content_digest` and `manifest.replay.cassette_digest` as
written in the record. Signature algorithms and verdicts are in
[Section 13](#13-signatures).

### 6.6 Consistency binding

The signature covers the events (through `content_digest`) and the oracle
stream, but not `manifest.run_id` or the `run` summary. A verifier MUST
therefore check that these unsigned fields agree with the signed events:

1. Let `R` be the set of non-empty `run_id` values in the events. If
   `manifest.run_id` is present, `R` is non-empty, and `manifest.run_id` is
   not in `R`, the check fails.
2. Let `end` be the first event with `type = "run"` and `phase = "end"`. If
   both `run` and `end` exist:
   - if `run.status` is present and differs from `end.status`, the check fails;
   - if `run.output` is present and is not structurally equal to `end.output`
     (absent treated as `null`), the check fails;
   - if `run.error` is present and is not structurally equal to `end.error`
     (absent treated as `null`), the check fails.

Structural equality is JSON value equality with object member order ignored.

A verifier SHOULD report the run's identity from the events' `run_id`, not
from `manifest.run_id`.

## 7. The ledger

Each organisation has one ledger. It is stored in the `ad_ledger` table
(`sql/create_ledger.sql`, extended by `sql/add_ledger_typed_entries.sql`).
Ledger entries are not themselves an exchange format; they appear to a
verifier only through checkpoints and proofs. This section defines them
because proofs commit to them.

### 7.1 Entries

| Field | Meaning |
|---|---|
| `seq` | Position in the ledger, starting at 0, with no gaps. |
| `entry_kind` | `run`, `decision_batch`, `activity_batch`, `approval`, `override` or `report`. |
| `leaf_hash` | What the entry attests ([7.2](#72-leaf-hashes)). |
| `prev_hash` | The previous entry's `entry_hash`; `""` for `seq = 0`. |
| `entry_hash` | `H(prev_hash \|\| leaf_hash)`. |

The **head** of a ledger of `n` entries is the `entry_hash` of entry `n - 1`.

### 7.2 Leaf hashes

| `entry_kind` | `leaf_hash` | Defined in |
|---|---|---|
| `decision_batch` | `H("decision_batch:" \|\| C({"batch_id", "org_id", "count", "root"}))` | [8.4](#84-decision-batches) |
| `activity_batch` | `H("activity_batch:" \|\| C({"batch_id", "org_id", "count", "root"}))` | [8.7](#87-activity-batches) |
| `approval`, `override`, `report` | `H("record:" \|\| C({"id", "kind", "org_id", "subject_id", "content_hash"}))` | [9](#9-approvals-overrides-and-reports) |
| `run` | `H("leaf:" \|\| C({"run_id", "name", "status", "digest", "ended_at", "steps"}))` | below (informative) |

The run leaf binds a run's id, name, status, cassette digest, end time and
step count, each `null` when missing (`web/lib/ledgerCore.ts`, `runLeaf`). No
v3 proof document carries a run leaf, so an outside verifier cannot check one
from the formats in this version. It is listed so that the ledger is fully
described.

### 7.3 Tombstones (informative)

When a sealed run or decision is deleted under a retention or erasure policy,
a tombstone records it, keyed by the run id or by `"decision:" || id`. The set
of tombstones is bound into each new checkpoint as:

```
tombstone_digest = H( "tombstones:" || join(U+0001, sort([run_id || U+0000 || reason for each tombstone])) )
```

where U+0000 and U+0001 are the single control characters NUL and SOH, and
`sort` orders by UTF-16 code unit. A checkpoint sealed before tombstone
coverage existed has `tombstone_digest = null`.

No verification step in this version recomputes `tombstone_digest`: it is
signed as part of the checkpoint payload ([11.2](#112-signed-payload)) and is
otherwise opaque to a verifier. See [Security considerations](#18-security-considerations)
on run ids and reasons that contain the separator characters.

## 8. Policy decisions and `decided_by`

### 8.1 Decision fields

A policy decision has these fields. All of them are hashed.

| Field | Type | Meaning |
|---|---|---|
| `id` | string | The decision's UUID, lowercase. |
| `run_id` | string or null | The run the call belonged to. |
| `span_id` | string or null | The step within the run. |
| `agent` | string or null | The agent that proposed the call. |
| `policy_id` | string or null | The policy that judged it. |
| `policy_version` | string or null | Its version. |
| `decision` | string or null | The verdict, for example `allow`, `deny`, `block`, `require_approval`. `null` only after redaction. |
| `rule` | string or null | The rule that produced the verdict. |
| `call_hash` | string or null | A hash binding the decision to the exact call. |
| `decided_by` | string | Provenance ([8.3](#83-provenance-decided_by)). |
| `ts` | string | When the decision was made. |

### 8.2 Decision hash

```
decision_hash = H( "decision:" || C({
    "id":             id,
    "run_id":         S(run_id),
    "span_id":        S(span_id),
    "agent":          S(agent),
    "policy_id":      S(policy_id),
    "policy_version": S(policy_version),
    "decision":       S(decision),
    "rule":           S(rule),
    "call_hash":      S(call_hash),
    "decided_by":     decided_by,
    "ts":             T(ts)
}) )
```

- `S(v)` is `null` when `v` is null or absent, and otherwise the string form of
  `v` (so a numeric `policy_version` of `3` hashes as `"3"`).
- `id` and `decided_by` are hashed as given, without conversion.
- `T(ts)` parses `ts` as an instant and writes it as
  `YYYY-MM-DDTHH:mm:ss.sssZ` in UTC with exactly three fractional digits.
  Fractional seconds beyond milliseconds are truncated, not rounded:
  `2026-10-09T10:00:00.1239+00:00` becomes `2026-10-09T10:00:00.123Z`.

Producers MUST write `ts` in proof documents already in the `T(ts)` form, and
MUST restrict it to years 1 to 9999. A `ts` without an explicit `Z` or UTC
offset MUST NOT be produced: ECMAScript parses a date-time without an offset
in the verifier's local time zone, so the hash would depend on where it was
verified.

### 8.3 Provenance (`decided_by`)

`decided_by` says who made the decision and who only recorded it. It is part
of the decision hash, so a decision cannot be relabelled after sealing without
failing verification.

The values defined by this version, with the exact attribution sentence the
reference verifier reports for each:

| Value | Who decided | Attribution |
|---|---|---|
| `server` | Runback's server-side decide endpoint. | `decided and sealed by Runback` |
| `mcp_proxy` | Runback's MCP proxy, in line with the tool call. | `decided and sealed by Runback` |
| `sdk_local` | The customer's Runback SDK, evaluating the policy in the customer's process, which then reported the decision. | `reported by your SDK, sealed on receipt` |
| `sdk_backfill` | The customer's Runback SDK, which failed closed during an outage and reported the decision later. | `reported by your SDK, sealed on receipt` |
| `aws_agentcore` | AWS Bedrock AgentCore Policy (Cedar policies evaluated at the AgentCore Gateway). The customer's forwarder sent the record to Runback. | `decided by AWS AgentCore, sealed on receipt by Runback` |
| `microsoft_agent365` | A Microsoft Agent 365 AI guardrail (an `AIGuardrail` record in the Microsoft Purview audit log). Runback pulled the record from the customer's own Office 365 Management Activity feed. Added in 3.3.0. | `decided by a Microsoft Agent 365 guardrail, recorded by Microsoft, sealed on receipt by Runback` |

The values fall into three classes:

1. **Decided by Runback** (`server`, `mcp_proxy`). Runback's code evaluated
   the policy and recorded the result.
2. **Reported by the customer's SDK** (`sdk_local`, `sdk_backfill`). Runback
   code ran, but in an environment Runback does not control. Runback recorded
   what it was told.
3. **Third-party** (`aws_agentcore`, `microsoft_agent365`, and any later vendor value). A system
   that is not Runback made the decision. **A third-party value means
   "recorded by the vendor, sealed on receipt".** Runback did not make the
   decision, did not re-evaluate it, and did not confirm it with the vendor.
   What a valid proof establishes is that this record, with this content,
   reached Runback and has not changed since it was sealed.

Producers MUST NOT emit a `decided_by` value that is not defined by this
specification or a later version of it. How values are added, and how
verifiers treat values they do not know, is in
[Section 17.2](#172-adding-a-decided_by-value).

### 8.4 Decision batches

Decisions are sealed in batches. A batch is the Merkle tree
([Section 10](#10-merkle-trees)) over its decisions' `decision_hash` values,
in `batch_index` order (from 0). It is sealed as one ledger entry of kind
`decision_batch` with:

```
leaf_hash = H( "decision_batch:" || C({
    "batch_id": batch_id,    (string)
    "org_id":   org_id,      (string)
    "count":    count,       (integer: the number of decisions in the batch)
    "root":     root         (hex64: the batch's Merkle root)
}) )
```

`count` is hashed as a JSON number, not a string.

### 8.5 Redaction

A decision may be redacted under a retention or erasure policy. Its content
is removed and its `decision_hash` is kept, so the batch root still
re-derives. A redacted decision's content, including `decided_by`, can no
longer be checked against its hash. Its provenance is therefore not proven
(see [12.1](#121-decision-proof-runbackdecision-proofv3)).

### 8.6 Activity recorded by other vendors

Some vendors keep their own record of what happened (who did what, and
when) without any allow-or-deny shape. Runback seals those records as
**activity**, never as decisions: nothing in an activity says that a policy
allowed or stopped anything. Added in verifier 3.3.0; `openai_audit` in 3.4.0.

`recorded_by` names the vendor that kept the record. It is a closed list,
like `decided_by`, and Runback is never a value:

| Value | Source | Attribution |
|---|---|---|
| `anthropic_compliance` | Anthropic's Compliance API activity feed. | `recorded by Anthropic, sealed on receipt by Runback` |
| `microsoft_purview` | The Microsoft Purview unified audit log (Copilot, AI-app and agent activity), read through the Office 365 Management Activity API. | `recorded by Microsoft Purview, sealed on receipt by Runback` |
| `openai_audit` | The OpenAI API Platform organization audit log: changes to the organization's API keys, projects, roles and settings, read through `GET /v1/organization/audit_logs`. It records administration, not what an agent called or said. | `recorded by OpenAI, sealed on receipt by Runback` |

`received_via` says how the record reached Runback. The only value defined by
this version is `pulled_by_runback`: Runback fetched it from the vendor with a
credential the customer supplied.

The vendor's record itself is kept as canonical JSON ([Section 4](#4-canonical-serialisation)),
and its hash is bound into the activity as `record_sha256`. The activity
hash is:

```
activity_hash = H( "activity:" || C({
    "id":            id,              (string, Runback's id for the activity)
    "recorded_by":   recorded_by,
    "source_id":     source_id,       (string, the vendor's own id for the record)
    "activity_type": S(activity_type),
    "actor_type":    S(actor_type),
    "actor_id":      S(actor_id),
    "agent":         S(agent),
    "occurred_at":   T(occurred_at),
    "received_via":  received_via,
    "record_sha256": S(record_sha256)
}) )
```

`S` and `T` are as in [8.2](#82-decision-hash). `id`, `recorded_by`,
`source_id` and `received_via` are hashed as given. `actor_id` is the
vendor's stable actor id, never an email address.

What a valid activity proof establishes is the same as for a third-party
decision ([8.3](#83-provenance-decided_by)): this record, with this content,
reached Runback and has not changed since it was sealed. Runback did not
observe the activity, and did not confirm the record with the vendor.

An activity may be redacted, as a decision may ([8.5](#85-redaction)): its
content and the vendor's record are removed, `activity_hash` is kept, and
its provenance is no longer proven.

### 8.7 Activity batches

Activities are sealed in batches, as decisions are: a batch is the Merkle
tree over its activities' `activity_hash` values in `batch_index` order, sealed
as one ledger entry of kind `activity_batch` with:

```
leaf_hash = H( "activity_batch:" || C({
    "batch_id": batch_id,    (string)
    "org_id":   org_id,      (string)
    "count":    count,       (integer)
    "root":     root         (hex64)
}) )
```

The prefix `activity_batch:` keeps an activity batch from ever being read as
a decision batch with the same members.

## 9. Approvals, overrides and reports

An approval (a person deciding on a held call), an override (an agent's
authorisation being revoked or restored) or a report is sealed as its own
ledger entry.

| Field | Meaning |
|---|---|
| `id` | The record's UUID. |
| `kind` | `approval`, `override` or `report`. |
| `org_id` | The organisation. |
| `subject_id` | What the record is about: an approval's id, or `agent:<name>` for an override. |
| `payload` | A flat JSON object whose values are strings or `null`. |
| `content_hash` | `H(kind \|\| ":" \|\| C(payload))` |

```
leaf_hash = H( "record:" || C({
    "id": id, "kind": kind, "org_id": org_id,
    "subject_id": subject_id, "content_hash": content_hash
}) )
```

Producers MUST convert every payload value to a string or `null` before
hashing, so that the payload hashes identically after storage. The payload's
members are defined by the producer and are not fixed by this version. At the
time of writing an approval payload carries `approval_id`, `run_id`,
`span_id`, `status`, `approver`, `decided_at`, `call_hash` and, when present,
`claimed_call_hash`, `policy_id` and `policy_version`
(`web/lib/approvals.ts`); an override payload carries `action`, `agent`,
`reason`, `manual` and `at` (`web/lib/guard.ts`). A verifier MUST hash the
payload exactly as given, whatever its members.

## 10. Merkle trees

Merkle trees are used twice: over a decision batch's decision hashes, and
over a ledger's leaf hashes.

### 10.1 Root

```
node(a, b) = H( "node:" || a || b )

MerkleRoot([]) = H("empty-ledger")
MerkleRoot(L):
    level = L
    while length(level) > 1:
        next = []
        for i = 0, 2, 4, ...:
            left  = level[i]
            right = level[i + 1] if it exists, otherwise level[i]
            append node(left, right) to next
        level = next
    return level[0]
```

A level with an odd number of nodes pairs its last node with itself. A tree
of one leaf has that leaf as its root. Leaves are used as given; they are not
hashed again, because every leaf hash already carries its own prefix.

### 10.2 Audit path

An audit path for the leaf at `index` in a tree of `count` leaves is a list of
steps `{"hash": <hex64>, "right": <boolean>}`, from the leaf level upwards.
`right: true` means the sibling is on the right.

```
Fold(leaf, path):
    h = leaf
    for step in path:
        h = node(h, step.hash) if step.right else node(step.hash, h)
    return h
```

A verifier MUST check both that the path folds to the expected root, and that
the path has the shape the claimed position requires:

```
PathMatches(path, index, count):
    require index and count are integers and 0 <= index < count
    depth = 0; n = count
    while n > 1: depth = depth + 1; n = ceil(n / 2)
    require length(path) == depth
    idx = index
    for step in path:
        require step.hash is a string
        require step.right == (idx is even)
        idx = floor(idx / 2)
    return true
```

Without the shape check a path proves membership but not position. When the
sibling is the duplicated last node, `step.hash` equals the current hash and
`step.right` is `true`.

## 11. Checkpoints (`runback.checkpoint/v3`)

### 11.1 Document

```json
{
  "$schema": "runback.checkpoint/v3",
  "org_id": "33333333-3333-4333-8333-333333333333",
  "seq": 1,
  "head_hash": "<hex64>",
  "merkle_root": "<hex64>",
  "tombstone_digest": "<hex64> or null",
  "created_at": "2026-11-01T00:00:00Z",
  "signature": { "alg": "Ed25519", "value": "<hex>", "pubkey": "<SPKI PEM, optional>" }
}
```

| Member | Requirement |
|---|---|
| `org_id` | REQUIRED string. |
| `seq` | REQUIRED integer, `>= 0`. The number of ledger entries covered: entries `0` to `seq - 1`. |
| `head_hash` | REQUIRED hex64. The `entry_hash` of entry `seq - 1`. |
| `merkle_root` | REQUIRED hex64. `MerkleRoot` over the `leaf_hash` of entries `0` to `seq - 1`, in `seq` order. |
| `tombstone_digest` | hex64 or `null` ([7.3](#73-tombstones-informative)). |
| `created_at` | Informative. Not signed. |
| `signature` | A signature object, or `null` for an unsigned checkpoint. `pubkey` is OPTIONAL for Ed25519. |

### 11.2 Signed payload

The checkpoint signature covers the UTF-8 bytes of:

```
"ledger:" || org_id || ":" || seq || ":" || head_hash || ":" || merkle_root
```

followed, only when `tombstone_digest` is a non-empty string, by:

```
":ts:" || tombstone_digest
```

`seq` is written in base 10. The suffix is omitted, not written empty, when
`tombstone_digest` is `null`, so a checkpoint sealed before tombstone coverage
existed still verifies against its original payload.

### 11.3 What a checkpoint proves

A valid checkpoint proves that the holder of the signing key stated this
`seq`, head and root (and tombstone set) for this organisation. It does not by
itself prove that the ledger still matches it. That is established by a proof
document against `merkle_root` ([Section 12](#12-proof-documents)), or by
re-deriving the whole ledger, which only Runback or a self-hosted operator
can do.

## 12. Proof documents

### 12.1 Decision proof (`runback.decision-proof/v3`)

```json
{
  "$schema": "runback.decision-proof/v3",
  "org_id": "<string>",
  "decided_by": "server",
  "attribution": "decided and sealed by Runback",
  "decision": { "id": "...", "run_id": "...", "...": "the fields of 8.1", "ts": "2026-10-09T10:00:00.123Z" },
  "redacted": false,
  "decision_hash": "<hex64>",
  "batch": { "id": "<batch_id>", "count": 3, "merkle_root": "<hex64>", "index": 1, "path": [ { "hash": "<hex64>", "right": false } ] },
  "ledger": { "seq": 0, "index": 0, "entry_kind": "decision_batch", "leaf_hash": "<hex64>", "path": [] },
  "checkpoint": { "$schema": "runback.checkpoint/v3", "...": "a checkpoint document (11.1)" }
}
```

Names in the proof differ from the names hashed in [8.4](#84-decision-batches):
`batch.id` is hashed as `batch_id`, `batch.merkle_root` as `root`, and
`batch.count` as `count`. `org_id` is the proof's top-level `org_id`.

For a redacted decision, `decision` is `null`, `redacted` is `true`,
`decided_by` is `null`, and `attribution` is
`provenance redacted — not proven`.

`ledger.index` is the batch entry's position in the ledger, which is also the
leaf's index in the checkpoint's Merkle tree. The tree has `checkpoint.seq`
leaves.

`ledger.seq`, `attribution` and `checkpoint.created_at` are informative. No
verification step reads them; a verifier MUST derive the attribution it
reports from `decided_by` ([8.3](#83-provenance-decided_by)), never from the
proof's `attribution` member.

### 12.2 Record proof (`runback.record-proof/v3`)

```json
{
  "$schema": "runback.record-proof/v3",
  "org_id": "<string>",
  "kind": "approval",
  "record": { "id": "<uuid>", "subject_id": "<string>", "payload": { "...": "strings and nulls" }, "content_hash": "<hex64>" },
  "ledger": { "seq": 4, "index": 4, "entry_kind": "approval", "leaf_hash": "<hex64>", "path": [ "..." ] },
  "checkpoint": { "$schema": "runback.checkpoint/v3", "...": "a checkpoint document (11.1)" }
}
```

`ledger.entry_kind` MUST equal `kind`. `ledger.seq` is informative.

### 12.3 Activity proof (`runback.activity-proof/v1`)

```json
{
  "$schema": "runback.activity-proof/v1",
  "org_id": "<string>",
  "recorded_by": "anthropic_compliance",
  "attribution": "recorded by Anthropic, sealed on receipt by Runback",
  "activity": { "id": "...", "recorded_by": "anthropic_compliance", "...": "the fields of 8.6", "occurred_at": "2026-04-10T08:09:10.000Z" },
  "record": "<the vendor's record as canonical JSON, or null>",
  "redacted": false,
  "activity_hash": "<hex64>",
  "batch": { "id": "<batch_id>", "count": 2, "merkle_root": "<hex64>", "index": 0, "path": [ { "hash": "<hex64>", "right": true } ] },
  "ledger": { "seq": 7, "index": 7, "entry_kind": "activity_batch", "leaf_hash": "<hex64>", "path": [] },
  "checkpoint": { "$schema": "runback.checkpoint/v3", "...": "a checkpoint document (11.1)" }
}
```

Names map to the batch leaf of [8.7](#87-activity-batches) as in
[12.1](#121-decision-proof-runbackdecision-proofv3). `record` is optional;
when it is a string, it is checked against `activity.record_sha256`.

For a redacted activity, `activity` and `record` are `null`, `redacted` is
`true`, `recorded_by` is `null`, and `attribution` is
`provenance redacted — not proven`. As for decisions, a verifier MUST derive
the attribution it reports from `recorded_by`, never from the proof's
`attribution` member.

## 13. Signatures

### 13.1 Signature object

```json
{ "alg": "Ed25519", "value": "<lowercase hex>", "pubkey": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----\n" }
```

| Member | Meaning |
|---|---|
| `alg` | `Ed25519` or `HMAC-SHA256`. |
| `value` | The signature or MAC, as lowercase hexadecimal. |
| `pubkey` | Ed25519 only: the signer's public key as a PEM-encoded SubjectPublicKeyInfo [RFC 8410]. REQUIRED in a run record; OPTIONAL in a checkpoint. |

A signature is absent when the object is `null` or has no `value`; the
artifact is then **unsigned**.

### 13.2 Ed25519

Signatures are pure Ed25519 as defined in [RFC 8032] Section 5.1: the message
is signed directly, with no pre-hash and no context. The message is the UTF-8
encoding of the payload string defined for the artifact:

| Artifact | Payload |
|---|---|
| Run record | `content_digest \|\| ":" \|\| cassette_digest` ([6.5](#65-signature-payload)) |
| Checkpoint | `"ledger:" \|\| ...` ([11.2](#112-signed-payload)) |
| Evidence pack | `"runback-pack:" \|\| manifest_text` ([14.3](#143-manifest-and-signature)) |

`value` is the 64-byte signature as 128 lowercase hexadecimal characters.
Producers MUST write exactly that. The reference verifier decodes `value`
leniently: it accepts uppercase, and ignores everything from the first
character that is not a hexadecimal pair onwards (see
[Appendix A, D6](#d6-lenient-hexadecimal-decoding-of-signatures)).

The public key is an Ed25519 SubjectPublicKeyInfo: 44 bytes of DER, the
12-byte prefix `302a300506032b6570032100` followed by the 32-byte key.
Two keys are the same key when their DER encodings are byte-for-byte equal.
A verifier MUST compare keys this way and MUST NOT compare PEM text, whose
line breaks and trailing whitespace vary between tools.

### 13.3 HMAC-SHA256 (legacy)

Deployments without an Ed25519 key sign with HMAC-SHA256 [RFC 2104] under a
shared secret. `value` is the lowercase hexadecimal MAC over the same payload
string. An HMAC signature can only be checked by someone who holds the
secret, proves custody of that secret rather than identity, and is never
evidence to a third party. Evidence packs are never HMAC-signed.

### 13.4 Signature verdicts

A verifier reports one of these values for a signature:

| Verdict | Meaning |
|---|---|
| `valid` | The signature verifies under a pinned key ([15](#15-key-distribution-and-trust)), or the HMAC matches a secret the caller supplied. |
| `valid-unpinned` | An Ed25519 signature is mathematically sound, but its key is not pinned. The signer is unproven. |
| `revoked` | An Ed25519 signature is sound, under a key on the revocation list. |
| `invalid` | The signature does not verify, or could not be decoded. |
| `unsigned` | There is no signature. |
| `no-key` | There is a signature, but nothing to check it with: an HMAC signature without the secret, or an Ed25519 signature with no key available. |

The checks are made in this order: the signature must verify; then the key
is compared with the revocation list (`revoked`); then with the pinned keys
(`valid`, or `valid-unpinned`). A revoked key is reported as `revoked` even
when the caller pinned no keys.

Which key is tried:

- **Run record.** The key in `signature.pubkey`. If there is none the
  verdict is `no-key`.
- **Checkpoint and evidence pack.** The key in `signature.pubkey` when
  present. When absent, each pinned key in turn; the first that verifies is
  the signer. With no pinned keys the verdict is `no-key`.

Which algorithm is used:

- **Run record.** `Ed25519` when `alg` is exactly `Ed25519`; otherwise the
  reference verifier treats the signature as HMAC-SHA256.
- **Checkpoint and evidence pack.** `Ed25519` or `HMAC-SHA256`; any other
  `alg` is `invalid`.

See [Appendix A, D5](#d5-unknown-signature-algorithm).

## 14. Evidence packs (`runback.pack/v1`)

An evidence pack is a PDF that an auditor reads. It carries its own signed
manifest, so the file that is read is the file that is verified, with no PDF
parser required.

### 14.1 Manifest region

The PDF contains exactly one occurrence of each of these byte sequences
(ISO 8859-1, which for these characters is ASCII):

```
BEGIN = "%RUNBACK-PACK-MANIFEST-BEGIN" followed by one line feed (0x0A)
END   = one line feed (0x0A) followed by "%RUNBACK-PACK-MANIFEST-END"
```

The **manifest region** is the bytes strictly between them: it starts at the
byte after the last byte of `BEGIN`, and ends at the first byte of `END`
(exclusive). The markers themselves are outside the region.

A verifier MUST locate the region as follows and MUST fail if any condition
is not met:

1. Find the first occurrence of `BEGIN`. There MUST be one, and no second
   occurrence anywhere in the file.
2. Find the first occurrence of `END` after `BEGIN`. There MUST be one, no
   second occurrence after it, and no occurrence before `BEGIN`.

The producer renders the region inside an uncompressed PDF stream, initially
filled with spaces (0x20), 16 384 bytes long.

### 14.2 Body hash

```
pdf_sha256 = lowercase hex SHA-256 of ( bytes[0 .. start) || bytes[end .. EOF) )
```

where `start` and `end` are the region's bounds. Every byte of the file
outside the region is covered: every page, the metadata, the cross-reference
table, the trailer, and anything appended after `%%EOF`, such as an
incremental update.

### 14.3 Manifest and signature

The region holds, after any leading whitespace, one JSON object, followed by
spaces up to the end of the region:

```json
{"manifest":"<the manifest, as a JSON string>","signature":{"alg":"Ed25519","value":"<hex>","pubkey":"<SPKI PEM>"}}
```

- `manifest` is a string: the manifest's JSON text, exactly as signed.
- `signature` is a signature object ([13.1](#131-signature-object)), or `null`
  for an unsigned pack.

The producer escapes every character from U+007F upwards in this object as
`\u` followed by four lowercase hexadecimal digits, so that the region is
plain ASCII whatever the organisation is called. Those escapes belong to the
outer object's encoding only. **The signed bytes are the UTF-8 encoding of
`"runback-pack:" || manifest_text`**, where `manifest_text` is the value of the
`manifest` string *after* the outer object has been parsed as JSON. They are
not the escaped bytes in the region, and the manifest is never
re-serialised before verification.

The prefix `runback-pack:` keeps a pack signature from being accepted as any
other artifact signed by the same key.

Parsing `manifest_text` gives the manifest object:

| Member | Requirement |
|---|---|
| `$schema` | REQUIRED. `runback.pack/v1`. |
| `sample` | REQUIRED boolean. `true` for an illustrative pack that is not a record of any organisation. A sample pack is never signed by the producer. |
| `org_id` | REQUIRED string. |
| `pdf.sha256` | REQUIRED hex64. The body hash ([14.2](#142-body-hash)). |
| `ledger.checkpoint` | A checkpoint document ([11.1](#111-document)), or `null`. |
| `org_name`, `period`, `generated_at`, `counts`, `ledger.intact`, `ledger.entries`, `ledger.head`, `signer`, `pdf.excludes` | Informative. Covered by the signature, not re-derived by a verifier. |

`signer.key_sha256`, when present, is the lowercase hex SHA-256 of the signing
key's SubjectPublicKeyInfo DER. The reference verifier does not check it
against the signature's key.

## 15. Key distribution and trust

### 15.1 Why a key must be pinned

The hash chains in this specification are public. Anyone can author a run
record, a ledger and a checkpoint from nothing, and every hash in them will
verify. A signature verified against a key carried in the same document
proves only that the document is internally consistent, because a forger
signs with their own key and embeds it. **Only a signature that verifies
under a key the verifier obtained independently establishes who produced the
artifact.**

A verifier MUST NOT report an artifact as `valid` on the strength of a key it
read from the artifact itself.

### 15.2 Runback's published key

Runback signs with one Ed25519 key at a time. The current key is:

```
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEArDPmR+Gvu1HawnSvM6xjZao7BVPPQ80Qq3sa1hAYvDU=
-----END PUBLIC KEY-----
```

SHA-256 of its SubjectPublicKeyInfo DER:
`8dbb7af3502a2596e7b525b788c40c59a39ee7ca34e838dacf935efe3da063dd`

It is distributed through three channels, all operated by Runback:

1. Compiled into the reference verifier as `RUNBACK_AUDIT_PUBKEYS_PEM`
   (`packages/verify/index.js`), and into the Python port
   (`packages/verify-python/runback_verify/__init__.py`).
2. Served at `https://runback.dev/.well-known/runback-audit-key.pem`
   (`application/x-pem-file`).
3. In this document.

A verifier SHOULD obtain the key through at least one channel other than the
artifact, and SHOULD compare two channels when it is first configured.

The well-known URL serves whatever key the deployment is configured to sign
with; it answers 404 when the deployment has no Ed25519 key. It is a way to
check the compiled-in key, not a substitute for pinning one.

### 15.3 Rotation

The pinned set is a list, newest first. An artifact verifies as `valid` under
any key in the list. When the key rotates, the new key is added at the front
and the old key stays in the list until nothing anyone still verifies was
signed under it. A verifier MUST accept a signature from any pinned key, not
only the newest.

### 15.4 Revocation

The reference verifier carries a revocation list,
`RUNBACK_AUDIT_REVOKED_PUBKEYS_PEM`. It is empty: no Runback audit key has
been revoked. A signature under a revoked key is reported as `revoked`
([13.4](#134-signature-verdicts)). A caller can supply its own revocation list
to react to a compromise before a new verifier release.

### 15.5 Self-hosted deployments

A self-hosted Runback deployment signs with its own key. Its artifacts report
`valid-unpinned` against Runback's key, which is correct: Runback did not sign
them. A verifier SHOULD let the caller pin a different key (the reference
verifier's `expectedPublicKey` option), so that a self-hosted operator's
auditor can reach `valid` against the operator's key.

## 16. Verification algorithms

Each algorithm ends in one of three verdicts:

| Verdict | Meaning | Reference CLI exit code |
|---|---|---|
| `valid` | Integrity holds and a pinned key signed it. | 0 |
| `unverified` | Integrity holds, but nothing pinned vouches for it: unsigned, an unpinned or unavailable key, or a sample pack. | 2 |
| `invalid` | A check failed. | 1 (also for unreadable input) |

`unverified` is not a pass. Continuous-integration and audit tooling SHOULD
treat only `valid` as success.

### 16.1 Run record

1. Require `manifest` to be an object and `events` an array; otherwise the
   input is not a run record.
2. **schema**: `$schema` is `runback.audit/v2` or `runback.cassette/v1`.
3. **chain**: recompute the event chain ([6.3](#63-event-chain)); every
   `events[i]._hash` matches.
4. **digest**: the terminal chain hash equals `manifest.content_digest`.
5. **cassette**: the oracle-stream digest ([6.4](#64-oracle-stream-and-cassette-digest))
   equals `manifest.replay.cassette_digest`.
6. **consistent**: the consistency binding ([6.6](#66-consistency-binding)) holds.
7. **signature**: compute the verdict ([13.4](#134-signature-verdicts)) over
   the payload of [6.5](#65-signature-payload), using `manifest.content_digest`
   and `manifest.replay.cassette_digest` as written.
8. `integrity = schema AND chain AND digest AND cassette AND consistent`.
9. Verdict:
   - `invalid` if not `integrity`, or the signature verdict is `invalid` or
     `revoked`;
   - `valid` if `integrity` and the signature verdict is `valid`;
   - otherwise `unverified`.

A run record signed under a revoked key is `invalid`, as a checkpoint, proof
or pack is. Verifiers before 3.3.0 reported it as `unverified`; see
[Appendix A, D4](#d4-revoked-key-on-a-run-record).

### 16.2 Checkpoint

1. **schema**: `$schema` is `runback.checkpoint/v3`.
2. **shape**: `org_id` is a string; `seq` is an integer `>= 0`; `head_hash` and
   `merkle_root` are hex64; `tombstone_digest` is `null`, absent or hex64.
3. **signature**: the verdict over the payload of [11.2](#112-signed-payload).
4. Verdict:
   - `invalid` if schema or shape fails, or the signature verdict is
     `invalid` or `revoked`;
   - `valid` if the signature verdict is `valid`;
   - otherwise `unverified`.

### 16.3 Decision proof

1. **schema**: `$schema` is `runback.decision-proof/v3`.
2. Let `redacted` be true when `proof.redacted` is `true` and `proof.decision`
   is `null` or absent.
3. **decided_by**: if `redacted`, skip (reported as `redacted`). Otherwise
   `proof.decided_by` is a value this verifier knows ([8.3](#83-provenance-decided_by)).
4. **content**:
   - if `redacted`: `decision_hash` is hex64 (reported as `redacted`);
   - otherwise: `decision.decided_by` equals `proof.decided_by`, and
     `decision_hash` equals the hash of `decision` computed by
     [8.2](#82-decision-hash). A `ts` that cannot be parsed fails this check.
5. **batch**: `PathMatches(batch.path, batch.index, batch.count)` and
   `Fold(decision_hash, batch.path) == batch.merkle_root`.
6. **leaf**: the batch leaf of [8.4](#84-decision-batches) computed from
   `batch.id`, `proof.org_id`, `batch.count` and `batch.merkle_root` equals
   `ledger.leaf_hash`, and `ledger.entry_kind` is `decision_batch`.
7. **ledger**: `checkpoint` is an object; `checkpoint.org_id` equals
   `proof.org_id`; `PathMatches(ledger.path, ledger.index, checkpoint.seq)`;
   and `Fold(ledger.leaf_hash, ledger.path) == checkpoint.merkle_root`.
8. **checkpoint**: verify `checkpoint` by [16.2](#162-checkpoint).
9. `integrity = schema AND decided_by AND content AND batch AND leaf AND ledger`
   (with `redacted` counting as passing for steps 3 and 4).
10. Verdict:
    - `invalid` if not `integrity`, there is no checkpoint, or the checkpoint's
      verdict is `invalid`;
    - `valid` if the checkpoint's verdict is `valid`;
    - otherwise `unverified`.
11. Report provenance:
    - if `redacted`: `decided_by` is `null` and the attribution is
      `provenance redacted — not proven`, whatever the proof's own members say;
    - otherwise, if step 3 passed: `decided_by` and its attribution from
      [8.3](#83-provenance-decided_by);
    - otherwise `decided_by` and attribution are `null`.

### 16.4 Record proof

1. **schema**: `$schema` is `runback.record-proof/v3`.
2. **kind**: `kind` is `approval`, `override` or `report`.
3. **content**: `H(kind || ":" || C(record.payload)) == record.content_hash`.
4. **leaf**: the record leaf of [Section 9](#9-approvals-overrides-and-reports)
   computed from `record.id`, `kind`, `proof.org_id`, `record.subject_id` and
   `record.content_hash` equals `ledger.leaf_hash`, and `ledger.entry_kind`
   equals `kind`.
5. **ledger** and **checkpoint**: as steps 7 and 8 of [16.3](#163-decision-proof).
6. `integrity = schema AND kind AND content AND leaf AND ledger`; verdict as
   step 10 of [16.3](#163-decision-proof).

### 16.5 Evidence pack

1. **pdf**: the first five bytes are `%PDF-`.
2. Locate the manifest region ([14.1](#141-manifest-region)). If it cannot be
   located, the verdict is `invalid`.
3. Decode the region as UTF-8, trim surrounding whitespace, and parse it as
   JSON. Its `manifest` member MUST be a string, and parsing that string MUST
   give an object. Otherwise the verdict is `invalid`.
4. **schema**: the manifest's `$schema` is `runback.pack/v1`.
5. **body_hash**: `manifest.pdf.sha256` is hex64 and equals the body hash
   ([14.2](#142-body-hash)).
6. **signature**: the verdict ([13.4](#134-signature-verdicts)) of the
   region's `signature` over `"runback-pack:" || manifest_text`, with no HMAC
   secret available (so an HMAC signature is `no-key`).
7. **checkpoint**: if `manifest.ledger.checkpoint` is present, verify it by
   [16.2](#162-checkpoint); if its `org_id` differs from `manifest.org_id`, its
   verdict is `invalid`.
8. `integrity = pdf AND schema AND body_hash AND (checkpoint verdict is not invalid)`.
9. Verdict:
   - `invalid` if not `integrity`, or the signature verdict is `invalid` or
     `revoked`;
   - `valid` if the signature verdict is `valid` and `manifest.sample` is not
     `true`;
   - otherwise `unverified`.

A sample pack is never `valid`, whatever its signature. A pack whose
checkpoint is `unverified` can still be `valid`: the checkpoint is checked on
its own terms and only an `invalid` checkpoint fails the pack.

### 16.6 Activity proof

1. **schema**: `$schema` is `runback.activity-proof/v1`.
2. Let `redacted` be true when `proof.redacted` is `true` and `proof.activity`
   is `null` or absent.
3. **recorded_by**: if `redacted`, skip (reported as `redacted`). Otherwise
   `proof.recorded_by` is a value this verifier knows ([8.6](#86-activity-recorded-by-other-vendors)),
   `activity` is an object, and `activity.received_via` is a value this
   verifier knows.
4. **content**:
   - if `redacted`: `activity_hash` is hex64 (reported as `redacted`);
   - otherwise: `activity.recorded_by` equals `proof.recorded_by`, and
     `activity_hash` equals the hash of `activity` computed by
     [8.6](#86-activity-recorded-by-other-vendors). An `occurred_at` that
     cannot be parsed fails this check.
5. **record**: if `redacted`, reported as `redacted`. Otherwise, if
   `proof.record` is a string, `H(record) == activity.record_sha256`; if it
   is not a string, reported as `absent`, which does not fail the proof.
6. **batch**: `PathMatches(batch.path, batch.index, batch.count)` and
   `Fold(activity_hash, batch.path) == batch.merkle_root`.
7. **leaf**: the batch leaf of [8.7](#87-activity-batches) computed from
   `batch.id`, `proof.org_id`, `batch.count` and `batch.merkle_root` equals
   `ledger.leaf_hash`, and `ledger.entry_kind` is `activity_batch`.
8. **ledger** and **checkpoint**: as steps 7 and 8 of [16.3](#163-decision-proof).
9. `integrity = schema AND recorded_by AND content AND (record is not false) AND batch AND leaf AND ledger`;
   verdict as step 10 of [16.3](#163-decision-proof).
10. Report provenance as step 11 of [16.3](#163-decision-proof), with
    `recorded_by` and the attribution of [8.6](#86-activity-recorded-by-other-vendors)
    in place of `decided_by`.

## 17. Versioning and extension

### 17.1 Format versions

Each format is versioned by its `$schema` string. A change that alters what
is hashed, what is signed, or how a verdict is reached is a new `$schema`
value. A verifier MUST NOT verify a document whose `$schema` it does not know
as if it were a version it does know.

Adding an informative member that no verification step reads is not a format
change. A verifier MUST ignore members it does not use, except inside hashed
objects, where every member is hashed.

This document is versioned separately (`runback-evidence-format-v1`). A
revision that only clarifies text keeps the version; one that changes a
format adds or replaces a section and increments it.

### 17.2 Adding a `decided_by` value

`decided_by` is a closed list. A value exists when it is in all of these
places, which is how `aws_agentcore` was added in verifier 3.2.0:

- the table in [Section 8.3](#83-provenance-decided_by), with its class and
  exact attribution sentence;
- the reference verifier's `DECIDED_BY` list and its `attribution()`
  function, with a test vector in `packages/verify/testdata/v3-vectors.json`,
  released as a new minor version of the verifier;
- the producer's `DECIDED_BY` list and `attribution()` in
  `web/lib/ledgerEntries.ts`;
- the `decided_by` CHECK constraint on the `policy_decisions` table, changed
  by its own migration (for example `sql/add_decided_by_aws_agentcore.sql`).

It is RECOMMENDED that the verifier release ship before, or with, the first
producer release that can emit the value, so that no proof exists that every
current verifier rejects.

A third-party value's attribution sentence SHOULD name the vendor as the
party that decided and Runback as the party that sealed on receipt, as
`decided by AWS AgentCore, sealed on receipt by Runback` does. It MUST NOT be
either of the sentences used for Runback-decided or SDK-reported values.

In the reference verifier, `attribution()` returns
`reported by your SDK, sealed on receipt` for any value it does not
explicitly recognise. A value added to `DECIDED_BY` without its own branch
in `attribution()` would therefore be reported with the SDK sentence, so
every new value needs its own branch.

### 17.3 Unknown `decided_by` values

A verifier that meets a `decided_by` value it does not know MUST NOT report
the decision as `valid`, and MUST NOT report an attribution for it.

The reference verifier, from 3.0, reports such a decision proof as `invalid`
with `checks.decided_by: false`, `decided_by: null` and `attribution: null`.
It does so even though the value may be well-formed and correctly hashed
under a newer version of this specification: an older verifier cannot tell a
new value from a forged one. Verifiers before 3.2.0 report `aws_agentcore`
decisions this way, and verifiers before 3.3.0 report `microsoft_agent365`
decisions this way. The same rule applies to `recorded_by`: a verifier MUST
NOT report an activity proof as `valid` for a value it does not know.
Verifiers before 3.3.0 do not know `runback.activity-proof/v1` at all, and verifiers before 3.4.0 report an activity proof whose `recorded_by` is `openai_audit` as invalid. Users verifying a proof that names a value introduced
after their verifier was released need to upgrade.

## 18. Security considerations

**Integrity is not provenance.** Every chain and tree in this specification
can be computed by anyone. Integrity checks show that an artifact is
internally consistent; only a signature under a pinned key shows who produced
it. Verifiers MUST keep these apart, as the three verdicts do.

**Embedded keys.** A key inside an artifact is a hint for which key to try,
never a trust anchor ([15.1](#151-why-a-key-must-be-pinned)).

**HMAC.** A party who can check an HMAC signature can also forge one. HMAC
signatures are never evidence to anyone other than the holder of the secret.

**Revocation is only as fresh as the verifier.** The compiled-in revocation
list changes only when the verifier is updated. A compromise is not reflected
in a copy installed before it. Callers who need prompt revocation SHOULD
supply their own list.

**Unsigned fields.** In a run record, `manifest.run_id` and the `run`
summary are not signed. They are bound to the signed events by
[6.6](#66-consistency-binding); a verifier that skips that step can be shown
a genuinely signed record with a forged outcome.

**Merkle trees with a duplicated last node.** Pairing an odd last node with
itself means a tree of `n` leaves and a tree with the last leaf repeated can
share a root, the weakness behind CVE-2012-2459. This format is safe from it
only because the leaf count is always bound: `count` is inside the batch leaf
hash, the ledger tree's size is the signed `checkpoint.seq`, and
`PathMatches` requires the path's length and shape to match that count.
A verifier MUST NOT skip the shape check.

**Domain separation.** Leaf hashes and interior nodes use distinct prefixes
(`"decision:"`, `"decision_batch:"`, `"record:"`, `"leaf:"`, `"node:"`), so a
leaf cannot be presented as an interior node or as a leaf of another kind.
The concatenations in the event chain, the oracle chain and the ledger chain
join a previous hash, which is either empty or exactly 64 characters, to the
next input, so they are unambiguous.

**Cross-artifact signatures.** One key signs run records, checkpoints and
packs. Their payloads cannot be confused: a run record's payload is two 64
character hexadecimal strings joined by a colon; a checkpoint's begins with
`ledger:`; a pack's begins with `runback-pack:`. The same key also signs
artifacts outside this specification (narrative and security-finding rows,
whose payload is a bare 64-character hash, and trust attestations). A new
signed artifact MUST use a payload that cannot be read as any of these.

**Tombstone set encoding.** The tombstone digest ([7.3](#73-tombstones-informative))
separates fields with U+0000 and tombstones with U+0001, and does not escape
either. Postgres text cannot hold U+0000, but a run id or reason can hold
U+0001, and then two different tombstone sets can give the same digest (for
example `{("a", "b" || U+0001 || "e"), ("c", "d")}` and
`{("a", "b"), ("e" || U+0001 || "c", "d")}`). Run ids are chosen by the
caller. A future format SHOULD hash a canonical JSON array instead, and
producers SHOULD reject control characters in run ids. No verification step
in this version depends on the digest.

**Timestamps.** `ts` is a claim made by whoever recorded the decision. For
`sdk_local`, `sdk_backfill` and third-party values that is not Runback. The
ledger orders entries; it does not attest wall-clock time. Independent time
evidence is the RFC 3161 witnessing of checkpoints
(`docs/WITNESSING.md`), which this version does not specify.

**Parser differentials.** Hashes depend on exact bytes. The differences in
Appendix A are each a case where two honest verifiers disagree on the same
input. Implementers SHOULD run every vector in [Section 20](#20-test-vectors)
and SHOULD add their own for numbers, strings and key ordering.

**Signature encoding.** The reference verifier's lenient hex decoding
([Appendix A, D6](#d6-lenient-hexadecimal-decoding-of-signatures)) means a
signature `value` is not unique as text: trailing characters can be appended
without changing the verdict. Nothing should treat the textual `value` as an
identifier.

## 19. Out of scope, and what is not guaranteed

A `valid` verdict establishes exactly what Section 16 checks, and nothing
more. In particular:

- **A sealed decision is not a correct decision.** A valid decision proof
  shows that this decision record existed with this content when it was
  sealed, and has not changed since. It does not show that the policy was
  right, that the rule was applied correctly, or that the agent obeyed it.
- **A sealed third-party record proves receipt and integrity, not the
  vendor's decision.** For `aws_agentcore` and any later vendor value, Runback
  sealed what the customer's forwarder sent. It did not make the decision,
  re-evaluate it, or confirm it with the vendor. A valid proof does not
  establish that the vendor actually made this decision, or that the forwarder
  sent every decision the vendor made.
- **SDK-reported decisions** (`sdk_local`, `sdk_backfill`) were made in the
  customer's environment. Their content is as reported.
- **Completeness.** A proof shows that one item is in the ledger. It does not
  show that every decision, approval or run that happened was recorded. An
  agent that never reported a call leaves nothing to prove.
- **Freshness.** A checkpoint shows the ledger at its `seq`. A later
  checkpoint may exist; a verifier given one checkpoint cannot know whether
  it is the latest.
- **The ledger chain.** Proof documents prove membership under
  `merkle_root`. They do not check `head_hash` against the entry, nor the
  `prev_hash` chain; only Runback or a self-hosted operator, holding the whole
  ledger, re-derives that.
- **Run leaves.** No document in this version proves a run's ledger entry.
- **Unbound members.** `ledger.seq`, `attribution` and
  `checkpoint.created_at` in proofs; `manifest.generated_at`,
  `manifest.signed`, `manifest.event_count` and the `replay` metadata in run
  records; and `signer.key_sha256` in packs are not checked by any step.
- **Pack figures.** The counts, period and organisation name in a pack are
  signed, so they are Runback's statement and cannot be altered, but a
  verifier cannot re-derive them from the pack.
- **Content before capture.** Values redacted by an SDK before they were sent
  were never recorded, and their absence is not detectable.
- **Time.** No artifact in this version proves when anything happened.
- **Other artifacts.** AI narrative rows and external security-finding rows
  are verified by `@runback/verify` (`verifyNarrative`, `verifyFinding`) but
  are not specified in this version. RFC 3161 witness tokens and the
  transparency feed are not specified in this version.

## 20. Test vectors

All vectors are in `packages/verify/testdata/` in the Runback repository. An
independent verifier SHOULD reproduce every one of them.

What is published where, at the date of this document: the
`@runback/verify` npm package ships only `index.js`, `cli.js` and its README,
not the test vectors. Version 3.4.0, which adds `microsoft_agent365`,
activity proofs and the `openai_audit` value, is on npm, and was published
before any producer emits any of them. The verifier source described here, and
the vectors, are in the repository.

| File | What it pins |
|---|---|
| `jcs-vectors.json` | 22 canonicalisation cases: `value` and the exact `canonical` output. Covers HTML-sensitive characters, U+2028/U+2029, exponent formatting, negative zero, non-BMP key ordering, integer-like keys, control characters and surrogate pairs. |
| `records/*.json` with `records/expected.json` | Ten run records (genuine, unsigned, unpinned, wrong pin, tampered event, tampered digest, tampered cassette, forged summary, unknown schema, bad signature) and the exact verdict and checks the reference produces for each, with the `expectedPublicKey` to pin. |
| `v3-vectors.json` | Decision hashes for three decisions (`server`, `mcp_proxy`, `sdk_backfill`), a batch root, batch leaf and audit path, an approval's content hash and leaf, an `aws_agentcore` decision with its one-decision batch, and (3.3.0) activities with their vendor records, hashes and batch leaf (`activity`) and a `microsoft_agent365` decision with its batch (`microsoft`). |
| `packs/valid.pdf`, `packs/tampered.pdf`, `packs/sample.pdf`, `packs/key.pem` | A signed pack whose organisation name is non-ASCII (so the escaped region differs from the signed text), the same pack with one byte changed, and a sample pack; `key.pem` is the public key to pin. |

The generators (`generate.mjs`, `gen-records.mjs`, `gen-packs.mjs`) are in the
same directory. Signed proof documents are built in the reference verifier's
tests (`packages/verify/test/v3.test.js`) from `v3-vectors.json` with a
throwaway key.

`web/__tests__/specConformance.test.ts` re-implements the canonicalisation,
event chain, oracle chain, decision and record hashes, Merkle path check,
checkpoint payload, tombstone digest and pack body hash from this document's
text, without importing the reference's internals, and checks that they
agree with the reference and the producer on these vectors and on mutated
inputs. `web/__tests__/specConformanceProjection.test.ts` does the same for
key projection against the producer's licensed projection code.

---

## Appendix A. Known divergences between implementations

These are places where Runback's own implementations do not agree with each
other, or did not before a stated version. Each is a bug in at least one of them.
They are listed so that an independent implementer knows which behaviour the
reference verifier has, and is not surprised by it.

### D1. Key projection on an array input (resolved in 3.3.0)

Before 3.3.0, `packages/verify/index.js` `projectInput` returned an array
input unchanged, while the producer (`packages/replay/src/cassette-enterprise.ts`)
and the Python port applied a `drop` projection inside the array's elements.
For an `llm` or `tool` event whose `request` or `input` is an array and whose
`key_projection` has a non-empty `drop`, those verifiers report
`cassette: false` on a genuine record. From 3.3.0 the reference verifier
projects arrays as [6.4](#64-oracle-stream-and-cassette-digest) describes.
Records without `key_projection` (every Community-build record) were never
affected.

### D2. Python port: integers outside binary64

The Python port parses JSON integers with arbitrary precision and writes them
back in full. For `9007199254740993` it writes `9007199254740993`; the
reference writes `9007199254740992`. For `1000000000000000000000` it writes
that, and the reference writes `1e+21`. Hashes over such values differ.

### D3. Python port: absent `output`

For a `tool` or `env` event with no `output` member (or an `llm` event with no
`response`), the Python port puts `"output":null` in the oracle entry; the
reference and the producer omit the member ([4.6](#46-omitted-members)). The
cassette digests differ.

### D4. Revoked key on a run record (resolved in 3.3.0)

Before 3.3.0, the reference verifier's `verify()` reported a run record whose
signature verifies under a revoked key as `unverified` (exit code 2), with
signature verdict `revoked`, while `verifyCheckpoint`, the proof verifiers and
`verifyPack` reported `invalid`. From 3.3.0 the reference verifier and the
Python port report `invalid` for all of them.

### D5. Unknown signature algorithm

For a run record, any `alg` other than `Ed25519` is treated as HMAC-SHA256,
and without a secret is `no-key` (verdict `unverified`). For a checkpoint or
pack, an unknown `alg` is `invalid`.

### D6. Lenient hexadecimal decoding of signatures

The reference verifier decodes an Ed25519 signature `value` with Node.js's
`Buffer.from(value, "hex")`, which accepts uppercase and stops at the first
character that is not part of a hexadecimal pair. A valid signature with
`zz` appended still verifies.

### D7. Missing `model.model_id` or `tool_name`

For a schema-invalid `llm` event with no `model.model_id`, the reference
verifier hashes the key prefix as `llm::`, the producer as `llm:undefined:`,
and the Python port raises an error. The trace schema requires `model_id` and
`tool_name`, so this affects only records that are already malformed.

## Appendix B. Source map

| Topic | Code |
|---|---|
| Canonical serialisation | `packages/verify/index.js` (`canonical`), `web/lib/canonical.ts`, `packages/replay/src/hash.ts` |
| Event chain, run record | `web/lib/audit.ts`, `packages/verify/index.js` (`computeEventChain`, `verify`) |
| Oracle stream | `packages/replay/src/cassette.ts`, `packages/replay/src/digest.ts`, `packages/replay/src/cassette-enterprise.ts`, `packages/verify/index.js` (`computeCassetteDigest`) |
| Trace-event schema | `packages/schema/schema.json`, `packages/schema/src/events.ts` |
| Signing | `web/lib/signing.ts` |
| Ledger, Merkle, checkpoints | `web/lib/ledgerCore.ts`, `web/lib/ledger.ts`, `sql/create_ledger.sql`, `sql/add_checkpoint_tombstone_digest.sql` |
| Decisions, records, `decided_by` | `web/lib/ledgerEntries.ts`, `web/lib/decisions.ts`, `sql/add_ledger_typed_entries.sql`, `sql/add_decided_by_aws_agentcore.sql` |
| Third-party decisions | `web/lib/agentcore.ts`, `web/lib/connectors/microsoftPurview.ts`, `web/lib/connectors/externalDecisions.ts` |
| Activity recorded by other vendors | `web/lib/connectors/activities.ts`, `web/lib/connectors/anthropicCompliance.ts`, `web/lib/connectors/microsoftPurview.ts`, `web/lib/connectors/openaiAudit.ts`, `web/lib/ledgerEntries.ts`, `sql/add_external_activity_records.sql`, `sql/add_microsoft_purview_connector.sql`, `sql/add_openai_audit_connector.sql` |
| Evidence pack | `web/lib/evidencePack/seal.ts`, `web/lib/evidencePack/data.ts`, `packages/verify/index.js` (`verifyPack`) |
| Published key | `web/app/.well-known/runback-audit-key.pem/route.ts` |
| Reference CLI | `packages/verify/cli.js` |
| Python port | `packages/verify-python/runback_verify/__init__.py` |

## References

- [FIPS 180-4] NIST, "Secure Hash Standard (SHS)", FIPS PUB 180-4, August 2015.
- [RFC 2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997.
- [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [RFC 7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, March 2015.
- [RFC 8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital Signature Algorithm (EdDSA)", RFC 8032, January 2017.
- [RFC 8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, May 2017.
- [RFC 8410] Josefsson, S. and J. Schaad, "Algorithm Identifiers for Ed25519, Ed448, X25519, and X448 for Use in the Internet X.509 Public Key Infrastructure", RFC 8410, August 2018.
- [RFC 8785] Rundgren, A., Jordan, B. and S. Erdtman, "JSON Canonicalization Scheme (JCS)", RFC 8785, June 2020.
