Human-executable secret sharing for BIP39 mnemonics using GF(2053)
Project description
Schiavinato Sharing (Python)
⚠️ WARNING: EXPERIMENTAL SOFTWARE ⚠️
DO NOT USE IT FOR REAL FUNDS!
Schiavinato Sharing specification and implementations have NOT been audited. Use for testing, learning, and experimentation only. See SECURITY for details.
We invite cryptographers and developers to review the spec and software. See CONTRIBUTING to know more.
Python implementation of Schiavinato Sharing: dual-mode (manual + software) (k)-of-(n) threshold secret sharing for BIP39 mnemonics over GF(2053). Designed for offline/air-gapped workflows, with manual-fallback compatibility.
What is this?
Schiavinato Sharing is a dual-mode (manual + software) (k)-of-(n) threshold secret sharing scheme for BIP39 mnemonics. It operates directly on the 1-indexed BIP39 word indices over the prime field GF(2053), so the recovered secret is a standard BIP39 mnemonic compatible with modern wallets.
In this Python implementation, you can:
- Split a BIP39 mnemonic into (k)-of-(n) shares (
Share) - Recover the original BIP39 mnemonic from (k) shares (
RecoveryResult) - Validate inputs and share integrity during split/recovery to prevent silent mistakes
Links
- Canonical protocol + specs: schiavinato-sharing
- Whitepaper: PDF (latest) | Releases (versioned PDF) | LaTeX
- Test Vectors: TEST_VECTORS
- Canonical security posture: SECURITY
- HTML implementation: schiavinato-sharing-html
- JavaScript implementation: schiavinato-sharing-js
Security
This library implements well-established cryptographic principles but has NOT been professionally audited.
Use only for: testing, learning, experimentation.
Canonical security posture: schiavinato-sharing/SECURITY
Verify Before Use (Required)
CRITICAL: Before using with real crypto seeds, verify the package and/or release artifacts haven't been tampered with.
Option A: Verify release artifacts (recommended for highest assurance)
This repository's releases include:
CHECKSUMS-PYPI.txt(+ detached signatureCHECKSUMS-PYPI.txt.asc)- Python package artifacts (
*.whl,*.tar.gz) (+ optional detached signatures*.asc)
Import the GRIFORTIS public key and verify signatures before use.
curl -fsSL https://raw.githubusercontent.com/GRIFORTIS/schiavinato-sharing-py/main/GRIFORTIS-PGP-PUBLIC-KEY.asc | gpg --import
gpg --fingerprint security@grifortis.com
Expected: 7921 FD56 9450 8DA4 020E 671F 4CFE 6248 C57F 15DF
Then verify release assets (examples):
gpg --verify CHECKSUMS-PYPI.txt.asc CHECKSUMS-PYPI.txt
sha256sum --check CHECKSUMS-PYPI.txt --ignore-missing
Option B: Verify the PyPI artifacts (supply-chain sanity check)
- Pin exact versions and use lockfiles for repeatable installs
- Prefer offline installs from a locally verified wheel/sdist
Installation
pip install schiavinato-sharing
Quick Start
Split a mnemonic
from schiavinato_sharing import split_mnemonic
mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
shares = split_mnemonic(mnemonic, 2, 3)
print(shares[0].share_number)
Recover a mnemonic
from schiavinato_sharing import recover_mnemonic
result = recover_mnemonic(shares[:2], word_count=12, strict_validation=True)
if not result.success:
raise RuntimeError(str(result.errors))
print(result.mnemonic)
API Reference (high-level)
Stable entry points:
split_mnemonic(mnemonic, k, n, wordlist=None)recover_mnemonic(shares, word_count, strict_validation=True, wordlist=None)
Advanced exports (field arithmetic, Lagrange helpers, checksum helpers, secure wipe utilities) are also available for integration/testing; see the package exports in schiavinato_sharing/__init__.py.
Conformance Validation
This implementation is validated against canonical test vectors:
Functional Validation (Run Tests)
See TESTING for the full local testing checklist (CI parity).
Compatibility
- Spec version: v0.4.0
- Python: 3.10+
Contributing
See CONTRIBUTING.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file schiavinato_sharing-0.4.2.tar.gz.
File metadata
- Download URL: schiavinato_sharing-0.4.2.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6733daa78d331bc8ca1934f421f3bcedf0843dfa05525413d5dedf9883b9be79
|
|
| MD5 |
4231f5e0dd9d06b15841b0ae55b101e7
|
|
| BLAKE2b-256 |
b6e760ee52bd38a7d53c72759afa45081fea66d98978b32507e7d1545942f72e
|
Provenance
The following attestation bundles were made for schiavinato_sharing-0.4.2.tar.gz:
Publisher:
publish.yml on GRIFORTIS/schiavinato-sharing-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
schiavinato_sharing-0.4.2.tar.gz -
Subject digest:
6733daa78d331bc8ca1934f421f3bcedf0843dfa05525413d5dedf9883b9be79 - Sigstore transparency entry: 910213333
- Sigstore integration time:
-
Permalink:
GRIFORTIS/schiavinato-sharing-py@d97c988035dfede259af4205cf1fa86fc5055328 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/GRIFORTIS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d97c988035dfede259af4205cf1fa86fc5055328 -
Trigger Event:
release
-
Statement type:
File details
Details for the file schiavinato_sharing-0.4.2-py3-none-any.whl.
File metadata
- Download URL: schiavinato_sharing-0.4.2-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bf0424926225017351a66f8e58611ded4434bd7a0fe722b909e549d5f6358ff
|
|
| MD5 |
ac0a533d3e50f4f156b5bbac11949acc
|
|
| BLAKE2b-256 |
c788c1bcdfcb0e6a146bb1951c70e21fbb8c701e5b7571a6a37c37ffb848545e
|
Provenance
The following attestation bundles were made for schiavinato_sharing-0.4.2-py3-none-any.whl:
Publisher:
publish.yml on GRIFORTIS/schiavinato-sharing-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
schiavinato_sharing-0.4.2-py3-none-any.whl -
Subject digest:
0bf0424926225017351a66f8e58611ded4434bd7a0fe722b909e549d5f6358ff - Sigstore transparency entry: 910213345
- Sigstore integration time:
-
Permalink:
GRIFORTIS/schiavinato-sharing-py@d97c988035dfede259af4205cf1fa86fc5055328 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/GRIFORTIS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d97c988035dfede259af4205cf1fa86fc5055328 -
Trigger Event:
release
-
Statement type: