Skip to main content

Python bindings to bulletproofs

Project description

Bulletproofs in Python

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

WARNING: Work-in-progress. Only meant for experimental purposes.


We use pyo3 to wrap the bulletproof implementation by dalek-cryptography in python.

Quickstart

Install latest development version from PyPI.

pip install pybulletproofs

To test the python library, run the following proof and verification.

from pybulletproofs import zkrp_prove, zkrp_verify

proof1, comm1, _ = zkrp_prove(2022, 32)
proof2, comm2, _ = zkrp_prove(2023, 32)

assert zkrp_verify(proof1, comm1)
assert !zkrp_verify(proof2, comm1)

Development

Dependencies

  • Python 3.8 and up
  • Rust 1.62.0-nightly (60e50fc1c 2022-04-04) and up

Building

We first create a python virtual environment, activate it, and install maturin into the virtual environment.

$ python -m venv .env
$ source .env/bin/activate
$ pip install maturin

To compile the Rust implementation into a python library, run the following code snippet.

$ maturin init
$ maturin develop

Alternatively, use the Dockerfile.

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

pybulletproofs-0.1.0_dev4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distributions

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

pybulletproofs-0.1.0_dev4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pybulletproofs-0.1.0_dev4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pybulletproofs-0.1.0_dev4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file pybulletproofs-0.1.0_dev4.tar.gz.

File metadata

  • Download URL: pybulletproofs-0.1.0_dev4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.15

File hashes

Hashes for pybulletproofs-0.1.0_dev4.tar.gz
Algorithm Hash digest
SHA256 d37f3709c487d012d7f341bb58e14d51ed2efb8e1f2a8ad61be4e5800006616f
MD5 a054a18236e7b844cb751a8e44bcaee7
BLAKE2b-256 80405ce236198f52b32365898f99750cf163cc229a3d406ec906f288058d33b3

See more details on using hashes here.

File details

Details for the file pybulletproofs-0.1.0_dev4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pybulletproofs-0.1.0_dev4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 301a21542afc835f0a9a4e172317004b6914a467d6501f0624effe67bb194429
MD5 7eb615130b660f83ebeffca7a6c273bf
BLAKE2b-256 65abcbd6aba0b3339484074e08ca79e6bda2483837f9f7cd7461b3b25ce258c5

See more details on using hashes here.

File details

Details for the file pybulletproofs-0.1.0_dev4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pybulletproofs-0.1.0_dev4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b0267dbc300d5c9b2245faa585b69c15f30010ffc15676241cb91070da1c676
MD5 fe0419a38c93242588c04da61bd8e981
BLAKE2b-256 c39335ecae8918af041959ad0dcdcd2214fee61552d446ac50194da80d0b5cfe

See more details on using hashes here.

File details

Details for the file pybulletproofs-0.1.0_dev4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pybulletproofs-0.1.0_dev4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 50abe1a8347f0c40af338d651fcc06bfca7cc10d538c00250bf15d350083a940
MD5 5d629a135d959ad6b0b1fc7767c496f3
BLAKE2b-256 6c24b117c4f9d0790bea7fe30bfa762906798260c96bc1840934087bc9ddcf3e

See more details on using hashes here.

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