eth-hash
eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3
What it is and what it does
eth-hash is a low-level wrapper around the keccak256 hashing algorithm, the cryptographic hash function used throughout the Ethereum protocol. It abstracts over multiple backend implementations, allowing you to choose which one to use based on your environment and needs. The package is designed as an internal dependency for other Ethereum tools rather than as a user-facing library—the documentation suggests using higher-level alternatives for application code.
The package has no runtime dependencies by default; you install it with an extra to specify which cryptographic backend to use. It supports Python 3.10 through 3.14 and is actively maintained with recent releases. The API is minimal: import from eth_hash.auto and call it with bytes to get the hash.
Use it for:
- Computing Ethereum address checksums and transaction hashes within wallet or node software.
- Verifying Ethereum smart contract bytecode and state root hashes in light clients or validators.
- Building low-level Ethereum protocol tools that need direct access to keccak256 without higher-level abstractions.
- Integrating keccak hashing into cryptographic libraries or frameworks that wrap Ethereum functionality.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides the keccak256 hashing function used by Ethereum through a pluggable backend architecture.
Yes, if you are building Ethereum protocol-level tools or libraries that need keccak256 and want a lightweight, actively maintained wrapper. No, if you are writing application code—use higher-level alternatives instead. The package has no known vulnerabilities, low install friction, and permissive licensing.
Install
eth-hash on PyPI
pip
pip install eth-hashuv
uv add eth-hashpoetry
poetry add eth-hashInstalling eth-hash
Before you install
Low install friction; pure Python wheel with no compiled dependencies. Actively maintained with recent releases and a stable repository.
License in practice
MIT license (permissive); you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install eth-hash[pycryptodome]
from eth_hash.auto import keccak
result = keccak(b'')
Requires Python 3.10 or later; you must install a backend extra for the hashing implementation to work.
Verify before relying
- Whether the auto backend selection handles all deployment environments gracefully or requires explicit backend configuration in some cases.
- Performance characteristics compared to alternative keccak implementations.
- Which specific backends are available and their relative performance trade-offs.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 142 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,844,184/month — #1,836 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: eth_hash-0.8.0-py3-none-any.whl
Keywords: ethereum
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
pysha3Provides SHA-3, SHAKE, and Keccak hash…
permissive · top 15,000 on PyPI
safe-pysha3Provides SHA-3, SHAKE, and Keccak hash…
permissive · top 15,000 on PyPI
faster-eth-utilsProvides Ethereum utility functions for address…
permissive · top 15,000 on PyPI
eth-keysProvides a unified API for Ethereum key…
permissive · top 5,000 on PyPI
eth-typingProvides standardized type annotations for…
permissive · top 5,000 on PyPI
py-multihashEncodes and decodes multihash digests,…
permissive · top 15,000 on PyPI
eip712Provides Python message classes for EIP-712…
permissive · top 15,000 on PyPI
dict-hashGenerates consistent hashes for Python…
permissive · top 15,000 on PyPI
eth-accounteth-account signs Ethereum transactions and…
permissive · top 5,000 on PyPI
siphashProvides a Python implementation of SipHash, a…
permissive · top 15,000 on PyPI