Expand description
Portable passport verification (Phase 20.1).
This module is the “the WASM-compiled kernel verifies the passport” half of the Phase 20.1 acceptance. It is pure compute over a minimal portable passport envelope: given bytes on the wire, a trusted authority key set, and a clock, it answers “is this envelope signed by a trusted authority, well-formed, and currently inside its validity window?”.
§Scope (what this module does NOT do)
The native chio-credentials crate owns the full passport format
(embedded reputation credentials, merkle roots, enterprise identity
provenance, issuer-chain validation, cross-issuer portfolios,
lifecycle resolution). None of that lives in chio-kernel-core:
chio-credentials pulls std, chrono, and chio-reputation, which
would break the no_std + alloc posture of this crate.
What passport_verify offers instead is the thin trust primitive the
portable kernel actually needs at runtime: a signed wire envelope
that a browser / mobile / edge adapter can verify offline with the
same cryptographic path the native sidecar uses. The envelope wraps
an arbitrary JSON payload, so adapters can attach whatever passport
shape they want and still reuse the same pure-compute verify.
§no_std status
This module imports only chio_core_types::crypto::PublicKey /
Signature / canonical_json_bytes and the kernel-core
Clock trait. It contains zero std::*
imports. It participates in the same scripted portability proof as the
rest of chio-kernel-core: host plus wasm32-unknown-unknown builds with
--no-default-features via scripts/check-portable-kernel.sh.
Structs§
- Portable
Passport Body - Body of a portable passport envelope.
- Portable
Passport Envelope - Signed portable passport envelope.
- Verified
Passport - The subset of a verified portable passport that callers actually
need downstream. Mirrors
crate::VerifiedCapabilityin shape.
Enums§
- Verify
Error - Errors raised by
verify_passport.
Constants§
- PORTABLE_
PASSPORT_ SCHEMA - Schema tag for the portable passport envelope. Versioned so future envelope shapes can evolve without breaking older verifiers.
Functions§
- verify_
parsed_ passport - Verify an already-parsed portable passport envelope. Useful for adapters that materialize the envelope from a non-JSON transport (CBOR, protobuf, etc.) before handing it to the kernel core.
- verify_
passport - Verify a portable passport envelope.