Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 51 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.
BLAKE3 is a cryptographic hash function (2020) that produces fixed-size digests from arbitrary input data, serving as KERI's primary digest algorithm for SAIDs, content addressing, and integrity verification through its high performance, parallelizable architecture, and cryptographic strength.
BLAKE3 is a cryptographic hash function introduced in 2020 that represents a significant evolution from its predecessors BLAKE and BLAKE2. Unlike earlier versions which were algorithm families with multiple variants (BLAKE2b, BLAKE2s, etc.), BLAKE3 is designed as a single unified algorithm that consolidates multiple cryptographic capabilities into one cohesive implementation.
In the KERI/ACDC ecosystem, BLAKE3 serves as the primary digest algorithm for generating SAIDs (Self-Addressing Identifiers), creating content-addressable identifiers, and providing cryptographic integrity verification across all verifiable data structures. The algorithm is specifically referenced in KERI specifications as Blake3-256 and Blake3-512, producing 256-bit and 512-bit digests respectively.
BLAKE3 is formally classified as:
This multi-functional design eliminates the need for separate algorithm variants that characterized BLAKE and BLAKE2, simplifying implementation and reducing the complexity of cryptographic protocol design.
Python Implementations:
pip3 install blake3Rust Implementations:
C Implementations:
When implementing Blake3 in KERI systems, ensure proper CESR encoding:
E for 256-bit or 0D for 512-bitParallel Processing:
Incremental Updates:
Cryptographic Strength:
BLAKE3 employs a binary tree structure as its fundamental architectural pattern, which fundamentally distinguishes it from traditional sequential hash functions. This tree-based design enables:
The compression function is closely based on BLAKE2s but incorporates a critical optimization: the number of rounds is reduced from 10 to 7. This design decision reflects the assumption that current cryptographic standards tend to be overly conservative in their security margins, allowing BLAKE3 to achieve significantly higher performance while maintaining strong security properties.
BLAKE3 provides 128 bits of cryptographic strength in its 256-bit variant, which is considered sufficient for post-quantum security in hash functions. According to research by Daniel J. Bernstein referenced in KERI documentation, hash collision attacks remain inefficient on quantum computers compared to classical approaches, meaning BLAKE3's security properties are expected to hold even in a post-quantum computing environment.
Key security characteristics:
BLAKE3 is specifically designed to be as fast as possible, achieving speeds consistently several times faster than BLAKE2—itself already known for high performance. The performance gains derive from:
The Merkle tree format provides additional operational benefits:
BLAKE3 supports two primary output sizes in KERI:
Blake3-256 (256-bit / 32-byte output):
EBlake3-512 (512-bit / 64-byte output):
0DAs an XOF, BLAKE3 can technically produce outputs of any length, but KERI standardizes on these two sizes for interoperability.
In KERI's CESR (Composable Event Streaming Representation) encoding system, BLAKE3 digests are represented as qualified primitives that include both the digest value and metadata about the algorithm used.
Blake3-256 CESR Encoding:
E (single character)E + 43 Base64 characters encoding the 32-byte digestBlake3-512 CESR Encoding:
0D (two characters)0D + 86 Base64 characters encoding the 64-byte digestIn the CESR text domain, BLAKE3 digests use Base64 URL-safe encoding (character set: A-Z, a-z, 0-9, -, _). The encoding follows CESR's composability requirements, ensuring 24-bit boundary alignment.
Example Blake3-256 text representation:
ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo
Breakdown:
E: Derivation code indicating Blake3-256LEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo: 43 Base64 characters encoding the 32-byte digestIn the CESR binary domain, BLAKE3 digests are represented as raw bytes with a prepended derivation code:
Blake3-256 binary:
0x1C (binary representation of derivation code E)Blake3-512 binary:
0DIn the CESR raw domain, a BLAKE3 digest is represented as a tuple:
("E", <32-byte digest>) # Blake3-256
("0D", <64-byte digest>) # Blake3-512
This representation separates the derivation code metadata from the actual cryptographic material, which is useful for cryptographic operations that require the raw digest bytes.
BLAKE3-256 is the mandatory digest algorithm for generating SAIDs (Self-Addressing Identifiers) in KERI and ACDC. The SAID generation protocol follows these steps:
# characters (ASCII 35)E derivation codeExample from ACDC specification:
{
"v": "ACDC10JSON00011c_",
"d": "ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo",
"i": "EAco5dU5WjDrxDBK4b4HrF82_rYb6MX6xsegjq4n0Y7M",
"s": "EBfdlu8R27Fbx-ehrqwImnK-8Cm79sqbAQ4MmvEAYqao",
"a": {
"name": "John Doe",
"role": "Developer"
}
}
The d field contains the Blake3-256 SAID of the entire ACDC structure.
In KEL (Key Event Log) structures, BLAKE3 digests provide cryptographic chaining between events:
Inception Events: Include Blake3-256 digest of configuration data Rotation Events: Include Blake3-256 digest of previous event Interaction Events: Include Blake3-256 digest of previous event
This creates a hash chain where each event cryptographically commits to all previous events, making the log tamper-evident.
KERI's pre-rotation mechanism uses Blake3-256 digests to commit to next keys:
{
"v": "KERI10JSON00011c_",
"t": "icp",
"d": "EAco5dU5WjDrxDBK4b4HrF82_rYb6MX6xsegjq4n0Y7M",
"i": "EAco5dU5WjDrxDBK4b4HrF82_rYb6MX6xsegjq4n0Y7M",
"s": "0",
"kt": "1",
"k": ["DKxy2sgzfplyr-tgwIxS19f2OchFHtLwPWD3v4oYimBx"],
"nt": "1",
"n": ["ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo"],
"bt": "0",
"b": [],
"c": [],
"a": []
}
The n field contains Blake3-256 digests of the next (pre-rotated) public keys, providing post-quantum secure commitment.
In ACDC credentials, Blake3-256 enables selective disclosure through attribute commitments:
Compact Disclosure: Only SAIDs of attribute blocks are revealed Selective Disclosure: Individual attributes are blinded using Blake3-256 digests Full Disclosure: Complete attribute data is provided with verifiable SAIDs
Example compact ACDC:
{
"v": "ACDC10JSON00011c_",
"d": "ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo",
"i": "EAco5dU5WjDrxDBK4b4HrF82_rYb6MX6xsegjq4n0Y7M",
"s": "EBfdlu8R27Fbx-ehrqwImnK-8Cm79sqbAQ4MmvEAYqao",
"a": "ELEjyRTtmfyp4VpTBTkv_b6KONMS1V8-EW-aGJ5P_QMo"
}
The a field contains only the Blake3-256 SAID of the attribute block, enabling privacy-preserving disclosure.
In TEL (Transaction Event Log) structures for credential registries, Blake3-256 digests anchor registry events to KEL events:
This creates a verifiable link between credential lifecycle events and the authoritative KEL.
SAID Verification:
# characters)Event Chain Verification:
Pre-Rotation Verification:
While Blake3-256 is the primary digest algorithm in KERI, the specification supports multiple hash functions for cryptographic agility:
Blake2b-256 (derivation code F):
Blake2s-256 (derivation code G):
SHA3-256 (derivation code H):
SHA2-256 (derivation code I):
BLAKE3 digests are often used in conjunction with signature primitives:
Ed25519 signatures (derivation code 0B):
ECDSA secp256k1 signatures (derivation code 0C):
BLAKE3 digests commit to key material:
Ed25519 public keys (derivation code D):
X25519 public keys (derivation code C):
SAID + Signature Pattern:
SAID(event) = Blake3-256(event)
Signature = Ed25519.sign(SAID(event))
This pattern enables efficient verification—verifiers can check the signature against the SAID without recomputing the digest of the entire event.
Merkle Tree Pattern: BLAKE3's native Merkle tree structure enables efficient verification of large data sets:
Root = Blake3-256(Blake3-256(leaf1) || Blake3-256(leaf2))
This pattern is used for batch verification of multiple credentials or events.
Selective Disclosure Pattern:
Attribute_SAID = Blake3-256(attribute_value)
Aggregate_SAID = Blake3-256(Attribute_SAID_1 || ... || Attribute_SAID_n)
This pattern enables privacy-preserving credential disclosure where only selected attributes are revealed while maintaining verifiable commitments to undisclosed attributes.
Canonicalization:
Verification:
Incorrect Padding:
= pad characters in CESR-encoded Blake3 digestsWrong Derivation Code:
E for Blake3-256, not F (Blake2b-256) or other codes0D for Blake3-512, not 0E (Blake2b-512)Canonicalization Errors:
Test Vectors:
Edge Cases:
Performance Benchmarks: