skillfed

bip32

Minimalistic implementation of BIP32 (Bitcoin HD wallets)

bip32 v5.0.0 225.6K downloads/30d#9,217 on PyPI51
Permissive license BSD-3-Clause AGING released

What it is and what it does

BIP 32 is the Bitcoin standard for hierarchical deterministic wallets—a way to derive many cryptographic keys from a single seed in a deterministic, hierarchical structure. This package provides a minimal Python implementation that lets you create a BIP32 instance from a raw seed, an extended private key (xpriv), or an extended public key (xpub), then derive child keys at any depth using standard path notation. It supports both hardened and unhardened derivation, and can return keys in multiple formats: raw bytes, extended keys with chain codes, or serialized base58-encoded strings.

The package wraps coincurve for elliptic curve operations on secp256k1, the curve Bitcoin uses. It's designed for applications that need to manage hierarchical key structures—wallet software, hardware wallet interfaces, or key management systems. The interface is straightforward: instantiate from a seed or master key, then call methods like get_xpriv_from_path() or get_pubkey_from_path() with a derivation path as either a list of integers or a string.

Use it for:

  • Generate a complete set of Bitcoin wallet addresses from a single seed phrase in a deterministic, recoverable way.
  • Derive public keys for address generation without exposing the private key (public-only derivation from xpub).
  • Implement multi-account or multi-address wallet hierarchies following the BIP 32 standard.
  • Build key management or hardware wallet interfaces that need to derive keys on demand.
  • Create deterministic key hierarchies for testing or cryptographic applications requiring secp256k1.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Implements BIP 32 hierarchical deterministic (HD) wallet key derivation for Bitcoin, allowing you to generate extended private and public keys from a seed or master key using standard derivation paths.

Yes, if you need BIP 32 key derivation for Bitcoin wallets or cryptographic applications. The implementation is minimal and focused, with low install friction and no known vulnerabilities. Maintenance is aging (274 days since release), so verify that the package meets your stability and support expectations before adopting it in production. The BSD-3-Clause license is permissive and poses no barrier.

Install

bip32 on PyPI

pip

pip install bip32

uv

uv add bip32

poetry

poetry add bip32

Installing bip32

Before you install

Low friction: pure Python wheel with a single compiled dependency (coincurve). Maintenance is aging—274 days since last release—but the repository remains active with recent commits and no archived status.

License in practice

BSD-3-Clause (permissive) allows commercial and private use with minimal restrictions; you must include the license text and original copyright notice.

Quickstart

pip install bip32

from bip32 import BIP32, HARDENED_INDEX
bip32 = BIP32.from_seed(bytes.fromhex("01"))
xpriv = bip32.get_xpriv_from_path("m/1/0'/9998")
pubkey = bip32.get_pubkey_from_path("m/1/1/1/1/1/1/1/1/1/1/1")

Requires Python 3.9 or later. coincurve wraps libsecp256k1, which may require a C compiler or prebuilt binaries on some platforms.

Verify before relying

  • Whether the package is actively maintained or in maintenance-only mode (last release 274 days ago, but recent commits suggest ongoing work).
  • Performance characteristics for deep derivation paths or batch key generation.
  • Common wallet derivation path standards supported beyond the examples shown.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — coincurve
Maintenance aging — 274 days since the last release
Last repo commit
First released
Downloads 225,646/month — #9,217 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: bip32-5.0.0-py3-none-any.whl

Keywords: bitcoin, key derivation, HD wallet

Operating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Security :: Cryptography

Tags

BIP32 key derivationHD wallet implementationBitcoin hierarchical deterministicextended key generationcryptocurrency key derivationhardened key derivationwallet seed derivation
bitcoinkey-derivationcryptography

More Cryptography packages