Skip to content

/test-vectors · conformance · index

Conformance test vectors.

Deterministic JSON files any library author can fetch + run against their implementation. Versioned + frozen per spec revision so legislation referencing a vector set has a stable target. Each vector is reproducible: given the same inputs, every conformant implementation must produce the same outputs byte-for-byte.

RFC-004 v1 · sociedad-IA operational-log

Spec: /rfcs/004 · Status: draft · Published: 2026-05-11 · Vectors: 7

Download

/test-vectors/rfc-004-v1.json

Application/json · CC-BY-4.0 · frozen at v1 publication

Conformance vectors for RFC-004 v1 (draft). A library claiming RFC-004 v1 conformance MUST produce these exact outputs given these exact inputs and the shared secret below. The HMAC values are hex-encoded SHA-256 outputs prefixed with 'sha256:'. Vectors are deterministic + reproducible — re-run the reference impl against this file and every assertion holds. License: CC-BY-4.0.

Vectors index

  • vector-1-canonical-keys-sortedcanonical-JSON serializes objects with keys sorted lexicographically at every level. JSON.stringify on its own is NOT canonical in JavaScript — key order follows insertion order, which differs across runtimes + reconstructions.
  • vector-2-canonical-nestedcanonical-JSON recurses through nested objects + arrays. Arrays preserve order (positional); objects inside arrays are still key-sorted.
  • vector-3-hmac-base-entryHMAC-SHA256 of the canonical-JSON of an entry, with the hmac field stripped before signing. Verify must operate on the same field set.
  • vector-4-mutated-output-differsMutating any field (here: output.pong from 1 to 2) produces a different HMAC. This is the integrity guarantee of the chain.
  • vector-5-sign-is-idempotentRe-signing the same entry with the same secret produces the same HMAC. Determinism check.
  • vector-6-nested-input-baseEntry with deeply-nested input. Used to validate that recursive canonicalization works inside arrays of objects.
  • vector-6-mutated-nestedSame entry as vector-6 but with batch[1].amount changed from 200 to 201. The deeply-nested mutation MUST produce a different HMAC.

Reference implementation

The TypeScript reference impl + its conformance proof live in the same repo:

How to claim conformance

  1. Fetch the JSON file: curl -sL https://ar-agents.vercel.app/test-vectors/rfc-004-v1.json
  2. Run every vector through your library. Compare expectedCanonical + expectedHmac byte-for-byte.
  3. All 7 vectors must match exactly. mustDifferFrom + mustEqual cross-checks must also hold.
  4. Open a PR to github.com/ar-agents/ar-agents adding your library to the conformance registry with a link to your passing test suite.

Conformance registry

LibraryLanguageVersionRFC-004 v1
apps/landing/src/lib/auditTypeScript(reference)✓ passing (7/7)
(your library here)open a PR

RFC-005 v1 · Ed25519 asymmetric extension

Spec: /rfcs/005 · Status: draft · Published: 2026-05-11 · Vectors: 3

Download

/test-vectors/rfc-005-v1.json

Application/json · CC-BY-4.0 · includes a demo Ed25519 keypair (DO NOT use in prod)

3 deterministic vectors with base64url-exact Ed25519 signatures. Cross-validated against Node's native crypto.sign(null, msg, privateKey). Conformance proof at apps/landing/test/rfc-005-vectors.test.ts (7 vitest tests, all passing).

The same keypair is published in production at /.well-known/sociedad-ia/keys (public key only). RFC-005 § 4 specifies the publication format.

Versioning policy

  • Spec version = vectors version. When RFC-004 publishes v2, a parallel rfc-004-v2.json appears. v1 stays frozen so legislation citing v1 remains stable.
  • v1 finalization checkpoint. Vectors marked draft may change one more time before v1 final. After that, the hex values are locked.
  • License. CC-BY-4.0 on the vectors + MIT on the reference impl. Use anywhere; attribute the spec.