skillfed

eth-keys

eth-keys: Common API for Ethereum key operations

eth-keys v0.7.0 6.0M downloads/30d#1,989 on PyPI177
Permissive license MIT AGING released

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

uv

uv add eth-keys

poetry

poetry add eth-keys

Installing 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

Development Status :: 4 - BetaIntended 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.8Programming Language :: Python :: 3.9

Tags

ethereum key signingECDSA signature verificationethereum private key managementpublic key derivation ethereummessage signing ethereumethereum address generationcryptographic key operations
ethereumcryptographykey-management

More Cryptography packages