skillfed

shamir-mnemonic

SLIP-39 Shamir Mnemonics

shamir-mnemonic v0.3.0 168.1K downloads/30d#10,456 on PyPI
Permissive license MIT DORMANT released

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-mnemonic

uv

uv add shamir-mnemonic

poetry

poetry add shamir-mnemonic

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

shamir secret sharingslip-0039 implementationsecret splitting thresholdmnemonic recovery sharescryptographic secret sharingthreshold secret reconstructionshamir backup scheme
slip-0039reference-implementationthreshold-cryptography

More Cryptography packages