/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
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-sorted, canonical-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-nested, canonical-JSON recurses through nested objects + arrays. Arrays preserve order (positional); objects inside arrays are still key-sorted.vector-3-hmac-base-entry, HMAC-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-differs, Mutating 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-idempotent, Re-signing the same entry with the same secret produces the same HMAC. Determinism check.vector-6-nested-input-base, Entry with deeply-nested input. Used to validate that recursive canonicalization works inside arrays of objects.vector-6-mutated-nested, Same 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:
- Library:
apps/landing/src/lib/audit.ts - Conformance tests:
apps/landing/test/rfc-004-vectors.test.ts - Repo: github.com/ar-agents/ar-agents
How to claim conformance
- Fetch the JSON file:
curl -sL https://ar-agents.ar/test-vectors/rfc-004-v1.json - Run every vector through your library. Compare
expectedCanonical+expectedHmacbyte-for-byte. - All 7 vectors must match exactly.
mustDifferFrom+mustEqualcross-checks must also hold. - 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
| Library | Language | Version | RFC-004 v1 |
|---|---|---|---|
apps/landing/src/lib/audit | TypeScript | (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
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.jsonappears. 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.