This repository contains implementation of a zero-knowledge prover and verifier tailored for an arbitrary set of LC3 compatible instructions, leveraging the SP1 Zero Knowledge Virtual Machine.
Before getting started, ensure that Rust is installed on your system. You can install Rust by following the official installation guide.
Additionally, for SP1 installation, follow the SP1 installation guide.
-
Clone the repository:
git clone https://github.com/surajj3404/lc3-sp1-pv.git cd lc3-sp1-pv
-
Build Program
cd program cargo prove build
-
In
./scripts/src/main.rs
, add the LC3 instructions for which you want to generate proofs. By default, the instruction set is configured to compute the square of 7.let instructions: Vec<u16> = vec![/* Add your LC3 instructions here */];
-
Once you have modified the instruction you can genarate proofs by running the following commands. The proof genarated will be stored as a json file in the script directory.
cd ./script cargo run
Contributions, bug reports, and feature requests are welcome! Fork the repository, make your changes, and submit a pull request.