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 Distribution
Built Distributions
Close
Hashes for pybulletproofs-0.1.0_dev4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d37f3709c487d012d7f341bb58e14d51ed2efb8e1f2a8ad61be4e5800006616f |
|
MD5 | a054a18236e7b844cb751a8e44bcaee7 |
|
BLAKE2b-256 | 80405ce236198f52b32365898f99750cf163cc229a3d406ec906f288058d33b3 |
Close
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 |
Close
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 |
Close
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 |