Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 19 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.
SKRAP (Signify-KERIA Request Authentication Protocol) is the authentication and communication protocol that defines how Signify clients establish delegated relationships with KERIA agent workers, enabling lightweight edge clients to control KERI AIDs through cloud-hosted agents while maintaining cryptographic security through cooperative delegation.
SKRAP (Signify-KERIA Request Authentication Protocol) is the formal specification defining authentication, initialization, and request-response patterns between Signify clients and KERIA (KERI Agent in the cloud) servers. The protocol enables a cooperative delegation model where lightweight edge clients maintain cryptographic control over their AIDs (Autonomic Identifiers) while delegating operational capabilities to cloud-hosted agent workers.
The protocol addresses a fundamental challenge in decentralized identity systems: providing convenient cloud services without compromising the self-certifying and controller-centric security model of KERI. SKRAP achieves this through a delegation architecture where the Client AID (delegator) delegates signing authority to an Agent AID (delegate), but both parties must participate in all key operations, maintaining the security properties of KERI's key management infrastructure.
SKRAP serves three primary objectives:
When implementing a SKRAP client:
Key Derivation: Use Argon2 with the specified parameters (128-bit salt, paths signify:controller00 and signify:controller01) for deterministic key generation from passphrases
Keystore Security: Store encrypted keystores with appropriate file permissions; never expose private keys outside the client boundary
Request Signing: Always sign Admin Interface requests with the Client AID's current signing key; include timestamps for replay protection
Response Verification: Verify all Agent responses against the Agent AID's current key state before processing
State Synchronization: Implement robust reconciliation for handling intermittent connectivity and concurrent updates
When implementing a KERIA agent:
Interface Separation: Expose Boot, Admin, and Protocol interfaces on separate network interfaces with appropriate access controls
Worker Isolation: Dedicate one agent worker per Client AID to ensure multi-tenant isolation
Witness Coordination: Implement parallel witness queries with timeout and retry logic for acceptable latency
State Management: Maintain complete KEL and witness receipts; implement efficient storage and retrieval
Security Validation: Verify all client requests against current key state; validate timestamps and sequence numbers
When integrating with witness infrastructure:
Receipt Generation: Verify events cryptographically before generating receipts; store receipts durably
Duplicity Detection: Monitor for inconsistent events from the same AID; maintain DEL (Duplicitous Event Log)
Threshold Configuration: Support configurable TOAD (Threshold of Accountable Duplicity) values
Performance: Optimize for low-latency receipt generation; use efficient cryptographic libraries
Secure Agent Initialization: Establishes a cryptographically verifiable delegation relationship between a Signify client's AID and a KERIA agent worker's AID through a three-step handshake protocol
Authenticated Request-Response: Defines message authentication patterns where all Admin Interface requests must be signed by the Client AID and all responses signed by the Agent AID, establishing bidirectional cryptographic verification
Key Management Lifecycle: Specifies procedures for passcode rotation, key derivation, and recovery operations that maintain security while enabling cloud-hosted agent services
SKRAP is documented in the KERIA protocol specification (commit 3e18975) and the Cardano Foundation KERIA fork. The protocol builds upon foundational KERI specifications:
SKRAP represents the Mark II Agent server architecture for KERIA, succeeding earlier single-tenant agent designs. The protocol emerged from the need to support:
The protocol continues to evolve as part of the broader KERI suite development, with ongoing refinements to support additional use cases and security requirements.
KERIA exposes three distinct HTTP endpoints on separate network interfaces, each serving a specific security boundary:
The Boot Interface handles Agent Worker initialization and is designed for internal infrastructure access only. This interface:
This separation allows the Boot Interface to be protected from external access while other interfaces remain publicly accessible, following defense-in-depth security principles.
The Admin Interface provides the REST API for command and control operations from Signify clients. All requests must be signed by the Client AID using Signify Request Authentication. All responses are expected to be signed by the Agent AID, establishing bidirectional cryptographic verification.
The Admin Interface handles:
The KERI Protocol Interface implements CESR over HTTP for KERI protocol interactions with external KERI ecosystem entities. This interface enables:
This three-interface design enables network-level security controls where administrators can expose interfaces to different network zones based on operational requirements.
The SKRAP architecture organizes components into three layers:
Signify clients operate at the edge, performing:
Signify minimizes KERI implementation complexity at the edge, handling only cryptographic operations while delegating protocol complexity to KERIA agents.
KERIA agent workers provide:
Each agent worker is dedicated to a single Client AID, providing isolation in the multi-tenant architecture.
The KERI infrastructure layer includes:
KERIA agents interact with this infrastructure layer through the KERI Protocol Interface.
SKRAP defines three primary data flows:
The initialization flow establishes the Client AID to Agent AID delegation:
This flow creates a cooperative delegation where both delegator and delegate must participate.
The request-response flow handles operational commands:
This bidirectional authentication ensures both parties cryptographically verify all communications.
The event propagation flow distributes signed events to KERI infrastructure:
This flow leverages KERI's witness infrastructure for ambient verifiability.
SKRAP employs a distributed state management model:
Signify clients maintain:
KERIA agents maintain:
Witnesses and watchers maintain:
This distributed state model enables end-verifiability where any party can independently verify the complete event history.
All SKRAP messages use CESR (Composable Event Streaming Representation) encoding, which provides:
CESR encoding is specified in IETF draft-ssmith-cesr.
The Client AID inception event establishes the initial key state:
Field Definitions:
v: Version string - KERI protocol version ("KERI10JSON00012b_")t: Message type - "icp" for inceptiond: SAID (Self-Addressing Identifier) - digest of the eventi: Identifier prefix - same as SAID for inceptions: Sequence number - "0" for inceptionkt: Signing threshold - "1" for single-sigk: Current signing keys - array of qualified public keysnt: Next threshold - threshold for next rotationn: Next key digests - array of pre-rotated key digestsbt: Witness threshold - "0" for no witnesses initiallyb: Witness identifiers - empty array initiallyc: Configuration traits - empty arraya: Anchoring seals - empty array initiallySemantic Requirements:
d and i fields MUST be identical for inception eventss field MUST be "0" for inceptionk array length MUST satisfy the kt thresholdn array length MUST satisfy the nt thresholdk MUST be a qualified Base64 public key with derivation coden MUST be a qualified Base64 digest of a pre-rotated public keyThe Agent AID delegated inception event references the delegating Client AID:
Additional Field:
di: Delegator identifier - Client AID prefixSemantic Requirements:
di field MUST reference a valid Client AIDThis creates the cooperative delegation relationship where both parties must participate.
Interaction events anchor external data without changing key state:
Field Definitions:
v: Version stringt: Message type - "ixn" for interactiond: SAID of the eventi: Identifier prefixs: Sequence number - incremented from previous eventp: Prior event digest - SAID of previous event in KELa: Anchoring seals - array of seals to external dataSemantic Requirements:
s field MUST be exactly one greater than the previous eventp field MUST be the SAID of the immediately prior eventa array MAY contain seals anchoring delegated inceptions, credential operations, or other dataRotation events change the authoritative key set:
Field Definitions:
v: Version stringt: Message type - "rot" for rotationd: SAID of the eventi: Identifier prefixs: Sequence number - incremented from previous eventp: Prior event digestkt: New signing thresholdk: New current signing keysnt: New next thresholdn: New next key digestsbr: Witness remove list - witnesses to removeba: Witness add list - witnesses to adda: Anchoring sealsSemantic Requirements:
k MUST correspond to the pre-rotated digests in the prior event's n fieldbr and ba lists enable witness pool rotationSKRAP supports multiple serialization formats:
JSON (JavaScript Object Notation) encoding is the primary format for human-readable messages:
JSON encoding is used for:
CBOR (Concise Binary Object Representation) provides compact binary encoding:
CBOR encoding is specified in RFC 7049.
MessagePack provides an alternative binary format:
The version string encodes:
Example: "KERI10JSON00012b_" indicates KERI 1.0, JSON format, 299 bytes (0x12b).
The SAID (Self-Addressing Identifier) provides:
SAID computation:
Thresholds in KERI support:
SKRAP primarily uses simple thresholds for Client and Agent AIDs.
The initialization handshake establishes the Client-Agent delegation through a three-step protocol:
The Signify client generates the Client AID as a transferable identifier with:
Key Derivation Algorithm:
signify:controller00signify:controller01The signing public key and rotation key digest are included in the inception event.
Security Properties:
The KERIA service generates the Agent AID as a delegated identifier:
Delegated Inception Creation: KERIA creates a delegated inception event with:
di field referencing the Client AIDDelegation Seal: The delegated inception includes a seal to the delegating event in the Client AID's KEL
Agent Worker Initialization: KERIA initializes an agent worker dedicated to the Client AID
Security Properties:
di fieldThe Signify client completes the delegation:
Interaction Event Creation: Client creates an interaction event with:
Event Signing: Client signs the interaction event with the signing key
Event Submission: Client submits the signed interaction event to the Agent through the Admin Interface
Witness Propagation: Agent propagates both the Client's interaction event and the Agent's delegated inception to witnesses
Receipt Collection: Agent collects witness receipts for both events
Security Properties:
All Admin Interface requests use the Signify Request Authentication pattern:
Request Body Creation: Client constructs JSON request body with:
Signature Generation: Client signs the request body with the Client AID's current signing key
Signature Attachment: Client attaches the indexed signature to the request
Request Transmission: Client sends the signed request to the Admin Interface
Signature Format:
Signature Extraction: Agent extracts the indexed signature from the request
Key State Retrieval: Agent retrieves the Client AID's current key state from the KEL
Signature Verification: Agent verifies the signature against the current signing key
Timestamp Validation: Agent validates the timestamp is within acceptable window
Operation Authorization: Agent verifies the Client AID is authorized for the requested operation
Security Properties:
Response Body Creation: Agent constructs JSON response body with:
Signature Generation: Agent signs the response body with the Agent AID's current signing key
Signature Attachment: Agent attaches the indexed signature to the response
Response Transmission: Agent sends the signed response to the client
Signature Extraction: Client extracts the indexed signature from the response
Key State Retrieval: Client retrieves the Agent AID's current key state
Signature Verification: Client verifies the signature against the current signing key
Response Processing: Client processes the verified response
Security Properties:
Passcode rotation enables users to change their passphrase while maintaining the same Client AID:
New Passphrase Entry: User provides new 21-character passphrase
New Key Derivation: Client derives new signing and rotation keys from new passphrase using same salt
Rotation Event Creation: Client creates rotation event with:
Event Signing: Client signs rotation event with OLD signing key (from old passphrase)
Event Submission: Client submits signed rotation event to Agent
Security Properties:
Event Verification: Agent verifies the rotation event signature and pre-rotation commitment
Witness Propagation: Agent propagates rotation event to witnesses
Receipt Collection: Agent collects witness receipts
Key State Update: Agent updates internal key state to reflect new keys
Confirmation: Agent returns signed confirmation to client
Keystore Update: Client updates encrypted keystore with new passphrase-derived keys
Security Properties:
SKRAP defines state transitions for both Client and Agent AIDs:
SKRAP enforces strict ordering requirements:
p fieldSecurity Properties:
SKRAP's security design addresses multiple threat categories:
Threat: Adversaries controlling network infrastructure attempting to:
Mitigation:
Threat: Malicious or compromised KERIA agents attempting to:
Mitigation:
Threat: Adversaries obtaining client private keys through:
Mitigation:
Threat: Malicious witnesses colluding to:
Mitigation:
SKRAP provides the following cryptographic guarantees:
Guarantee: All messages are cryptographically attributable to their claimed source.
Mechanism:
Strength: Authenticity relies on the cryptographic strength of the signature algorithm (128-bit security for Ed25519).
Guarantee: Message content cannot be modified without detection.
Mechanism:
Strength: Integrity relies on collision resistance of hash functions (Blake3-256 provides 256-bit security).
Guarantee: Message senders cannot deny having sent a message.
Mechanism:
Strength: Non-repudiation relies on the security of private key storage and the signature algorithm.
Guarantee: Message content is protected from unauthorized disclosure.
Mechanism:
Note: SKRAP focuses on authentication and integrity, not confidentiality. Confidentiality is provided by complementary protocols.
Guarantee: Services remain available despite failures or attacks.
Mechanism:
Strength: Availability depends on witness pool configuration and network infrastructure.
SKRAP resists multiple attack vectors:
Attack: Adversary captures and replays valid messages.
Defense:
Effectiveness: Replay attacks are detected through timestamp validation and sequence number verification.
Attack: Adversary intercepts and modifies messages between client and agent.
Defense:
Effectiveness: MITM attacks are prevented by signature verification and transport encryption.
Attack: Adversary creates multiple fake identities to subvert witness pools.
Defense:
Effectiveness: Sybil attacks are mitigated by controller-designated witness pools and threshold requirements.
Attack: Adversary isolates a client from honest witnesses.
Defense:
Effectiveness: Eclipse attacks are mitigated by redundant witness endpoints and alternative verification paths.
Attack: Adversary obtains client private keys.
Defense:
Effectiveness: Key compromise is recoverable if detected before the compromised keys are used for rotation.
SKRAP is designed for post-quantum security:
Supported quantum-resistant algorithms include:
Clients can migrate to quantum-resistant algorithms through:
Timeline: Migration should occur before large-scale quantum computers become available (estimated 10-20 years).
SKRAP builds upon foundational KERI protocols:
Dependency: KERI (Key Event Receipt Infrastructure) provides:
Integration: SKRAP uses KERI event structures for all Client and Agent AID operations.
Dependency: CESR (Composable Event Streaming Representation) provides:
Integration: All SKRAP messages use CESR encoding for cryptographic primitives.
Dependency: ACDC (Authentic Chained Data Container) provides:
Integration: SKRAP enables ACDC issuance and presentation through agent operations.
Dependency: IPEX (Issuance and Presentation Exchange) provides:
Integration: SKRAP Admin Interface supports IPEX operations for credential exchange.
Dependency: OOBI (Out-Of-Band Introduction) provides:
Integration: SKRAP uses OOBI for discovering witness and watcher endpoints.
SKRAP provides integration points for:
Integration: Client applications integrate SKRAP through:
Examples:
Integration: Hardware wallets integrate SKRAP through:
Examples:
Integration: Witnesses integrate through:
Examples:
Integration: Credential registries integrate through:
Examples:
Implementers face several common challenges:
Challenge: Argon2 key stretching is computationally expensive, causing delays during initialization and rotation.
Mitigation:
Challenge: Collecting witness receipts introduces latency, especially with geographically distributed witnesses.
Mitigation:
Challenge: Keeping client and agent state synchronized, especially with intermittent connectivity.
Mitigation:
Challenge: Handling errors gracefully without compromising security.
Mitigation:
Challenge: Supporting large numbers of clients and high transaction volumes.
Mitigation:
Performance optimization strategies:
Optimization:
Optimization:
Optimization:
Optimization:
Security best practices:
Best Practices:
Best Practices:
Best Practices:
Best Practices:
Deployment strategies:
Configuration:
Configuration:
Configuration:
Comprehensive testing approaches:
Focus:
Focus:
Focus:
Focus:
Focus:
Network Security: Use TLS/HTTPS for all network communication; validate certificates; implement certificate pinning
Access Control: Implement least-privilege access; disable Boot Interface in production or restrict to internal network
Monitoring: Log all key events and operations; implement alerting for security events; use watchers for independent verification
Key Management: Use hardware wallets or HSMs for high-value identities; implement secure key deletion; rotate keys periodically
Unit Tests: Test cryptographic operations, key derivation, signature verification, and message serialization
Integration Tests: Test client-agent communication, witness coordination, event propagation, and state synchronization
Security Tests: Test replay attack prevention, MITM resistance, key compromise scenarios, and duplicity detection
Performance Tests: Test throughput, latency, scalability, and resource utilization under load
Interoperability Tests: Test cross-implementation compatibility and protocol version compatibility