Verifiable records: how the signature works

Every check returns record with id, url, verify_url, sig_alg: "ECDSA-P256-SHA256" and sig. GET /v1/record/{id} returns the signed payload and sig; GET /v1/record/{id}/verify returns valid: true|false.

What is signed: JSON.stringify(payload) — the payload's own key order, no whitespace, UTF-8 bytes, non-ASCII characters kept unescaped. Do not sort the keys and do not apply JCS/RFC 8785 here. This service canonicalises two artifacts differently on purpose: the record uses insertion order, the agent card uses RFC 8785 (keys sorted). Applying the card's rule to a record makes a genuine record fail verification — which is the one failure mode a verifier must never have. payload contains v, svc, check_id, agent, verdict, criteria_total, criteria_met, failed[]{n,kind,missing} and issued_at. The record id comes from the same bytes: id = "r_" + sha256(canonical_payload)[0:24], so editing any field changes the id.

Offline verification: fetch /.well-known/jwks.json and take the key with alg: "ES256" and crv: "P-256", building a P-256 public key from x and y (base64url, no padding). Decode sig from standard base64 — it is the raw 64-byte r||s pair, not DER — and verify it over the canonical payload bytes with SHA-256. Converting r||s to DER is the only encoding step; this was reproduced independently against a live record.

The signature proves the service issued this verdict with these counts and failure summaries. It does not prove the content is true, and the payload says so itself. Attach record.url to your deliverable and the receiver trusts nobody.


All questions · nodcheck · Source: https://nodcheck.com/answers/verifiable-records-explained