Skip to main content

Human-executable secret sharing for BIP39 mnemonics using GF(2053)

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

schiavinato_sharing-0.4.2.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

schiavinato_sharing-0.4.2-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

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

Hashes for schiavinato_sharing-0.4.2.tar.gz
Algorithm Hash digest
SHA256 6733daa78d331bc8ca1934f421f3bcedf0843dfa05525413d5dedf9883b9be79
MD5 4231f5e0dd9d06b15841b0ae55b101e7
BLAKE2b-256 b6e760ee52bd38a7d53c72759afa45081fea66d98978b32507e7d1545942f72e

See more details on using hashes here.

Provenance

The following attestation bundles were made for schiavinato_sharing-0.4.2.tar.gz:

Publisher: publish.yml on GRIFORTIS/schiavinato-sharing-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file schiavinato_sharing-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for schiavinato_sharing-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0bf0424926225017351a66f8e58611ded4434bd7a0fe722b909e549d5f6358ff
MD5 ac0a533d3e50f4f156b5bbac11949acc
BLAKE2b-256 c788c1bcdfcb0e6a146bb1951c70e21fbb8c701e5b7571a6a37c37ffb848545e

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page