Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 65 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.
Post-quantum cryptography refers to cryptographic algorithms designed to remain secure against attacks from quantum computers. In KERI, post-quantum security is achieved through the [pre-rotation](/concept/pre-rotation "Pre-rotation is a cryptographic mechanism in KERI where a controller commits to ...") mechanism, which uses cryptographic hash digests to commit to future keys before they are exposed, providing quantum resistance at the protocol level even when individual key pairs may not be inherently quantum-resistant.
Post-quantum cryptography (also called quantum-proof, quantum-safe, or quantum-resistant cryptography) encompasses cryptographic algorithms—primarily public-key algorithms—that are designed to remain secure against cryptanalytic attacks performed by quantum computers. In the context of KERI, post-quantum security is achieved not through the use of specialized post-quantum cryptographic primitives for individual key pairs, but rather through the protocol's innovative pre-rotation mechanism.
A cryptographic system is considered post-quantum secure if it maintains its security properties even when an adversary has access to a large-scale quantum computer capable of running Shor's algorithm (for factoring and discrete logarithm problems) and Grover's algorithm (for symmetric key search). The security level is typically measured in "quantum bits" of security, where n quantum bits of security requires approximately 2^n quantum operations to break.
KERI's approach to post-quantum security addresses a fundamental vulnerability in traditional PKI systems: the ability of quantum computers to break current public-key cryptography schemes (RSA, ECDSA, etc.) through Shor's algorithm. Rather than requiring immediate adoption of post-quantum cryptographic algorithms (which are still maturing), KERI provides quantum resistance through its temporal security model based on proactive key rotation.
In KERI's architecture, post-quantum security is a protocol-level property rather than a primitive-level property. This distinguishes it from approaches that rely on quantum-resistant cryptographic algorithms like:
KERI's post-quantum security instead leverages the one-way property of cryptographic hash functions, which remain secure against quantum attacks (requiring only a doubling of hash output size to maintain equivalent security).
KERI achieves post-quantum security through its pre-rotation scheme, which works as follows:
The quantum resistance of KERI's pre-rotation mechanism relies on several key properties:
Hash Function Security: Cryptographic hash functions like Blake3, SHA-256, and SHA-512 maintain their security properties against quantum computers. While Grover's algorithm provides a quadratic speedup for preimage attacks, this only requires doubling the hash output size (e.g., from 128-bit to 256-bit security) to maintain equivalent security levels.
Temporal Advantage: The security model assumes that keys are rotated before a quantum computer can successfully attack them. As stated in the source documents: "keys are rotated before a brute force quantum attack can be effective." This creates a race condition where the defender (through proactive rotation) stays ahead of the attacker.
Adaptive Security Parameters: As quantum computing technology advances, KERI systems can respond by:
KERI's post-quantum security model requires:
The theoretical foundation for KERI's post-quantum approach draws on Daniel J. Bernstein's research on the cost of collision attacks. Key findings include:
This asymmetry—where signing algorithms are vulnerable but hash functions remain secure—forms the basis for KERI's pre-rotation strategy.
In KERI, post-quantum security is implemented through the next key digest field in establishment events. These digests are encoded using CESR (Composable Event Streaming Representation) with specific derivation codes.
Pre-rotated key digests appear in the n field of establishment events:
Single Next Key (Basic Format):
{
"v": "KERI10JSON00011c_",
"t": "icp",
"d": "EL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug",
"i": "EL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug",
"s": "0",
"kt": "1",
"k": ["DL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug"],
"nt": "1",
"n": ["ETNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM"],
"bt": "0",
"b": [],
"c": [],
"a": []
}
Multiple Next Keys (Multi-sig Format):
{
"n": [
"ETNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM",
"EYAfSVPzhzaU6JR2nmoTNZH3ULvwyZb6b5CMi0d8JZAS",
"EnmwyZdi0d8JZAoTNZYAfSVPzhzaU6JR2H3ULvS6b5CM"
]
}
CESR uses specific derivation codes to indicate the hash algorithm used for next key digests:
E: Blake3-256 digest (44 characters total in Base64)F: Blake2b-256 digest (44 characters total)G: Blake2s-256 digest (44 characters total)H: SHA3-256 digest (44 characters total)I: SHA2-256 digest (44 characters total)The choice of hash algorithm affects the quantum security level:
Text Domain (Base64 URL-safe):
ETNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM
Binary Domain (raw bytes):
0x13 0x35 0x87 0xDD 0x42 0xEF 0x61 0xAC 0x32 0x67 0xE8 0xB4 0x77 0xC2 0x49 0x53
0xA2 0x51 0xD8 0x79 0x80 0x20 0x1F 0x49 0x53 0xF3 0x87 0x34 0xBA 0x6F 0x90 0xC8
Raw Domain (code, raw) tuple:
("E", <32-byte Blake3-256 digest>)
Post-quantum security through pre-rotation is implemented in two types of establishment events:
1. Inception Events (icp):
The inception event creates an AID and establishes the initial key state, including the first pre-rotated key commitment:
{
"v": "KERI10JSON00011c_",
"t": "icp",
"d": "EL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug",
"i": "EL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug",
"s": "0",
"kt": "1",
"k": ["DL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug"],
"nt": "1",
"n": ["ETNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM"],
"bt": "0",
"b": [],
"c": [],
"a": []
}
Key fields for post-quantum security:
k: Current signing keys (exposed)n: Next key digests (quantum-protected through one-way hash)nt: Next threshold (number of signatures required from next keys)2. Rotation Events (rot):
Rotation events change the key state and establish new pre-rotated commitments:
{
"v": "KERI10JSON00011c_",
"t": "rot",
"d": "E0d8JZU6JR2nmAoAfSVPzhzS6b5CMTNZH3ULvYawyZ-i",
"i": "EL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug",
"s": "1",
"p": "EL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug",
"kt": "1",
"k": ["DTNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM"],
"nt": "1",
"n": ["EYAfSVPzhzaU6JR2nmoTNZH3ULvwyZb6b5CMi0d8JZAS"],
"bt": "0",
"br": [],
"ba": [],
"a": []
}
Key fields:
p: Prior event digest (backward chaining)k: New current keys (previously committed in prior event's n field)n: New next key digests (quantum-protected commitment to future keys)Pattern 1: Proactive Rotation Schedule
Organizations implement scheduled key rotations to maintain quantum security:
Time T0: Inception with keys K0, commit to digest(K1)
Time T1: Rotate to K1, commit to digest(K2)
Time T2: Rotate to K2, commit to digest(K3)
...
Rotation frequency depends on:
Pattern 2: Compromise Recovery
If current signing keys (K0) are compromised, the controller can still recover control using the pre-rotated keys (K1) that were never exposed:
1. Attacker compromises K0
2. Controller detects compromise
3. Controller uses K1 (which attacker doesn't have) to rotate to K2
4. Attacker's K0 is now useless
This recovery mechanism works because:
Pattern 3: Multi-Signature Quantum Security
For multi-sig AIDs, post-quantum security scales with the number of signers:
{
"kt": "2",
"k": [
"DL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug",
"DTNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM",
"DYAfSVPzhzaU6JR2nmoTNZH3ULvwyZb6b5CMi0d8JZAS"
],
"nt": "2",
"n": [
"ETNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM",
"EYAfSVPzhzaU6JR2nmoTNZH3ULvwyZb6b5CMi0d8JZAS",
"EnmwyZdi0d8JZAoTNZYAfSVPzhzaU6JR2H3ULvS6b5CM"
]
}
An attacker would need to:
This creates exponential security scaling where each additional signer multiplies the attack difficulty.
Verifying Pre-Rotation Commitments:
Extract next key digest from prior establishment event:
prior_event.n[i] = "ETNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM"
Extract current key from rotation event:
rotation_event.k[i] = "DTNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM"
Compute digest of current key:
computed_digest = Blake3(rotation_event.k[i])
Verify commitment:
assert computed_digest == prior_event.n[i]
This verification proves:
Verifying Rotation Authority:
Only if all checks pass is the rotation considered valid and quantum-secure.
Post-quantum security extends to ACDC credentials through the issuer's AID:
{
"v": "ACDC10JSON00011c_",
"d": "EL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug",
"i": "EL1L56LyoKrIofnn0oPChS4EyzMHEEk75INJohDS_Bug",
"s": "E0d8JZU6JR2nmAoAfSVPzhzS6b5CMTNZH3ULvYawyZ-i",
"a": {
"d": "ETNZH3ULvYawyZ-i0d8JZU6JR2nmAoAfSVPzhzS6b5CM",
"i": "EYAfSVPzhzaU6JR2nmoTNZH3ULvwyZb6b5CMi0d8JZAS",
"LEI": "254900OPPU84GM83MG36"
}
}
The credential's quantum security derives from:
i field) with post-quantum key managementd field) using quantum-resistant hash functionss field) ensuring schema integrityVerifiers can trust the credential's authenticity because:
Post-quantum security in KERI fundamentally depends on the quantum resistance of cryptographic hash functions:
These hash functions share the property that quantum computers provide only a quadratic speedup (via Grover's algorithm) rather than the exponential speedup available for factorization and discrete logarithm problems.
KERI uses key derivation functions (KDFs) to generate keys from high-entropy seeds:
These KDFs maintain their security properties against quantum attacks when using quantum-resistant hash functions as their underlying primitive.
While KERI's current implementations use classical signature schemes (Ed25519, ECDSA), the protocol is designed to support post-quantum signature algorithms:
Current (Quantum-Vulnerable):
Future (Quantum-Resistant):
KERI's pre-rotation mechanism provides quantum security regardless of which signature scheme is used, because the next keys are hidden behind quantum-resistant hash functions.
Pattern 1: Hash-Based Commitment + Classical Signatures
Current KERI implementations use:
Quantum-Resistant Hash (next key) + Classical Signature (current key)
This provides quantum security through temporal advantage: keys rotate before quantum attack succeeds.
Pattern 2: Hash-Based Commitment + PQC Signatures
Future KERI implementations may use:
Quantum-Resistant Hash (next key) + PQC Signature (current key)
This provides defense-in-depth: both the commitment mechanism and the signature scheme are quantum-resistant.
Pattern 3: Multi-Layer Security
High-security deployments can combine:
Multi-sig (M-of-N) + Pre-rotation + Short rotation intervals + High entropy
This creates multiple independent barriers to quantum attack.
The quantum security of KERI depends critically on rotating keys before quantum computers can attack them. Factors to consider:
Quantum Computing Progress:
Attack Time Estimation:
Operational Constraints:
Recommended Intervals (as of 2024):
These intervals should be shortened as quantum computing advances.
Post-quantum security requires sufficient entropy in key generation:
Minimum Requirements:
Entropy Sources:
/dev/urandom (Linux), CryptGenRandom (Windows)Entropy Testing:
Choosing appropriate hash functions for post-quantum security:
Blake3-256 (Recommended):
SHA3-256 (Conservative):
SHA2-512 (High-Security):
Post-quantum security requires protecting both current and next keys:
Current Signing Keys:
Next (Pre-Rotated) Keys:
Key Generation Environment:
Post-quantum security extends to the witness network:
Witness Pool Size:
Threshold Configuration:
Watcher Networks:
While KERI's pre-rotation provides quantum security with classical algorithms, organizations may want to migrate to post-quantum cryptographic algorithms:
Algorithm Selection:
Migration Strategy:
CESR Support:
Post-quantum security mechanisms have performance implications:
Hash Function Performance:
Key Generation:
Signature Size:
Verification Time:
These performance characteristics should be considered when designing systems with post-quantum security requirements.
KERI's approach to post-quantum security represents a pragmatic and innovative solution to the quantum computing threat. By leveraging the quantum resistance of cryptographic hash functions through the pre-rotation mechanism, KERI provides quantum security today without requiring immediate adoption of post-quantum cryptographic algorithms. This temporal security model, combined with adaptive parameters (rotation intervals, entropy levels, hash functions), ensures that KERI-based systems can maintain security as quantum computing technology advances.
The key insight is that protocol-level security properties can provide quantum resistance even when individual cryptographic primitives may be vulnerable. This approach offers a path forward for securing digital identities in the post-quantum era while allowing the ecosystem to gradually transition to fully post-quantum cryptographic algorithms as they mature and become standardized.