eth-keys
eth-keys: Common API for Ethereum key operations
What it is and what it does
eth-keys is a cryptographic library for Ethereum that abstracts elliptic curve operations behind a clean, high-level API. It handles the core key management tasks: generating private keys, deriving corresponding public keys, signing messages with ECDSA, verifying signatures, and recovering public keys from signatures. The library supports two backends—a pure-Python implementation and an optional high-performance backend via coincurve—and automatically falls back to the native implementation if the faster library is unavailable.
Developers use eth-keys to build Ethereum applications that need to sign transactions, verify message authenticity, or derive addresses from keys. The API provides both low-level methods (ecdsa_sign, ecdsa_verify, ecdsa_recover) and convenience methods on key objects (sign_msg, verify_msg, to_checksum_address). It depends only on eth-utils and eth-typing, keeping the dependency footprint minimal.
Use it for:
- Sign Ethereum transactions or messages in a wallet or dApp backend
- Verify that a message or transaction was signed by a specific Ethereum address
- Recover the signer's public key and address from a signature to authenticate requests
- Generate Ethereum addresses from public keys for account creation or validation
- Implement multi-signature or threshold signing schemes using the low-level ECDSA API
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a unified API for Ethereum key operations including private key generation, public key derivation, message signing, and signature verification using elliptic curve cryptography.
Yes. eth-keys is a foundational library for Ethereum development with no known vulnerabilities, permissive licensing, and low install friction. The aging maintenance status (last release 494 days ago) is a minor concern for a stable cryptographic library, but the active repository and broad Python version support (3.8–3.13) make it reliable for production use. Install if you need to handle Ethereum key operations.
Install
eth-keys on PyPI
pip
pip install eth-keysuv
uv add eth-keyspoetry
poetry add eth-keysInstalling eth-keys
Before you install
Low install friction with a pure-Python fallback backend; the package prefers the coincurve library for performance but does not require it, making it accessible without compiled dependencies.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal attribution requirements.
Quickstart
from eth_keys import keys
pk = keys.PrivateKey(b'\x01' * 32)
signature = pk.sign_msg(b'a message')
public_key = pk.public_key
address = public_key.to_checksum_address()
verified = signature.verify_msg(b'a message', public_key)
Verify before relying
- Performance characteristics and benchmarks comparing NativeECCBackend vs CoinCurveECCBackend backends
- Whether the package is actively maintained beyond the aging status indicator
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — eth-utils, eth-typing |
| Maintenance | aging — 494 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,000,576/month — #1,989 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: eth_keys-0.7.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
eth-keyfileLoads, creates, and decrypts Ethereum…
permissive · top 5,000 on PyPI
x25519Provides pure Python implementations of…
permissive · top 15,000 on PyPI
starkbank-ecdsaPure Python ECDSA implementation supporting…
permissive · top 5,000 on PyPI
coincurvecoincurve provides Python bindings to…
permissive · top 5,000 on PyPI
eth-hashProvides the keccak256 hashing function used by…
permissive · top 5,000 on PyPI
eth-accounteth-account signs Ethereum transactions and…
permissive · top 5,000 on PyPI
nkeysGenerates, manages, and verifies Ed25519-based…
permissive · top 15,000 on PyPI
cchecksumProvides a C-accelerated implementation of…
permissive · top 15,000 on PyPI
ethereum-dasmDisassembles Ethereum EVM bytecode into…
copyleft · top 15,000 on PyPI
pysetoPySETO implements PASETO (Platform-Agnostic…
permissive · top 15,000 on PyPI