Skip to main content

Module presentation

Module presentation 

Source
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::present challenge 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 with PresentationVerdict::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 injected now. 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 surfaces PresentationVerdict::Expired once now passes not_after.

Structs§

PresentationEnvelope
A minimal presentation envelope: the subject’s proof of current control of a.i.

Enums§

PresentationBinding
The presentation binding mode carried in a PresentationEnvelope.
PresentationVerdict
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.