distributedstatemachine / icicle

a GPU Library for Zero-Knowledge Acceleration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ICICLE

Icicle is a library for ZK acceleration using CUDA-enabled GPUs.

image (4)

Build status Chat with us on Discord Follow us on Twitter

Background

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.

If we want ZK hardware today we have FPGAs or GPUs which are relatively inexpensive. However, the biggest selling point of GPUs is the software; we talk in particular about CUDA, which makes it easy to write code running on Nvidia GPUs, taking advantage of their highly parallel architecture. Together with the widespread availability of these devices, if we can get GPUs to work on ZK workloads, then we have made a giant step towards accessible and efficient ZK provers.

Zero Knowledge on GPU

ICICLE is a CUDA implementation of general functions widely used in ZKP. ICICLE currently provides support for MSM, NTT, and ECNTT, with plans to support Hash functions soon.

Supported primitives

Build and usage

Prerequisites

  • CUDA Toolkit version 12.0 or newer.
  • CMake, version 3.18 and above. Latest version is recommended.
  • GCC version 9, latest version is recommended.
  • Any Nvidia GPU (which supports CUDA Toolkit version 12.0 or above).

Note

It is possible to use CUDA 11 for cards which dont support CUDA 12, however we dont officially support this version and in the future there may be issues.

Accessing Hardware

If you don't have access to a Nvidia GPU we have some options for you.

Checkout Google Colab. Google Colab offers a free T4 GPU instance and ICICLE can be used with it, reference this guide for setting up your Google Colab workplace.

If you require more compute and have an interesting research project, we have bounty and grant programs.

Build systems

ICICLE has three build systems.

ICICLE core always needs to be built as part of the other build systems as it contains the core ICICLE primitives implemented in CUDA. Reference these guides for the different build systems, ICICLE core guide, ICICLE Rust guide and ICICLE Golang guide.

Docker

We offer a simple Docker container so you can simply run ICICLE without setting everything up locally.

docker build -t <name_of_your_choice> .
docker run --gpus all -it <name_of_your_choice> /bin/bash

Contributions

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.

Development Contributions

If you are changing code, please make sure to change your git hooks path to the repo's hooks directory by running the following command:

git config core.hooksPath ./scripts/hooks

In case clang-format is missing on your system, you can install it using the following command:

sudo apt install clang-format

This will ensure our custom hooks are run and will make it easier to follow our coding guidelines.

Hall of Fame

  • Robik, for his ongoing support and mentorship
  • liuxiao, for being a top notch bug smasher
  • gkigiermo, for making it intuitive to use ICICLE in Google Colab.

Help & Support

For help and support talk to our devs in our discord channel "ICICLE"

License

ICICLE is distributed under the terms of the MIT License.

See LICENSE-MIT for details.

About

a GPU Library for Zero-Knowledge Acceleration

License:MIT License


Languages

Language:C 62.0%Language:Cuda 31.0%Language:Rust 3.5%Language:Go 1.7%Language:Python 0.9%Language:CMake 0.4%Language:Shell 0.2%Language:Makefile 0.1%Language:Nix 0.1%Language:Dockerfile 0.1%