gen-secp
gen-secp is a lightweight Python CLI and website for generating secp256k1 keypairs. It quickly prints fresh keys for local development, can emit detailed output, and offers a static WebAssembly-powered demo so you can generate keys directly in your browser.
- Web demo: https://gen-secp.github.io
- Source: https://github.com/tonidy/gen-secp
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Requirements:
Installation
Install directly from PyPI (recommended):
uv tool install gen-secp
Or for development, clone and install locally:
git clone https://github.com/tonidy/gen-secp.git
cd gen-secp
uv tool install .
To update after pulling new changes:
uv tool update
For PEM export support, install with coincurve extra:
uv sync --extra coincurve
Usage
The project provides a CLI entry. Example commands:
uv run genkey
Runs the command to generate a new key or secure artifact and prints or saves the result depending on configuration.
uv run genkey --long
Prints the private key plus compressed and uncompressed public keys.
uv run genkey --save mykey
Writes mykey.priv.hex (private key hex string) and mykey.pub.txt with both public key encodings in the current directory.
Run uv run genkey -h for the full list of options.
uv run genkey --coincurve --save mykey
Uses the original coincurve implementation (requires the extra above) and writes SEC1 PEM files (mykey.pem, mykey.pub.pem).
Browser demo
The static site under docs/ is deployed to GitHub Pages. It bundles the same Python implementation (executed through Pyodide WebAssembly) to generate keypairs client-side. Open https://tonidy.github.io/gen-secp and click “Generate Keypair”.
Troubleshooting
- If you see "python: command not found", ensure Python is installed and on your PATH.
- If dependencies fail to install, try
uv syncagain.
License
MIT
Metadata
Release files for gen-secp 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gen_secp-0.1.6.tar.gz | 11.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gen_secp-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.1 kB
Release files / gen_secp-0.1.6.tar.gz
| Download URL | gen_secp-0.1.6.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fc802ab4f721ea9308fba8a1ee3928a0f8c99a8f3f484cca4caf833210a1890
|
|
BLAKE2b-256 checksum How to use checksums |
433f5157304d35c1813ba9b137e81680a3cd71f706954f50243a0d732d2e78a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / gen_secp-0.1.6-py3-none-any.whl
| Download URL | gen_secp-0.1.6-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d9511ffa7abc454670c86af187bb49d1782f0605f37013966acdced488a88f2
|
|
BLAKE2b-256 checksum How to use checksums |
5f8513b1bc0f77ff214a25535f9bc9af6c0d92bc8c60bf3badb55e7ddd217ddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|