bip39
Rust implementation of BIP-39 Bitcoin mnemonic codes with no_std support and all standard wordlists.
Repository Health
Technical Analysis
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.
Used by 2 apps in this directory
Kuku
Note Taking
A local-first, open-source Markdown knowledge workspace for macOS — plain files, personal wiki and Second Brain workflows, AI-assisted diffs, and encrypted sync, built as an Obsidian alternative.
Spacedrive
File Storage · Collaboration
One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.