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
selfdriven Network/SSI Interface/IPEX
selfdriven Network · SSI Interface
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 methodsUnder /ipex: apply, offer, agree, grant, admit and spurn
Every message is a KERI exchange message, signed by its sender
Messages, credential, schema and logs are each named by their own digest, a SAID
What this page builds parses and verifies in KERIpy 1.3, the reference implementation
The premise
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 belowThe 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.
Each exn carries, in p, the SAID of the message it answers. Drop, reorder or swap a message and the chain no longer reads.
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.
The 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.
Making identifiers…
The protocol
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.
Disclosee. Can open. Names the schema SAID and the attribute labels it wants.
Discloser. Can open, or answers apply. Embeds the credential with its attribute block compacted to a SAID.
Disclosee. Answers offer. Its signature binds the disclosee to the rules it was shown.
Discloser. Can open, or answers agree. Embeds the full credential, its TEL iss event and the KEL event that anchors it.
Disclosee. Answers grant, once its agent has verified what arrived.
Either side. Answers apply, offer, agree or grant, and closes the exchange.
The interface
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.
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.
sender, recipient, schema, attributes, message.
sender, recipient, credential, prior (an apply, optional), message.
sender, prior (the offer), message.
sender, recipient, credential, prior (an agree, optional), message.
sender, prior (the grant), message. Verifies the grant before it signs.
sender, prior, message.
Exchanges for an AID, each with its transcript, state and the routes allowed next.
Runs the disclosee’s checks on a transcript without admitting it.
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.
{
"method": "ssi-ipex-grant",
"apikey": "[supplied]",
"authkey": "[supplied]",
"data": {
"sender": "EC6TwD6g6-wU…",
"recipient": "EHbMNjP6dtBE…",
"credential": "EGN0p9Lv2t0A…",
"prior": "ENf3CTAtEGYl…",
"message": "Here is the credential."
}
}{
"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 …"
}
]
}{
"method": "ssi-ipex-admit",
"status": "ER",
"error": {
"code": "ipex-verify-failed",
"description": "The granted credential is not the one that was offered and agreed"
}
}Everything runs in this page. Nothing is sent anywhere.
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.
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.
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.
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
An audio overview, the interface this belongs to, the specifications behind it, and the implementation it was checked against.
Twenty-two minutes on why IPEX puts agreement before disclosure.
IPEX is specified alongside ACDC at the Trust over IP Foundation, and implemented in KERIpy.