Skip to content

Phatfella/AIEP-VECTORS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIEP-VECTORS

Validate Vectors

Canonical conformance test vector corpus for the AIEP GENOME SDK (Phatfella/AIEP-GENOME-SDK).


What is this?

AIEP-VECTORS contains the reference test vectors for the AIEP canonical hash protocol. Any implementation — in any language — that claims AIEP conformance must pass all vectors in this corpus against the exact kernel version pinned in GENOME_LOCKFILE.json.

This is hash-pinned conformance, not just version-string conformance. A passing claim is:

"My implementation produces identical outputs to AIEP kernel SHA-256: 6b0dbd8ed4..."


Repo structure

GENOME_LOCKFILE.json          ← repo-level kernel pin (kernel_bundle_hash)
LICENSE                       ← Apache 2.0
vectors/
  schema/
    vector.schema.json        ← JSON Schema Draft-07 for all vector files
  v1.0.0/
    MANIFEST.json             ← index of all 31 vectors across 7 suites
    01-deterministic-replay/  ← 3 vectors: concat_hash replay determinism
    02-tamper-detection/      ← 2 vectors: pack_hash tamper detection
    03-negative-proof/        ← 2 vectors: NegativeProofRecord hashing
    04-admissibility/         ← 3 vectors: evidence admissibility gate
    05-number-normalisation/  ← 8 vectors: R5 float serialisation (P270)
    06-malformed-input/       ← 6 vectors: rejection of non-finite/minus-zero inputs

How to run

Clone AIEP-GENOME-SDK and install it:

git clone https://github.com/Phatfella/AIEP-GENOME-SDK
cd AIEP-GENOME-SDK
pip install -e .

Then from this repo:

aiep-verify --self-test
aiep-verify --vectors vectors/v1.0.0/

Manual validation (no install required)

Run the canonical kernel directly:

import sys, json, hashlib, pathlib
sys.path.insert(0, "/path/to/AIEP-GENOME-SDK/src")
from aiep_genome.kernel.canon import canonical_json, concat_hash

# Load a vector
vector = json.loads(pathlib.Path("vectors/v1.0.0/01-deterministic-replay/case-001.json").read_text())
# Run your implementation and compare output to vector["expected"]["pack_hash"]

Schema validation

pip install jsonschema
python -c "
import json, jsonschema, pathlib, glob

schema = json.loads(pathlib.Path('vectors/schema/vector.schema.json').read_text())
for f in sorted(glob.glob('vectors/v1.0.0/**/*.json', recursive=True)):
    if 'MANIFEST' not in f:
        v = json.loads(pathlib.Path(f).read_text())
        jsonschema.validate(v, schema)
        print(f'OK  {f}')
print('All vectors valid.')
"

Conformance claim

To make a valid conformance claim:

  1. Pin check — verify SHA-256(your kernel/canon/canon.py) equals kernel_bundle_hash in GENOME_LOCKFILE.json
  2. Vector execution — for each vector in vectors/v1.0.0/, run the named primitive with the inputs and assert the output matches expected
  3. Suite completeness — all 24 vectors across all 6 suites must pass
  4. Record — store the kernel_bundle_hash alongside your conformance claim as evidence

Suites

Suite Vectors What it tests
deterministic-replay 3 Identical inputs → identical pack_hash across time and platform
tamper-detection 2 Modifying any ledger field changes pack_hash detectably
negative-proof 2 NegativeProofRecord hashing is deterministic and composable
admissibility 3 Evidence admissibility gate (fail-closed, dissent-blocked, pass)
number-normalisation 8 R5 fixed-point float serialisation — no scientific notation (P270)
malformed-input 6 Rejection vectors: NaN, ±Inf, −0 must raise; prototype key safety proof

Kernel pin

{
  "LOCKFILE_VERSION": "1.0.3",
  "kernel_bundle_hash": "6b0dbd8ed431357403286a2a12badd336cbd88c161c1eaf3fa5ca48d44882aec",
  "vector_pack_version": "1.0.0",
  "total_vectors": 24
}

Vectors were generated against AIEP GENOME SDK commit f6b10cc, KERNEL_VERSION 1.0.3.


Licence

Apache 2.0 — see LICENSE.

Copyright 2026 Phatfella Limited. All rights reserved.

About

Canonical test vectors for the AIEP protocol — deterministic verification inputs, expected outputs, and SHA-256 integrity manifest.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors