Expand description
Holder-binding + presentation verification — credentials are not bearer tokens (Epic F.8).
An issuer-signature-only ACDC that anyone who possesses it can present as
authority is a bearer token — the red flag this project bans. Authority
derived from a credential is honored only on proof of current control of the
subject AID (a.i), established by replaying the subject’s KEL and checking a
fresh presentation signature against the signing-time key. A possessed-but-
unbound ACDC grants nothing.
verify_presentation is pure and WASM-safe: no git, no network, no clock of its
own (the verification time is injected). It chains F.5’s [verify_credential] so a
revoked/invalid credential never binds, then enforces the holder proof.
§Replay model
The signed message is always (credential-SAID || audience || nonce). Two binding
modes select how the nonce is judged:
- Interactive challenge-response (the v1 default): the verifier issues a fresh
random nonce as its own ephemeral per-session state (see the SDK
credentials::presentchallenge session), the subject signs over it, and the verifier accepts the matching nonce exactly once. One-shot consumption is the calling session’s job — the pure verifier only confirms the presented nonce equals the challenge it is handed. A replayed/mismatched/consumed nonce is rejected withPresentationVerdict::NonceMismatchOrConsumed. This is genuine replay protection without any global seen-cache, which is what keeps it WASM-compatible. - Non-interactive TTL (
expected_challenge == None): no fresh challenge is possible, so the presentation binds to(audience, purpose, short-TTL)carried in the envelope and is judged against the injectednow. Residual (documented honestly): within the TTL window, the same presentation can be replayed to the same audience — there is no per-use nonce to consume. This is acceptable only for low-stakes / idempotent audiences; it is NOT a replacement for the challenge path where genuine single-use is required. The verdict surfacesPresentationVerdict::Expiredoncenowpassesnot_after.
Structs§
- Presentation
Envelope - A minimal presentation envelope: the subject’s proof of current control of
a.i.
Enums§
- Presentation
Binding - The presentation binding mode carried in a
PresentationEnvelope. - Presentation
Verdict - The distinguishable outcome of
verify_presentation.
Functions§
- verify_
presentation - Verify a credential presentation — F.5 credential validity AND holder-binding proof.
- verify_
presentation_ sync - Verify a credential presentation synchronously, with no executor — the WASM-safe
core behind
verify_presentation.