Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 87 GitHub source documents. All source documents are searchable here.
Last updated: October 7, 2025
This content is meant to be consumed by AI agents via MCP. Click here to get the MCP configuration.
Note: In rare cases it may contain LLM hallucinations.
For authoritative documentation, please consult the official GLEIF vLEI trainings and the ToIP Glossary.
IPEX (Issuance and Presentation EXchange) is a KERI protocol that provides a unified mechanism for both issuing and presenting ACDC credentials by modeling both operations as disclosure events between a Discloser and Disclosee, where the difference lies in what information is disclosed rather than how disclosure occurs.
The Issuance and Presentation Exchange (IPEX) Protocol represents a fundamental innovation in verifiable credential exchange by recognizing that credential issuance and presentation can be unified under a single protocol framework. As specified in the IETF Internet Draft authored by Samuel M. Smith and Phil Feairheller, IPEX addresses the challenge of creating a standardized, secure mechanism for exchanging ACDC (Authentic Chained Data Container) credentials.
The protocol's foundational insight is that both issuance and presentation are fundamentally disclosure operations. Rather than requiring separate protocols with different security models and implementation patterns, IPEX models all exchanges as information disclosure between two parties:
The critical distinction between issuance and presentation lies in what is disclosed, not how disclosure occurs. This unification provides significant advantages:
Route Processing: Implementations must handle five IPEX routes (/ipex/apply, /ipex/offer, /ipex/agree, /ipex/grant, /ipex/admit) with appropriate state transitions for each message type.
Attachment Processing: IPEX messages include CESR attachments that must be parsed separately from the message body. Attachments contain ACDC credentials and CESR Proof signatures.
SAID Verification: All message SAIDs must be verified by recomputing the digest over the message structure and comparing to the d field value.
Exchange Tracking: Implementations should maintain exchange state indexed by exchange SAID, tracking current state (PENDING, AGREED, GRANTED, COMPLETED) and associated messages.
Notification System: IPEX requires a notification system for alerting parties to new messages. Notifications should include message type, sender AID, and exchange reference.
Timeout Handling: Implement configurable timeouts for exchanges in PENDING or AGREED states. Default timeout recommendations are not specified in the protocol but typical implementations use 24-72 hours.
KEL Verification: Before accepting any IPEX message, verify the sender's KEL is consistent and has sufficient witness receipts according to the TOAD (Threshold of Accountable Duplicity).
ACDC Validation: Verify ACDC credentials include:
Chain Verification: For chained credentials, verify the complete chain from root to leaf, validating each edge reference and ensuring proper , , or operator semantics.
IPEX is defined in the IETF Internet Draft specification:
draft-ssmith-ipex (IETF Internet Draft)IPEX emerged from practical implementation experience in the vLEI (verifiable Legal Entity Identifier) ecosystem developed by GLEIF. The protocol evolved to address real-world challenges in credential exchange:
The protocol specification explicitly acknowledges sections marked as "TODO" including Introduction, Security Considerations, and Acknowledgments, indicating active development status.
IPEX operates as a presentation layer protocol within the KERI protocol stack:
┌─────────────────────────────────────┐
│ Application Layer │
│ (vLEI, Custom Credentials) │
├─────────────────────────────────────┤
│ IPEX Protocol Layer │
│ (Issuance & Presentation) │
├─────────────────────────────────────┤
│ ACDC Layer │
│ (Credential Structure) │
├─────────────────────────────────────┤
│ KERI Layer │
│ (Identifier & Key Management) │
├─────────────────────────────────────┤
│ CESR Layer │
│ (Encoding & Serialization) │
└─────────────────────────────────────┘
Layer Responsibilities:
IPEX implements asynchronous message-based communication with the following flow patterns:
Issuance Exchange Flow:
Issuer Holder
│ │
│──────── /ipex/apply ──────────>│ (Holder requests credential)
│ │
│<─────── /ipex/offer ───────────│ (Issuer offers credential)
│ │
│──────── /ipex/agree ──────────>│ (Holder agrees to terms)
│ │
│<─────── /ipex/grant ───────────│ (Issuer grants credential)
│ │
│──────── /ipex/admit ──────────>│ (Holder admits receipt)
│ │
Presentation Exchange Flow:
Verifier Holder
│ │
│──────── /ipex/apply ──────────>│ (Verifier requests presentation)
│ │
│<─────── /ipex/offer ───────────│ (Holder offers to present)
│ │
│──────── /ipex/agree ──────────>│ (Verifier agrees to terms)
│ │
│<─────── /ipex/grant ───────────│ (Holder grants presentation)
│ │
│──────── /ipex/admit ──────────>│ (Verifier admits receipt)
│ │
Key Architectural Properties:
IPEX implements distributed state management where each party maintains:
State synchronization occurs through:
IPEX defines five core message types using the KERI exn (exchange) message format:
/ipex/apply)Initiates an exchange by requesting credential issuance or presentation.
Structure:
{
"v": "KERI10JSON00011c_",
"t": "exn",
"d": "<message SAID>",
"i": "<sender AID>",
"p": "<prior event SAID>",
"dt": "2024-01-15T10:30:00.000000+00:00",
"r": "/ipex/apply",
"q": {
"m": "<optional message text>",
"i": "<target AID>"
},
"a": [
"<attachment SAID 1>",
"<attachment SAID 2>"
]
}
Field Semantics:
/ipex/offer)Responds to an apply by offering credential issuance or presentation.
Structure:
{
"v": "KERI10JSON00011c_",
"t": "exn",
"d": "<message SAID>",
"i": "<sender AID>",
"p": "<prior event SAID>",
"dt": "2024-01-15T10:31:00.000000+00:00",
"r": "/ipex/offer",
"q": {
"m": "<optional message text>",
"i": "<target AID>"
},
"a": [
"<credential SAID>"
]
}
The offer message includes the ACDC credential (or credential reference) being offered in the attachments section.
/ipex/agree)Accepts an offer and agrees to proceed with the exchange.
Structure:
{
"v": "KERI10JSON00011c_",
"t": "exn",
"d": "<message SAID>",
"i": "<sender AID>",
"p": "<prior event SAID>",
"dt": "2024-01-15T10:32:00.000000+00:00",
"r": "/ipex/agree",
"q": {
"m": "<optional message text>",
"i": "<target AID>"
}
}
/ipex/grant)Grants the credential or presentation, completing the exchange.
Structure:
{
"v": "KERI10JSON00011c_",
"t": "exn",
"d": "<message SAID>",
"i": "<sender AID>",
"p": "<prior event SAID>",
"dt": "2024-01-15T10:33:00.000000+00:00",
"r": "/ipex/grant",
"q": {
"m": "<optional message text>",
"i": "<target AID>"
},
"a": [
"<credential SAID>",
"<signature attachments>"
]
}
The grant message includes the complete ACDC with CESR Proof signature attachments.
/ipex/admit)Acknowledges receipt and completes the exchange.
Structure:
{
"v": "KERI10JSON00011c_",
"t": "exn",
"d": "<message SAID>",
"i": "<sender AID>",
"p": "<prior event SAID>",
"dt": "2024-01-15T10:34:00.000000+00:00",
"r": "/ipex/admit",
"q": {
"m": "<optional message text>",
"i": "<target AID>"
}
}
IPEX messages use CESR (Composable Event Streaming Representation) encoding with support for multiple serialization formats:
Supported Serializations:
CESR Encoding Properties:
Attachment Encoding:
IPEX messages include CESR attachments for:
Attachments are appended to the message body using CESR count codes and group codes for efficient parsing.
Standard KERI Exchange Message Fields:
v (Version String): Identifies CESR version and serialization format
KERI<major><minor><serialization><size>_KERI10JSON00011c_t (Message Type): Always "exn" for IPEX messages
d (Digest/SAID): Self-addressing identifier of the message
i (Identifier): Sender's AID
p (Prior): SAID of prior event in sender's KEL
dt (DateTime): ISO 8601 timestamp
r (Route): IPEX message type identifier
/ipex/<message-type>q (Query/Payload): Message-specific payload
a (Attachments): Array of attachment SAIDs
IPEX implements negotiated exchange patterns with multiple interaction models:
Scenario: Holder requests credential from Issuer
/ipex/apply (credential request)/ipex/offer (credential offer with terms)/ipex/agree (acceptance of terms)/ipex/grant (credential issuance)/ipex/admit (receipt acknowledgment)Key Properties:
Scenario: Issuer proactively issues credential to Holder
/ipex/offer (unsolicited credential offer)/ipex/agree (acceptance)/ipex/grant (credential issuance)/ipex/admit (receipt acknowledgment)Key Properties:
Scenario: Verifier requests credential presentation from Holder
/ipex/apply (presentation request)/ipex/offer (presentation offer)/ipex/agree (acceptance)/ipex/grant (credential presentation)/ipex/admit (verification acknowledgment)Key Properties:
Scenario: Holder proactively presents credential to Verifier
/ipex/offer (unsolicited presentation)/ipex/agree (acceptance)/ipex/grant (credential presentation)/ipex/admit (verification acknowledgment)Key Properties:
IPEX exchanges follow a finite state machine model:
┌─────────┐
│ IDLE │
└────┬────┘
│
│ apply/offer
▼
┌─────────┐
│ PENDING │
└────┬────┘
│
│ agree
▼
┌─────────┐
│ AGREED │
└────┬────┘
│
│ grant
▼
┌─────────┐
│ GRANTED │
└────┬────┘
│
│ admit
▼
┌─────────┐
│COMPLETED│
└─────────┘
State Definitions:
Error States:
Replay Attack Protection:
IPEX implements KRAM (KERI Request Authentication Method) for replay protection:
p field establishes causal orderingMessage Ordering:
p fielddt field provides temporal orderingTimeout Handling:
IPEX operates under the KERI threat model with specific considerations for credential exchange:
Adversary Capabilities:
Trust Assumptions:
Authenticity:
Confidentiality:
Availability:
Privacy:
Replay Attack Resistance:
Forgery Resistance:
Correlation Resistance:
Revocation Resistance:
IPEX is deeply integrated with the KERI protocol suite:
KERI Infrastructure:
ACDC Credentials:
CESR Encoding:
Supporting Protocols:
Application Layer Integration:
Transport Layer Integration:
Storage Layer Integration:
Identity Layer Integration:
did:keri and did:webs integrationAsynchronous State Management:
Credential Lifecycle Tracking:
Privacy-Preserving Disclosure:
Multi-Party Coordination:
Message Size Optimization:
Network Efficiency:
Cryptographic Performance:
Scalability Patterns:
Key Management:
Transport Security:
Validation Requirements:
Privacy Protection:
Unit Testing:
Integration Testing:
Security Testing:
Interoperability Testing:
Graduated Disclosure: Implement support for compact, partial, selective, and full disclosure variants. Default to most compact disclosure appropriate for the use case.
Pairwise AIDs: For privacy-sensitive applications, use different AIDs for different relationships to prevent correlation across contexts.
Contractual Protection: When implementing chain-link confidentiality, include Ricardian contracts in the rules section of ACDCs and require explicit agreement before disclosure.
Group Identifiers: For multi-sig AIDs, IPEX exchanges require coordination among multiple signers. Implement escrow mechanisms to collect partial signatures before completing grant messages.
Threshold Satisfaction: Verify that grant messages include sufficient signatures to meet the signing threshold of the issuer's AID.
Rotation Handling: Monitor for rotation events that change the authoritative key set during an exchange and handle appropriately (typically by restarting the exchange with updated keys).
Validation Failures: When message or credential validation fails, implementations should:
Timeout Handling: When exchanges timeout:
Revocation Handling: When a credential is revoked during an exchange:
Caching Strategies:
Batch Processing:
Asynchronous Operations:
Interoperability Testing: IPEX implementations should be tested against other implementations using standardized test vectors. The vLEI ecosystem provides reference test cases.
Security Testing: Implementations must be tested for:
Privacy Testing: Verify that: