Keccak vs SHA3
Keccak-256 and SHA3-256 are closely related but not interchangeable. Ethereum uses Keccak-256 with original padding, while SHA3-256 is the later NIST standardized variant.
Core Difference
Both use the Keccak-f[1600] permutation. The output differs because SHA3-256 uses standardized SHA-3 domain separation padding, while Keccak-256 uses the original Keccak padding.
Why Ethereum Uses Keccak
Ethereum adopted Keccak before NIST finalized SHA-3. Existing addresses, smart contracts, and protocol rules depend on that exact output.
| Input | abc |
|---|---|
| Keccak-256 | 4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 |
| SHA3-256 | 3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532 |
Common Mistake
Do not compare Ethereum keccak256 output against SHA3-256 from a generic crypto library unless the library explicitly supports Keccak.
Keccak-256 Page
Hash text, Hex, Base64, or files with the dedicated Keccak-256 algorithm page.
SHA3-256 Page
Use standardized SHA3-256 when Ethereum compatibility is not required.