Loading vLEI.wiki Fetching knowledge base...
vLEI.wiki Comprehensive knowledge base for KERI (Key Event Receipt Infrastructure) and vLEI (verifiable Legal Entity Identifier) ecosystem.
Made by Key State Capital .
© 2025 vLEI.wiki. Educational resource for KERI/vLEI ecosystem.
discovery - vLEI.wiki | KERI Knowledge Base - vLEI.wiki
Back to ConceptsShort Definition Discovery in KERI is a mechanism that enables systems to automatically locate and verify service endpoints, witness networks, and cryptographic identifiers without relying on centralized authorities, primarily implemented through OOBI (Out-Of-Band Introduction) and percolated information discovery protocols.
Related Concepts No related concepts available
Comprehensive Explanation Discovery in KERI
Process Definition
Discovery in the KERI ecosystem represents a fundamental departure from traditional centralized discovery mechanisms. Rather than relying on DNS-like centralized registries, KERI implements a zero-trust discovery model where the discovery mechanism itself is untrusted, but the discovered information is cryptographically verifiable through KERI's key event infrastructure.
The core principle is captured in the phrase: "Discovery via URI, trust via KERI." This separation of concerns allows KERI to leverage existing internet infrastructure for discovery while maintaining cryptographic security through in-band verification protocols.
Discovery accomplishes several critical functions:
Endpoint location : Finding IP addresses and URLs for witnesses, watchers, and other KERI infrastructure
AID resolution : Locating Key Event Logs (KELs) for Autonomic Identifiers
Service discovery : Identifying available services associated with identifiers
Bootstrap initialization : Establishing initial connections in a zero-trust environment
Key participants in discovery processes include:
Controllers : Entities managing AIDs who need to discover witnesses and other infrastructure
Witnesses : Designated entities providing key event receipting services
Watchers : Validators monitoring KELs for duplicity detection
Verifiers : Entities needing to discover and validate credentials and identifiers
Process Flow
OOBI-Based Discovery
The primary discovery mechanism in KERI is , which follows this sequence:
Implementation Notes Critical Implementation Considerations
OOBI Security Model
Never Trust OOBIs Directly : The OOBI itself is an untrusted discovery mechanism. Always verify discovered information through KERI's cryptographic verification:
Validate KEL signatures against current key state
Verify hash chain integrity from inception to current event
Check witness receipts meet threshold requirements
Detect duplicity through watcher network queries
OOBI Distribution Channels : Choose appropriate channels based on security requirements:
High security : In-person QR code exchange with identity verification
Medium security : Encrypted messaging or email with out-of-band confirmation
Low security : Public web pages or social media (acceptable for public identifiers)
Performance Optimization
Caching Strategy : Implement intelligent caching to reduce network overhead:
Cache resolved AIDs and their KELs locally
Invalidate cache on key rotation events
Use TTL-based expiration for witness endpoints
Implement cache warming for frequently accessed identifiers
Parallel Resolution : Resolve multiple OOBIs concurrently:
Use Promise.all() or similar parallel execution patterns
Implement timeout handling for slow witnesses
Fail gracefully when some witnesses are unavailable
Prioritize witnesses by response time and reliability
Lazy Loading : Defer discovery operations until needed:
Resolve witness OOBIs only when sending events
Discover credential schemas on first validation
Load watcher networks on-demand for high-value transactions
Error Handling Patterns
Network Failures : Implement robust retry logic:
Use exponential backoff for transient failures
Set reasonable timeout values (5-10 seconds for OOBI resolution)
Provide fallback discovery mechanisms
Log failures for operational monitoring
Verification Failures : Handle cryptographic validation errors:
Reject invalid signatures immediately
Alert on hash chain breaks (indicates corruption or attack)
OOBI (Out-Of-Band Introduction)
A controller or service generates an OOBI associating a URL with an AID
The OOBI can be as simple as a tuple: (url, aid)
Example: ("http://8.8.5.6:8080/oobi", "EaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM")
Step 2: OOBI Distribution
OOBIs are shared through out-of-band channels:
QR codes for mobile applications
Email or messaging for human-to-human sharing
Configuration files for automated systems
Well-known URIs following RFC-8615 standards
Social media or web pages for public discovery
The recipient resolves the OOBI by accessing the provided URL
The URL acts as a service endpoint returning verifiable information
The response typically includes:
The AID's Key Event Log (KEL)
Witness endpoint information
Service endpoint configurations
Additional metadata for verification
The discovered information is verified using KERI's BADA (Best Available Data Acceptance) policy
The KEL is validated for:
Cryptographic signature integrity
Hash chain consistency
Witness receipt validation
Duplicity detection
Critical : The OOBI itself is not trusted; only the cryptographically verified KEL establishes trust
Step 5: State Persistence
Verified AIDs and their endpoints are stored locally
Aliases may be assigned for human-readable reference
Relationships between AIDs are tracked for future interactions
KERI implements a more sophisticated discovery mechanism called Percolated Information Discovery , based on Invasion Percolation Theory:
Initial OOBI provides entry point into the discovery network
Bootstrap information includes both discovery and verification data
After bootstrap, subsequent authorization becomes non-interactive
Each discoverer can share what they discover with other discoverers
Information "percolates" through the network following paths of least resistance
The percolation mechanism itself does not need to be trusted
End-verifiability ensures security regardless of the percolation path
Percolation intermediaries are untrusted
Cryptographic verification occurs at endpoints
Duplicity detection protects against malicious percolation
Ambient verifiability enables anyone to verify anywhere, anytime
Witness Discovery Witness discovery follows a specific pattern critical to KERI's security model:
Witness Pool Configuration :
Controllers designate witnesses during AID inception
Witness AIDs are included in the inception event
Witness endpoints are discovered through OOBIs
Each witness has its own OOBI for endpoint discovery
Example format: http://witness-demo:5642/oobi/{witness_AID}/witness
Resolution returns the witness's KEL and service endpoints
Witness KELs are validated like any other AID
Witness receipts are verified against witness public keys
Threshold requirements (TOAD) determine minimum witness confirmations
Witnesses often provide mailbox services for asynchronous communication
Mailbox endpoints are discovered through witness OOBIs
Controllers authorize witnesses to act as mailboxes through end role assignments
Watcher Network Discovery Watchers provide additional security through duplicity detection:
Validators choose their own watcher networks
Watchers operate in "promiscuous mode" monitoring multiple AIDs
Watcher discovery uses standard OOBI mechanisms
Validators query watchers for KEL copies
Multiple watcher responses are compared for consistency
Discrepancies indicate potential duplicity
Watchers may act as super-nodes aggregating discovery information
Watcher networks provide scalable discovery infrastructure
Integration with DHT systems (Keridemlia) enables distributed discovery
Technical Requirements
Cryptographic Requirements
All discovered data structures must be Self-Addressing Identifiers (SAIDs)
SAID computation uses cryptographic digests (typically Blake3-256)
CESR encoding ensures composability across text and binary domains
All key events must have valid signatures from current authoritative keys
Multi-signature thresholds must be satisfied
Pre-rotation commitments must be verified
Each event must correctly reference the previous event's digest
Forward chaining through pre-rotation digests must be consistent
Any break in the chain invalidates the KEL
Timing Considerations
Discovery operations are inherently asynchronous
Witnesses may not respond immediately
Mailbox polling may be required for message retrieval
OOBI resolution should implement reasonable timeouts
Witness queries may require retry logic
Watcher network queries should be parallelized
Discovered endpoints should be cached locally
KEL state should be persisted to avoid redundant verification
Cache invalidation must occur on key rotation events
Error Handling OOBI Resolution Failures :
Network errors should trigger retry with exponential backoff
Invalid URLs should be logged and reported
Malformed responses should be rejected with clear error messages
Invalid signatures must cause immediate rejection
Hash chain breaks indicate corrupted or malicious KELs
Duplicity detection should trigger security alerts
Threshold requirements (TOAD) allow for some witness failures
Insufficient witness responses should prevent event acceptance
Alternative witnesses may be discovered through OOBI sharing
Conflicting KEL versions from watchers indicate duplicity
Validators must investigate and resolve inconsistencies
Duplicitous controllers should be flagged and potentially rejected
Usage Patterns
Initial AID Creation and Discovery Scenario : A new controller creates an AID and needs to establish witness connections.
Generate AID with inception event specifying witness AIDs
Resolve witness OOBIs to discover endpoints
Send inception event to witnesses for receipting
Wait for witness receipts to confirm event acceptance
Generate controller OOBI for sharing with others
Use well-known witness pools for initial testing
Configure at least 3 witnesses for production use
Set TOAD to require majority witness confirmation
Store witness OOBIs in configuration files for reproducibility
Credential Presentation Discovery Scenario : A holder needs to present a credential to a verifier.
Holder generates OOBI for their AID
Holder shares OOBI with verifier through secure channel
Verifier resolves OOBI to discover holder's KEL
Verifier validates holder's key state
Holder presents credential with cryptographic proof
Verifier validates credential against holder's verified keys
Use QR codes for in-person presentations
Implement challenge-response for authentication
Verify issuer AIDs through their OOBIs
Check credential registry status through TEL discovery
Multi-Signature Coordination Discovery Scenario : Multiple parties need to coordinate on a multi-sig AID.
Each participant creates individual AID
Participants exchange OOBIs through secure channels
Each participant resolves others' OOBIs
Challenge-response authentication establishes mutual verification
Multi-sig inception event is coordinated
Witnesses are discovered and configured for the group AID
Use video calls for OOBI exchange to prevent MITM attacks
Implement challenge-response to verify control
Configure shared witness pools for the multi-sig AID
Use mailbox services for asynchronous coordination
Delegated Identifier Discovery Scenario : A delegate needs to discover and verify their delegator.
Delegator creates delegation event in their KEL
Delegator shares OOBI with delegate
Delegate resolves delegator OOBI
Delegate verifies delegation event in delegator's KEL
Delegate creates delegated inception event
Delegate's KEL references delegator's AID and delegation event
Verify delegation seal in delegator's KEL
Ensure delegator's KEL is witnessed and stable
Configure delegate witnesses to be discoverable
Maintain delegation chain for hierarchical structures
Schema and Credential Discovery Scenario : A verifier needs to discover and validate credential schemas.
Credential includes schema SAID
Verifier discovers schema through data OOBI
Schema is retrieved from well-known URI or registry
Schema SAID is verified against retrieved content
Credential is validated against schema structure
Use well-known URIs for schema hosting (e.g., /.well-known/keri/schema/{SAID})
Implement schema caching to reduce network requests
Verify schema SAIDs before using for validation
Support multiple schema versions through SAID references
Watcher Network Integration Scenario : A validator wants to use watchers for enhanced security.
Validator discovers watcher network through OOBIs
Validator queries multiple watchers for target AID's KEL
Watcher responses are compared for consistency
Inconsistencies trigger duplicity investigation
Consistent KEL is accepted as valid
Query at least 3 independent watchers
Use geographically distributed watchers
Implement parallel queries for performance
Log and investigate any duplicity detected
Integration Considerations
Web Application Integration
Use SignifyTS for browser-based OOBI resolution
Implement QR code scanning for mobile OOBI sharing
Cache discovered endpoints in browser storage
Handle CORS restrictions for cross-origin OOBI resolution
Use KERIA agents for cloud-based discovery
Implement OOBI resolution APIs for client applications
Provide discovery endpoints for service integration
Support webhook notifications for discovery events
Mobile Application Integration
Generate QR codes for OOBI distribution
Support NFC for proximity-based OOBI exchange
Implement deep links for OOBI handling
Use secure enclaves for key material protection
Implement background tasks for witness polling
Use push notifications for discovery events
Optimize battery usage with intelligent polling
Cache discovered data for offline access
Enterprise System Integration Configuration Management :
Store witness OOBIs in configuration files
Use environment variables for endpoint configuration
Implement service discovery for internal infrastructure
Support dynamic witness pool updates
Monitoring and Observability :
Log all discovery operations for audit trails
Monitor witness availability and response times
Alert on duplicity detection events
Track discovery success rates and failures
Blockchain Integration
Use blockchain as backer for KEL storage
Discover ledger registrars through OOBIs
Verify ledger-anchored events through blockchain queries
Support multiple ledger types (Ethereum, Cardano, etc.)
Combine witness -based and ledger-based discovery
Use ledgers for high-value identifier discovery
Maintain witness pools for performance
Implement fallback discovery mechanisms
Investigate duplicity detection events
Provide clear error messages for debugging Partial Witness Availability : Handle witness threshold scenarios:
Accept events when TOAD threshold is met
Queue events when insufficient witnesses respond
Retry witness queries with timeout
Consider alternative witnesses if configured
Multi-Signature Coordination OOBI Exchange Protocol : Establish secure OOBI sharing:
Use video calls for initial OOBI exchange
Implement challenge-response authentication
Verify all participants before multi-sig inception
Document OOBI exchange in audit logs
Asynchronous Coordination : Handle timing challenges:
Use mailbox services for asynchronous message delivery
Implement polling for multi-sig event collection
Set reasonable timeouts for signature collection
Provide status visibility for all participants
Production Deployment Witness Infrastructure : Deploy reliable witness networks:
Use geographically distributed witnesses
Implement witness monitoring and alerting
Maintain witness availability SLAs
Provide witness discovery through well-known URIs
Watcher Networks : Integrate watcher services:
Deploy independent watcher infrastructure
Query multiple watchers for critical operations
Implement duplicity detection workflows
Log and investigate all duplicity events
Monitoring and Observability : Track discovery operations:
Log all OOBI resolutions with timestamps
Monitor witness response times and availability
Alert on verification failures and duplicity
Track discovery success rates and failure modes
Integration Patterns Web Applications : Use SignifyTS for browser-based discovery:
Implement OOBI resolution in client-side code
Use KERIA agents for server-side operations
Handle CORS restrictions for cross-origin requests
Cache discovered data in browser storage
Mobile Applications : Optimize for mobile constraints:
Use QR codes for OOBI sharing
Implement background discovery tasks
Optimize battery usage with intelligent polling
Support offline operation with cached data
Enterprise Systems : Integrate with existing infrastructure:
Store witness OOBIs in configuration management
Use service discovery for internal KERI infrastructure
Implement monitoring and alerting
Support dynamic witness pool updates
Testing Strategies Unit Testing : Test discovery components in isolation:
Mock OOBI resolution responses
Test verification logic with known KELs
Validate error handling paths
Test caching behavior
Integration Testing : Test end-to-end discovery flows:
Use witness demo for testing
Test multi-party coordination scenarios
Validate watcher network integration
Test failure recovery mechanisms
Security Testing : Validate security properties:
Test with malformed OOBIs
Verify rejection of invalid KELs
Test duplicity detection
Validate challenge-response authentication