Verification is the cryptographic process of determining the authenticity, integrity, and validity of digital objects (credentials, signatures, key states) using public keys and cryptographic proofs, enabling trust decisions without relying on intermediaries.
Related Concepts
No related concepts available
Comprehensive Explanation
Verification in KERI/ACDC Systems
Process Definition
Verification in the KERI ecosystem represents a fundamental cryptographic operation that enables trust establishment through mathematical proof rather than institutional authority. As defined in the ToIP glossary, verification is "an action an agent (of a principal) performs to determine the authenticity of a claim or other digital object using a cryptographic key."
The process accomplishes several critical objectives:
Authenticity Determination: Confirming that data originates from the claimed source through signature validation
Integrity Validation: Ensuring data has not been altered since signing through cryptographic digest comparison
Temporal Validity: Checking that credentials or key states remain valid and have not expired
Structural Conformance: Validating that data structures adhere to their specified schemas
Verification is used throughout the KERI protocol stack:
Key Event Log (KEL) verification: Validating the cryptographic chain of key events from inception through all rotations
Credential verification: Confirming ACDC credentials are properly signed and anchored to valid KELs
Witness receipt verification: Validating that witnesses have properly signed key events
Presentation verification: Confirming that credential presentations are authentic and authorized
Key participants in verification processes include:
Verified KELs should be cached with appropriate invalidation:
Cache key: AID prefix
Cache value: Verified KEL + current key state + timestamp
Invalidation: When new events are discovered or cache TTL expires
Consider using LRU eviction for memory management
Performance Optimization
Batch Operations: When verifying multiple credentials from the same issuer, retrieve and verify the issuer's KEL once, then reuse for all credentials.
Parallel Verification: Independent verification operations (e.g., verifying multiple credentials) can be parallelized for better performance.
Incremental Verification: When a KEL is updated with new events, only verify the new events rather than re-verifying the entire log.
Error Handling Patterns
Transient vs Permanent Failures: Distinguish between failures that might succeed on retry (network errors) and permanent failures (invalid signatures).
Graceful Degradation: When optional verification steps fail (e.g., witness receipt verification), decide whether to proceed with reduced confidence or reject entirely based on policy.
Detailed Error Context: Provide sufficient error information for debugging without exposing sensitive data.
Security Considerations
Timing Attacks: Verification operations should be constant-time where possible to prevent timing side-channels.
Resource Exhaustion: Implement limits on KEL size, recursion depth for credential chains, and verification timeout to prevent DoS attacks.
Duplicity Detection: Always compare KELs from multiple sources when possible to detect malicious controllers.
Integration Patterns
KEL Verification Sequence
The verification of a Key Event Log follows a precise sequence:
Step 1: Inception Event Verification
Extract the AID prefix from the inception event
Verify the prefix is correctly derived from the initial public key(s)
For self-addressing identifiers, compute the digest of the inception event and confirm it matches the prefix
Validate the inception event signature(s) using the public key(s) embedded in or derived from the prefix
Step 2: Establishment Event Chain Verification
Process each rotation event in sequence
Verify the previous event digest matches the computed digest of the prior event (backward chaining)
Verify the pre-rotated key commitment from the previous event matches the digest of the current rotation keys (forward chaining)
Validate signatures on the rotation event using the current authoritative keys
Update the key state to reflect the new authoritative keys and next key commitments
Step 3: Interaction Event Verification
Verify interaction events are signed by keys that were authoritative at the time of signing
Validate the previous event digest chain
Confirm sequence numbers are monotonically increasing
Verify any seals (anchored data commitments) are properly formatted
Step 4: Witness Receipt Verification
For each key event, verify witness receipts if operating in indirect mode
Confirm witness signatures using witness AIDs and their KELs
Validate that the threshold of accountable duplicity (TOAD) is satisfied
Check for duplicity by comparing receipts from multiple witnesses
ACDC Credential Verification Sequence
Step 1: Structural Validation
Parse the ACDC according to its version string
Validate the ACDC conforms to its declared schema
Verify all required fields are present
Confirm field ordering matches the schema specification
Step 2: SAID Integrity Verification
Extract the SAID from the credential's d field
Replace the SAID with placeholder characters (typically #)
Compute the cryptographic digest of the modified credential
Verify the computed digest matches the extracted SAID
Repeat for nested SAIDs in attribute, edge, and rule sections
Step 3: Issuer KEL Verification
Extract the issuer AID from the credential's i field
Retrieve the issuer's KEL (via OOBI or cached copy)
Verify the issuer's KEL from inception through current state
Determine the key state that was authoritative when the credential was issued
Step 4: Signature Verification
Locate the CESR Proof Signature attachments
Extract the signature(s) and signing key indices
Retrieve the public keys that were authoritative at issuance time
Verify the signature(s) over the credential using the authoritative public keys
For multi-sig credentials, verify the threshold is satisfied
Step 5: Registry State Verification (if applicable)
If the credential includes a registry identifier (ri field), retrieve the TEL
Verify the TEL is properly anchored to the issuer's KEL
Check the credential's issuance and revocation state