Overview

AIOSchema conformance is verified through two independent test suites:

  1. Unit test vectors (TV-01 through TV-18) – validate individual operations
  2. Cross-verification vectors (CV-01 through CV-14) – validate deterministic output across implementations

An implementation is conformant when it passes all 18 unit test vectors and all 14 cross-verification vectors for its target compliance level.

Compliance Levels

Level Requirements Key Dependency
Level 1 – Core Core Block fields + core_fingerprint computation, canonical JSON, timestamp validation None
Level 2 – Signed Level 1 + Ed25519 signature, creator_id validation Ed25519 key pair
Level 3 – Anchored Level 2 + anchor reference parsing, anchor verification Anchor service

Level 1 is valid today, in ten years, and in fifty years – with no server, no key, no infrastructure dependency. The hash is the proof.

Note: core_fingerprint is a derived value computed from the five Core Block fields. It is not itself a Core Block field – it is the integrity seal over them.

Bootstrap Rule

core_fingerprint is computed over exactly these five fields:

CORE_HASH_FIELDS = [
  "asset_id",
  "schema_version",
  "creation_timestamp",
  "hash_original",
  "creator_id"
]

core_fingerprint is deliberately excluded from this set. An implementation that includes core_fingerprint in its own computation will produce incorrect results and fail conformance. All five reference implementations verify this rule explicitly.

Test Vectors

TV-01 through TV-12 cover the v0.4 baseline. TV-13 through TV-18 cover v0.5 additions. All 18 vectors are required for full v0.5.5 conformance.

TV-01 – TV-12 (v0.4 baseline)

ID Description
TV-01 Valid generate + verify round-trip (hard match)
TV-02 Tampered hash_original must fail
TV-03 Tampered core_fingerprint must fail
TV-04 Soft match within pHash threshold
TV-05 Soft match outside threshold must fail
TV-06 Signature present and valid
TV-07 Signature with wrong public key must fail
TV-08 Unsigned manifest (null signature) passes
TV-09 Missing required fields must fail
TV-10 Invalid timestamp format rejected
TV-11 Non-UTC timestamp (+HH:MM offset) rejected
TV-12 Unknown schema_version rejected

TV-13 – TV-18 (v0.5 additions)

ID Description
TV-13 Multi-hash manifest (SHA-256 + SHA-384)
TV-14 manifest_signature present and valid
TV-15 manifest_signature fails when extensions tampered
TV-16 SHA-384 single-hash manifest
TV-17 Anchor verified via AnchorResolver
TV-18 anchor_reference present, verify_anchor=false – warning not failure

TV-19 (key rotation – implementation extension)

TV-19 covers key rotation via previous_version_anchor chaining. It is implemented in the Node.js and TypeScript suites as an extension beyond the v0.5.5 conformance requirement. It will be canonicalized in v0.5.6.

Cross-Verification Vectors

The cross_verify_vectors.json file contains 14 deterministic vectors, 26 total checks. All conformant implementations must produce byte-identical results for every vector.

ID Description Expected output
CV-01 SHA-256 of "The quick brown fox..." sha256-d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592
CV-02 SHA-384 of "The quick brown fox..." sha384-ca737f1014a48f4c0b6dd43cb177b0afd9e5169367544c494011e3317dbf9a509cb1e5dc1e85a941bbee3d7f2afbc9b1
CV-03 SHA-256 of empty bytes sha256-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
CV-04 SHA-256 of bytes 0x00–0xFF See vectors.json
CV-05 Canonical JSON of known object Compact, sorted keys, no whitespace
CV-06 core_fingerprint of known core fields See vectors.json
CV-07 Deterministic manifest verification (fixed inputs) success: true, match_type: "hard"
CV-08 Tampered hash_original – fail success: false
CV-09 Tampered core_fingerprint – fail success: false
CV-10 hash_schema_block alias accepted success: true
CV-11 Multi-hash array verification success: true
CV-12 Unsupported schema_version – fail success: false
CV-13 Missing required field (creator_id) – fail success: false
CV-14 Invalid timestamp format – fail success: false

Test Suite Summary

Implementation Tests CV Vectors Status
Python 3.9+ 108 14 / 14 ✓ All passing
TypeScript 70 + 12 XC 14 / 14 ✓ All passing
Node.js 18+ 80 14 / 14 ✓ All passing
Go 1.21+ 27 14 / 14 ✓ All passing
Rust 2021 30 14 / 14 ✓ All passing

Cross-verification runs 14 vectors across 26 total checks. Node.js includes TV-19 (key rotation, 5 sub-tests) beyond the v0.5.5 conformance bar.

Conformance Registry

Implementation Level 1 Level 2 Level 3 Notes
Python 3.9+ ✓ Pass ✓ Pass ✓ Pass 108 tests, TV-01–TV-18
TypeScript ✓ Pass ✓ Pass ✓ Pass 70 tests + 12 XC, TV-01–TV-18
Node.js 18+ ✓ Pass ✓ Pass ✓ Pass 80 tests, TV-01–TV-18 + TV-19 extension
Go 1.21+ ✓ Pass ✓ Pass ✓ Pass 27 tests, TV-01–TV-18
Rust 2021 ✓ Pass ✓ Pass ✓ Pass 30 tests, TV-01–TV-18

Reference implementations are available at github.com/aioschema/aioschema.


View reference implementations →