--- id: eth-keyfile version: "0.9.1" license: MIT license_treatment: permissive maintenance: aging --- # eth-keyfile — eth-keyfile: A library for handling the encrypted keyfiles used to store ethereum private keys License: permissive · Maintenance: aging · Downloads: 5.9M/mo ## What it is and what it does eth-keyfile is a library for reading, writing, and decrypting Ethereum keyfiles—the encrypted JSON format used to store Ethereum private keys. It implements the Ethereum keyfile standard (versions 3 and 4), handling the encryption/decryption logic so you don't have to manage AES-128-CTR ciphers, PBKDF2/Scrypt key derivation, or MAC verification yourself. The library wraps eth-keys, eth-utils, py_ecc, and pycryptodome to provide four main functions: load keyfiles from disk, create new encrypted keyfiles from a raw private key and password, decrypt keyfile JSON to recover the private key, and extract keys directly from a file path. It's primarily used in Ethereum wallet software, key management tools, and applications that need to persist private keys securely. The library supports both the older v3 standard (using secp256k1 curve limits) and the newer v4 standard (using bls12-381 curve limits), though it is still marked Pre-Alpha, suggesting v4 may not be fully stable. Use it for: - Load an encrypted Ethereum keyfile from disk and decrypt it with a password to retrieve the private key for signing transactions - Generate a new encrypted keyfile from a raw private key and password, then save it for later use in wallet software - Validate and parse keyfile JSON structures to ensure they conform to the Ethereum keyfile standard before processing - Migrate keys between wallet implementations by reading v3 keyfiles and re-encrypting them as v4 with updated metadata ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Loads, creates, and decrypts Ethereum keyfiles—encrypted JSON files that store private keys using PBKDF2 or Scrypt key derivation with AES-128-CTR encryption. Yes, if you are building Ethereum wallet or key management tooling and need standard-compliant keyfile handling. The library is well-established (in use since 2017), has no known vulnerabilities, and is maintained by the Ethereum Foundation. However, the aging maintenance status (550 days since last release) and Pre-Alpha classifier for v4 suggest you should verify v4 stability for your use case before relying on it in production. ## Install pip install eth-keyfile uv add eth-keyfile poetry add eth-keyfile ## Installing eth-keyfile Before you install: Low install friction with a pure-Python wheel and four runtime dependencies. Maintenance status is aging—last release was 550 days ago, though the repository remains active with a recent commit on 2025-12-18. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: from eth_keyfile import load_keyfile, extract_key_from_keyfile # Load keyfile JSON from disk keyfile_json = load_keyfile('path/to/keyfile.json') # Or extract the private key directly private_key = extract_key_from_keyfile('path/to/keyfile.json', b'password') Requires a valid Ethereum keyfile in JSON format on disk; the password must match the one used to encrypt the keyfile. Verify before relying: - Whether version 4 keyfile support is production-ready or still experimental given the Pre-Alpha classifier - Current test coverage and whether the aging maintenance status reflects reduced security review ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 5.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ethereum keyfile encryption, decrypt ethereum private key, keystore json handler, ethereum key management, pbkdf2 scrypt keyfile, aes encrypted keystore, ethereum wallet keyfile, ethereum, key-management, cryptography [View on SkillFed](https://skillfed.io/packages/eth-keyfile) · [View on PyPI](https://pypi.org/project/eth-keyfile/)