Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 177 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.
Qualified is a fundamental property of cryptographic primitives in KERI (Key Event Receipt Infrastructure) and CESR (Composable Event Streaming Representation) that distinguishes self-describing cryptographic material from raw binary values. When a cryptographic primitive is qualified, it includes a prepended derivation code (also called a proem) that explicitly indicates:
This qualification mechanism transforms raw cryptographic material into self-certifying, self-describing data that can be parsed, validated, and processed without requiring external schema definitions or configuration files.
According to the IETF-KERI specification by Samuel Smith, a cryptographic primitive is qualified when it "includes a prepended derivation code (as a proem) that indicates the cryptographic algorithm or suite used for that derivation." This prepending operation:
Qualification serves multiple critical purposes in the KERI ecosystem:
Self-Description: Qualified primitives carry their own interpretation instructions, enabling parsers to process streams of mixed cryptographic material without prior knowledge of content types.
Implementations must:
When converting between text and binary domains:
Composability: The qualification property is essential for CESR's composability guarantee—the ability to convert concatenated primitives between text and binary domains without losing separability.
Algorithm Agility: By embedding algorithm identifiers, qualified primitives support multiple cryptographic suites coexisting in the same system, enabling gradual migration to post-quantum algorithms.
Interoperability: Systems can exchange qualified primitives without pre-negotiating cryptographic parameters, as each primitive declares its own derivation method.
Qualified primitives in KERI/CESR fall into several categories:
Basic Primitives: Single cryptographic values with derivation codes
Composed Primitives: Aggregations of qualified primitives
Variable-Length Primitives: Qualified text or binary data
The derivation code (proem) that qualifies a primitive consists of:
Code Characters: 1-4 characters in Base64 URL-safe encoding that specify:
Length Information: Implicit or explicit encoding of the primitive's length:
Qualification provides several security benefits:
Algorithm Binding: The derivation code cryptographically commits to the algorithm used, preventing algorithm substitution attacks where an attacker might attempt to reinterpret a primitive under a weaker algorithm.
Type Safety: Parsers can verify that primitives are used in appropriate contexts (e.g., ensuring a signature primitive is not misinterpreted as a public key).
Version Control: Different versions of the same algorithm can be distinguished through distinct derivation codes, enabling security updates without breaking existing systems.
KERI mandates minimum cryptographic strength requirements:
128-bit Security: All qualified primitives must provide approximately 128 bits of cryptographic strength, ensuring resistance to brute-force attacks and providing a security margin against future computational advances.
Post-Quantum Considerations: The qualification mechanism supports post-quantum algorithms through:
Qualified primitives in CESR exist in three domains:
Text Domain (T): Base64 URL-safe encoding
[A-Z, a-z, 0-9, -, _]BF5pxRJP6THrUtlDdhh07hJEDKrJxkcR9m5u1xs33bhp
B = derivation code for Ed25519 public keyBinary Domain (B): Compact binary representation
Raw Domain (R): Unqualified cryptographic material
(derivation_code, raw_bytes)The qualification mechanism ensures round-trip composability between text and binary domains:
Text Representation:
Derivation_Code + Base64(Raw_Material)
Binary Representation:
Binary_Derivation_Code + Raw_Material_Bytes
24-bit Alignment: All qualified primitives align on 24-bit boundaries (the least common multiple of 6-bit Base64 characters and 8-bit bytes), ensuring clean conversion between domains without bit-level dependencies between adjacent primitives.
CESR defines extensive code tables for different primitive types:
Single-Character Codes: Most common primitives
A: Ed25519 non-transferable prefix (basic derivation)B: Ed25519 transferable prefix (self-addressing derivation)C: X25519 public encryption keyD: Ed25519 public signing keyE: Blake3-256 digestF: Blake2b-256 digestG: Blake2s-256 digestH: SHA3-256 digestI: SHA2-256 digestMulti-Character Codes: Specialized or less common primitives
0B: Ed25519 signature (indexed)0C: ECDSA secp256k1 signature1AAA: Large frame count code4B##: Variable-length byte string (small)Count Codes: For grouping primitives
-A##: Attachment group counter-B##: Message group counter-C##: Material group counterQualified primitives appear throughout KERI key events:
Inception Events:
{
"v": "KERI10JSON00011c_",
"t": "icp",
"d": "EAdXt3gIXOf2BBWNHdSXCJnFJL5OuQPyM5K0neuniccM",
"i": "EAdXt3gIXOf2BBWNHdSXCJnFJL5OuQPyM5K0neuniccM",
"s": "0",
"kt": "1",
"k": ["DKxy2sgzfplyr-tgwIxS19f2OchFHtLwPWD3v4oYimBx"],
"n": ["EQb3h7P3fmKJNRqZbzxI7JZ6JjLQCXq0JzLZqFZvDxkQ"],
"bt": "2",
"b": ["BGKVzj4ve0VSd8z_AmvhLg4lqcC_9WYX90k03q-R_Ydo"],
"c": [],
"a": []
}
Qualified primitives in this event:
d: Qualified SAID (self-addressing identifier) with E derivation codei: Qualified AID (autonomic identifier) with E derivation codek: Qualified public key with D derivation coden: Qualified next key digest with E derivation codeb: Qualified witness AID with B derivation codeRotation Events: Similar structure with qualified primitives for rotated keys and next key commitments.
Interaction Events: Include qualified seals (digests) anchoring external data.
ACDCs extensively use qualified primitives:
SAIDs (Self-Addressing Identifiers):
ELqriXX1-lbV9zgXP4BXxqJlpZTgFchll3cyja (Blake3-256 digest)Issuer AIDs:
i field contains a qualified AID of the credential issuerSchema SAIDs:
s field references schemas via qualified SAIDsIdentifier Derivation:
Signature Attachment:
Digest Computation:
Verifying qualified primitives follows a standard pattern:
Step 1: Parse Derivation Code
Step 2: Extract Raw Material
Step 3: Perform Cryptographic Operation
Step 4: Validate Context
Qualification is a property that applies to all CESR primitives:
Diger: Qualified digest primitive
Verfer: Qualified public key primitive
Signer: Qualified private key primitive
Siger: Qualified indexed signature primitive
Cigar: Qualified non-indexed signature primitive
Salter: Qualified seed/salt primitive
Qualified primitives compose into higher-level structures:
Multi-Signature Groups: Collection of qualified indexed signatures
Witness Receipt Logs: Sequences of qualified receipts
ACDC Chains: Linked credentials via qualified SAIDs
Qualification is not optional in KERI/CESR—all cryptographic primitives MUST be qualified. This requirement ensures:
Universal Parseability: Any CESR stream can be parsed without external schema
Algorithm Agility: Systems can evolve cryptographic algorithms without breaking changes
Interoperability: Different implementations can exchange primitives reliably
Security: Algorithm binding prevents substitution attacks
The qualification mechanism is described as an essential property of CESR, making it a foundational concept for understanding KERI's encoding scheme and cryptographic architecture.