Skip to main content

Python bindings to bulletproofs

Project description

Bulletproofs in Python

PyPI version PyPI - Format PyPI - Status ci

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pybulletproofs-0.1.0_dev7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pybulletproofs-0.1.0_dev7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pybulletproofs-0.1.0_dev7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

Supported by

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