ICICLE libraries
ICICLE is composed of two main logical parts:
ICICLE device
The ICICLE device library serves as an abstraction layer for interacting with various hardware devices. It provides a comprehensive interface for tasks such as setting the active device, querying device-specific information like free and total memory, determining the number of available devices, and managing memory allocation. Additionally, it offers functionality for copying data to and from devices, managing task queues (streams) for efficient device utilization, and abstracting the complexities of device management away from the user.
See programmers guide for more details. C++, Rust, Go
ICICLE Core
ICICLE Core is a template library written in C++ that implements fundamental cryptographic operations, including field and curve arithmetic, as well as higher-level APIs such as MSM and NTT.
The Core can be instantiated for different fields, curves, and other cryptographic components, allowing you to tailor it to your specific needs. You can link your application to one or more ICICLE libraries, depending on the requirements of your project. For example, you might only need the babybear library or a combination of babybear and a Merkle tree builder.
Rust
Each library has a corresponding crate. See programmers guide for more details.
Supported curves, fields and operations
Supported curves and operations
Operation\Curve | bn254 | bls12-377 | bls12-381 | bw6-761 | grumpkin |
---|---|---|---|---|---|
MSM | ✅ | ✅ | ✅ | ✅ | ✅ |
G2 MSM | ✅ | ✅ | ✅ | ✅ | ❌ |
NTT | ✅ | ✅ | ✅ | ✅ | ❌ |
ECNTT | ✅ | ✅ | ✅ | ✅ | ❌ |
Vector operations | ✅ | ✅ | ✅ | ✅ | ✅ |
Polynomials | ✅ | ✅ | ✅ | ✅ | ❌ |
Poseidon | ✅ | ✅ | ✅ | ✅ | ✅ |
Supported fields and operations
Operation\Field | babybear | Stark252 | m31 |
---|---|---|---|
Vector operations | ✅ | ✅ | ✅ |
Polynomials | ✅ | ✅ | ❌ |
NTT | ✅ | ✅ | ❌ |
Extension Field | ✅ | ❌ | ✅ |
Poseidon | ✅ | ✅ | ✅ |
Misc
Operation | Description |
---|---|
Keccak | supporting 256b and 512b digest |
SHA3 | supporting 256b and 512b digest |
Blake2s | digest is 256b |
Merkle-Tree | works with any combination of hash functions |
Backend
Each backend must implement the device API interface. Each backend may implement
- One or more ICICLE library. For example implement only bn254 curve.
- One or more APIs in this library. For example MSM only.
See CUDA backend and Build Your Own Backend for more info about implementing a backend.