Skip to main content

Schiavinato Sharing (Python)

Security: Experimental CI CodeQL codecov PyPI version Python versions License: MIT

⚠️ 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


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 signature CHECKSUMS-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

MIT License

Metadata

Release files for schiavinato-sharing 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for schiavinato-sharing 0.4.2
File Size Uploaded Provenance Actions
schiavinato_sharing-0.4.2.tar.gz 29.7 kB With provenance Details for schiavinato_sharing-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for schiavinato-sharing 0.4.2
File Interpreter ABI Platform Actions
schiavinato_sharing-0.4.2-py3-none-any.whl Python 3 none any Details for schiavinato_sharing-0.4.2-py3-none-any.whl

Total release size: 50.8 kB

Release files / schiavinato_sharing-0.4.2.tar.gz

Download URL schiavinato_sharing-0.4.2.tar.gz
Size 29.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6733daa78d331bc8ca1934f421f3bcedf0843dfa05525413d5dedf9883b9be79
BLAKE2b-256 checksum
How to use checksums
b6e760ee52bd38a7d53c72759afa45081fea66d98978b32507e7d1545942f72e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.

Transparency log

Release files / schiavinato_sharing-0.4.2-py3-none-any.whl

Download URL schiavinato_sharing-0.4.2-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bf0424926225017351a66f8e58611ded4434bd7a0fe722b909e549d5f6358ff
BLAKE2b-256 checksum
How to use checksums
c788c1bcdfcb0e6a146bb1951c70e21fbb8c701e5b7571a6a37c37ffb848545e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.

Transparency log

Security for schiavinato-sharing 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for schiavinato_sharing-0.4.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page