Human Seal

Conformance

The conformance suite

A standard is only a standard if two independent implementations agree. This page fixes the exact rules and gives you the test vectors, a standalone verifier and a JavaScript verifier that all give the same answers.

The canonical form (v0.1)

What is signed is the receipt core: every field except signature_ed25519 and public_key, serialized in one exact way so any language reproduces the same bytes.

This equals Python's json.dumps(obj, sort_keys=True, separators=(",", ":"), ensure_ascii=True), which is what the reference issuer uses.

Relationship to RFC 8785 (JCS) and the IETF work. The emerging IETF signed-action-receipt draft canonicalizes with RFC 8785. That differs from the form above in string escaping (JCS does not escape non-ASCII) and in number formatting. For data that is ASCII-only with integer numbers, the two produce identical bytes. Aligning a future version with RFC 8785 is a proposal, not a decision, and would be versioned so v0.1 receipts stay verifiable.

Test vectors

11 vectors generated from the reference issuer. A conforming verifier reproduces every outcome. Download test-vectors.json.

VectorWhat it testsExpected
valid_asciiA plain valid Seal binding an ASCII action.valid
valid_non_asciiAccents and an emoji in the action: the verifier must escape them exactly as the reference does.valid
valid_integral_floatAn integral float (100.0): the verifier must keep the number exactly as written.valid
valid_with_oversightA Level 2 Seal carrying the signed oversight evidence object.valid
valid_refusalA refusal is also a valid, signed decision.valid
tampered_decisionThe decision was changed after signing.must FAIL
tampered_approverThe approver was changed after signing.must FAIL
tampered_oversightA forged fast decision time inside the signed oversight evidence.must FAIL
swapped_actionThe signature is valid but the action presented is not the one that was approved.must FAIL
unsignedNo signature present.must FAIL
wrong_keyThe signature was made by a different key than the one the receipt names.must FAIL

Run them

node run-vectors.js test-vectors.json
# needs hs-verify.js beside it (or in ../assets)

pip install cryptography
python3 hs_verify.py --vectors test-vectors.json

Or open the browser verifier and pick any vector from the dropdown to watch a tampered or swapped Seal fail.

What conformance means at each level

Changelog