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

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

pybulletproofs-0.1.0_dev7-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_dev7-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_dev7-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_dev7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pybulletproofs-0.1.0_dev7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 94d33f298cddd4d8e62d374b7681bfbb28dc9a2fce3c46871ab03017e2fd395d
MD5 0fe2918916bbbfd741fe88c219970797
BLAKE2b-256 1696a8f2f52d43a7f7d0d6b005c2930edc120cb4ec98c33b6c302bcf977e0d36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pybulletproofs-0.1.0_dev7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 77a5c28d134cdc0527c2a36a89ba5a5184542af07e2cd459671d8b972fbaec19
MD5 820152de9fe1952594c80b0e83519332
BLAKE2b-256 c0fa7bb55864753d1f866f0f50c2ae311202be61c7b2795d8f7644f57a581ee9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pybulletproofs-0.1.0_dev7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 80a64fc53b6a875aa12bc7081dd72f90170bdaa4e51caa0630b627995fef04db
MD5 736ee5d2d59abdd8a6d27ae60ae0d2fe
BLAKE2b-256 2a9e3c1573f2b3147213e4c8d2bad86fb7fca270ad7a48cb4d5aca85917a3687

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