Warning
This is a standalone version of ICICLE specifically meant for integration with the Gnark codebase. It is NOT meant to be used together with the main ICICLE repo.
If you are looking for the main ICICLE repo, you can find it here
Zero Knowledge Proofs (ZKPs) are considered one of the greatest achievements of modern cryptography. Accordingly, ZKPs are expected to disrupt a number of industries and will usher in an era of trustless and privacy preserving services and infrastructure.
We believe that ICICLE will be a cornerstone in the acceleration of ZKPs:
- Versatility: Supports multiple hardware platforms, making it adaptable to various computational environments.
- Efficiency: Designed to leverage the parallel nature of ZK computations, whether on GPUs, CPUs, or other accelerators.
- Scalability: Provides an easy-to-use and scalable solution for developers, allowing them to optimize cryptographic operations with minimal effort.
- Any compatible hardware: CPU or Nvidia GPU.
- CMake, Version 3.18 or above. Latest version recommended
- CUDA Toolkit, Required only if using NVIDIA GPUs (version 12.0 or newer).
- Clang
- User permissions to create directories in GOMODCACHE
- User permissions to install libraries in
/usr/local/lib
Note
For older GPUs that only support CUDA 11, ICICLE may still function, but official support is for CUDA 12 onwards.
Gnark includes icicle-gnark as a direct dependency. Before gnark can use icicle-gnark, the c++ libraries need to be built. Follow these instructions to build the libs.
-
Run
go mod tidy
to pull all the dependecies. -
Navigate to the icicle-gnark dependency in your GOMODCACHE and build the c++ libraries there.
cd $(go env GOMODCACHE)/github.com/ingonyama-zk/icicle-gnark/v3@<version>/wrappers/golang chmod +x build.sh ./build.sh -curve=bn254
-
Double check that the following frontend libs are located in
/usr/local/lib
.- libicicle_curve_bn254.so
- libicicle_field_bn254.so
- libicicle_device.so
-
Double check that the following backend libs are located in
/usr/local/lib/backend/**
.- libicicle_backend_cuda_curve_bn254.so
- libicicle_backend_cuda_field_bn254.so
- libicicle_backend_cuda_device.so
-
Finally, export the
ICICLE_BACKEND_INSTALL_DIR
environment variable to the location with the backend librariesexport ICICLE_BACKEND_INSTALL_DIR=/usr/local/lib/backend
Tip
By default, the above steps build both the CPU and CUDA backends. You can switch the device by using the CreateDevice API.
Note
To specify a curve, use the flag -curve=<curve>, where <curve> can be one of the following: bn254, bls12_377, bls12_381, or bw6_761.
Currently, Gnark only has support for bn254 with icicle-gnark
Join our Discord Server and find us on the ICICLE channel. We will be happy to work together to support your use case, and talk features, bugs and design.
Please see the main ICICLE repo for contributing.
For help and support talk to our devs in our discord channel #ICICLE or contact us at support@ingonyama.com.
This version of ICICLE is distributed under the terms of the MIT License.
See LICENSE-MIT for details.