Trust anchors (trust-anchors.json)¶
_type: crawcus-trust-anchors. spec_version: 1.0.0.
Schema: spec/schemas/trust-anchors-1.0.json.
A trust-anchor document lists every public key a verifier may trust, with its purpose, validity window and status. It is modelled on TUF root metadata: a threshold of root keys signs the document, and root keys sign nothing else. Verifiers map the document onto a trust policy (schema version 1, which stays threshold-free; the threshold lives only here).
No production document yet
The copy in the repository and at the .well-known URL is a
TEST placeholder generated from public seeds. Its issuer is
TEST-ONLY.crawcus.invalid. Never trust it.
Location¶
| Copy | Location |
|---|---|
| Canonical | trust/trust-anchors.json in crawcus/crawcus (history: trust/history/<version>.json, planned) |
| Mirror | https://crawcus.org/.well-known/crawcus-trust-anchors.json, byte-identical, built from docs/.well-known/ |
| Root pin | trust/pinned-root.json (keyids + threshold) and README "Verifying CRAWCUS" |
Remote sources are one ordered list, tried in order:
https://crawcus.org/.well-known/crawcus-trust-anchors.jsonhttps://raw.githubusercontent.com/crawcus/crawcus/main/trust/trust-anchors.json
Every source must verify against the trust chain rooted in the pinned
root; no source is trusted because of where it was found. The
reference verifier exports this list as CRAWCUS_ANCHOR_SOURCES.
Other issuers supply their own ordered list and pin.
CI (pnpm lint → tools/anchors/anchors.mjs check) fails when:
- the mirror differs from the canonical copy;
- the README fingerprints or
trust/pinned-root.jsondiffer fromroles.root; - a non-TEST document expires less than 30 days from now;
versionorissued_atis not strictly greater than the previous version's (the newesttrust/history/<version>.jsonbelow it, and the copy on the git base branch). Every file intrust/history/must be named<version>.jsonand parse as a valid document with that version; an unparseable history file fails the check.
/trust/ is covered by CODEOWNERS. On any change under trust/, the
trust-anchors workflow verifies the root threshold signatures against
trust/pinned-root.json.
Publication cadence¶
A new version is published at least every 6 months, even if no key
changed, and expires is at most 12 months after issued_at. This
keeps the CI expiry gate (30 days) from being reached in normal
operation and bounds how long a withheld update can go unnoticed.
Document¶
{
"signed": {
"_type": "crawcus-trust-anchors",
"spec_version": "1.0.0",
"issuer": "crawcus.org",
"version": 7,
"issued_at": "2026-11-01T00:00:00Z",
"expires": "2027-05-01T00:00:00Z",
"roles": { "root": { "keyids": ["sha256:…", "sha256:…", "sha256:…", "sha256:…"], "threshold": 2 } },
"keys": [
{
"keyid": "sha256:3f9a…",
"alg": "ed25519",
"public_key": "MCowBQYDK2VwAyEA…",
"purpose": "release",
"deployment": null,
"custody": "hsm",
"kms_resource": null,
"not_before": "2026-11-01T00:00:00Z",
"not_after": "2028-11-01T00:00:00Z",
"status": "active",
"revoked_at": null,
"revocation_reason": null,
"superseded_by": null
}
]
},
"signatures": [
{ "keyid": "sha256:…", "sig": "base64…" },
{ "keyid": "sha256:…", "sig": "base64…" }
]
}
Key identifiers¶
This is the only derivation in CRAWCUS. The human-facing fingerprint is
the same string, and TrustResult.signer.keyFingerprint uses it too.
public_key is base64 SubjectPublicKeyInfo DER. A keyid that does not
match its public_key rejects the whole document.
Field rules¶
versionis a positive integer that increases with every publication.expiresis afterissued_atand at most 12 calendar months later. Publishers re-sign at least every 6 months.purposeis one ofroot,release,test-vectors,audit-export(audit bundles of one deployment). Each key has exactly one purpose.deploymentis required foraudit-exportand null otherwise.statusisactive,retiredorrevoked.revokedrequiresrevoked_atandrevocation_reason(key-compromise,superseded,retired, the trust-policy names). Both are null otherwise.- A key with an unknown
purposeorstatusis ignored, not the file. Unknown fields insidesignedare ignored; they are still covered by the signature. Unknown top-level fields reject the document. superseded_by, when set, must name a different key in the same document whosestatusisactiveorrevoked; otherwise the whole document is rejected.not_beforeis inclusive andnot_afteris exclusive: a key is valid for signing times in[not_before, not_after).- Root keys are listed in
keyswithpurpose: "root".
Root keys and threshold¶
The number of root keys (N) and roles.root.threshold are configurable
per document; production documents use a threshold of at least 2. Root
keys sign only this document. The TEST placeholder uses N = 2 with
threshold 2.
Signatures¶
JCS is RFC 8785. The PAE prefix separates domains, so an anchor
signature never verifies as a bundle signature or the reverse. The
document is valid when at least roles.root.threshold signatures verify
from distinct keyids in roles.root.keyids whose entries have
purpose: "root" and status: "active". Duplicate keyids count once.
threshold must be at least 2; 1 is accepted only in an explicit
verifier test mode.
Verifier behaviour¶
Trust begins with an out-of-band pin of the root keyids and threshold (the README fingerprints, or a copy embedded in a verifier release) and moves forward one document at a time.
- Bootstrap. The document's
roles.rootmust equal the pin, and it must be signed to threshold by that root. - Update. A candidate N replaces the trusted document T only if:
N is signed by a threshold of T's root; N is signed by a threshold of
its own root (so a root rotation needs both);
N.version > T.version(an equal version must be byte-identical); the issuer is unchanged; and N has not expired. Otherwise T is kept and the update is reported as rejected. The verifier never fails open. - Expiry. If the trusted document has expired and no valid newer
one is available, verification fails with
anchors-expired. This holds offline too. An explicit override exists for archival use and is never a default. - Local files (
--anchors <path>style) and history steps go through the same update rule; they cannot replace the root.
Fetching uses HTTPS only, a 1 MiB cap, a 10 s timeout and no redirects.
Mapping to a trust policy¶
trustPolicyFromAnchors(signed, { purpose, deployment? }) selects keys
whose purpose matches the artifact (release → release, vectors →
test-vectors, audit bundle → audit-export plus deployment).
root is never mapped. Each selected key becomes an ed25519-pinned
anchor with notBefore/notAfter; each revoked key also becomes a
revoked row with its reason. The existing evaluator then applies:
| Status | Self-asserted signing time |
|---|---|
revoked / key-compromise |
Fail, whatever the signing time |
revoked / superseded or retired |
Accept only if signing time < revoked_at; result carries signingTimeSelfAsserted: true |
active, retired |
Signing time must fall in [not_before, not_after) |
Until bundles carry an independent signing time, a holder of a
superseded or retired (not compromised) key can back-date into its old
window. Only key-compromise is a hard boundary.
Reference implementation¶
@crawcus/verifier exports bootstrapTrustAnchors,
updateTrustAnchors, loadTrustAnchors (store → local candidates →
remote → expiry, with a pluggable TrustAnchorsStore, in-memory by
default, and injected fetch), trustPolicyFromAnchors, keyIdFor,
and signTrustAnchors with a pluggable AnchorSigner. Signers backed
by hardware or cloud key custody implement AnchorSigner outside this
repository.
Tooling: tools/anchors/{keygen,sign,verify} and
tools/anchors/anchors.mjs check|placeholder. Local key files are for
TEST keys only.
Conformance vectors: packages/tck/vectors/trust-anchors/.