Reference material

Conformance test vectors

Based on KNOBE Protocol v1.0 Nine files For verifier implementers

Nine files for verifying a KNOBE v1 implementation against the normative specification. Run each file through your verifier and compare the result to the expected outcome below.

Reference verifier: lens.py (python3 lens.py <file>). An implementation that reproduces all nine expected results is canonically compatible with KNOBE Protocol v1. A further ten adversarial hardening vectors exercise hostile input beyond the conformance bar.

Conformance test vectors and their expected outcomes
File Expected outcome What it tests
full-valid.knobe.md verified · body_verified yes · conformance valid Complete, fully populated valid KNOBE
minimal-valid.knobe.md verified · body_verified omitted · conformance valid Minimum required fields only; no body_hash
unicode-valid.knobe.md verified · body_verified yes · conformance valid Unicode content in body and payload; verifier must apply NFC normalization to the payload before hashing
multi-block.knobe.md verified · body_verified omitted · conformance warnings Multiple BEGIN KNOBE B64 blocks present; verifier must use the last block and surface a warning
omitted-body-hash.knobe.md verified · body_verified omitted · conformance valid Payload verifies; no body_hash field, so body verification is intentionally skipped
numeric-violation.knobe.md verified · body_verified yes · conformance invalid Hashes intact; a numeric field violates a conformance rule, so the verifier must flag conformance as invalid while still reporting verified
body-modified.knobe.md verified-body-modified · body_verified modified · conformance valid Payload hash intact; body text altered after sealing, so the verifier reports a distinct body-modified status
payload-modified.knobe.md failed · conformance valid Payload JSON altered after sealing; payload hash mismatch, so the verifier must report failed
unreadable.knobe.md unreadable · conformance invalid Malformed Base64 block; verifier must report unreadable without crashing