shamir-mnemonic
SLIP-39 Shamir Mnemonics
What it is and what it does
This package is a reference implementation of SLIP-0039, the Shamir's Secret Sharing standard for mnemonic codes. It splits a secret into unique shares distributed among participants, requiring a specified minimum number of shares to reconstruct the original secret—knowledge of fewer shares reveals nothing about the secret. The package provides both a programmatic API and an optional CLI tool for creating and recovering shares.
The implementation is intentionally not hardened against side-channel attacks and explicitly warns against use with sensitive production secrets; its stated purpose is to verify correctness of other implementations. It supports custom multi-group schemes (e.g., requiring completion of multiple threshold groups) and includes test vectors for validation. Runtime dependencies are minimal: only dataclasses on Python 3.6–3.7, and zero extra dependencies on Python 3.7+.
Use it for:
- Verify correctness of other SLIP-0039 implementations by comparing against this reference.
- Split a wallet seed or master secret into shares for distributed backup or recovery testing.
- Implement threshold-based secret recovery in applications that need to distribute trust across multiple parties.
- Create custom multi-group backup schemes where different groups must each reach their own threshold.
- Educational exploration of Shamir's Secret Sharing and SLIP-0039 specification mechanics.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements SLIP-0039 Shamir's Secret Sharing to split a secret into shares that require a minimum threshold to reconstruct, with optional CLI tools for share creation and recovery.
Yes, if you need a reference SLIP-0039 implementation for testing, verification, or non-sensitive prototyping. The low install friction and zero extra runtime dependencies make it suitable as a library dependency. No, if you need to handle production secrets—the package explicitly warns it is unsuitable for that purpose and lacks hardening against side-channel attacks. Dormant maintenance is acceptable for a stable cryptographic standard but means no active support.
Install
shamir-mnemonic on PyPI
pip
pip install shamir-mnemonicuv
uv add shamir-mnemonicpoetry
poetry add shamir-mnemonicInstalling shamir-mnemonic
Before you install
Low friction: pure Python wheel with only dataclasses as a runtime dependency. Dormant maintenance status (820 days since last release) means no active development, but the stable SLIP-0039 specification it implements is unlikely to require frequent updates.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
pip install shamir-mnemonic
from shamir_mnemonic import generate_mnemonics, combine_mnemonics
# Split a secret into 5 shares, requiring 3 to recover
shares = generate_mnemonics(group_threshold=1, groups=[(3, 5)])
recovered_secret = combine_mnemonics(shares[:3])
The package explicitly warns it is not suitable for handling sensitive production secrets due to lack of side-channel attack hardening; use only for testing and verification on non-sensitive data.
Verify before relying
- Whether the implementation has undergone formal security audit or cryptographic review beyond the stated reference implementation purpose.
- Current real-world adoption or compatibility with other SLIP-0039 implementations in production systems.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — dataclasses |
| Maintenance | dormant — 820 days since the last release |
| First released | |
| Downloads | 168,058/month — #10,456 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: shamir_mnemonic-0.3.0-py3-none-any.whl
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
mnemonicGenerates mnemonic word sequences and converts…
permissive · top 5,000 on PyPI
bip-utilsGenerates mnemonics, seeds, private/public…
permissive · top 15,000 on PyPI
slip10Implements SLIP-0010 hierarchical deterministic…
permissive · top 15,000 on PyPI
borsh-constructImplements the Borsh binary serialization…
permissive · top 15,000 on PyPI
robocorp-vaultProvides read and write access to secrets…
permissive · top 15,000 on PyPI
microsoft-security-utilities-secret-maskerDetects and masks sensitive data in text using…
permissive · top 5,000 on PyPI
SLH-DSAPure Python implementation of the SLH-DSA…
copyleft · top 15,000 on PyPI
spake2Implements SPAKE2, a password-authenticated key…
permissive · top 15,000 on PyPI
aws-cdk.aws-secretsmanagerAWS CDK construct library for provisioning and…
permissive · top 15,000 on PyPI
bip32Implements BIP 32 hierarchical deterministic…
permissive · top 15,000 on PyPI