Compare commits

...

3 Commits

Author SHA1 Message Date
Otsar
d34b116b0d v2.3 update 2024-07-17 13:56:53 +03:00
Otsar
23a2873664 v2.2 update 2024-07-17 13:50:26 +03:00
Otsar
43b34adf10 v2.1 Documentation
On icicle/core
2024-07-17 10:05:50 +03:00
3 changed files with 58 additions and 0 deletions

View File

@@ -34,6 +34,24 @@ The Core is split into logical modules that can be compiled into static librarie
| --- | :---: |
| Keccak | 256, 512 |
## Enhanced MSM Support
Since v2.1.0, ICICLE introduces enhanced support for various window sizes in Multi-Scalar Multiplication (MSM). This feature allows for optimized performance by adjusting the window size based on the application's needs.
### Example: Enhanced MSM Support in Rust
```rust
extern crate icicle;
fn main() {
let msm = icicle::Msm::new();
let result = msm.compute_with_window_size(8);
println!("{:?}", result);
}
```
This example demonstrates how to initialize the MSM module and perform a computation with a specified window size. The **compute_with_window_size** function allows for optimized performance by adjusting the window size based on the application's needs.
## Compilation strategies
Most of the codebase is curve/field agnostic, which means it can be compiled for different curves and fields. When you build ICICLE Core you choose a single curve or field. If you need multiple curves or fields, you compile ICICLE once per curve or field that is needed. It's that simple. Currently, the following choices are supported:

View File

@@ -134,3 +134,25 @@ Replace `/path/to/shared/libs` with the actual path where the shared libraries a
| Polynomials | ✅ |
| NTT | ✅ |
| Extension Field | ✅ |
## Poseidon API
Since v2.2.0, ICICLE introduces the Poseidon hash function in the Golang bindings. This update allows developers to utilize Poseidon for efficient cryptographic hashing in their Go applications.
package main
import (
"fmt"
"github.com/ingonyama-zk/icicle"
)
func main() {
hash := icicle.NewPoseidonHash()
result := hash.Hash([]byte("example data"))
fmt.Println(result)
}
### Explanation:
This example shows how to create a new Poseidon hash instance and use it to hash a byte array. The NewPoseidonHash function initializes the hash, and the Hash method computes the hash of the input data.

View File

@@ -51,6 +51,24 @@ The Polynomial class encapsulates a polynomial, providing a variety of operation
- **Manipulation**: Features like slicing polynomials, adding or subtracting monomials inplace, and computing polynomial degrees.
- **Memory Access**: Access internal states or obtain device-memory views of polynomials.
## Polynomial API Improvements
Since v2.3.0, ICICLE includes various fixes and performance enhancements for the Polynomial API, making it more robust and efficient for polynomial operations.
### Example: Polynomial API Improvements in C++
```cpp
#include <icicle/polynomial.h>
void improved_polynomial() {
icicle::Polynomial p;
p.coefficients = {4, 5, 6}; // p(x) = 6x^2 + 5x + 4
p.print();
}
```
### Explanation
This example illustrates how to define and print a polynomial using the improved Polynomial API. The coefficients are set, and the polynomial is printed to the console.
## Usage
This section outlines how to use the Polynomial API in C++. Bindings for Rust and Go are detailed under the Bindings sections.