Skip to content

ingonyama-zk/icicle-labrador

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icicle-labrador

This repository contains a compact, end-to-end demo of LaBRADOR — the first practical lattice-based zk-SNARK (CRYPTO 2023) - built on top of ICICLE v4. LaBRADOR produces ~50 kB proofs without a trusted setup and is secure under the Module-SIS assumption, making it resistant to both classical and quantum attacks.

ICICLE ships highly-tuned GPU and CPU kernels for FFT/NTT, polynomial arithmetic and lattice primitives. Thanks to those kernels the prover can run unchanged on a laptop CPU or a CUDA-capable GPU and enjoy order-of-magnitude speed-ups.

For additional background see the original paper and our detailed blog post.

To run the program on CPU use

./run.sh

To run on GPU, run

./run.sh -d CUDA

This script will automatically download the ICICLE CUDA backend (v4.0.0) when running with the CUDA option, build the necessary components, and run the prover.

You can also specify a custom backend installation directory with:

./run.sh -d CUDA -b /path/to/backend

The main program runs a simple benchmarking program for which the parameters can be set here:

  std::vector<std::tuple<size_t, size_t>> arr_nr{{1 << 6, 1 << 3}};
  std::vector<std::tuple<size_t, size_t>> num_constraint{{10, 10}};
  size_t NUM_REP = 1;
  bool SKIP_VERIF = false;
  benchmark_program(arr_nr, num_constraint, NUM_REP, SKIP_VERIF);

You can also run the function prover_verifier_trace in main. This function runs 3 recursion iterations of the Labrador protocol for a random instance.

The following flag in prover.h can be used to control the program output:

// SHOW_STEPS creates a print output listing every step performed by the Prover and the time taken
constexpr bool SHOW_STEPS = true;

All functions and objects are documented in code.

Performance

LaBRADOR latency vs. constraint count

About

LaBRADOR over ICICLE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •