Skip to main content

PicoZK

Integrated, Efficient, and Extensible Zero-Knowledge Proof Engineering


Installation

You can install the library from PyPI using pip install:

pip install picozk

Or, clone the repository and then install with pip install (This library requires Python3):

git clone git@github.com:uvm-plaid/picozk.git
cd picozk
pip install .

If you want to run the examples, you'll need to install some extra Python packages (which are optional and are not required to install the core library). These dependent packages can be done by running the command pip install ".[examples]".

Usage

To generate a zero-knowledge (ZK) statement, write a Python program that uses the PicoZK library, and then run the program to generate the statement. For example, the following program corresponds to a ZK statement that the prover knows a number x such that x + x * x is 30:

from picozk import *

with PicoZKCompiler('picozk_test'):
    x = SecretInt(5)
    z = x + x * x
    assert0(z + -30)

Running this program results in three files:

  • picozk_test.rel: the relation, which is the statement itself (known to both prover and verifier)
  • picozk_test.type0.ins: the instance, which holds public information (known to both prover and verifier, always empty in our setting)
  • picozk_test.type0.wit: the witness, which holds secret information (known only to prover)

These files can be used to generate a ZK proof using any backend compatible with the SIEVE intermediate representation (IR) - for example, the EMP Toolkit.

Licensing and Acknowledgments

PicoZK is made available under the MIT License.

DISTRIBUTION A: Approved for Public Release. Distribution is Unlimited. This material is based upon work supported by DARPA under Contract No. HR001120C0087 and by the Broad Agency Announcement Program and the Cold Regions Research and Engineering Laboratory (ERDC-CRREL) under Contract W913E521C0003. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of DARPA or ERDC-CRREL.

Metadata

Release files for picozk 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for picozk 0.4
File Size Uploaded
picozk-0.4.tar.gz 19.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for picozk 0.4
File Interpreter ABI Platform
picozk-0.4-py3-none-any.whl Python 3 none any Details

Total release size: 40.6 kB

Release files / picozk-0.4.tar.gz

Download URL picozk-0.4.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d022b261d5918beb5cbcf3cc92649a4ca0cf9cc581578e98db022795e561bbcd
BLAKE2b-256 checksum
How to use checksums
cdfd162d7ac63c34f856ca065411c6f7f3d10d7d332ba5a43ed124beb9f7f220
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.4

Release files / picozk-0.4-py3-none-any.whl

Download URL picozk-0.4-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4cb665766158209a81da950263b3b06499723af0a604c79de66a4f23277f9407
BLAKE2b-256 checksum
How to use checksums
92eafedcc0cc25dd2a25fdc0b39c687ef2a309e8e0cd87fa23bc1971a5d08264
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page