selfdriven Network/SSI Interface/IPEX

selfdriven Network · SSI Interface

Disclose by agreement.

IPEX, the Issuance and Presentation Exchange protocol, moves ACDC credentials between two KERI identifiers as a chain of signed exn messages. This interface runs an exchange end to end in your browser, with real keys, real SAIDs, and a verifier you can try to fool.

Run an exchange Or read the proposed interface methods
6 routes

Under /ipex: apply, offer, agree, grant, admit and spurn

exn

Every message is a KERI exchange message, signed by its sender

Blake3

Messages, credential, schema and logs are each named by their own digest, a SAID

KERIpy

What this page builds parses and verifies in KERIpy 1.3, the reference implementation

The premise

Nothing is disclosed until both sides have agreed to the terms.

A credential holds attributes that belong to someone. IPEX lets the discloser put the terms first: the offer carries the credential with its rules in full, and its attribute values only as a digest.

The disclosee accepts by signing an agree that cites the offer. Only then does the grant reveal the values, and the digest proves they are the ones that were offered.

Offer, agree, then disclose.

Try it below
Terms. THE OFFER COMES FIRST agree Rules shown Values sealed Agreed

Contractually protected disclosure

The offer shows the rules and commits to the attribute values by their SAID. The disclosee agrees to the terms before it sees a single value.

  • Offer
  • Agree
  • Rules
Chained. EVERY REPLY CITES THE LAST apply offer agree grant admit p Opens Cites the last Closed

A conversation that can’t be rewritten

Each exn carries, in p, the SAID of the message it answers. Drop, reorder or swap a message and the chain no longer reads.

  • exn
  • SAID
  • p
Verified. AGAINST THE SENDER’S KEL Inception Current key Signature

Checked against the sender’s log

A signature is only as good as the key behind it. The disclosee replays each sender’s key event log and checks every message against its current key.

  • KEL
  • Ed25519
  • CESR

The exchange

Run an IPEX exchange.

Identifiers for the Foundation, a community member and an Interfaces Node are made in this page as it loads. Pick a scenario, then act for either side. Only the moves IPEX allows are offered.

Scenario

Making identifiers…

Transcript.

    The protocol

    Six routes, one conversation.

    Every IPEX message is an exn under /ipex. Three routes can open an exchange; the rest must cite the message they answer, and only certain replies are allowed.

    1. 01 · apply

      Ask for a credential

      Disclosee. Can open. Names the schema SAID and the attribute labels it wants.

    2. 02 · offer

      Set out the terms

      Discloser. Can open, or answers apply. Embeds the credential with its attribute block compacted to a SAID.

    3. 03 · agree

      Accept the terms

      Disclosee. Answers offer. Its signature binds the disclosee to the rules it was shown.

    4. 04 · grant

      Disclose

      Discloser. Can open, or answers agree. Embeds the full credential, its TEL iss event and the KEL event that anchors it.

    5. 05 · admit

      Accept the credential

      Disclosee. Answers grant, once its agent has verified what arrived.

    6. 06 · spurn

      Decline

      Either side. Answers apply, offer, agree or grant, and closes the exchange.

    The interface

    Proposed methods.

    For ssi.interface.selfdriven.network, in the network’s convention: every method an HTTP POST, JSON in and out, status OK or ER. Not live yet.

    Methods

    One method per route.

    Each call returns the signed exn and its CESR attachments, ready for the counterparty. The Interface call tab on every message in the transcript shows the request and response for it.

    Hosted identifiers sign inside the interface. A self-hosted agent can sign locally and post the finished message instead.

    • Disclosee

      ssi-ipex-apply

      sender, recipient, schema, attributes, message.

    • Discloser

      ssi-ipex-offer

      sender, recipient, credential, prior (an apply, optional), message.

    • Disclosee

      ssi-ipex-agree

      sender, prior (the offer), message.

    • Discloser

      ssi-ipex-grant

      sender, recipient, credential, prior (an agree, optional), message.

    • Disclosee

      ssi-ipex-admit

      sender, prior (the grant), message. Verifies the grant before it signs.

    • Either side

      ssi-ipex-spurn

      sender, prior, message.

    • Read

      ssi-ipex-get-exchanges

      Exchanges for an AID, each with its transcript, state and the routes allowed next.

    • Read

      ssi-ipex-verify

      Runs the disclosee’s checks on a transcript without admitting it.

    On the wire

    A grant, called and answered.

    The request names what to send. The response carries the signed message, and the error shape is the one every interface on the network uses.

    Request · ssi-ipex-grantSample values
    {
      "method": "ssi-ipex-grant",
      "apikey": "[supplied]",
      "authkey": "[supplied]",
      "data": {
        "sender": "EC6TwD6g6-wU…",
        "recipient": "EHbMNjP6dtBE…",
        "credential": "EGN0p9Lv2t0A…",
        "prior": "ENf3CTAtEGYl…",
        "message": "Here is the credential."
      }
    }
    Response · OKexn abridged
    {
      "method": "ssi-ipex-grant",
      "status": "OK",
      "data": [
        {
          "said": "EJIznqG5uSGv…",
          "route": "/ipex/grant",
          "exn": {
            "v": "KERI10JSON000759_",
            "t": "exn",
            "d": "EJIznqG5uSGv…",
            "i": "EC6TwD6g6-wU…",
            "rp": "EHbMNjP6dtBE…",
            "p": "ENf3CTAtEGYl…",
            "r": "/ipex/grant",
            "e": "{ acdc, iss, anc, d }"
          },
          "attachments": "-FABEC6TwD6g… … -LAg4AACA-e-acdc …"
        }
      ]
    }
    Response · ERAdmit refused
    {
      "method": "ssi-ipex-admit",
      "status": "ER",
      "error": {
        "code": "ipex-verify-failed",
        "description": "The granted credential is not the one that was offered and agreed"
      }
    }
    Fine print

    What is real here, and what is not.

    Everything runs in this page. Nothing is sent anywhere.

    • 01

      Real

      Blake3-256 SAIDs, Ed25519 signatures (RFC 8032) and CESR encoding, in plain JavaScript. A run of this page was checked in KERIpy 1.3.6: both key event logs were accepted, every SAID and signature verified, and KERIpy’s Exchanger parsed the grant.

    • 02

      Simplified

      No witnesses, no key rotation and no transport. Messages pass between identifiers inside the page, not over OOBIs and mailboxes. Keys live in memory and are gone when you reload.

    • 03

      Disclosure

      The grant discloses the whole attribute block. Selective disclosure, with attributes split into separately blinded blocks, is beyond this page. The salts in u keep the sealed values from being guessed.

    • 04

      Compatibility

      KERIpy computes a credential’s SAID over its full form. The ToIP ACDC draft computes it over the most compact form, which would let an offer be verified on its own. This page follows KERIpy. It also sets rp on every message, where KERIpy’s builders leave it empty.

    Explore

    Going deeper.

    An audio overview, the interface this belongs to, the specifications behind it, and the implementation it was checked against.

    Listen

    The exchange, as audio.

    Twenty-two minutes on why IPEX puts agreement before disclosure.

    • Podcast · 22 min
      How IPEX Enforces Agreement Before Disclosure
      Why IPEX holds a credential’s attribute values back until the disclosee has agreed to the terms. Get the m4a (16 MB)

    selfdriven Foundation · Build

    Agree first. Then disclose.