You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sumchek protocol is a protocol where a Prover proves to a Verifier that the sum of a multilinear polynomial, over the boolean hypercube, is a specific sum.
4
+
The Sumcheck protocol allows a Prover to prove to a Verifier that the sum of a multilinear polynomial, over the Boolean hypercube, equals a specific scalar value.
5
5
6
-
For a polynomial $P$, with $n$ dimension $n$ the Prover is trying to prove that:
6
+
For a polynomial $P$ with $n$ variables, the Prover aims to prove that:
The proof is build in an interactive way, where the Prover and Verifier do a series of $n$ rounds. Each round is consists of a challenge (created by the Verifier), computation (made by the Prover) and verifying (done by the Verifier). Using a Fiat-Shamir (FS) scheme, the proof become non-interactive. This allow the Prover to generate the entire proof and send it to Verifier which then verify the whole proof.
12
+
The proof is constructed interactively, involving a series of $n$ rounds. Each round consists of a challenge (from the Verifier), a computation (from the Prover), and a verification step (by the Verifier). Using a Fiat-Shamir (FS) scheme, the proof becomes non-interactive, enabling the Prover to generate the entire proof and send it to the Verifier for validation.
13
13
14
14
### Sumcheck with Combine Function
15
-
The Sumcheck protocol can be generalized to an arbitrary function of several multilinear polynomials. In this case, assuming there are $m$ polynomials of $n$ variables, and let $f$ be some arbitrary function that take $m$ polynomials and return a polynomial of higher (or equal) degree. Now the Prover tries to prove that:
15
+
The Sumcheck protocol can be generalized to handle multiple multilinear polynomials. In this case, assuming there are $m$ polynomials of $n$ variables, and $f$ is an arbitrary function that takes these $m$ polynomials and returns a polynomial of equal or higher degree, the Prover tries to prove that:
ICICLE implements a non-interactive Sumcheck protocol that supports a combine function. Sumcheck is supported by both CPU and CUDA backends of ICICLE. The polynomials are passed to the protocol as MLEs (evaluation representation).
21
+
## ICICLE's Sumecheck Implementation
22
+
ICICLE implements a non-interactive Sumcheck protocol that supports a combine function. It is available on both the CPU and CUDA backends of ICICLE. The polynomials are passed to the protocol in MLE (evaluation representation) form.
23
23
24
24
### Implementation Limitations
25
25
26
-
There are some limitations / assumptions to the Sumcheck implementation.
27
-
28
-
- The maximum size of the polynomials (number of evaluations = $2^n$) depends on the number of polynomials and memory size of the device (e.g. CPU/GPU) used. For 4 polynomials one should expects that a GPU equipped with 24GB of memory can run Sumcheck with polynomials of size up to $2^{29}$.
29
-
- The polynomial size must be of size which is a power of 2.
26
+
There are some limitations and assumptions in the Sumcheck implementation:
30
27
28
+
- The maximum size of the polynomials (i.e., the number of evaluations $2^n$) depends on the number of polynomials and the memory size of the device (e.g., CPU/GPU) being used. For example, with 4 polynomials, a GPU with 24GB of memory should be able to handle Sumcheck for polynomials of size up to $2^29$.
29
+
- The polynomial size must a power of 2.
30
+
- The current implementation does not support generating the challenge ($\alpha$) in an extension field. This functionality is necessary for ensuring security when working with small fields.
31
31
32
32
## C++ API
33
-
A sumcheck is created by the following function:
33
+
A Sumcheck object can be created using the following function:
34
34
```cpp
35
35
Sumcheck<scalar_t> create_sumcheck()
36
36
```
37
37
38
-
There are two configuration structs related to the Sumcheck protocol.
38
+
There are two key configuration structs related to the Sumcheck protocol.
39
39
40
-
The `SumcheckConfig` struct is a configuration object used to specify parameters for Sumcheck. It contains the following fields:
41
-
- **`stream: icicleStreamHandle`**: Specifies the CUDA stream for asynchronous execution. If `nullptr`, the default stream is used.
42
-
- **`use_extension_field: bool`**: If true extension field is used for the Fiat-Shamir results. ***Currently not supported (should always be false)***
43
-
-**`batch: int`**: Number of input chunks to hash in batch.
44
-
-**`are_inputs_on_device: bool`**: If true expect the input polynomials to reside on the device (e.g. GPU), if false expect them to reside on the host (e.g. CPU).
40
+
### SumcheckConfig
41
+
The `SumcheckConfig` structis used to specify parameters for the Sumcheck protocol. It contains the following fields:
42
+
-**`stream: icicleStreamHandle`**: The CUDA stream for asynchronous execution. If `nullptr`, the default stream is used.
43
+
-**`use_extension_field: bool`**: If true, an extension field is used for Fiat-Shamir results. Currently unsupported (should always be false).
44
+
-**`are_inputs_on_device: bool`**: If true, the input polynomials are expected to reside on the device (e.g., GPU); otherwise, they are expected to reside on the host (e.g., CPU).
45
45
-**`is_async: bool`**: If true runs the hash asynchronously.
The `SumcheckTranscriptConfig<F>` class is a configuration object used to specify parameters to the Fiat-Shamir scheme used by the Sumcheck. It contained the following fields:
61
-
- **`hasher: Hash`**: Hash function used for randomness generation by Fiat-Shamir.
62
-
- **`domain_label: char*`**: Label for the domain separator in the transcript.
63
-
- **`poly_label: char*`**: Label for round polynomials in the transcript.
64
-
- **`challenge_label: char*`**: Label for round challenges in the transcript.
65
-
- **`seed: F`**: Seed for initializing the RNG.
66
-
- **`little_endian: bool`**: Encoding endianness
60
+
### SumcheckTranscriptConfig
61
+
The `SumcheckTranscriptConfig<F>` class is used to specify parameters for the Fiat-Shamir scheme used by the Sumcheck protocol. It contains the following fields:
62
+
- **`hasher: Hash`**: The hash function used to generate randomness for Fiat-Shamir.
63
+
- **`domain_label: char*`**: The label for the domain separator in the transcript.
64
+
- **`poly_label: char*`**: The label for round polynomials in the transcript.
65
+
- **`challenge_label: char*`**: The label for round challenges in the transcript.
66
+
- **`seed: F`**: The seed for initializing the RNG.
67
+
- **`little_endian: bool`**: The encoding endianness.
67
68
68
-
There are three constructors for `SumcheckTranscriptConfig<F>`, each one with its own arguments and default value.
69
+
There are three constructors for `SumcheckTranscriptConfig<F>`, each with its own default values:
-`stream: IcicleStreamHandle` - Stream for asynchronous execution (default: `nullptr`).
30
+
-`use_extension_field: bool` - Whether to use an extension field for Fiat-Shamir transformation. Sumcheck currently does not support extension fields, always set to `false` otherwise return an error.
31
+
-`batch: u64` - Number of input chunks to hash in batch (default: 1).
32
+
-`are_inputs_on_device: bool` - Whether inputs reside on the device (e.g., GPU).
33
+
-`is_async: bool` - Whether hashing is run asynchronously.
34
+
-`ext: ConfigExtension` - Pointer to backend-specific configuration extensions.
35
+
36
+
##### **Methods:**
37
+
-**`default() -> Self`**:
38
+
Returns a default `SumcheckConfig` instance.
39
+
40
+
### **Traits**
41
+
42
+
#### `Sumcheck`
43
+
Defines the main API for SumCheck operations.
44
+
45
+
##### **Associated Types:**
46
+
-`Field: FieldImpl + Arithmetic` - The field implementation used.
47
+
-`FieldConfig: FieldConfig + GenerateRandom<Self::Field> + FieldArithmetic<Self::Field>` - Field configuration.
48
+
-`Proof: SumcheckProofOps<Self::Field>` - Type representing the proof.
0 commit comments