Using Lispex Vouch

Follow one safe path from reviewed source and input through policy, issuance, authentication, exact request binding, Native re-execution, and a local decision match.

Before you start

The running example is a refund-window rule. Prepare these independently — none of them may come from the artifact you are about to verify:

  • the reviewed rule as refund-window.lspx.png or refund-window.lspx;
  • the exact checked input file INPUT;
  • an Ed25519 public key issuer.spki.der and an absolute local PKCS#8 key URI;
  • the reviewed digest of the exact Native executable; and
  • new paths for POLICY, OUTPUT, and each report.

The trust policy belongs to the consumer. Do not derive trust from the bundle you are about to verify.

The six-stage path

Each stage answers one question and hands its result to the next. Success at one stage never implies the next.

StageMain commandWhat a success establishesSurface
1. Describe trustvouch policy create, then policy checkone exact canonical configuration for the reviewed key, engine, and source identitiesNative or npm
2. Issuevouch issue --emit-bundlea Native-signed exact source/input/profile context, packed into one bounded transport bundleNative only
3. Authenticatevouch verify --bundle ...the bundle's own signed context satisfies the supplied policyNative or npm
4. Bind the requestadd --source-image (or --source) and --inputthe authenticated context equals the request this invocation supplied separatelyNative or npm
5. Observe current executionadd --reexecutethe current Native verifier agrees with the signed complete transcriptsNative only
6. Require one decisionvouch gate --require-decision ...this live, authenticated Native agreement matches the caller's required decisionNative only

Read the results in order

  1. A valid policy is configuration, not authentication.
  2. Verifying a bundle without pins authenticates the bundle's own context only.
  3. Pinned verification adds exact byte equality with the caller's external source and input; both files are mandatory for every authority-bearing Native step.
  4. Re-execution is a new observation by the current Native build. It is not a claim about a past run and not an independent implementation.
  5. A gate exit of 0 is one local decision match. Exit 10 means no grant. The report itself cannot be replayed as a grant.
  6. Any payment, deployment, refund, or other action remains a separate application decision with its own freshness and replay controls.

What each step establishes — and what it still lacks

OperationA success establishesStill missing or never provided
Identity commandskey-id, engine-id, source-id, and input-id print exact existing values from named bounded files through shared Rustno stdin, no inference from artifacts; no provenance, trust, input validation, authentication, evidence, or authority
Policy create/checklispex vouch policy create writes one canonical v1 policy from reviewed public inputs; policy check validates the exact canonical bytesno private key, no inferred engine, no trust derived from artifacts, no overwrite or merge; no authentication, evidence, decision grant, or browser export
Source IDlispex vouch source-id --source RULE prints the exact policy v1 value from bounded bytesno stdin, artifact extraction, or normalization; no approval, policy writing, authentication, or evidence
Trust policy v1the selected key may vouch only for source bytes on its exact allowed_source_sha256 allowlist, checked after the signature, profile, and engine checksa disallowed source fails as native-source-disallowed before any raw source mismatch is reported; the policy says nothing about inputs, requests, or freshness
Bundleone bounded transport input carrying exact envelope/source/input bytestrust, profile, and authentication remain external; transport alone establishes no authority
Inspectschema, hashes, and structural consistencyno origin authentication
Authenticatean authorized key signed the exact bound envelope contextstill needs a current execution observation
Re-executethe current Native verifier agrees with both signed complete transcriptsstill needs application authorization and policy review
Compiled artifact build/validatecanonical Core IR and verified bytecode are exactly re-derived from the separately supplied sourceno authentication, no execution, no compiler correctness outside this derivation, no authority
Compiled re-executerequest-bound authentication, current tree/Meaning agreement, and the verified Rust VM all agree with the signed complete transcriptno independent implementation equivalence, freshness, policy correctness, or external authorization
Gatelive authenticated current-Native agreement exactly matches the explicitly required decisionfreshness, replay handling, identity, policy review, and deployment controls remain the application's job
Acta separate application action outside Vouchauthorization and side-effect control belong to the application

Commands you can copy

1. Derive the exact key identity

SH
lispex vouch key-id --public-key issuer.spki.der

2. Derive the exact engine identity

SH
lispex vouch engine-id --executable /exact/path/to/lispex

3. Derive the exact source identity

SH
lispex vouch source-id --source-image refund-window.lspx.png

4. Derive the exact input identity

SH
lispex vouch input-id --input INPUT

5. Native issue and emit the bundle

SH
lispex vouch issue \
  --source-image refund-window.lspx.png --input INPUT \
  --profile csk.checked-profile/v1 \
  --key-handle pkcs8-file:///ABSOLUTE/issuer.pk8 \
  --out-dir OUTPUT --emit-bundle

6. Create policy from independently reviewed public inputs

SH
lispex vouch policy create \
  --public-key issuer.spki.der \
  --engine-sha256 sha256:<reviewed-engine-digest> \
  --source-image refund-window.lspx.png --out POLICY

7. Check the exact canonical policy bytes

