web-prover-circuits is a project focused on implementing parsers and extractors/selective-disclosure for various data formats inside zero-knowledge circuits.
Specifically, these are designed to be used in an NIVC folding scheme.
Currently, our program layout looks like this:

circuits/: Current implementation of circuitschacha: ChaCha encryption circuithttp: HTTP parser and extractorjson: JSON parser and extractorjsonhas its own documentation here
utils: Utility circuitstest: Circuit tests
src/: Rust public-params creation binaryexamples/: Reference examples for JSON and HTTP parsers
Documentation, in general, can be found in the docs directory.
To use this repo, you will need to install the following dependencies. These instructions should work on Linux/GNU and MacOS, but aren't guaranteed to work on Windows.
To install Rust, you need to run:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
exec $SHELLCheck this is installed by running:
rustc --version && cargo --versionto see the path to your Rust compiler and Cargo package manager.
Succinctly, cd to a directory of your choosing and run:
git clone https://github.com/iden3/circom.git
cd circom
cargo build --release
cargo install --path circomin order to install circom globally.
First, install nvm by running:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
exec $SHELLNow with nvm installed, run:
nvm install --lts
nvm use --lts
node --version && npm --versionFrom the root of the repository, you can now run:
npm installwhich will install all the necessary packages for working with Circom.
This includes executables circomkit, snarkjs, and mocha which are accessible with Node: npx.
This repository uses circomkit to manage Circom circuits.
To see what you can do with circomkit, we suggest running:
npx circomkit help
circomkit can essentially do everything you would want to do with these Circuits, though we can't guarantee all commands work properly.
Example:
For example, to compile the plaintext_authentication, you can run the following from the repository root:
npx circomkit compile plaintext_authentication_1024b
which implicitly checks the circuits.json for an object that points to the circuit's code itself.
If you are having trouble with circomkit, consider
mocha will also be installed from before.
Running
npx mochawill run every circuit test.
To filter tests, you can use the -g flag (very helpful!).
Licensed under the Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
We welcome contributions to our open-source projects. If you want to contribute or follow along with contributor discussions, join our main Telegram channel to chat about Pluto's development.
Our contributor guidelines can be found in CONTRIBUTING.md. A good starting point is issues labelled 'bounty' in our repositories.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.