This project is a Rust implementation of a system for creating zk-SNARKs. It includes various components like circuits, Rank-1 Constraint Systems (R1CS), and polynomial operations, which are central to the construction of zk-SNARKs.
The project is organized into several modules, each with a specific focus:
circuits
: Defines the structure and operations of circuits used in zk-SNARKs.circuit.rs
: Contains theCircuit
struct and related functionalities.errors.rs
: Error handling specific to circuit operations.indexed_map.rs
: Provides an indexed map utility used within circuits.sample_circuits
: Sample JSON files representing predefined circuits.utils.rs
: Utilities for circuit operations.
r1cs
: Implements the Rank-1 Constraint System (R1CS) crucial for zk-SNARKs.r1cs.rs
: Contains theR1CS
struct and methods for managing constraints.
utils
: Common utilities used across the project.polynomial.rs
: Defines polynomial operations essential in zk-SNARK constructions.
zk_proofs
: Contains the implementation for generating zk-SNARK proofs.qap.rs
: Quadratic Arithmetic Program (QAP) related implementations.
To get started with this project:
- Ensure you have Rust installed on your machine.
- Clone the repository to your local machine.
- Navigate to the project directory and build the project using Cargo:
cargo build
- Circuits: Import and utilize the
Circuit
struct to create and manipulate circuits. - R1CS: Use the
R1CS
struct to generate and manage R1CS constraints. - Polynomials: Leverage polynomial operations for various cryptographic computations.
Run the tests provided in the respective modules to ensure everything is working as expected:
cargo test
Contributions to this project are welcome. Please follow these steps:
- Fork the repository.
- Create a new branch for your feature.
- Commit your changes.
- Push to the branch.
- Submit a pull request.
[Specify the license under which this project is made available]