EIP-8526 SSZ Keccak-256 merkleization (SSZ Keccak Merkleization)

No call decision · EVM & execution · EIP status Draft · created 2026-11-30

EIP-8526 adds a hash keyword to SSZ composite data types, allowing the hash function used for merkleization to be specified as Keccak-256 instead of SHA-256.

Why it is needed

Currently, SSZ merkleization only uses the consensus layer's SHA-256. The execution layer, on the other hand, uses Keccak-256 throughout: for state, transactions, receipts, block hash computation, address generation, and even the KECCAK256 opcode in smart contracts. So until now, if execution layer data structures wanted to use SSZ, SHA-256 was the only option available. EF research PQAI #1 (2026-11-24) found that binary-field-based proof systems can now also efficiently prove hash functions like Keccak-256, and concluded that the choice of hash function should ultimately be decided on security grounds, recommending Keccak-256. The hash keyword specifies the hash function per data type, keeping the Merkle tree shape and generalized index unchanged, so that execution layer objects have the same hash_tree_root across both layers.

What changes

Today

After EIP-8526

Who is affected

In depth

Syntax and scope of the hash keyword

For constructor calls of SSZ composite types (Container, ProgressiveContainer, Vector, List, ProgressiveList, Bitvector, Bitlist, ProgressiveBitlist, Union, CompatibleUnion), you can prepend the keyword hash=keccak256 before the parenthesized parameters. Omitting the keyword gives the same type as hash=sha256. This keyword attaches only to constructor calls that denote a type, not to values. Since the same type expression always refers to the same type wherever it is used, the hash function of a containing type or a contained type never changes. Basic types have no hash function and do not accept the keyword, and containers are also allowed to have a field literally named hash.

Supported hash functions: SHA-256 and Keccak-256

The hash keyword's value designates a hash function that maps bytes to Bytes32. sha256 is the existing hash function from the consensus spec, and keccak256 is the keccak256 function from the execution spec. This keccak256 is different from SHA3-256 in FIPS 202; the two functions share the same permutation, rate, and capacity but differ in padding. The execution layer already uses this Keccak-256 for block hash and trie root computation and for the KECCAK256 opcode, so it was chosen to match.

Extending the Merkleization helper functions

hash(a, b) zero-pads each input to BYTES_PER_CHUNK, then computes H(a+b) with the specified hash function H. merkleize keeps the same binary tree construction in which each parent node is computed as hash(left, right) of its two child nodes. In the definition of hash_tree_root(value), H is the hash function determined by value's type, and nested hash_tree_root calls each use the hash function determined by their own argument's type. Vector, Bitvector, and Container only call hash when chunk_count(type) > 1 (for example, ByteVector[48] calls it but ByteVector[32] does not), while List, Bitlist, ProgressiveList, ProgressiveBitlist, ProgressiveContainer, Union, and CompatibleUnion always call hash.

Summary/expansion types and CompatibleUnion compatibility

A type that calls hash can only be the summary type of an expansion type if they use the same hash function. EIP-8016's definition of compatible Merkleization is likewise extended: types that call hash are only compatible if they share the same hash function. Even with identical structure, types with different hash functions are not treated as compatible.

Extending Merkle proof computation and verification

merkle_tree, calculate_merkle_root, calculate_multi_merkle_root, verify_merkle_proof, and verify_merkle_multiproof each additionally take, for every node they compute, the hash function of the type that produced that node. A node that combines the roots of nested values uses the hash function of the containing type. Under a Union (excluding CompatibleUnion), a node's hash function depends on which option was selected. Since a generalized index only indicates a position within the tree, verifying a proof requires knowing the types along the path in order to apply the correct hash function.

Performance: Keccak-256 can be slower than SHA-256

To compute a single parent node, SHA-256 runs its compression function twice because of padding on the 64-byte input, while Keccak-256 runs its permutation only once. Even so, Keccak-256 Merkleization is slower on most x86 and Arm processors that support dedicated SHA-256 instructions. x86 has no dedicated Keccak instructions, and Arm's optional SHA-3 extension only builds rounds out of combinations of XOR, AND-NOT, and rotation. Implementations can narrow this gap by hashing multiple nodes in a single call, and any limits that cap hashing work per block or per message should account for this difference as well.

Need for domain separation in signatures and identifiers

Protocols that sign a Keccak-256-based hash_tree_root must specify the signing preimage explicitly and keep it distinct from preimages used for other purposes with the same signing key. They should either embed the root in an existing domain-separated signing format, or define a protocol-specific Container(hash=keccak256) with two fields, a domain constant and an object root, so it does not overlap with other encodings signed under the same key, such as RLP data or EIP-2718 typed transactions. The design must also account for the case where both child nodes hold arbitrary data (for example, sibling Bytes32 fields or sibling chunks of a byte list), in which case all 64 bytes can be freely chosen.

Status is Draft, no reference implementation yet

This EIP's status is Draft, and its Reference Implementation is listed as TBD and has not yet been written. It builds on EIP-7495 (ProgressiveContainer), EIP-7916 (ProgressiveList, ProgressiveBitlist), and EIP-8016 (CompatibleUnion), so it may change alongside changes to those EIPs. No fork-inclusion decision appears in the call notes.

Original EIP · ← EIPs