toip.tools

Concepts

Identity, messaging, credentials, governance, and proofs: what each does and how this toolkit uses it.

Each section links to its specifications. For the communities behind them and their different implementation choices, see the ecosystem guide.

Decentralized identifiers

An identifier you control, with keys others can verify.

A decentralized identifier (DID) identifies a person, organization, or device without requiring an account at a central provider. It resolves to a document containing verification keys and, depending on the method, other information. Those keys let others check signatures and establish encrypted communication.

The toolkit starts with did:key, which encodes the public key in the identifier itself. Resolution needs no network or registry. The tradeoff is a fixed key: if it is lost or compromised, you need a new identifier. This makes did:key useful for tutorials and short-lived identities.

Other approaches support key rotation. KERI, described below, records changes in a key-event history so an identifier can keep its identity as its keys change.

Two ways to make an identifier from keysTop: an Ed25519 public key, prefixed with its multicodec and encoded in base58, becomes did:key:z6Mk followed by the key. Bottom: a KERI inception event lists the current key and a digest of the next key; the digest of the whole event becomes the AID, which can be written as did:keri followed by the AID.did:keyEd25519 public key32 bytesencodedid:key:z6MkfkozPjJQsb11Szt73tYJ…KERIInception eventcurrent keydigest of next keywitnessesdigestAID EHg4MO2lkvGBo-dOX3ERUPrhqhW…
A did:key is its public key, written out. A KERI identifier (AID) is a digest of its first event, which already commits to the next key.

In this toolkit

  • Fixed-key identities. Create Ed25519 did:key identities with identityFromSeed and resolve them offline with resolveDidKey.
  • Key histories. Eventlog creates KERI identifiers as did:keri:<AID> and resolves them from their key-event logs.
Scope

Other DID methods are not supported by these resolvers.

Verifiable credentials and status lists

A claim you can carry, verify, and revoke.

A verifiable credential is a signed statement from an issuer about a subject: "Bob is a member of the Riverside Community Garden." The holder keeps it and presents it when needed. A verifier checks the signature and decides whether the issuer is an authority it accepts for that claim.

The issuer can revoke a credential by updating a signed status list. Each credential points to a bit in that list. A verifier retrieves a current copy, checks its signature, and reads the bit. One list covers many credentials, so the request does not identify which credential is being checked. Verification can happen without asking the issuer about the holder's visit.

Issuer, holder, verifier, and a status listThe garden, the issuer, signs a credential and gives it to Bob, the holder. Bob presents it to Alice, the verifier. Alice checks the garden's signature against the garden's DID, and reads the garden's signed status list, published anywhere, to see whether Bob's bit is set.Issuerthe gardenHolderBobVerifierAliceissuespresentsAlice trusts the garden's DID for this kind of claimStatus list, signed by the gardenreads bit 5
The issuer makes the claim, the holder presents it, and the verifier checks it against an issuer it trusts.

In this toolkit

  • Issue and verify. issueCredential and verifyCredential use the W3C Verifiable Credentials 2.0 shape with eddsa-jcs-2022 Data Integrity proofs.
  • Delegate authority. Mandates builds delegation chains from these credentials.
Scope

The signed StatusList format is inspired by the W3C Bitstring Status List but is not format-compatible.

The Trust Spanning Protocol

Private, authenticated messages that can travel over different transports.

The Trust Spanning Protocol (TSP) provides ToIP's messaging layer. In the Direct mode used here, a message names its sender and recipient with verifiable identifiers (VIDs), encrypts its payload with authenticated HPKE, and carries the sender's signature. The recipient checks that signature before processing the contents.

This separates message security from delivery. A relay, radio link, or portable file can carry the same protected message. The carrier can delay or drop it, but cannot read its encrypted payload or alter it without detection.

In Direct mode, which this toolkit uses, both VIDs travel in the clear, so a carrier learns who is talking to whom. The specification also defines Routed and Nested modes that provide additional metadata protection through intermediaries.

A TSP message between two agents, through a relayAlice's agent signs and seals a message and sends it through a relay to Bob's agent. The message has four parts: the sender's identifier and the receiver's identifier, both readable, the sealed payload, and the signature. The relay can read only the two identifiers, the size and the time.Alice's agentsigns, sealsRelaystores, forwardsBob's agentverifies, opensfrom: VIDto: VIDpayload, sealed (HPKE)signaturereadable by anyone carrying itonly Bob's key opens itproves Alice sent all of itThe relay learns: who to whom, when, how many bytes.
What each part of a Direct-mode TSP message reveals. The landing page shows a real one, byte for byte.

In this toolkit

  • Direct messages. Trust-core uses @openvtc/vti-tsp-js over an in-memory Bus or the WebSocket relay.
  • Radio delivery. Mesh transport carries the same messages, replacing visible identifiers with short address tags on the air.
Scope

Communication starts with a Direct message. The invitation handshake and Routed mode are not implemented here.

Trust Tasks

A shared message format for the work parties do together.

A Trust Task describes one interaction: issuing an endorsement, requesting community membership, or approving a payment. Each uses the same document envelope: an id, a specification URI as its type, an issuer, a recipient, timing fields, a payload, and a proof when required. A response uses the same type with #response appended.

Before dispatching a document to a handler, the receiver checks freshness, replay history, required proofs, and payload validity. The public registry at trusttasks.org catalogs specifications for many interactions, from community membership to voting. A specification defines an interaction; check separately whether an implementation exists.

A Trust Task document and its responseA request document has an id, a type URI, an issuer, a recipient, an issue time, a payload and a proof. The response has the same type with #response appended, a threadId pointing at the request's id, and its own proof by the responder.Requestidurn:uuid:63e64c74-…typehttps://toip.tools/spec/…/0.1issuerdid:key:z6Mkfk…recipientdid:key:z6MkoY…issuedAt2026-11-07T02:24:07Zpayload{ … }proofeddsa-jcs-2022Responsetype…/0.1#responsethreadIdthe request's idissuerthe recipientpayloadthe answer, ora signed errorproofby the responder
Every Trust Task in this toolkit is signed by its issuer, and every response by its responder, refusals included.

In this toolkit

  • Send and handle. Endpoint builds, signs, encrypts, and checks Trust Tasks using the OpenVTC libraries, then dispatches them to registered handlers.
  • Define interactions. This repository's types use the https://toip.tools/spec/ namespace. The task reference documents each one.

Trust registries and governance

Decide whose claims you accept, and under what rules.

A valid signature tells you which key signed a claim. You still need to decide whether to accept that signer as an authority. For a garden membership credential, that means knowing the garden's DID and trusting it to vouch for members.

A governance framework records those decisions: who may issue which credentials, how members join and leave, and how disputes are resolved. A trust registry makes a key question answerable by software: is this DID authorized to issue this kind of credential?

These rules belong to the community operating the system. A shared credential format does not determine who may join, who can delegate authority, or how decisions can be challenged.

Governance decides which signers countA community's governance document, signed by the community, says which DIDs may issue which kinds of credential. A verifier that holds a credential asks: is this issuer allowed to say this? A trust registry, or a list the verifier pinned, answers yes or no.Governance documentwho may issue whathow members join and leavesigned by the communityVerifierholds a credential fromdid:key:z6Mk… about BobTrust registry or pinned listanswers from the documentis this issuer allowed?
Governance turns 'this key signed it' into 'this is an authority for this claim'.

In this toolkit

  • Accepted issuers. Anonymous membership uses AcceptPolicy to pin issuers. Shared To-Do checks rosters signed by the list's own key.
  • Delegated authority. Mandates checks a chain of credentials leading back to a principal.
  • Local decisions. Trust-core's Policies runs Rego policy on the party's own device.
Scope

There is no general trust-registry library in this toolkit yet.

KERI key event logs and witnesses

Rotate keys while keeping a verifiable identity history.

KERI (Key Event Receipt Infrastructure) records how an identifier's keys change. For the identifiers used here, the AID is a digest of an inception event that lists the initial keys and commits to the next ones. Rotation reveals those pre-committed keys. Someone who steals only the current key cannot substitute their own next keys. Signed events form the key event log (KEL).

Witnesses sign receipts for the first version of each event they accept. If a controller presents conflicting histories, watchers can compare witness records and produce evidence of duplicity. The log also lets a verifier check an older signature against the keys that were valid when it was made.

A KERI key event log with witnessesFour events in a chain: inception, interaction, rotation, interaction. Inception sets key 1 and commits to a digest of key 2. Rotation reveals key 2 and commits to key 3. Three witnesses receipt each event, keeping only the first version they see; a watcher compares what different witnesses hold.icpkey 1commits to key 2ixnsigned by key 1anchors datarotreveals key 2commits to key 3ixnsigned by key 2anchors datawitness 1witness 2witness 3receipt first versionsA watcher compares witnesses; two versions of one event is duplicity, and it's evidence.
Each event commits to the next key before it is needed. Witnesses make a forked history detectable.

In this toolkit

  • Verifiable key histories. Write KERI 1.0 logs with Ed25519 or P-256 keys, witnesses, and watchers. Interoperability tests verify the logs with KERIpy 1.3.6.
  • Audit trails. The toolkit adds its own signed logs, called trails. A key rotation seals the open trails.
Scope

Delegated identifiers, weighted thresholds, and KERI 2.0 are unsupported and rejected.

Selective disclosure and zero-knowledge membership

Prove a required fact while keeping the underlying record private.

Presenting a full credential reveals all its claims, and repeated presentations can link a holder's activity. Selective disclosure lets a holder reveal chosen claims. Zero-knowledge proofs can establish a statement, such as "I am a current employee" or "I am over 18", without disclosing the underlying credential or record.

A membership proof is one application: a person shows they belong to an accepted group without revealing their membership record. The verifier still needs rules for which issuers, group roots, and proof systems it accepts.

Proving membership without saying which memberAn issuer keeps a Merkle tree of members' commitments and signs its root. A member proves their commitment is one of the leaves under that signed root, and outputs a nullifier for this scope. The verifier sees the root, the nullifier and the message the proof is bound to, but not which leaf.root, signed by the issuerCCCCCyouCCThe verifier learns: a member of this group, under this root, says this,and this nullifier is theirs for this scope. Not which leaf.
Group membership in zero knowledge: the verifier checks a signed root and a nullifier, and never sees the leaf.

In this toolkit

  • Membership proofs. Prove membership in one of up to four groups and check attribute requirements.
  • Repeat participation. A scope-specific nullifier lets a verifier recognize the same membership without learning which record it is.
  • Disclosure scope. Field-level credential disclosure with BBS or SD-JWT is not implemented.
Experimental cryptography

The library uses Noir and Barretenberg's UltraHonk in a mode designed to be zero-knowledge. Its authors found no published proof of that property, and Noir is not yet intended for production use.