Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 153 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.
Internal inconsistency refers to contradictions or violations of protocol rules within a single Key Event Log (KEL) that make it cryptographically unverifiable, as opposed to external inconsistency (duplicity) where multiple verifiable but conflicting versions of a KEL exist.
Internal inconsistency describes a state where a data structure—particularly a Key Event Log (KEL) in KERI—contains contradictions, protocol violations, or cryptographic failures within itself that prevent successful verification. The term "internal" emphasizes that the inconsistency exists within the defining data structures and related data stores of a single identifier, rather than arising from comparison with external copies.
Key properties of internal inconsistency include:
The scope of internal inconsistency encompasses:
The concept of internal consistency has roots in database theory and distributed systems, where maintaining data integrity within a single system is a fundamental requirement. Traditional approaches include:
Database ACID Properties: The "Consistency" property in ACID (Atomicity, Consistency, Isolation, Durability) ensures that database transactions maintain internal consistency by enforcing constraints and rules.
Implementers must perform comprehensive internal consistency checks during KEL verification:
Cryptographic Verification:
Structural Validation:
Protocol Compliance:
When internal inconsistency is detected:
Immediate Rejection: The KEL must be rejected entirely—partial verification is not permitted
Clear Error Reporting: Implementations should provide detailed error messages indicating:
No Fallback: Unlike some systems that might accept "best effort" verification, KERI requires strict consistency—there is no fallback to weaker verification modes
Internal consistency verification is computationally efficient:
Linear Complexity: Verification requires processing each event once, giving O(n) complexity where n is the number of events
Local Operations: All verification is local cryptographic computation—no network communication required
Caching Opportunities: Verified key states can be cached to avoid re-verifying the entire KEL on subsequent operations
Parallel Verification: Independent KELs can be verified in parallel for scalability
Merkle Tree Verification: Cryptographic data structures like Merkle trees provide internal consistency through hash chaining—any tampering with internal nodes can be detected by verifying the hash chain to the root.
Blockchain Internal Validation: Blockchains verify internal consistency by checking that each block's hash correctly references the previous block, that transactions are properly signed, and that consensus rules are followed.
However, these traditional systems often conflate internal consistency with external consistency (agreement across replicas), or rely on trusted validators to enforce consistency. KERI makes a sharp distinction between these two types of consistency.
KERI provides protection against internal inconsistency through its self-certifying architecture and cryptographic verification mechanisms:
The KEL is a backward and forward-chained data structure where each event includes:
This structure makes internal inconsistency immediately detectable:
KERI's autonomic identifiers (AIDs) are derived from their inception keys, creating a cryptographic binding between the identifier and its initial key state. This self-certifying property means:
As stated in the source documents: "In KERI, you are protected against internal inconsistency by the hash chain data structure of the KEL because the only authority that can sign the log is the controller itself."
KERI's verification process systematically checks for internal consistency:
If any check fails, the KEL is internally inconsistent and cannot be trusted.
KERI makes a critical distinction between internal and external inconsistency:
Internal Inconsistency:
External Inconsistency (Duplicity):
As the source documents explain: "Internal is used to describe things that exist or happen inside an entity. In our scope of digital identifiers its (in)consistency is considered within the defining data structures and related data stores."
KERI's protection against internal inconsistency enables ambient verifiability—anyone, anywhere, at any time can verify a KEL's internal consistency without relying on trusted infrastructure. This is possible because:
Identifier Validation: Before accepting an identifier as authoritative, validators must verify internal consistency. An internally inconsistent KEL indicates:
Error Detection: Internal consistency checks serve as error detection mechanisms:
Security Auditing: Regular internal consistency verification provides security assurance:
Objective Verification: Internal consistency is objectively verifiable through cryptographic algorithms, requiring no subjective judgment or trusted authorities.
Early Detection: Internal inconsistency is detected immediately during verification, before any trust decisions are made based on the KEL.
Clear Failure Mode: An internally inconsistent KEL has an unambiguous failure state—it simply cannot be verified. There is no gray area or partial trust.
Implementation Simplicity: Verification algorithms for internal consistency are straightforward to implement and test, reducing implementation risk.
Performance: Internal consistency checks are computationally efficient, requiring only local cryptographic operations without network communication.
Strict Requirements: KERI's internal consistency requirements are strict—any protocol violation renders the entire KEL unverifiable. This rigidity:
No Repair Mechanism: An internally inconsistent KEL cannot be repaired—it must be rejected entirely. This means:
Complexity for Multi-Sig: Multi-signature identifiers have more complex internal consistency requirements:
This added complexity increases the risk of implementation errors that create internal inconsistency.
Forward Compatibility: Strict internal consistency requirements may complicate protocol evolution:
Despite these trade-offs, KERI's approach to internal consistency provides a solid foundation for trustworthy identifier systems. By making internal inconsistency immediately detectable through cryptographic verification, KERI ensures that only valid, protocol-compliant KELs can be accepted as authoritative sources of key state information.
Implementations should include comprehensive test suites for internal consistency:
Positive Tests: Verify that valid KELs pass all consistency checks
Negative Tests: Confirm that various types of internal inconsistency are correctly detected:
Edge Cases: Test boundary conditions: