skillfed

eth-hash

eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3

eth-hash v0.8.0 6.8M downloads/30d#1,836 on PyPI110
Permissive license Active released

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-hash

uv

uv add eth-hash

poetry

poetry add eth-hash

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

ethereum keccak256 hashingkeccak hash functionethereum hashing librarysha3 ethereumcryptographic hash ethereumkeccak256 python
ethereumcryptographylow-level

More Cryptography packages