Quick Answer
Keccak-256 is the cryptographic hash function used by
Ethereum and many other
blockchain networks. It transforms any input data into a fixed 256-bit string (64 hexadecimal characters). It is irreversible, deterministic, and any minimal change in the data produces a completely different
hash.
What is Keccak-256?
Keccak-256 is a cryptographic hash function from the Keccak family, developed by Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche. It won the SHA-3 competition organised by NIST (the US National Institute of Standards and Technology) in 2012, although the version officially standardised as SHA-3 differs slightly from the variant adopted by Ethereum.
When Vitalik Buterin and the Ethereum team implemented the network in 2015, they chose the original Keccak-256 variant — not the official SHA-3 — which is why the two terms are not fully interchangeable in the blockchain context.
Simple analogy: Keccak-256 is like a machine that transforms anything — an entire book, a sentence or a single character — into a code of exactly 64 characters. If you change even one letter in that book, the code changes completely and unpredictably. And you cannot reconstruct the book from the code, no matter how hard you try.
How does Keccak-256 work?
Keccak-256 uses an internal structure called sponge construction. Unlike earlier hash functions (SHA-1, SHA-2) which operate on successive blocks of data, Keccak “absorbs” the input data and “squeezes” it to produce the output.
1. Absorption phase
The input data is divided into fixed-size blocks and mixed with the function’s internal state through a series of mathematical permutations. The internal state is 1,600 bits — much larger than the 256-bit output.
2. Keccak-f permutations
The function applies 24 rounds of complex mathematical permutations — XOR operations, rotations and substitutions — that “mix” the data until there is no longer any detectable linear relationship between the input and the internal state.
3. Squeezing phase
The first 256 bits are extracted from the final internal state — these represent the final hash. The result is always exactly 64 hexadecimal characters, regardless of the size of the input.
📝 Concrete example
Input:
“Abarai”
Keccak-256:
a7f3d2…9c4e1b (64 hex characters)
Input: “abarai” (only the first letter lowercase)
Keccak-256: 2b9f1a…7d3c8e (completely different)
Even a single character change produces a totally different hash — the property known as the avalanche effect.
Critical properties of Keccak-256
🔁
Determinism
The same input data always produces the same hash. Essential for transaction verification — anyone can recalculate the hash and confirm data integrity.
🚫
Irreversibility
There is no mathematical method to reconstruct the original data from the hash. Hash functions are one-way by design — reverse computation is computationally impossible.
🌊
Avalanche effect
A minimal change in input (even a single bit) produces a completely different hash. Impossible to predict how the output will change — essential for security.
💥
Collision resistance
Practically impossible to find two different data sets that produce the same hash. Collisions exist theoretically (the space is finite), but are computationally inaccessible.
📏
Fixed output
Regardless of whether the input is 1 character or 1 gigabyte, the output is always exactly 256 bits (64 hexadecimal characters). Essential for blockchain efficiency.
⚡
Computation speed
Hash calculation is fast on modern hardware. The Ethereum network calculates millions of hashes per second for transaction validation and the execution of
smart contracts.
Where Keccak-256 is used in Ethereum
Keccak-256 is not used in just one place — it is omnipresent in Ethereum’s architecture:
🏠 Generating Ethereum addresses
Ethereum addresses (those beginning with “0x”) are derived from the
public key via Keccak-256. The hash is applied to the 64-byte public key and the last 20 bytes (40 hex characters) are taken. That is your Ethereum address.
📦 Hashing blocks and transactions
Every
block in the Ethereum blockchain has a hash calculated with Keccak-256. This includes the hash of the previous block — creating the immutable cryptographic chain. The same applies to every
transaction.
⚙️ Smart contracts — function selectors
When you interact with a smart contract, Ethereum identifies the called function through the first 4 bytes of the Keccak-256 hash of the function signature. Example: the hash of
transfer(address,uint256) → first 4 bytes = the
ERC-20 transfer function selector.
🌳 Merkle Patricia Tries
Ethereum uses Merkle Patricia Tries to store the network’s state (balances, contract code, storage). Every node in these structures is hashed with Keccak-256 — enabling efficient verification of any data without downloading the entire blockchain.
✍️ ECDSA digital signatures
Before being signed with the private key, a transaction is hashed with Keccak-256. The digital signature is applied to the hash, not the raw data — more efficient and more secure.
Nodes verify the signature by recalculating the hash and comparing.
Keccak-256 vs SHA-256 vs SHA-3 — what is the difference?
Confusion between these terms is common. Here are the clear distinctions:
| SHA-256 | Keccak-256 | SHA-3 |
|---|
| Family | SHA-2 | Keccak | Keccak (standardised) |
| Structure | Merkle-Damgård | Sponge construction | Sponge construction |
| NIST standardised | Yes (2001) | No (original variant) | Yes (2015) |
| Identical to SHA-3? | No | No — different padding | — |
| Used by | Bitcoin | Ethereum, TRON | Modern post-2015 applications |
| 256-bit output | Yes | Yes | Yes (SHA3-256) |
Why doesn’t Ethereum use official SHA-3? Ethereum was implemented in 2015, when SHA-3 standardisation was still in progress. The team chose the original Keccak-256 variant, which differs from the final SHA-3 by a single padding constant. This decision became permanent — changing it now would invalidate all existing
cryptography in the network.
Networks that use Keccak-256
Due to Ethereum’s popularity, Keccak-256 has become the de facto standard for many EVM (Ethereum Virtual Machine)-compatible networks:
All EVM-compatible networks — those that can run Ethereum smart contracts without major modifications — use Keccak-256 for address generation and transaction hashing. This is why an Ethereum address works identically on BNB Chain or Polygon.
Frequently asked questions about Keccak-256
What is Keccak-256?
Keccak-256 is the cryptographic hash function used by Ethereum and EVM-compatible networks. It transforms any input data into a fixed 256-bit hash (64 hexadecimal characters), irreversible and unique for each set of data.
Is Keccak-256 the same as SHA-3?
No, although they are related. SHA-3 is the version officially standardised by NIST in 2015, which differs from the original Keccak-256 by a padding constant. Ethereum uses the original Keccak-256 — implemented before SHA-3 standardisation was finalised — and not the official SHA-3.
Why does Ethereum use Keccak-256 and not SHA-256 like Bitcoin?
SHA-256 and Keccak-256 are both secure hash functions, but with different architectures. Ethereum chose Keccak-256 because it offers superior security properties in the context of smart contracts and is resistant to certain classes of attacks to which SHA-2 is theoretically more vulnerable.
How is Keccak-256 related to my Ethereum address?
Your Ethereum address is derived directly from Keccak-256. The process:
private key → ECDSA algorithm → public key (64 bytes) → Keccak-256 → last 20 bytes = your address (preceded by “0x”). Irreversible — you cannot reconstruct the private key from the address.
Can Keccak-256 be broken?
With current technology, no. No documented collision has been found. A brute-force attack would require astronomical computational resources. Like SHA-256, Keccak-256 faces a theoretical long-term threat from quantum computers — but the industry is already working on post-quantum alternatives.
What is “sponge construction” in Keccak?
Sponge construction is Keccak’s internal architecture. Unlike classic hash functions, Keccak “absorbs” input data in stages and “squeezes” it to produce the output. This architecture allows output of any length to be generated — not just 256 bits — making it flexible for various cryptographic applications.
keccak-256
hash function
ethereum
cryptography
sha-3
blockchain
crypto dictionary