Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 171 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.
A top-level field map within an ACDC that provides properties or characteristics of an entity, either inherent or assigned, enabling verifiable claims about subjects through structured data representation.
In the KERI/ACDC ecosystem, an attribute is a fundamental structural component that represents a property or characteristic of an entity. The ACDC specification defines attributes as a top-level field map within an Authentic Chained Data Container, designated by the a field label in the canonical ACDC structure.
Attributes serve multiple critical functions in the verifiable credential ecosystem:
Claim Representation: Attributes encode the substantive claims being made about a subject entity. For example, in a Legal Entity vLEI Credential, attributes include the LEI number, issuance datetime, and the entity's AID.
Selective Disclosure Support: The attribute structure enables graduated disclosure patterns where credential holders can reveal attributes progressively based on context and trust relationships.
Cryptographic Binding: Through SAID (Self-Addressing Identifier) mechanisms, attributes are cryptographically bound to the credential, ensuring tamper-evidence and integrity verification.
Schema Validation: Attributes conform to JSON Schema definitions that specify required fields, data types, and validation constraints, enabling automated verification of credential structure.
Insertion Order Mandatory: Attributes MUST use insertion-ordered field maps, not lexicographic ordering. Use Python 3.7+ dict, JavaScript Object, or Rust IndexMap to maintain insertion order. Alphabetical sorting will break SAID verification.
Consistent Ordering: All instances of a credential type MUST use identical field ordering. Document the canonical field order in the schema and enforce it during attribute creation.
Placeholder Length: When computing attribute block SAIDs, the placeholder string MUST be exactly 44 characters (for Blake3-256 with CESR 'E' code). Incorrect placeholder length will produce wrong SAIDs.
Compact Serialization: Use compact JSON serialization (no whitespace) for SAID computation: json.dumps(attrs, separators=(',', ':')). Extra whitespace changes the digest.
Encoding Details: Use Base64 URL-safe encoding without padding (= characters). The CESR derivation code 'E' indicates Blake3-256 digest.
Pre-Issuance Validation: Always validate attributes against their JSON Schema before computing SAIDs or issuing credentials. Invalid attributes will cause verification failures.
Schema Versioning: When schemas evolve, create new schema versions with new SAIDs. Never modify existing schemas as this breaks verification for previously issued credentials.
Required vs Optional: Mark fields as required only when truly mandatory. Optional fields provide flexibility for different use cases and future extensions.
PII Minimization: Avoid embedding personally identifiable information directly in attributes when possible. Use SAIDs to reference external data stores for sensitive information.
Correlation Awareness: Attributes containing unique identifiers (LEI, email, phone) enable correlation across credential presentations. Document correlation risks for credential holders.
Selective Disclosure Support: Design attribute schemas to support selective disclosure by grouping related attributes and using the selective attribute section (A) for independently disclosable attributes.
Compact Storage: Store credentials in compact form (SAIDs only) when full attributes aren't needed. Expand attributes only when required for presentation or verification.
The attribute section follows a hierarchical organization within the ACDC structure:
ACDC
├── v (version)
├── d (SAID of ACDC)
├── i (issuer AID)
├── ri (registry identifier)
├── s (schema SAID)
├── a (attributes) ← Primary attribute section
│ ├── d (SAID of attributes block)
│ ├── i (issuee AID)
│ ├── dt (datetime)
│ └── [domain-specific attributes]
├── e (edges)
└── r (rules)
The attribute section can be represented in two forms:
"a": "ELGgI0fkloqKWREXgqUfgS0bJybP1LChxCO3sqPSFHCj")This dual representation enables compact disclosure where credentials can be presented showing only the SAID initially, with full attributes revealed later after contractual protections are established.
Attribute sections typically contain several standard components:
Attribute Block SAID (d): A self-addressing identifier computed over the canonical serialization of the attribute block, providing content-addressable integrity.
Issuee Identifier (i): When present, specifies the AID of the entity to whom the credential is issued. This field is optional - credentials without an issuee are called untargeted ACDCs.
Issuance Datetime (dt): ISO 8601 formatted timestamp indicating when the credential was issued, enabling temporal validity checks.
Domain-Specific Attributes: Custom fields defined by the credential schema, such as LEI numbers for Legal Entity credentials, role descriptions for OOR credentials, or engagement context details for ECR credentials.
Attributes are structured as ordered field maps where field order is deterministic and preserved across serialization/deserialization cycles. This ordering requirement is critical for SAID computation and verification.
The ACDC specification mandates insertion-ordered field maps rather than lexicographic (alphabetical) ordering. This means fields appear in the order they were added to the structure, not sorted by field name. Modern programming languages like Python 3.7+, JavaScript, and Rust support ordered dictionaries/hash maps that maintain insertion order.
Example attribute structure from a QVI credential:
{
"d": "ELGgI0fkloqKWREXgqUfgS0bJybP1LChxCO3sqPSFHCj",
"i": "EpDA1n-WiBA0A8YOqnKrB-wWQYYC49i5zY_qrIZIicQg",
"dt": "2024-01-15T09:30:00.000000+00:00",
"LEI": "506700GE1G29325QX363",
"gracePeriod": 90
}
Field order matters: d, i, dt, LEI, gracePeriod must appear in this exact sequence for SAID verification to succeed.
ACDC attributes support multiple serialization formats:
JSON: The primary format for human-readable credentials and development. JSON serialization must preserve field ordering and use compact representation (no whitespace) for SAID computation.
CBOR: Concise Binary Object Representation for efficient binary transmission. CBOR maintains the same logical structure as JSON but with smaller byte footprint.
MGPK: MessagePack format, another binary serialization option with similar efficiency characteristics to CBOR.
CESR: Composable Event Streaming Representation for streaming protocols where attributes may be encoded as part of larger CESR streams.
The version string (v field) in the ACDC indicates which serialization format is used, enabling parsers to correctly deserialize the credential.
Attribute sections have several size-related considerations:
SAID Length: Attribute block SAIDs are typically 44 characters (Base64 encoding of 32-byte Blake3-256 digest with CESR derivation code).
Field Label Length: Field labels should be concise to minimize credential size. The ACDC specification uses short labels like i, d, dt rather than verbose names like issuer, digest, datetime.
Value Constraints: Individual attribute values are constrained by their JSON Schema definitions. For example, LEI fields must conform to ISO 17442 format (20 alphanumeric characters), datetime fields must be ISO 8601 format.
Total Size: While no hard limit exists, practical considerations suggest keeping attribute sections under several kilobytes for efficient transmission and storage. Large data should be referenced via SAIDs rather than embedded directly.
Attribute creation follows a specific workflow:
Schema Selection: Choose the appropriate JSON Schema that defines required and optional attributes for the credential type.
Field Population: Populate attribute fields according to schema requirements, ensuring all mandatory fields are present and values conform to type constraints.
Ordering Enforcement: Arrange fields in the canonical order specified by the schema. This order must be consistent across all instances of the credential type.
SAID Computation: Compute the attribute block SAID:
d field with placeholder characters (# repeated to match SAID length)E for Blake3-256)Schema Validation: Validate the completed attribute block against its JSON Schema to ensure structural correctness.
Example Python-like pseudocode:
def create_attributes(schema, values):
# Initialize ordered dict with required fields
attrs = OrderedDict()
attrs['d'] = '#' * 44 # Placeholder for SAID
# Add fields in schema-defined order
for field in schema.field_order:
if field in values:
attrs[field] = values[field]
# Compute SAID
serialized = json.dumps(attrs, separators=(',', ':'))
digest = blake3(serialized.encode())
said = 'E' + base64_url_safe(digest)
# Replace placeholder
attrs['d'] = said
# Validate against schema
validate(attrs, schema)
return attrs
ACDC attributes are immutable by design. Once a credential is issued with specific attributes, those attributes cannot be modified. This immutability is fundamental to the integrity model:
No In-Place Updates: Attributes cannot be updated in place. Any change to attribute values would invalidate the attribute block SAID, which would invalidate the ACDC SAID, breaking all cryptographic bindings.
Revocation and Reissuance: If attribute values need to change, the original credential must be revoked via the TEL (Transaction Event Log), and a new credential with updated attributes must be issued.
Versioning: Credential schemas may evolve over time, but each schema version is identified by its own SAID. Credentials issued under different schema versions are distinct credentials, not updates of existing ones.
Attribute verification involves multiple layers:
SAID Verification:
d fieldd field with placeholder charactersSchema Validation:
s fieldSemantic Validation:
Cryptographic Chain Verification:
Attributes are used across multiple KERI-related protocols:
ACDC Issuance: The IPEX (Issuance and Presentation Exchange) protocol uses attributes to convey credential claims from issuers to holders. During issuance, the issuer creates an ACDC with populated attributes and transmits it to the holder.
ACDC Presentation: When holders present credentials to verifiers, they may use selective disclosure to reveal only specific attributes. The IPEX protocol supports graduated disclosure where attributes are revealed progressively.
ACDC Verification: Verifiers use the IPEX protocol to request specific attributes from holders and validate the received attribute data against schemas and cryptographic commitments.
TEL Management: The Transaction Event Log tracks credential lifecycle events (issuance, revocation) that reference credentials by their SAIDs, which include attribute block SAIDs.
Attribute lifecycle follows the credential lifecycle:
Creation Phase: Attributes are created during credential issuance when the issuer populates the attribute section according to the credential schema.
Storage Phase: Holders store credentials with their attributes in secure storage (keystores, wallets). Attributes may be stored in compact form (SAID only) or expanded form (full field map).
Disclosure Phase: During presentation, holders decide which attributes to disclose:
Verification Phase: Verifiers validate disclosed attributes against schemas, SAIDs, and cryptographic signatures.
Revocation Phase: When credentials are revoked, the attributes become invalid. The TEL records the revocation event, and verifiers checking credential status will discover the attributes are no longer trustworthy.
Attributes interact with several related ACDC structures:
Schema Section (s): Defines the structure and validation rules for attributes. The schema SAID in the ACDC references a JSON Schema document that specifies required attributes, types, and constraints.
Edge Section (e): May reference attributes from other credentials. For example, an OOR credential's edge section references the Legal Entity credential, creating a verifiable chain where the OOR attributes depend on the LE attributes.
Rule Section (r): Contains legal disclaimers and usage terms that govern how attributes may be used. Rules may specify that certain attributes are confidential or subject to chain-link confidentiality.
Selective Attribute Section (A): A separate top-level section for attributes that support selective disclosure. These attributes are structured as arrays or aggregates where individual elements can be disclosed independently.
Attributes may contain nested field maps for complex data structures:
{
"d": "ELGgI0fkloqKWREXgqUfgS0bJybP1LChxCO3sqPSFHCj",
"i": "EpDA1n-WiBA0A8YOqnKrB-wWQYYC49i5zY_qrIZIicQg",
"dt": "2024-01-15T09:30:00.000000+00:00",
"personal": {
"legalName": "John Smith",
"dateOfBirth": "1980-05-15",
"nationality": "US"
},
"contact": {
"email": "[email protected]",
"phone": "+1-555-0123"
}
}
Nested structures enable logical grouping of related attributes while maintaining a single attribute block SAID for the entire structure.
Attributes may include arrays for multi-valued properties:
{
"d": "ELGgI0fkloqKWREXgqUfgS0bJybP1LChxCO3sqPSFHCj",
"i": "EpDA1n-WiBA0A8YOqnKrB-wWQYYC49i5zY_qrIZIicQg",
"dt": "2024-01-15T09:30:00.000000+00:00",
"roles": [
"Chief Executive Officer",
"Board Director"
],
"certifications": [
"ISO 27001",
"SOC 2 Type II"
]
}
Array-based attributes enable representation of multiple values for a single property type.
Attributes may reference external data via SAIDs:
{
"d": "ELGgI0fkloqKWREXgqUfgS0bJybP1LChxCO3sqPSFHCj",
"i": "EpDA1n-WiBA0A8YOqnKrB-wWQYYC49i5zY_qrIZIicQg",
"dt": "2024-01-15T09:30:00.000000+00:00",
"documentSAID": "EBfdlu8R27Fbx-ehrqwImnK-8Cm79sqbAQ4MmvEAYqao",
"imageSAID": "ENPXp1vQzRF6JwIuS-mp2U8Uf1MoADoP_GqQ62VsDZWY"
}
This pattern enables attributes to reference large data objects without embedding them directly, keeping credential size manageable.
The attribute structure supports privacy-preserving disclosure patterns:
Compact Disclosure: Share only the attribute block SAID, revealing structure but not values. Verifiers can confirm the credential exists and is properly formed without learning attribute values.
Partial Disclosure: Share some attributes while keeping others compact. For example, disclose dt and LEI but keep personal information compact.
Graduated Disclosure: Progressively reveal attributes as trust develops. Initial interactions use compact disclosure, later interactions reveal more attributes after contractual protections are established.
Attribute design impacts correlation resistance:
Unique Identifiers: Attributes containing unique identifiers (LEI, email, phone) enable correlation across presentations. Holders should be aware that disclosing such attributes links presentations.
Blinded Attributes: The ACDC specification supports blinded attributes using UUIDs as salty nonces. These attributes can be disclosed without enabling correlation to other presentations of the same credential.
Selective Attribute Aggregates: The A section enables selective disclosure of individual attributes from a set, where disclosed attributes are not correlatable to undisclosed attributes from the same set.
Several mechanisms ensure attribute integrity:
SAID Binding: The attribute block SAID cryptographically binds all attributes together. Any modification to any attribute invalidates the SAID.
ACDC SAID Binding: The ACDC SAID includes the attribute block SAID, creating a chain of cryptographic commitments from the issuer's signature through the ACDC SAID to the attribute block SAID to individual attribute values.
Schema Validation: JSON Schema validation ensures attributes conform to expected structure and constraints, preventing malformed or invalid attribute data.
Immutability: Attributes cannot be modified after issuance, preventing tampering or unauthorized updates.
When designing attribute schemas:
Minimize Required Fields: Only mark fields as required if they are truly essential. Optional fields provide flexibility for different use cases.
Use Concise Labels: Short field labels reduce credential size. Use i instead of issuer, dt instead of datetime.
Define Clear Constraints: Use JSON Schema constraints (regex, enum, min/max) to validate attribute values and prevent invalid data.
Version Schemas: When schemas evolve, create new schema versions with new SAIDs rather than modifying existing schemas.
Document Field Semantics: Provide clear documentation of what each attribute field means and how it should be used.
When populating attributes:
Validate Input Data: Validate all input data against schema constraints before creating attributes.
Preserve Field Order: Maintain consistent field ordering across all credential instances of the same type.
Use Standard Formats: Use ISO standards for dates (ISO 8601), identifiers (ISO 17442 for LEI), and other common data types.
Minimize PII: Only include personally identifiable information when necessary. Consider using references (SAIDs) to external data instead of embedding PII directly.
Test SAID Computation: Verify SAID computation produces consistent results across different implementations and serialization libraries.
When disclosing attributes:
Start Compact: Begin with compact disclosure to minimize information leakage.
Establish Contracts: Use contractually-protected disclosure to establish legal protections before revealing sensitive attributes.
Disclose Progressively: Reveal attributes incrementally as trust develops and requirements are met.
Consider Correlation: Be aware that disclosing unique identifiers enables correlation across presentations.
Verify Verifier: Authenticate the verifier before disclosing sensitive attributes to ensure you're sharing with the intended party.
Caching: Cache computed SAIDs to avoid redundant digest computation. SAIDs are deterministic and can be safely cached.
Lazy Expansion: Implement lazy expansion of compact attributes - only deserialize and expand attribute blocks when actually needed for verification or disclosure.
SAID Mismatch: If computed SAID doesn't match the d field value, the attribute block has been tampered with or incorrectly serialized. Reject the credential immediately.
Schema Validation Failure: If attributes don't conform to schema, the credential is malformed. Log the specific validation errors for debugging.
Missing Required Fields: If required attributes are missing, the credential is invalid. Don't attempt to use or verify credentials with incomplete attributes.
Round-Trip Testing: Verify that attributes can be serialized, SAID-computed, deserialized, and re-serialized producing identical results.
Cross-Implementation Testing: Test SAID computation across different programming languages and libraries to ensure consistent results.
Schema Compliance Testing: Create comprehensive test suites validating all schema constraints, including edge cases and boundary conditions.