Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 100 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.
A seal is a cryptographic commitment in the form of a digest or hash tree root that anchors arbitrary data or a tree of hashes to a specific event in a key event sequence, creating a verifiable binding between the event and external data without embedding the full data in the event itself.
A seal is a fundamental cryptographic primitive in the KERI protocol that serves as a cryptographic commitment mechanism for anchoring data to key events. Formally, a seal is either:
The seal anchors this data to a particular event in the key event sequence, creating an immutable, verifiable binding between the event and the sealed data. This binding is established through the seal's inclusion in the event's serialized content, which is then signed by the controller's authoritative keys.
Seals serve multiple critical functions in the KERI ecosystem:
When creating a seal:
Select Hash Algorithm: Choose an appropriate hash algorithm based on security requirements and performance constraints. Blake3-256 is recommended for new implementations.
Compute Digest: Hash the data to be sealed using the selected algorithm. Ensure the data is serialized consistently (e.g., canonical JSON for structured data).
Encode as CESR: Prepend the appropriate derivation code and encode the digest in Base64 URL-safe format for text domain, or use binary encoding for binary domain.
Include in Event: Add the seal to the appropriate field in the event structure (typically the a field for anchors).
Sign Event: Sign the complete event including the seal, creating a non-repudiable commitment.
When verifying a seal:
Parse Event: Extract the seal from the event structure, including derivation code and digest.
Verify Event Signature: Before trusting the seal, verify that the event is properly signed by the controller's authoritative keys.
Obtain Sealed Data: Retrieve the data that was allegedly sealed. This may require external lookups or data exchange.
Recompute Digest: Using the hash algorithm indicated by the derivation code, compute the digest of the sealed data.
Compare Digests: Use constant-time comparison to check if the computed digest matches the seal digest.
Verify Event Chain: Ensure the event is properly ordered in the KEL and all prior events are valid.
Seals create a dependency on data availability:
Seals are classified as cryptographic commitment primitives within KERI's architecture. They represent a specific application of hash functions to create tamper-evident bindings between events and data. Seals are not standalone primitives but rather structured data elements that appear within key events, encoded according to CESR conventions.
Seals leverage cryptographic hash functions that provide approximately 128 bits of cryptographic strength. The KERI specification supports multiple hash algorithms, with the specific algorithm indicated by a derivation code prepended to the digest:
For Merkle tree roots, the seal represents the root hash of a tree structure where:
Seals inherit the security properties of their underlying hash functions:
Collision Resistance: It is computationally infeasible to find two different inputs that produce the same seal digest. This ensures that each unique data item has a unique seal.
Pre-image Resistance: Given a seal digest, it is computationally infeasible to determine the original data that was sealed. This provides privacy protection for sealed data until it is explicitly disclosed.
Second Pre-image Resistance: Given a data item and its seal, it is computationally infeasible to find a different data item that produces the same seal.
Binding Property: Once a seal is included in a signed event, the controller has made a non-repudiable cryptographic commitment to the sealed data. The seal cannot be changed without invalidating the event signature.
Immutability: The payload of a seal becomes immutable once the containing event is signed. Any modification to the sealed data will produce a different digest, breaking the cryptographic binding.
Seal digests are typically 256 bits (32 bytes) in their raw binary form, matching the output size of the underlying hash functions. When encoded in CESR text format, seals include:
For example, a Blake3-256 seal in CESR format:
ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM
Where:
E is the derivation code for Blake3-256LvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM is the Base64-encoded digestSeals are encoded as CESR primitives, which means they are self-framing and composable. The CESR encoding ensures that seals can be:
Seals appear in key events as structured data elements, typically in one of two forms:
Event Source Seal (for anchoring to other KEL events):
{
"s": "3",
"d": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM"
}
Where:
s: Sequence number of the sealed eventd: Digest (seal) of the sealed eventData Seal (for anchoring arbitrary data):
{
"d": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM"
}
Where:
d: Digest (seal) of the sealed dataText Domain: Seals in the text domain use Base64 URL-safe encoding with prepended derivation codes. This format is human-readable and suitable for JSON serialization:
ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM
Binary Domain: Seals in the binary domain use raw bytes with binary-encoded derivation codes. This format is compact and efficient for transmission:
0x12 0x2e 0xb5 0x3a 0x67 ... (32 bytes total)
Raw Domain: The raw domain represents the seal as a tuple of derivation code and raw digest bytes, used internally for cryptographic operations:
("E", b"\x2e\xb5\x3a\x67...")
Common derivation codes for seals include:
E: Blake3-256 digest (44 characters in Base64)F: Blake2b-256 digest (44 characters in Base64)G: Blake2s-256 digest (44 characters in Base64)H: SHA3-256 digest (44 characters in Base64)I: SHA2-256 digest (44 characters in Base64)The derivation code is essential for:
Seals appear in establishment events (inception and rotation) to anchor critical data:
Delegated Inception: The delegator's rotation or interaction event includes a seal of the delegate's inception event:
{
"v": "KERI10JSON00011c_",
"t": "ixn",
"d": "EZ-i0d8JZLvaU6JR2nmwyYAZAoTNZH3UfSVPzhzS6b5C",
"i": "EaU6JR2nmwyYAZAoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8",
"s": "3",
"p": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM",
"a": [
{
"i": "EJJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8",
"s": "0",
"d": "EoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8JJR2nmwyYAZA"
}
]
}
The seal in the a (anchors) field commits the delegator to the delegate's inception event.
Seals are the primary payload of interaction events, which exist specifically to anchor data without changing key state:
Service Endpoint Anchoring:
{
"v": "KERI10JSON00011c_",
"t": "ixn",
"d": "EZ-i0d8JZLvaU6JR2nmwyYAZAoTNZH3UfSVPzhzS6b5C",
"i": "EaU6JR2nmwyYAZAoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8",
"s": "4",
"p": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM",
"a": [
{
"d": "EJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8J"
}
]
}
The seal in the a field commits to a service endpoint configuration document stored externally.
Transaction Event Logs use seals to anchor back to their controlling KEL:
TEL Inception with KEL Anchor:
{
"v": "KERI10JSON00011c_",
"t": "vcp",
"d": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM",
"i": "EaU6JR2nmwyYAZAoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8",
"s": "0",
"bt": "0",
"b": ["BaU6JR2nmwyYAZAoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8"],
"c": ["NB"]
}
The TEL event is anchored to the KEL through a seal in a KEL interaction event, creating a cryptographic link between the secondary root-of-trust (TEL) and primary root-of-trust (KEL).
ACDCs use seals extensively for credential issuance and chaining:
Credential Issuance Seal: The issuer's KEL includes an interaction event with a seal of the credential's SAID:
{
"v": "KERI10JSON00011c_",
"t": "ixn",
"d": "EZ-i0d8JZLvaU6JR2nmwyYAZAoTNZH3UfSVPzhzS6b5C",
"i": "EaU6JR2nmwyYAZAoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8",
"s": "5",
"p": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM",
"a": [
{
"d": "EBkPreYpZfFk66jpf3uFv7vklXKhzBrAqjsKAn2EDIPM"
}
]
}
This seal commits the issuer to the credential, enabling verification that the credential was issued by the claimed issuer at a specific point in the KEL.
Credential Chaining: ACDCs can reference other ACDCs through seals in their edge section:
{
"v": "ACDC10JSON00011c_",
"d": "EBkPreYpZfFk66jpf3uFv7vklXKhzBrAqjsKAn2EDIPM",
"i": "EaU6JR2nmwyYAZAoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8",
"s": "ED6jrVPTzlSkUPqGGeIZ8a8FWS7a6s4reAXRZOkogZ2A",
"a": {...},
"e": {
"d": "EFH3dCdoFOLe71iheqcywJcnjtJtQIYPvAu6DZIl3MOA",
"parent": {
"n": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM"
}
}
}
The seal in the edge section (n field) references the parent credential's SAID, creating a verifiable chain of credentials.
Pattern 1: Data Anchoring
Pattern 2: Delegation Authorization
Pattern 3: Credential Issuance
Verifying a seal involves several steps:
Step 1: Extract the Seal Parse the event to extract the seal structure, including the derivation code and digest.
Step 2: Obtain the Sealed Data Retrieve the data that was allegedly sealed. This may come from:
Step 3: Compute the Digest Using the hash algorithm indicated by the derivation code, compute the digest of the sealed data.
Step 4: Compare Digests Compare the computed digest with the seal digest. If they match, the seal is valid.
Step 5: Verify Event Signature Verify that the event containing the seal is properly signed by the controller's authoritative keys at the time of the event.
Step 6: Verify Event Ordering Verify that the event is properly ordered in the KEL and that all prior events are valid.
Only when all steps succeed can the seal be considered verified, establishing that:
Seals and SAIDs are closely related:
Seals are a specific application of general digest primitives:
Event Source Seals reference other events:
Data Seals reference arbitrary data:
Seal Arrays: Events can contain multiple seals in an array:
"a": [
{"d": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM"},
{"d": "EJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8J"},
{"d": "EoTNZH3UfSVPzhzS6b5CLvaU6Z-i0d8JJR2nmwyYAZA"}
]
This enables a single event to commit to multiple data items simultaneously.
Nested Seals: Seals can reference data that itself contains seals, creating hierarchical commitment structures. This is fundamental to ACDC chaining and delegation trees.
Merkle Tree Seals: When sealing a large dataset, a Merkle tree can be constructed with the root hash serving as the seal. This enables efficient verification of individual items within the dataset without revealing the entire dataset.
Seal computation is computationally efficient:
Seals are compact:
Seals provide privacy protection:
Seals support multiple hash algorithms:
Implementations must handle:
Hash Algorithm Selection: Use algorithms with at least 128 bits of security strength. Blake3-256 and SHA-256 are recommended.
Seal Verification: Always verify seals before trusting sealed data. Never assume a seal is valid without verification.
Data Availability: Ensure sealed data is available when needed for verification. Seals are useless if the sealed data cannot be retrieved.
Timing Attacks: Be aware that seal verification timing may leak information about the sealed data. Use constant-time comparison when necessary.
Collision Attacks: While collision attacks on modern hash functions are impractical, implementations should monitor for advances in cryptanalysis and be prepared to migrate to stronger algorithms if needed.
Support multiple hash algorithms: