Conformance Test Vectors
Test vectors for validating your AGA implementation. Use these to verify canonicalization, signature generation, chain validation, and tamper detection.
Warning: Test keys and vectors are for conformance testing only. Never use test keys in production. Generate fresh keypairs for real deployments.
TV-JCS-001: Canonicalization
Verify JCS (RFC 8785) canonicalization produces deterministic output.
{
"artifact_id": "art_01HXYZTEST0000000000000001",
"measurement_id": "m_0001",
"measurement_time": 1735600000,
"run_id": "run_01HXYZTEST0000000000000001",
"sequence_number": 1,
"stream_id": "pressure_psi",
"value": 42
}uM22uzzEnt39f1ZO14U_gZ7C7mGvCW87JPKCvgRGe-QKeys must be sorted lexicographically. No whitespace. Numbers without quotes.
TV-SIG-001: Ed25519 Signature
Verify Ed25519 signature generation and verification.
Test Keys (FOR TESTING ONLY - NEVER USE IN PRODUCTION):
────────────────────────────────────────────────────
Public Key: lKRKF0qyRCAgAy20lqWwTunJjnb8Id7ijIHcoXaWmrg
Private Key: S38UdZHLAVZYYoGvjvmF1gp-L2Yo6KDXAPukOiLMMx0
Key ID: 36ee3280c62ed537
Message (canonical bytes of TV-JCS-001 input):
{"artifact_id":"art_01HXYZTEST0000000000000001","measurement_id":"m_0001","measurement_time":1735600000,"run_id":"run_01HXYZTEST0000000000000001","sequence_number":1,"stream_id":"pressure_psi","value":42}uqon4tfDmyfYaM9txEyQAHlHPRQVc3Qrw22_0PnFpuEAlrDA8kwnOh4eNa76SdA0d9099mbRh8WRKB0uJurjCgSignature is over canonical JSON bytes, not the hash. Use base64url encoding.
TV-CHAIN-001: Receipt Chaining
Verify receipt hash chain continuity.
Receipt #1 (Genesis):
{
"sequence_number": 1,
"chain": {
"prev_receipt_hash": "0000000000000000000000000000000000000000000000000000000000000000",
"this_receipt_hash": "sha256:a1b2c3d4..."
}
}
Receipt #2:
{
"sequence_number": 2,
"chain": {
"prev_receipt_hash": "sha256:a1b2c3d4...", // Must match receipt #1 this_receipt_hash
"this_receipt_hash": "sha256:e5f6g7h8..."
}
}Chain is valid when each prev_receipt_hash equals the previous receipt's this_receipt_hashGenesis receipt has prev_receipt_hash of 64 zeros. Counter must be monotonically increasing.
TV-KEYID-001: Key ID Derivation
Verify key_id is derived correctly from public key.
Public Key (base64url): lKRKF0qyRCAgAy20lqWwTunJjnb8Id7ijIHcoXaWmrg Derivation: 1. Decode public key from base64url to bytes 2. SHA-256 hash the raw bytes 3. Take first 8 bytes (16 hex characters)
36ee3280c62ed537Key ID is lowercase hex. Used for key lookup without exposing full public key.
TV-TAMPER-001: Tamper Detection
Verify single-byte modification is detected.
Original receipt JSON:
{"sequence_number":1,"value":42}
Modified receipt JSON (change 42 to 43):
{"sequence_number":1,"value":43}RECEIPT_SIGNATURE_INVALID or RECEIPT_HASH_MISMATCHAny modification must cause verification failure. Verifier must identify which receipt failed.
Running Conformance Suite
# Download conformance test runner curl -LO https://attestedintelligence.com/downloads/conformance-tests.zip unzip conformance-tests.zip # Run all tests node run-conformance.js # Expected output: # ✓ TV-JCS-001: Canonicalization PASS # ✓ TV-SIG-001: Ed25519 Signature PASS # ✓ TV-CHAIN-001: Receipt Chaining PASS # ✓ TV-KEYID-001: Key ID Derivation PASS # ✓ TV-TAMPER-001: Tamper Detection PASS # ═══════════════════════════════════════ # All 5 tests passed