Definition: Conformance tests are executable checks that verify an implementation correctly follows the specification. Mechanism: Test vectors provide known input/output pairs for canonicalization, hashing, and signing. Value: Implementers can validate their code produces identical outputs. Output: PASS/FAIL for each test vector.

Conformance Suite v1.0

Conformance Tests

Test vectors and verification requirements for conformant implementations.

TV-JCS: Canonicalization

TV-JCS-001

Basic object canonicalization with sorted keys.

Input
{
  "stream_id": "pressure_psi",
  "artifact_id": "art_01HXYZTEST0000000000000001",
  "value": 42,
  "sequence_number": 1,
  "run_id": "run_01HXYZTEST0000000000000001",
  "measurement_time": 1735600000,
  "measurement_id": "m_0001"
}
Expected Canonical 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}
Expected SHA-256 (base64url)
uM22uzzEnt39f1ZO14U_gZ7C7mGvCW87JPKCvgRGe-Q

TV-JCS-002

Nested object with timestamp canonicalization.

Input
{
  "created_at": "2025-01-01T00:00:00.000Z",
  "issuer": {
    "key_id": "36ee3280c62ed537",
    "public_key": "lKRKF0qyRCAgAy20lqWwTunJjnb8Id7ijIHcoXaWmrg"
  },
  "policy_v": "1"
}
Expected Canonical Output
{"created_at":"2025-01-01T00:00:00.000Z","issuer":{"key_id":"36ee3280c62ed537","public_key":"lKRKF0qyRCAgAy20lqWwTunJjnb8Id7ijIHcoXaWmrg"},"policy_v":"1"}

TV-HASH: Hashing

TV-HASH-001

Key ID derivation from public key bytes.

Public Key (base64)
lKRKF0qyRCAgAy20lqWwTunJjnb8Id7ijIHcoXaWmrg
Expected key_id
36ee3280c62ed537

TV-HASH-002

Policy ID computation (hash of canonical policy without signature).

Input (canonical, without signature/policy_id)
{"created_at":"2025-01-01T00:00:00.000Z","drift_rules":{"mode":"STRICT_HASH_MATCH"},"issuer":{"key_id":"36ee3280c62ed537","public_key":"lKRKF0qyRCAgAy20lqWwTunJjnb8Id7ijIHcoXaWmrg"},"policy_v":"1","policy_version":"v1.0.0"}
Expected policy_id (hex)
a3b8f2e1d4c5a6b7890123456789abcdef0123456789abcdef0123456789abcd

TV-SIG: Signing

Warning: The private key below is for TEST PURPOSES ONLY. Never use test keys in production.

TV-SIG-001

Ed25519 signature verification.

Test Public Key (base64)
lKRKF0qyRCAgAy20lqWwTunJjnb8Id7ijIHcoXaWmrg
Test Private Key (base64) - TEST ONLY
S38UdZHLAVZYYoGvjvmF1gp-L2Yo6KDXAPukOiLMMx0
Message (canonical bytes)
{"artifact_id":"art_01HXYZTEST0000000000000001","measurement_id":"m_0001","measurement_time":1735600000,"run_id":"run_01HXYZTEST0000000000000001","sequence_number":1,"stream_id":"pressure_psi","value":42}
Expected Signature (base64)
uqon4tfDmyfYaM9txEyQAHlHPRQVc3Qrw22_0PnFpuEAlrDA8kwnOh4eNa76SdA0d9099mbRh8WRKB0uJurjCg

TV-CHAIN: Chain Continuity

TV-CHAIN-001

Genesis receipt (first in chain).

counter1
prev_receipt_hash0000000000000000000000000000000000000000000000000000000000000000
RequirementMUST use 64 zeros for genesis

TV-CHAIN-002

Subsequent receipt linking.

Receipt N this_receipt_hashabc123...
Receipt N+1 prev_receipt_hashabc123... (MUST match)
Receipt N+1 counterMUST be N.counter + 1

TV-VER: Verifier Conformance

A conformant verifier MUST detect and report the following error conditions:

Error CodeConditionVerdict
BUNDLE_CHECKSUM_MISMATCHFile checksum != manifestFAIL
POLICY_ID_MISMATCHRecomputed policy_id differsFAIL
POLICY_SIGNATURE_INVALIDPolicy signature verification failsFAIL
RECEIPT_SCHEMA_INVALIDReceipt missing required fieldsFAIL
RECEIPT_ID_MISMATCHRecomputed receipt_id differsFAIL
RECEIPT_HASH_MISMATCHthis_receipt_hash incorrectFAIL
RECEIPT_SIGNATURE_INVALIDReceipt signature verification failsFAIL
COUNTER_GAPCounter not monotonically increasingFAIL
CHAIN_PREV_HASH_MISMATCHprev_receipt_hash != prior this_receipt_hashFAIL
CHAIN_HEAD_MISMATCHchain_head.hash != last receipt hashFAIL
POLICY_MISMATCHReceipt references different policy_idFAIL
REQUIRED_EVENT_MISSINGRequired event_type not foundFAIL

Download Test Vectors

Complete test vector suite for implementation validation.