bip39

Rust implementation of BIP-39 Bitcoin mnemonic codes with no_std support and all standard wordlists.

Library
Cargo
v2.2.2
111stars
CC0-1.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
56/100Fair
Development Activity56
Maintenance12
Community76
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
80/100Excellent
Architecture82
Code Quality84
Innovation76
Learning Curve78

bip39 is a Rust library implementing the BIP-39 standard for mnemonic seed phrases used across Bitcoin and other cryptocurrency wallets. It generates new mnemonics from entropy, parses and validates existing phrases, and derives the binary seed used for key generation.

Maintained under the rust-bitcoin organization, the crate supports every language wordlist defined in the BIP-39 specification behind cargo features, works in no_std environments, and keeps a low minimum supported Rust version, making it suitable for embedded wallets, hardware devices, and full-featured desktop clients alike.

What You Get

  • A Mnemonic type for generating, parsing, and validating BIP-39 phrases
  • Seed derivation with optional passphrase following the BIP-39 spec
  • All standard BIP-39 language wordlists behind cargo features
  • no_std support with an optional alloc feature for constrained targets
  • A low MSRV and optional serde and rand integrations

Common Use Cases

  • Generating recovery seed phrases for cryptocurrency wallets
  • Validating and importing user-entered mnemonic phrases
  • Deriving master seeds for HD key generation (BIP-32)
  • Building wallets for embedded or no_std environments

Under The Hood

Architecture - The crate’s src is organized around a Mnemonic struct plus a Language enum whose variants map to compiled-in wordlists gated by cargo features. Construction from entropy computes the checksum from a SHA-256 hash and encodes 11-bit indices into words; parsing reverses that and validates the checksum. Seed derivation runs PBKDF2-HMAC-SHA512 over the normalized mnemonic and passphrase, with Unicode normalization applied to satisfy the spec across languages.

Tech Stack - Rust (edition 2018) with a feature-driven design: std/alloc/no_std tiers, bitcoin_hashes for hashing, unicode-normalization for NFKD, and optional serde and rand. A pinned Cargo-minimal.lock documents the low-MSRV dependency set.

Code Quality - The repository includes unit tests, benches, a CHANGELOG, and a contrib test script that exercises multiple Rust versions and feature combinations. As a rust-bitcoin project it follows that org’s review conventions, though recent activity is low since the crate is stable.

API Design - The API is compact and idiomatic: Mnemonic::generate, Mnemonic::parse, and to_seed cover the common flows, with feature flags keeping binary size small. docs.rs documentation and clear feature naming make the trade-offs explicit for wallet authors.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search