Ethereum ·
Ethereum adopts Keccak-256 for hash-based cryptography, prioritizing security over proving speed
The adoption of Keccak-256 as the hash function for Ethereum's hash-based cryptography represents a culmination of several years of dedicated work involving numerous researchers and engineers both…
The adoption of Keccak-256 as the hash function for Ethereum's hash-based cryptography represents a culmination of several years of dedicated work involving numerous researchers and engineers both inside and outside the EF. This significant determination was informed by contributions, innovative proofs, and feedback from many individuals, such as the authors of Binius and WHIR, Angus Gruen, Lev Soukhanov regarding GKR work, Benedikt Bünz, Ron Rothblum, and William Wang for Flock, Justin Thaler and Quang Dao for their sumcheck advancements, the zkEVM teams who shaped the current iteration of leanVM, and a broader assembly of cryptography community members. The list of contributors is extensive, and special acknowledgment is extended to Alex Hicks, Antonio Sanso, Benedikt Wagner, Cody Gunton, Derek Sorensen, Dmitry Khovratovich, Emile, George Kadianakis, Gottfried Herold, Han Jian, Ignacio Hagopian, Justin Drake, Tau, Thomas Coratger, and Vitalik Buterin for their involvement in this post within the EF.
The recommendation put forth is to utilize Keccak-256 as the cryptographic hash function for Ethereum's hash-based cryptography. Given that Keccak-256 possesses close to two decades of cryptographic scrutiny and maintains a substantial safety buffer, this choice is compelling. Since Ethereum already relies upon this function for its state and address generation within the execution layer, reinforcing this dependency means the protocol avoids incorporating a third general-purpose hash alongside SHA2-256. To satisfy the requirement for more than one hash function, a suite of symmetric primitives derived from the Keccak-f[1600] permutation is employed; this suite includes Keccak-256 for standard hashing, Keccak-duplex acting as the sponge object for Fiat-Shamir transformations, and SHAKE256 for generating pseudorandom bits and deriving keys.
A fundamental shift has occurred: performance is no longer the sole determinant in this selection process. When Ethereum transitions to hash-based cryptography, the security posture of the entire protocol hinges upon the chosen hash function; a compromise of that function invalidates everything else. Furthermore, the same hash must operate effectively across three distinct operational environments. Previously, the zkVM presented a performance constraint because traditional hashing proved too costly to verify, leading to the working assumption that Ethereum's future quantum-resistant signatures would necessitate a ZK-friendly hash like Poseidon, thereby exchanging established security for faster verification. We dedicated years to strengthening the cryptanalysis of Poseidon precisely because of this concern. However, this trade-off has dissipated now that SNARKs efficiently handle conventional hashes. Provers based on binary fields (Binius, Flock) and GKR-based methods can now verify standard hashes at or exceeding the 500K hashes per second benchmark. Consequently, performance no longer differentiates standard hashes from algebraic ones, elevating security to the primary deciding factor.
The standard for security is exceptionally high because this selection is difficult to reverse. As this hash will safeguard Ethereum's value over many decades, the preference is for the largest available body of cryptanalysis and a security margin robust enough that breaking the hash would necessitate entirely novel analytical approaches. When candidates are otherwise equivalent in security, reusing existing components within Ethereum is preferred to minimize ecosystem disruption, as every novel primitive demands implementation, optimization, auditing, and fuzzing across every client, zkVM, and SDK.
In narrowing down the possibilities, five contenders were evaluated: BLAKE3, BLAKE2, Poseidon/Poseidon2, SHA2-256, and Keccak-256. The hashes designed for Zero-Knowledge proofs, Poseidon and Poseidon2, were initially conceived to be efficiently verifiable within SNARKs over prime fields, an advantage that binary-field SNARKs have substantially negated. Bariant et al. demonstrated in 2022 that the designers' assessment was overly optimistic, revealing a technique that skips two full rounds with minimal overhead. Furthermore, the EF’s Poseidon Cryptanalysis Initiative, initiated in November 2024, continues to generate fresh assaults on reduced-round versions of both (Sanso and Vitto 2025, Bak et al. 2026). Although neither complete-round variant has been broken, there is no compelling reason to await the maturation of cryptanalysis when traditional hashes offer sufficient proving speed. It should be noted that Poseidon and Poseidon2 function as entirely distinct hash functions, yet the conclusions drawn for both remain identical.
Regarding the rapid hashing algorithms, BLAKE3 emerged as the quickest traditional hash among the options considered; verifiers already achieve approximately 2.2 million BLAKE3 compressions per second on a 16-vCPU machine (SNARK.fast Flock Challenge). Nevertheless, it alters the BLAKE2 round function and reduces the round count from ten to seven. This alteration means that cryptanalytic attacks against BLAKE2 and BLAKE3 are not interchangeable, and documented cryptanalysis for BLAKE3 is scarce. Moreover, the BLAKE3 operational mode lacks a security proof, and its underlying block cipher is known to possess distinguishers for a considerable number of rounds. BLAKE2 (2012) is subjected to more extensive study, though fewer than ten cryptanalytic attacks have been published, and the strongest attacks against the hash only reach two and a half rounds (BLAKE2). It is still considered secure and fast, and Ethereum exposes its compression function (for blake2f) via the EIP-152 precompile. Ultimately, BLAKE2 was not selected because the remaining hashes possess substantially more cryptanalysis and offer adequate performance.
The incumbents are SHA2-256 and Keccak-256. SHA2-256 (2001) is employed by SSZ on the consensus layer (CL), the 0x02 precompile on the execution layer (EL), and subsequently within the current deposit contract. It performs quickly natively, particularly when utilizing SHA-NI on x86 processors. However, practical instances of collisions are observed at 35 of its 64 rounds, and the most advanced collision attack reaches 38, exceeding half of its total rounds (Li et al. 2026, Zhang et al. 2026, Goldreich 2026). Security proofs for hash-based signatures, and the Fiat–Shamir step in the SNARGs that aggregate them, presume the hash functions behave as a random oracle. SHA2-256, conversely, utilizes a Merkle–Damgård construction, meaning that length extension alone is sufficient to distinguish it from a random oracle. Consequently, protocols built upon it require extra diligence: for instance, SLH-DSA-SHA2 employs HMAC and MGF1 for certain functions. While this random oracle concern can be addressed, requiring every protocol built on SHA2-256 to implement extra precautions is undesirable. Keccak-256 (2008) boasts arguably the most comprehensive cryptanalysis among all unbroken traditional hashes (Keccak team); furthermore, its security has remained impervious to the emergence of AI-assisted cryptanalysis. Practical collision attacks are found at five of its 24 rounds, and theoretical attacks reach six rounds when assessed against the underlying permutation used by Keccak-256, SHAKE128, and SHAKE256 (Guo et al. 2020, Zhang, Hou and Liu 2024). It is structured around a sponge mode, which is provably indistinguishable from a random oracle if the underlying permutation is ideal, against classical adversaries, and with a loose bound, against quantum adversaries (Tokat, Alagic, Carolan and Majenz, QCrypt 2026). This implies the sponge possesses inherent structural security preservation, meaning no attacks can exploit its design. However, attacks targeting the internal Keccak-f permutation remain a possibility.
Concerning relative speed, Keccak-256 lags behind other traditional hashes, particularly when dealing with binary tree hashing. Nevertheless, LeanVM demonstrates performance exceeding 500K keccak-f/s on EIP-7870 hardware, which is adequate for the necessary aggregation throughput, although it is slower to prove than BLAKE3 and inherently slower than SHA2-256. The accepted trade-off here is accepting the relative performance cost in exchange for the security margin and the depth of historical cryptanalysis.
When comparing Keccak-256 with SHA3-256, they share the identical Keccak-f permutation, rate, and capacity, thus possessing equivalent security, native speed, and proving expense. The sole distinction lies in the padding bits. Essentially, every cryptographic finding applicable to one also applies to the other, and any Keccak-f accelerator functions for both operations. The final decision between the two hinged upon integration within the Ethereum ecosystem: What this means for clients. For the majority of development teams, this selection requires minimal new code.
This selection underscores a maturation within the decentralized finance and Layer 2 ecosystems, where the focus is shifting from optimizing for immediate transaction speed to rigorously securing the foundational cryptographic primitives that underpin protocol integrity against future computational threats.





