A Zig-based command-line tool for generating and managing BLS12-381 v4 keystores compliant with the EIP-2335 specification.
- Overview
- Features
- Installation
- Usage
- Requirements
- Development
- Contributing
- License
- Support
- Acknowledgments
blskeystore provides functionality to:
- Generate new BLS12-381 v4 keystores with secure encryption
- Convert existing keystores between different crypto parameters
- Simplify keystore management for testing environments
This tool is particularly useful for Ethereum validators and developers working with BLS signatures who need to manage keystores or create test keystores with adjusted parameters.
- BLS12-381 Support - Full support for BLS12-381 key generation
- EIP-2335 Compliant - Generates v4 keystores following the standard
- Crypto Conversion - Modify keystore encryption parameters (KDF, cipher settings)
- Test-Friendly - Easily create keystores with reduced parameters for faster testing
- Cross-Platform - Built with Zig for portability
git clone https://github.com/usmansaleem/blskeystores.git
cd blskeystores
zig build -Doptimize=ReleaseSafeThe binary will be available in zig-out/bin/blskeystore.
Pre-built binaries will be available from the releases page once the first stable version is released.
Generate a single keystore:
blskeystore generate --count 1 --password "your-secure-password" --output-dir ./keystoresGenerate multiple keystores:
blskeystore generate --count 5 --password-file ./password.txt --output-dir ./keystoresConvert existing keystores to use lighter parameters (useful for testing):
blskeystore convert \
--input-dir ./keystores \
--output-dir ./light-keystores \
--password-dir ./passwords \
--kdf-iterations 1 \
--kdf-memory 16Run blskeystore --help for a full list of available commands and options.
- Zig 0.15.2 or later
Build the project:
zig buildBuild with optimizations:
zig build -Doptimize=ReleaseSafeRun all tests:
zig build test --summary all- Update version in
build.zig.zon - Update
CHANGELOG.md- move[Unreleased]entries to new version - Commit:
chore: release v0.x.x - Tag:
git tag v0.x.x - Push:
git push && git push --tags
See CHANGELOG.md for version history.
Contributions are welcome! Please feel free to submit a Pull Request.
This project follows Conventional Commits for commit messages:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test additions or modificationsrefactor:- Code refactoringchore:- Maintenance tasks
Example: feat: add support for scrypt KDF parameters
All notable changes are documented in CHANGELOG.md following the Keep a Changelog format.
When submitting a PR, please add an entry to the [Unreleased] section under the appropriate category:
Addedfor new featuresChangedfor changes in existing functionalityDeprecatedfor soon-to-be removed featuresRemovedfor now removed featuresFixedfor any bug fixesSecurityfor vulnerability fixes
- Ensure all tests pass:
zig build test --summary all - Follow the existing code style
- Add tests for new functionality
- Update CHANGELOG.md with your changes
This project is dual-licensed under:
- Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0
- MIT License - http://opensource.org/licenses/MIT
You may choose either license for your purposes.
- Issues: Report bugs or request features via GitHub Issues
- Discussions: For questions and discussions, use GitHub Discussions
- EIP-2335 - Ethereum BLS12-381 Keystore Specification
- The Zig community for the excellent programming language and tools
- Consensys Web3Signer and Teku