Skip to main content
Keystone Enabled A receipt or audit chain tells an auditor what was decided. It does not, on its own, tell them under which ruleset that decision was made — and if the issuer quietly rotates its policy, an old record gives no signal that the rules changed underneath it. Policy Binding closes that gap. It binds a content hash of the policy snapshot to an existing, frozen reference (a settlement-action binding_ref, or a retention_chain_ref) so the bound record becomes version-provable (you can prove exactly which policy was in force) and rotation-detectable (a record sealed under policy P fails recomputation under a rotated policy P'). It is strictly additive over the frozen Layer 1. It introduces no new cryptographic primitive and changes nothing in the canonicalisation substrate — it composes the same RFC 8785 JCS + SHA-256 already in use.
Apache-2.0 open source. Install via pip install algovoi-policy-binding. Python and TypeScript are byte-for-byte identical on the same input. Adopters who pin and verify against the canonical vectors qualify for a free v0 licence key for the mandate auditor — see Adopters below.

How it works

Two references, both computed with RFC 8785 JCS canonicalisation and SHA-256:
  • policy_ref is the content hash of the policy/ruleset/mandate snapshot itself. Because the policy is JCS-canonicalised first, key order in the policy document does not affect the result.
  • policy_bound_ref binds that policy hash to a subject_ref — the frozen reference of the thing the policy governed. The construction is version-agnostic: the subject_ref is imported by hash, so the same construction binds a policy to a settlement-action binding_ref (v1) or to a retention_chain_ref (v0 or v1) without any change.
Because subject_ref is imported by hash, Policy Binding does not need to know — and is not coupled to — the internal shape of whatever it binds. The subject can evolve independently; the binding stays valid as long as the subject hash is unchanged.

What an auditor can verify

No issuer call. No registry lookup. No AlgoVoi service. RFC 8785 JCS, SHA-256, and a JSON parser are the entire dependency.

Invariants

The construction holds five invariants, each backed by a conformance check:

Conformance vectors

policy_binding_v114 checks across three subject types and both rotation directions. Cross-validated Python + TypeScript, byte-for-byte. Subjects (the published canonical references from the conformance corpus): Policy references: Bound references (policy_bound_ref), six positives — every subject under both P and P': Plus three negative rotation cases (one per subject: sealed under P, must reject under P') and two invariant assertions (key-order-invariance, subject-binding).

Adopters

If you build on algovoi-policy-binding and verify against the canonical vectors, you qualify for a free v0 licence key for algovoi-mandate-auditor — AlgoVoi’s production-grade MiCA/DORA compliance audit service for payment mandate charge chains. Qualification criteria (enforced by scripts/check_v0_adoption.py):
  1. algovoi-policy-binding declared as a dependency, pinned to a specific version (==0.1.0) — a bare version range is rejected
  2. At least one canonical vector hash from policy_binding_v1 in your conformance tests
  3. A NOTICE file preserving the Apache-2.0 attribution
To apply: email [email protected] with your dependency file, a snippet showing the canonical hash in your test suite, and a copy of your NOTICE file. If all criteria are met, a v0 key is issued within one business day.

Relationship to the open substrate

Policy Binding sits directly on top of the open JCS Canonicalisation Substrate and composes with the Retention Chain and settlement-action binding. It uses the same RFC 8785 JCS and SHA-256 primitives — no additional cryptographic dependencies.
It enables the security; it is realized only when a verifier or gate rejects on a policy_bound_ref mismatch — that is a runtime posture decision, not a property of the substrate itself. Also available natively in the commercial Substrate 2 (substrate2.policy_binding), carried to adopters through the existing pin-and-licence channel.

Specification

The normative specification is IETF Internet-Draft draft-hopley-x402-retention-chain-05 (AlgoVoi, sole authorship, 19 June 2026), which adds:
  • Section 7.7 — Policy Binding: the policy_ref / policy_bound_ref construction and its invariants (Stability, Snapshot-binding, Rotation-detection, Subject-binding, Key-order-invariance)
  • Section 8.10 — Policy Binding Vectors: the exact preimage inputs, JCS canonical forms, and expected byte sequences for policy_binding_v1