Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 109 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.
In KERI's multi-signature threshold schemes, weight is a numerical value assigned to each signing key in a weighted threshold configuration, enabling flexible authorization policies where different keys contribute different amounts toward satisfying the signing threshold requirement.
In KERI (Key Event Receipt Infrastructure), weight is a fundamental component of sophisticated multi-signature authorization schemes that extends beyond simple M-of-N threshold signatures. Weight enables fractionally-weighted threshold signatures where different keys in a key set can carry different levels of authority or voting power. This mechanism is critical for implementing flexible governance models in organizational contexts where participants may have different levels of authority, responsibility, or trust.
The weight concept appears in two primary contexts within KERI:
isith - initial signing threshold or nsith - next signing threshold)Weights in KERI are organized within the threshold structure of establishment events (inception and rotation events). The KERI specification supports two levels of weighted thresholds - a deliberate architectural constraint designed to balance flexibility with implementation complexity:
Level 1: Individual Key Weights - Each key in a signing key set can be assigned a weight value that represents its contribution toward the threshold
Implementations MUST use exact rational number arithmetic, not floating-point, to avoid precision errors in threshold calculations. KERIpy uses Python's fractions.Fraction class. Other implementations should use equivalent rational number libraries.
KERI explicitly limits weighted thresholds to two levels (weight-of-weights). This architectural constraint exists because:
Weights must be encoded according to CESR specifications:
When verifying signatures against weighted thresholds:
When rotating keys with weight changes:
For ACDC edge weights:
Level 2: Weight-of-Weights - For tightly cooperating teams, KERI supports a two-level hierarchy where:
This two-level limitation is intentional. According to the canonical documentation, KERI explicitly does not support recursive weight-of-weights beyond two levels because:
The weight system integrates with several KERI components:
Tholder Objects: The Tholder (threshold holder) is a specialized object in KERI implementations that manages fractionally-weighted thresholds. It encapsulates the logic for:
Threshold Expressions: Weights are expressed in threshold strings that can represent:
"2" (requires 2 signatures)"1/2" (requires signatures totaling at least 1/2 of total weight)CESR Encoding: Weights must be encoded in CESR format for inclusion in key events. The CESR specification provides dual-indexed codes specifically designed for weighted threshold multi-signature schemes, enabling compact representation of weight information in both text and binary domains.
Weights appear in KERI data structures in several contexts:
In Establishment Events:
{
"v": "KERI10JSON00011c_",
"t": "icp",
"d": "EZAoTNZH3ULvaU6Z-i0d8JJR2nmwyYAfSVPzhzS6b5CM",
"i": "EZAoTNZH3ULvaU6Z-i0d8JJR2nmwyYAfSVPzhzS6b5CM",
"s": "0",
"kt": ["1/2", "1/2", "1/2"],
"k": [
"DaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM",
"DZH3ULvaU6JR2nmwyZ-i0d8JZAoTNYAfSVPzhzS6b5CM",
"DTNZH3ULvaU6JR2nmwyZ-i0d8JZAoYAfSVPzhzS6b5CM"
],
"nt": ["1/2", "1/2", "1/2"],
"n": [
"EYAfSVPzhzaU6JR2nmwyZdi0d8JZTNZH3ULvS6b5CM",
"EaU6JR2nmwyZdi0d8JZTNZH3ULvYAfSVPzhzS6b5CM",
"ETNZH3ULvYAfSVPzhzaU6JR2nmwyZdi0d8JZS6b5CM"
],
"bt": "2",
"b": ["witness1", "witness2", "witness3"],
"c": [],
"a": []
}
In this example:
kt (key threshold) contains weight values for current keysnt (next threshold) contains weight values for pre-rotated keys"1/2"In ACDC Edge Sections:
{
"d": "ELvaU6Z-i0d8JJR2nmwyYAZAoTNZH3UfSVPzhzS6b5CM",
"boss": {
"n": "EQzFVaMasUf4cZZBKA0pUbRc9T8yUXRFLyM1JDASYqAA",
"s": "EQzFVaMasUf4cZZBKA0pUbRc9T8yUXRFLyM1JDASYqAA",
"w": "high"
}
}
Here the w field provides an edge weight property, though the ACDC specification notes this is optional and the semantics of edge weights are application-specific.
Weights in KERI must be encoded according to CESR specifications:
Text Domain Encoding: Weights are represented as strings in JSON serializations:
"2", "3", "5""1/2", "2/3", "3/5"Binary Domain Encoding: When serialized to binary formats (CBOR, MGPK), weights follow CESR primitive encoding rules:
CESR Dual-Indexed Codes: The CESR specification provides specialized encoding for weighted threshold configurations:
Weight Value Constraints:
numerator/denominatorArchitectural Constraints:
Implementation Constraints:
Weighted Threshold Specification:
When creating a new AID with weighted thresholds, the controller specifies:
Example using KERIpy's kli tool:
kli incept \
--name myaid \
--icount 3 \
--isith '["1/2","1/2","1/2"]' \
--ncount 3 \
--nsith '["1/2","1/2","1/2"]' \
--transferable
This creates an AID where:
Tholder Object Initialization:
In KERIpy implementation, the Tholder class manages weighted thresholds:
from keri.core.coring import Tholder
# Create a tholder for weighted threshold
tholder = Tholder(sith=["1/2", "1/2", "1/2"])
# Check if a set of indices satisfies the threshold
indices = [0, 1] # First two keys
satisfied = tholder.satisfy(indices=indices)
Key Rotation with Weight Changes:
Weights can be modified during rotation events:
{
"v": "KERI10JSON00011c_",
"t": "rot",
"d": "E8JZAoTNZH3ULvaU6Z-i0d8JJR2nmwyYAfSVPzhzS6b5CM",
"i": "EZAoTNZH3ULvaU6Z-i0d8JJR2nmwyYAfSVPzhzS6b5CM",
"s": "1",
"p": "EZAoTNZH3ULvaU6Z-i0d8JJR2nmwyYAfSVPzhzS6b5CM",
"kt": ["2/3", "1/3"],
"k": [
"DaU6JR2nmwyZ-i0d8JZAoTNZH3ULvYAfSVPzhzS6b5CM",
"DZH3ULvaU6JR2nmwyZ-i0d8JZAoTNYAfSVPzhzS6b5CM"
],
"nt": ["2/3", "1/3"],
"n": [
"EYAfSVPzhzaU6JR2nmwyZdi0d8JZTNZH3ULvS6b5CM",
"EaU6JR2nmwyZdi0d8JZTNZH3ULvYAfSVPzhzS6b5CM"
],
"bt": "2",
"br": [],
"ba": [],
"a": []
}
This rotation:
Weight Rebalancing:
Organizations may need to rebalance weights as governance structures change:
Each rebalancing requires a rotation event that:
Threshold Satisfaction Checking:
Validators must verify that attached signatures satisfy the weighted threshold:
Pseudocode:
def verify_weighted_threshold(signatures, keys, weights, threshold):
total_weight = 0
for sig in signatures:
key_index = sig.index
if verify_signature(sig, keys[key_index]):
total_weight += weights[key_index]
return total_weight >= threshold
Fractional Arithmetic Precision:
Implementations must handle fractional weights correctly:
KERIpy uses Python's fractions.Fraction class for this purpose:
from fractions import Fraction
weight1 = Fraction(1, 2)
weight2 = Fraction(1, 2)
total = weight1 + weight2 # Exactly 1, not 0.9999999
Edge Weight Validation:
For ACDC edge weights, validation depends on application semantics:
KERI Establishment Events:
Weights are fundamental to KERI's key management:
ACDC Credential Graphs:
Weights enable sophisticated authorization logic:
Multi-Signature Coordination:
Weights facilitate organizational governance:
Initial Configuration:
Weights are established at AID inception:
Operational Phase:
During normal operations:
Governance Evolution:
Weights evolve through rotation events:
Delegation Hierarchies:
Weights propagate through delegation:
Tholder (Threshold Holder):
The Tholder object encapsulates weight logic:
CESR Primitives:
Weights are encoded as CESR primitives:
Key Event Logs (KELs):
Weights are recorded in KEL events:
Witness Pools:
Weights can apply to witness configurations:
CESR Encoding Complexity:
The two-level weight limitation exists because:
Alternative Approaches:
For scenarios requiring more than two weight levels:
Performance Implications:
Weighted thresholds affect performance:
Security Considerations:
Weight systems introduce security considerations:
Weights in KERI provide essential flexibility for multi-signature authorization schemes, enabling sophisticated governance models while maintaining cryptographic security. The deliberate limitation to two weight levels balances implementation complexity with practical use cases, while delegation mechanisms provide alternative approaches for more complex hierarchies. Understanding weight mechanics is crucial for implementing robust, flexible identity systems using KERI infrastructure.