Python bindings to bulletproofs
Project description
Bulletproofs in Python
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
Release history Release notifications | RSS feed
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
Close
Hashes for pybulletproofs-0.1.0_dev5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26c12de03b3a46c1594143aaf0fb772ab2216305ba2a27a4d8328199e0b9ec6f |
|
MD5 | 30a276b2777b5d94df3ec2bee4805315 |
|
BLAKE2b-256 | 1fefae1a464a22c803c5b1817fb127ffd072759ea313f96b8c0df7d289d92607 |
Close
Hashes for pybulletproofs-0.1.0_dev5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f3f640014375f7615aaf26f34b13b523308e301e595862b1dea36cb366211dd |
|
MD5 | 626b67e8b9cf358071e8bdf5b63b1e15 |
|
BLAKE2b-256 | 5a798b561c0e867f3fd4551c9b396f15f74196e022e7975f5b1050ffb8615689 |
Close
Hashes for pybulletproofs-0.1.0_dev5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9816ef63661b846bef4b1c1bda3ed044593da0074f7a9bd2a0837196ee6a629f |
|
MD5 | 53fd6592d06441dab437f2e1cdb4a051 |
|
BLAKE2b-256 | 9e2ada58050801897bebda7612aee88c3817dfa4c2a5bcdb7e424ae901e16df9 |