Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

syft-crypto-python (PyO3 bindings)

Python bindings for the syft-crypto-protocol crate, built with PyO3 and maturin.

Quick start

uv venv
uv pip install maturin
uv run -- maturin develop --manifest-path bindings/python/Cargo.toml

python - <<'PY'
import syft_crypto_python as syc

material = syc.generate_identity_material("alice@example.com")
print(material.fingerprint)
print(material.did)
print(material.recovery_key_hex)
PY

Building wheels

uv venv
uv pip install maturin
uv run -- maturin build --release --manifest-path bindings/python/Cargo.toml
ls dist

Development

  • Format Rust code with cargo fmt
  • Format Python stubs with uv run ruff format python
  • Lint Python code with uv run ruff check python

Streaming (large files)

encrypt_message / decrypt_message hold the whole payload in memory. For files, use the streaming API: it seals the file segment by segment (1 MiB by default) inside a single envelope, so memory use does not grow with the file size, and it releases the GIL while working.

import syft_crypto_python as syc

# encrypt: src -> envelope file
syc.encrypt_file("alice@example.com", alice_keys,
                 [syc.EncryptionRecipient("bob@example.com", bob_bundle)],
                 "weights.safetensors", "weights.safetensors.syc",
                 filename_hint="weights.safetensors")

# inspect and verify the sender before touching the ciphertext
header = syc.parse_envelope_header_file("weights.safetensors.syc")
syc.verify_envelope_header_signature(header, alice_bundle.identity_key_bytes)
print(header.prelude["cipher"])   # suite, segment_count, last_segment_bytes, ciphertext_len

# decrypt: envelope file -> dst (signature and recipient are verified first)
syc.decrypt_file("bob@example.com", bob_keys, alice_bundle,
                 "weights.safetensors.syc", "weights.safetensors")

Segments are sealed and opened on all cores by default; pass parallelism=1 to stay on one thread, or segment_size= to change the 1 MiB default.

Both APIs read each other's envelopes: decrypt_file opens whole-payload envelopes and decrypt_message opens streamed ones. On any error the partially written output file is removed.

Metadata

Release files for syft-crypto-python 0.1.2b4

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

Source distribution (sdist)

Source distribution for syft-crypto-python 0.1.2b4
File Size Uploaded Provenance
syft_crypto_python-0.1.2b4.tar.gz 81.3 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for syft-crypto-python 0.1.2b4
File
syft_crypto_python-0.1.2b4-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
syft_crypto_python-0.1.2b4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
syft_crypto_python-0.1.2b4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
syft_crypto_python-0.1.2b4-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
syft_crypto_python-0.1.2b4-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 4.2 MB

Release files / syft_crypto_python-0.1.2b4.tar.gz

Download URL syft_crypto_python-0.1.2b4.tar.gz
Size 81.3 kB
Tags Source
SHA-256 checksum
How to use checksums
47c4cf675db8b1f06cff4ff3ac644da73f4f13f5f1fa38ba6ebc81af0babff3d
BLAKE2b-256 checksum
How to use checksums
f320256dd1a82254b01dd32f0e9293ab159e1bbf7b06f3e5c587f40fce3182c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / syft_crypto_python-0.1.2b4-cp39-abi3-win_amd64.whl

Download URL syft_crypto_python-0.1.2b4-cp39-abi3-win_amd64.whl
Size 693.1 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e49d670f679ef6385ffccd1f7251dd5a0fc04acaacd83a4c5bfaa1c0c07a97f1
BLAKE2b-256 checksum
How to use checksums
08d4c2a874c65142ec4470ac596981f36ab3fc627808d25c687b6dd0449e27c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / syft_crypto_python-0.1.2b4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL syft_crypto_python-0.1.2b4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 903.5 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
1b6fa3e09bef6112bb98a26c0e868b85d34372421d1c6acc38db3f8d74494c92
BLAKE2b-256 checksum
How to use checksums
1b449c2c84f2b7c664f92235e4ed27006101687ba66b5f35fd90e182177a221b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / syft_crypto_python-0.1.2b4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL syft_crypto_python-0.1.2b4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 865.1 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
f4a60209aa6c6b746a27907c5f5732ed1a5eac6335668840fbf799c74d2e5af9
BLAKE2b-256 checksum
How to use checksums
342c623a652d2a85c04a739d9a0765f3c9bb5d49d1824807f152209e6e055483
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / syft_crypto_python-0.1.2b4-cp39-abi3-macosx_11_0_arm64.whl

Download URL syft_crypto_python-0.1.2b4-cp39-abi3-macosx_11_0_arm64.whl
Size 783.6 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1a6e69c99eddaf3a0e45343c2c0c9e58fdb6f2402d268596f970d5eb5f3876e7
BLAKE2b-256 checksum
How to use checksums
a4578f63f4a3907d6fe728fb5b219e425d3c765bd931d2ae7b89152db2b43c9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / syft_crypto_python-0.1.2b4-cp39-abi3-macosx_10_12_x86_64.whl

Download URL syft_crypto_python-0.1.2b4-cp39-abi3-macosx_10_12_x86_64.whl
Size 837.2 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6fe9b0f5121d5a28ab5b9d9bfae20ed6b8ac7b81bf8830bdd0ad04ef3e1fbf6b
BLAKE2b-256 checksum
How to use checksums
6f682bb1c579f2cf9b8ec93eb36a7736b83803304dc3064e584b25a3e8e693a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for syft-crypto-python 0.1.2b4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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