Skip to main content

Module verifiable_credential

Module verifiable_credential 

Source
Expand description

Verifiable Credentials — native issue / verify core (#19).

A credential = an ISSUER (an agent), a SUBJECT (an agent), a set of claim quins, and a validity window, sealed with an Ed25519 signature over a canonical SHA-256 digest of those fields. This is the NATIVE proof (fast, fits the engine); a W3C JSON-LD Data Integrity export is future work, and the lineage is the W3C Verifiable Claims WG.

Two principles are enforced here:

  • Verification authenticates ORIGIN, not TRUTH (principle-identifiers-not-identity): a valid signature proves who said it, not that the claim is true. A verified VC still enters the frame-relative machinery; it is never auto-promoted to fact.
  • Grounded issuers (agency.n3 G1’, via agent.rs): a credential whose issuer is an ArtificialAgent with no Principal is rejected by verify_grounded — an AI agent cannot issue free-floating credentials with no human accountable behind it.

Structs§

Credential
A credential: who attests, about whom, what, and for how long.

Enums§

VcError

Functions§

decode_credential
Deserialize a Credential from binary format.
encode_credential
Serialize a Credential to binary format.
issue
Issue: seal the credential with the issuer’s Ed25519 signing key.
verify
Verify the signature + expiry. Authenticates the claim’s ORIGIN (who issued it) and that it has not lapsed — NOT that the claim is true.
verify_grounded
Verify as verify, and additionally reject the credential if its issuer is an ungrounded artificial agent in index (agency.n3 G1’ — no human Principal behind it).