Skip to main content

Generate secp256k1 keypair CLI

Project description

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.

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

  1. Clone the repository:
git clone https://github.com/tonidy/gen-secp.git
cd gen-secp
  1. Install the packages:
uv sync

Or install directly from PyPI:

uv tool install gen-secp

If you want to enable the optional coincurve-backed CLI mode (for PEM export), install the extra:

uv sync --extra coincurve
  1. Install as a tool (optional):

This makes genkey available globally:

uv tool install .

Now you can run genkey directly without uv run:

genkey

To update after pulling new changes:

uv tool update

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 sync again.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gen_secp-0.1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gen_secp-0.1.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file gen_secp-0.1.2.tar.gz.

File metadata

  • Download URL: gen_secp-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for gen_secp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b30a991f757f330cad370b48c71f6035e1491ed7af75807c13661fcf15b54b11
MD5 fd3b743c3df431f7c51d60c488208e01
BLAKE2b-256 960878e322767af661ba3c8365a1f87e3d792fdf51389df1e0c31715b521a0c5

See more details on using hashes here.

File details

Details for the file gen_secp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gen_secp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for gen_secp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 997dcefb0fdd30d4c6972948c87d800f98965266a8977cac7d899aad2c4b2f4d
MD5 9822387e18d8b828213533370d3811c0
BLAKE2b-256 d835daf937e22d5bb20f691d294acddd1874909ccfcf37896dc03ae99e7161c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page