In this track: Cryptography with intuition
advanced · 4 MIN READ

Keccak-256 versus SHA3-256

Similar names do not make two digest algorithms interchangeable.

LET’S PICTURE IT

Two machines can belong to the same family while using different settings.

SEE IT FOR YOURSELF
From exact bytes to a Keccak-256 fingerprintStep 1 / 4
From exact bytes to a Keccak-256 fingerprintUTF-8 texthelloExact spelling mattersA hash commits to bytes, not a visual interpretationFive input bytes68656c6c6fLiteral text 0x68656c6c6f would be a different text inputInput bytes68 65 6c 6c 6f5 bytesKeccak-256Deterministic calculation32-byte resultUse Keccak-256, not an interchangeable SHA3-256 assumption0x1c8aff95…36deac8Fixed output: 32 bytesSame input bytes → same outputA fingerprint does not prove that the input is truthful or safe

The text hello is a particular sequence of characters. Case or text normalization can change the encoded bytes.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Name the required algorithm

Many Ethereum conventions use Keccak-256. Finalized SHA3-256 differs in domain-padding details, so selecting it solely because the name looks familiar gives a different result.

Compare identical payload bytes

Use the exact UTF-8 bytes of hello in both algorithms. A fair comparison changes the algorithm while keeping the input encoding fixed.

Connect the difference to interfaces

A function selector or event signature calculated with the wrong digest will not match the intended Ethereum convention, even if the canonical signature text is correct.

Use explicit library functions

Choose an implementation that names the required variant clearly. Record both algorithm and input bytes in test fixtures instead of documenting only a generic hash function.

Inspect the distinction

hello, UTF-8
Keccak-256: 0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8
SHA3-256: 0x3338be694f50c5f338814986cdf0686453a888b84f424d792af4b9202398f392

These are local teaching values, not a signature request or a live-chain lookup.

TURN UNDERSTANDING INTO PRACTICEOpen the Keccak-256 →
QUICK CHECK · NO PRESSURE

Can finalized SHA3-256 replace Keccak-256 when calculating a standard Ethereum selector?

Your progress stays in this browser.
Keep exploring the original referencekeccak.team ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.