SH
lispex vouch policy check --trust-policy POLICY

8. Native or npm authenticate the bundle-owned context

SH
lispex vouch verify \
  --bundle OUTPUT/vouch-input-bundle.json \
  --trust-policy POLICY --profile csk.checked-profile/v1 \
  --report-out AUTH-REPORT

9. Native or npm pin the bundle to the intended request

SH
lispex vouch verify \
  --bundle OUTPUT/vouch-input-bundle.json \
  --trust-policy POLICY --source-image refund-window.lspx.png --input INPUT \
  --profile csk.checked-profile/v1 --report-out PINNED-REPORT

10. Native bind the exact request and re-execute

SH
lispex vouch verify \
  --bundle OUTPUT/vouch-input-bundle.json \
  --trust-policy POLICY --source-image refund-window.lspx.png --input INPUT \
  --profile csk.checked-profile/v1 --reexecute \
  --report-out REEXECUTION-REPORT

11. Native local decision gate

SH
lispex vouch gate \
  --bundle OUTPUT/vouch-input-bundle.json \
  --trust-policy POLICY --source-image refund-window.lspx.png --input INPUT \
  --profile csk.checked-profile/v1 --require-decision approve \
  --report-out GATE-REPORT

12. Optionally require verified VM agreement

Build the Vouch-specific compiled container from the same exact source. Building, inspecting, and validating do not authenticate, execute, or grant anything:

SH
lispex vouch compiled build \
  --source-image refund-window.lspx.png \
  --out refund-window.lpxvca

lispex vouch compiled inspect \
  --artifact refund-window.lpxvca

lispex vouch compiled validate \
  --artifact refund-window.lpxvca \
  --source-image refund-window.lspx.png

Then opt into the compiled path without removing any earlier pin or check:

SH
lispex vouch verify \
  --bundle OUTPUT/vouch-input-bundle.json \
  --trust-policy POLICY --source-image refund-window.lspx.png --input INPUT \
  --profile csk.checked-profile/v1 --reexecute \
  --compiled-artifact refund-window.lpxvca \
  --report-out COMPILED-REEXECUTION-REPORT

lispex vouch gate \
  --bundle OUTPUT/vouch-input-bundle.json \
  --trust-policy POLICY --source-image refund-window.lspx.png --input INPUT \
  --profile csk.checked-profile/v1 --require-decision approve \
  --compiled-artifact refund-window.lpxvca \
  --report-out COMPILED-GATE-REPORT

The container must be canonical, pass the strict bytecode verifier, and match an exact source-to-Core-IR-to-bytecode derivation before any VM state is created. The current tree/Meaning execution must still agree first. A producer mutation, different source byte, VM disagreement, or required-decision mismatch fails closed; the command never retries through the source-only gate.

13. Raw compatibility with the same policy

SH
lispex vouch verify \
  --envelope OUTPUT/envelope.dsse.json \
  --trust-policy POLICY --source-image refund-window.lspx.png --input INPUT \
  --profile csk.checked-profile/v1 --report-out AUTH-REPORT

A common mistake

The gate does not execute an external action, and its report is not a transferable authorization. The calling application still owns freshness, replay handling, identity, deployment controls, and the judgment of whether requiring that decision is safe and correct.

Current boundaries

  • Policy creation accepts only the reviewed public inputs. It never accepts a private key, stdin, an envelope, bundle, receipt, or report, an inferred running engine, a network resource, or an existing policy to merge. Reviewing where the public key and engine came from — and distributing, replacing, and retiring the policy — remains the consumer's job; browser WASM and the Playground expose no policy API.
  • Identity commands read the named files only and infer nothing from artifacts. source-id and input-id are domain-separated hashes rather than ordinary SHA-256; neither decodes or normalizes text, and input-id does not parse checked-input JSON. An identity is a name for exact bytes — it establishes no provenance, approval, policy, trust, authentication, evidence, freshness, replay control, or authority.
  • A bundle is untrusted transport — not a receipt, signature, report, capability, source approval, or transferable authorization. It adds no encryption or confidentiality, and it provides no freshness, nonce enforcement, expiry, revocation, replay prevention, identity, independent witnessing, policy correctness, provenance before the supplied bytes, deployment safety, or permission for an external action.
  • Request pinning is exact byte equality and nothing else: it provides no freshness, nonce uniqueness, expiry, revocation, replay prevention, or proof of human intent, and no permission for an external action. An invalid signature or policy is rejected before any request mismatch is reported. With a bundle, --source and --input must be supplied together; a partial pair is usage exit 2 before any artifact is read.
  • A compiled artifact is deterministic integrity material derived from exact source — not a trust root, signed request, independent witness, or portable capability. Its report cannot be used as evidence input. The compiled path does not establish organizational identity, policy or rule correctness, freshness, replay prevention, compiler correctness beyond the checked derivation, or permission for an external action.

Keep going

Keep the Vouch overview nearby: it separates authentication, request binding, current execution agreement, and a local grant.

Lispex Vouch overview · Choosing a Runtime Surface