{"id":13809821,"url":"https://github.com/ingonyama-zk/icicle","last_synced_at":"2025-05-14T18:03:18.785Z","repository":{"id":143065654,"uuid":"611226044","full_name":"ingonyama-zk/icicle","owner":"ingonyama-zk","description":"A hardware acceleration library for compute intensive cryptography :ice_cube:","archived":false,"fork":false,"pushed_at":"2025-05-12T08:54:14.000Z","size":117372,"stargazers_count":410,"open_issues_count":32,"forks_count":134,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-12T08:56:08.595Z","etag":null,"topics":["cpu","cryptography","cuda","golang","msm","ntt","rust","zero-knowledge"],"latest_commit_sha":null,"homepage":"https://dev.ingonyama.com/icicle/overview","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ingonyama-zk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-08T11:40:36.000Z","updated_at":"2025-05-12T04:32:57.000Z","dependencies_parsed_at":"2024-03-03T05:29:11.452Z","dependency_job_id":"e33d603c-b35c-46da-9361-412318c54b47","html_url":"https://github.com/ingonyama-zk/icicle","commit_stats":{"total_commits":408,"total_committers":42,"mean_commits":9.714285714285714,"dds":0.803921568627451,"last_synced_commit":"696cfe36280b3358c17373866010868307277cb7"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingonyama-zk%2Ficicle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingonyama-zk%2Ficicle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingonyama-zk%2Ficicle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingonyama-zk%2Ficicle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ingonyama-zk","download_url":"https://codeload.github.com/ingonyama-zk/icicle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253708826,"owners_count":21951058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpu","cryptography","cuda","golang","msm","ntt","rust","zero-knowledge"],"created_at":"2024-08-04T02:00:36.831Z","updated_at":"2025-05-14T18:03:13.775Z","avatar_url":"https://github.com/ingonyama-zk.png","language":"C++","funding_links":[],"categories":["C++","Frameworks","Web3 and ZKP Framework","Projects by GPU Technology"],"sub_categories":["Cross-Platform Frameworks"],"readme":"# ICICLE\n\n\u003cdiv align=\"center\"\u003e\n  ICICLE is a high-performance cryptographic acceleration library designed to optimize cryptographic computations across various hardware platforms, including CPUs, GPUs, and other accelerators.\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg alt=\"ICICLE\" width=\"300\" height=\"300\" src=\"ICICLELOGONEW.png\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://discord.gg/EVVXTdt6DF\"\u003e\n    \u003cimg src=\"https://img.shields.io/discord/1063033227788423299?logo=discord\u0026style=flat\u0026labelColor=black\u0026color=5765f2\" alt=\"Chat with us on Discord\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.linkedin.com/company/ingonyama\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/follow-blue?style=flat\u0026logo=linkedin\u0026labelColor=black\" alt=\"Follow us on LinkedIn\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://x.com/Ingo_zk\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/follow-darkgray?style=flat\u0026logo=x\u0026labelColor=black\" alt=\"Follow us on Twitter\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ingonyama-zk/icicle/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/ingonyama-zk/icicle?style=flat\u0026labelColor=black\u0026color=lightblue\" alt=\"GitHub Release\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n\n## Background\n\nZero 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.\n\nWe believe that ICICLE will be a cornerstone in the acceleration of ZKPs:\n\n- **Versatility**: Supports multiple hardware platforms, making it adaptable to various computational environments.\n- **Efficiency:** Designed to leverage the parallel nature of ZK computations, whether on GPUs, CPUs, or other accelerators.\n- **Scalability:** Provides an easy-to-use and scalable solution for developers, allowing them to optimize cryptographic operations with minimal effort.\n\n## Getting Started\n\nThis guide will help you get started with ICICLE in C++, Rust, and Go.\n\n\u003e [!NOTE]\n\u003e **Developers**: We highly recommend reading our [documentation](https://dev.ingonyama.com/) for a comprehensive explanation of ICICLE’s capabilities.\n\n\u003e [!TIP]\n\u003e Try out ICICLE by running some [examples] available in C++, Rust, and Go bindings. Check out our install-and-use examples in [C++](https://github.com/ingonyama-zk/icicle/tree/main/examples/c%2B%2B/install-and-use-icicle), [Rust](https://github.com/ingonyama-zk/icicle/tree/main/examples/rust/install-and-use-icicle) and [Go](TODO)\n\n### Prerequisites\n\n- Any compatible hardware: ICICLE supports various hardware, including CPUs, Nvidia GPUs, and other accelerators.\n- [CMake](https://cmake.org/files/), Version 3.18 or above. Latest version recommended. Required only if building from source.\n- [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads), Required only if using NVIDIA GPUs (version 12.0 or newer).\n\n\u003e [!NOTE]\n\u003e For older GPUs that only support CUDA 11, ICICLE may still function, but official support is for CUDA 12 onwards.\n\n\n### Accessing Hardware\n\nIf you don't have access to an Nvidia GPU we have some options for you.\n \n[Google Colab](https://colab.google/) offers a free [T4 GPU](https://www.nvidia.com/en-us/data-center/tesla-t4/) instance and ICICLE can be used with it, reference this guide for setting up your [Google Colab workplace][GOOGLE-COLAB-ICICLE].\n\nIf you require more compute and have an interesting research project, we have [bounty and grant programs][GRANT_PROGRAM].\n\n## Building ICICLE from source\n\nICICLE provides build systems for C++, Rust, and Go. Each build system incorporates the core ICICLE library, which contains the essential cryptographic primitives. Refer to the [Getting started page](https://dev.ingonyama.com/icicle/build_from_source) for full details about building and using ICICLE.\n\n\u003e [!WARNING]\n\u003e Ensure ICICLE libraries are installed correctly when building or installing a library/application that depends on ICICLE so that they can be located at runtime.\n\n### Rust\n\nIn cargo.toml, specify the ICICLE libs to use:\n\n```bash\n[dependencies]\nicicle-runtime = { git = \"https://github.com/ingonyama-zk/icicle.git\", branch=\"main\" }\nicicle-core = { git = \"https://github.com/ingonyama-zk/icicle.git\", branch=\"main\" }\nicicle-babybear = { git = \"https://github.com/ingonyama-zk/icicle.git\", branch=\"main\" }\n# add other ICICLE crates here if need additional fields/curves\n```\n\nYou can specify `branch=branch-name`, `tag=tag-name`, or `rev=commit-id`.\n\nBuild the Rust project:\n\n```bash\ncargo build --release\n```\n\n### Go\n\nThere are two ways to build from source in Go:\n\n1. Clone the repo, update your go.mod to point to the local clone, and build ICICLE within the clone\n\n```sh\ngit clone https://github.com/ingonyama-zk/icicle.git\n```\n\nAdd ICICLE v3 to your go.mod file:\n\n```go\nrequire github.com/ingonyama-zk/icicle/v3 v3.0.0\n\nreplace github.com/ingonyama-zk/icicle/v3 =\u003e ../path/to/cloned/icicle\n```\n\nNavigate to the cloned repo's golang bindings and build the library using the supplied [build script][ICICLE-GO-BUILD-SCRIPT]\n\n```sh\ncd icicle/wrappers/golang\nchmod +x build.sh\n./build.sh -curve=bn254\n```\n\n2. Update your go.mod to include ICICLE as a dependency, navigate to the dependency in your GOMODCACHE and build ICICLE there\n\n```sh\ngo get github.com/ingonyama-zk/icicle/v3\ncd $(go env GOMODCACHE)/github.com/ingonyama-zk/icicle/v3@\u003cversion\u003e/wrappers/golang\nchmod +x build.sh\n./build.sh -curve=bn254\n```\n\n\u003e [!NOTE]\n\u003e To specify the field, use the flag -field=\u003cfield\u003e, where \u003cfield\u003e can be one of the following: babybear, stark252, m31, koalabear.\n\u003e To specify a curve, use the flag -curve=\u003ccurve\u003e, where \u003ccurve\u003e can be one of the following: bn254, bls12_377, bls12_381, bw6_761, grumpkin.\n\nOnce ICICLE has been built, you can add specific packages when you need them in your application:\n\n```go\nimport (\n  runtime \"github.com/ingonyama-zk/icicle/v3/wrappers/golang/runtime\"\n  core \"github.com/ingonyama-zk/icicle/v3/wrappers/golang/core\"\n  bn254 \"github.com/ingonyama-zk/icicle/v3/wrappers/golang/curves/bn254\"\n  bn254MSM \"github.com/ingonyama-zk/icicle/v3/wrappers/golang/curves/bn254/msm\"\n)\n```\n\n### C++\n\nICICLE can be built and tested in C++ using CMake. The build process is straightforward, but there are several flags you can use to customize the build for your needs.\n\n**Clone the ICICLE repository:**\n\n```bash\ngit clone https://github.com/ingonyama-zk/icicle.git\ncd icicle\n```\n\n**Configure the build:**\n\n```bash\nmkdir -p build \u0026\u0026 rm -rf build/*\ncmake -S icicle -B build -DFIELD=babybear\n```\n\n\u003e [!NOTE]\n\u003e To specify the field, use the flag -DFIELD=field, where field can be one of the following: babybear, stark252, m31, koalabear.\n\u003e To specify a curve, use the flag -DCURVE=curve, where curve can be one of the following: bn254, bls12_377, bls12_381, bw6_761, grumpkin.\n\n**Build the project:**\n\n```bash\ncmake --build build -j # -j is for multi-core compilation\n```\n\n**Link your application (or library) to ICICLE:**\n\n```cmake\ntarget_link_libraries(yourApp PRIVATE icicle_field_babybear icicle_device)\n```\n\n**Install (optional):**\n\nTo install the libs, specify the install prefix `-DCMAKE_INSTALL_PREFIX=/install/dir/`. Then after building, use cmake to install the libraries:\n\n```sh\ncmake -S icicle -B build -DFIELD=babybear -DCMAKE_INSTALL_PREFIX=/path/to/install/dir/\ncmake --build build -j # build\ncmake --install build # install icicle to /path/to/install/dir/\n```\n\n**Run tests (optional):**\n\n\u003e [!CAUTION]\n\u003e Most tests assume a CUDA backend exists and will fail otherwise, if a CUDA device is not found.\n\nAdd `-DBUILD_TESTS=ON` to the cmake command, build and execute tests:\n\n```bash\ncmake -S icicle -B build -DFIELD=babybear -DBUILD_TESTS=ON\ncmake --build build -j\ncd build/tests\nctest\n```\n\nor choose the test-suite\n\n```bash\n./build/tests/test_field_api # or another test suite\n# can specify tests using regex. For example for tests with ntt in the name:\n./build/tests/test_field_api --gtest_filter=\"*ntt*\"\n```\n\n**Build Flags:**\n\nYou can customize your ICICLE build with the following flags:\n\n- `-DCPU_BACKEND=ON/OFF`: Enable or disable built-in CPU backend. `default=ON`.\n- `-DCMAKE_INSTALL_PREFIX=/install/dir`: Specify install directory. `default=/usr/local`.\n- `-DBUILD_TESTS=ON/OFF`: Enable or disable tests. `default=OFF`.\n- `-DBUILD_BENCHMARKS=ON/OFF`: Enable or disable benchmarks. `default=OFF`.\n\n## Install CUDA backend\n\nTo install the CUDA backend\n\n1. [Download the release binaries](https://github.com/ingonyama-zk/icicle/releases/).\n2. Install it, by extracting the binaries to `/opt/` or any other custom install path.\n3. In your application, load the cuda backend and select a CUDA device.\n4. All subsequent API will now use the selected device.\n\n\nRust:\n\n```rust\nuse icicle_runtime::{runtime, Device};\n\nruntime::load_backend_from_env_or_default().unwrap();\n// or load programmatically\nruntime::load_backend(\"/path/to/backend/installdir\").unwrap();\n// Select CUDA device\nlet device = Device::new(\"CUDA\", 1 /*gpu-id*/);\nicicle_runtime::set_device(\u0026device).unwrap();\n\n// Any call will now execute on GPU-1\n```\n\nGo:\n\n```go\nimport(\n  \"github.com/ingonyama-zk/icicle/v3/wrappers/golang/runtime\"\n)\n\nresult := runtime.LoadBackendFromEnvOrDefault()\n// or load from custom install dir\nresult := runtime.LoadBackend(\"/path/to/backend/installdir\", true)\n// Select CUDA device\ndevice := runtime.CreateDevice(\"CUDA\", 0) // or other\nresult := runtime.SetDevice(device)\n\n// Any call will now execute on GPU-0\n```\nC++:\n\n```cpp\n#include \"icicle/runtime.h\"\n\n// Load the installed backend\neIcicleError result = icicle_load_backend_from_env_or_default();\n// or load it programmatically\neIcicleError result = icicle_load_backend(\"/path/to/backend/installdir\", true);\n\n// Select CUDA device\nicicle::Device device = {\"CUDA\", 0 /*gpu-id*/};\neIcicleError result = icicle_set_device(device);\n\n// Any call will now execute on GPU-0\n```\n\nFull details can be found in our [getting started docs](https://dev.ingonyama.com/icicle/getting_started)\n\n## Contributions\n\nJoin our [Discord Server][DISCORD] 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.\n\n### Development Contributions\n\nIf you are changing code, please make sure to change your [git hooks path][HOOKS_DOCS] to the repo's [hooks directory][HOOKS_PATH] by running the following command:\n\n```sh\ngit config core.hooksPath ./scripts/hooks\n```\n\nIn case `clang-format` is missing on your system, you can install it  using the following command:\n\n```sh\nsudo apt install clang-format\n```\n\nYou will also need to install [codespell](https://github.com/codespell-project/codespell?tab=readme-ov-file#installation) to check for typos.\n\nThis will ensure our custom hooks are run and will make it easier to follow our coding guidelines.\n\n### Hall of Fame\n\n- [Robik](https://github.com/robik75), for his ongoing support and mentorship\n- [liuxiao](https://github.com/liuxiaobleach), for being a top notch bug smasher\n- [gkigiermo](https://github.com/gkigiermo), for making it intuitive to use ICICLE in Google Colab\n- [nonam3e](https://github.com/nonam3e), for adding Grumpkin curve support into ICICLE\n- [alxiong](https://github.com/alxiong), for adding warmup for CudaStream\n- [cyl19970726](https://github.com/cyl19970726), for updating go install source in Dockerfile\n- [PatStiles](https://github.com/PatStiles), for adding Stark252 field\n\n## Help \u0026 Support\n\nFor help and support talk to our devs in our discord channel [#ICICLE](https://discord.gg/EVVXTdt6DF) or contact us at \u003csupport@ingonyama.com\u003e.\n\n## License\n\nICICLE frontend is distributed under the terms of the MIT License.\n\n\u003e [!NOTE]\n\u003e ICICLE backends, excluding the CPU backend, are distributed under a special license and are not covered by the MIT license.\n\nSee [LICENSE-MIT][LMIT] for details.\n\n\u003c!-- Begin Links --\u003e\n[BLS12-381]: ./icicle/curves/\n[BLS12-377]: ./icicle/curves/\n[BN254]: ./icicle/curves/\n[BW6-671]: ./icicle/curves/\n[Grumpkin]: ./icicle/curves/\n[babybear]: ./icicle/fields/\n[stark252]: ./icicle/fields/\n[m31]: ./icicle/fields/\n[koalabear]: ./icicle/fields/\n[LMIT]: ./LICENSE\n[DISCORD]: https://discord.gg/Y4SkbDf2Ff\n[googletest]: https://github.com/google/googletest/\n[HOOKS_DOCS]: https://git-scm.com/docs/githooks\n[HOOKS_PATH]: ./scripts/hooks/\n[GOOGLE-COLAB-ICICLE]: https://dev.ingonyama.com/icicle/colab-instructions\n[GRANT_PROGRAM]: https://medium.com/@ingonyama/icicle-for-researchers-grants-challenges-9be1f040998e\n[ICICLE-CORE]: ./icicle/\n[ICICLE-RUST]: ./wrappers/rust/\n[ICICLE-GO]: ./wrappers/golang/\n[ICICLE-GO-BUILD-SCRIPT]: ./wrappers/golang/build.sh\n[ICICLE-CORE-README]: ./icicle/README.md\n[ICICLE-RUST-README]: ./wrappers/rust/README.md\n[ICICLE-GO-README]: ./wrappers/golang/README.md\n[documentation]: https://dev.ingonyama.com/icicle/overview\n[examples]: ./examples/\n\n\u003c!-- End Links --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingonyama-zk%2Ficicle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fingonyama-zk%2Ficicle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingonyama-zk%2Ficicle/lists"}