Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,39 +86,39 @@ List of symbols:
- 🏗️ means that the feature is partially implemented or is under active construction.
- :x: means that the feature is not currently supported.

| Finite Fields | Lambdaworks | Arkworks | Halo2 | gnark | Constantine |
| -------------- | ------------------ | ------------------ | -------- | ------------------ | ----------- |
| StarkField 252 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: |
| Mersenne 31 | :heavy_check_mark: | :x: | :x: | :x: | :x: |
| Baby Bear | :heavy_check_mark: | :x: | :x: | :x: | :x: |
| MiniGoldilocks | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :x: |
| Binary fields | :heavy_check_mark: | :x: | :x: | :x: | :x: |
| **ZK friendly Hash function** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
| Poseidon | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| Pedersen | 🏗️ | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| Rescue Prime XLIX | :x: | :x: | :x: | :x: | :x: |
| **Elliptic Curves** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
| BLS12-381 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| BLS12-377 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| BN-254 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Pallas | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
| Vesta | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: |
| Bandersnatch | 🏗️ | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| secp256k1 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| secq256k1 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| secq256r1 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| **STARKs** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
| STARK Prover | :heavy_check_mark: | :x: | :x: | :x: | :x: |
| Circle STARKs | :x: | :x: | :x: | :x: | :x: |
| **SNARKs** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
| Groth16 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: |
| Plonk | 🏗️ | :heavy_check_mark: | ✔️ | :heavy_check_mark: | :x: |
| GKR | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: |
| **Polynomial Commitment Schemes** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** |
| KZG10 | :heavy_check_mark: | ✔️ | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| FRI | 🏗️ | :x: | :x: | :heavy_check_mark: | :x: |
| Binius | :x: | :x: | :x: | :x: | :x: |
| Circle FRI | :x: | :x: | :x: | :x: | :x: |
| Finite Fields | Lambdaworks | Arkworks | Plonky3 | gnark | Constantine | Halo2 |
| -------------- | ------------------ | ------------------ | ------------------ | ------------------ | ----------- | ----------- |
| StarkField 252 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :x:
| Mersenne 31 | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :x: | :x:
| Baby Bear | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :x: | :x:
| MiniGoldilocks | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x:
| Binary fields | :heavy_check_mark: | :x: | :x: | :x: | :x: | :x:
| **ZK friendly Hash function** | **Lambdaworks** | **Arkworks** | **Plonky3** | **gnark** | **Constantine** | **Halo2** |
| Poseidon | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: |
| Pedersen | 🏗️ | :heavy_check_mark: | :x: | :x: | :x: | :heavy_check_mark: |
| Rescue Prime XLIX | :x: | :x: | :heavy_check_mark: | :x: | :x: | :x: |
| **Elliptic Curves** | **Lambdaworks** | **Arkworks** | **Plonky3** | **gnark** | **Constantine** | **Halo2** |
| BLS12-381 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| BLS12-377 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: |
| BN-254 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Pallas | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| Vesta | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: | :heavy_check_mark: |
| Bandersnatch | 🏗️ | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: |
| secp256k1 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| secq256k1 | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: | :heavy_check_mark: |
| secq256r1 | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: | :heavy_check_mark: |
| **STARKs** | **Lambdaworks** | **Arkworks** | **Plonky3** | **gnark** | **Constantine** | **Halo2** |
| STARK Prover | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :x: | :x: |
| Circle STARKs | 🏗️ | :x: | :heavy_check_mark: | :x: | :x: | :x: |
| **SNARKs** | **Lambdaworks** | **Arkworks** | **Plonky3** | **gnark** | **Constantine** | **Halo2** |
| Groth16 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :x: |
| Plonk | 🏗️ | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :heavy_check_mark: |
| GKR | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :x: | :x: |
| **Polynomial Commitment Schemes** | **Lambdaworks** | **Arkworks** | **Plonky3** | **gnark** | **Constantine** | **Halo2** |
| KZG10 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| FRI | 🏗️ | :x: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: |
| Binius | :x: | :x: | :x: | :x: | :x: | :x: |
| Circle FRI | 🏗️ | :x: | :heavy_check_mark: | :x: | :x: | :x: |

Additionally, provers are compatible with the following frontends and VMs:

Expand Down
3 changes: 2 additions & 1 deletion crates/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ license.workspace = true

[dependencies]
lambdaworks-math = { workspace = true, features = ["alloc"] }
sha3 = { version = "0.10", default-features = false }
digest = "0.10.7"
sha3 = { version = "0.10.8", default-features = false }
sha2 = { version = "0.10", default-features = false }
# Optional
serde = { version = "1.0", default-features = false, features = [
Expand Down
7 changes: 2 additions & 5 deletions crates/crypto/src/merkle_tree/backends/field_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ use crate::hash::poseidon::Poseidon;

use crate::merkle_tree::traits::IsMerkleTreeBackend;
use core::marker::PhantomData;
use digest::{Digest, Output};
use lambdaworks_math::{
field::{element::FieldElement, traits::IsField},
traits::AsBytes,
};
use sha3::{
digest::{generic_array::GenericArray, OutputSizeUser},
Digest,
};

#[derive(Clone)]
pub struct FieldElementBackend<F, D: Digest, const NUM_BYTES: usize> {
Expand All @@ -31,7 +28,7 @@ impl<F, D: Digest, const NUM_BYTES: usize> IsMerkleTreeBackend
where
F: IsField,
FieldElement<F>: AsBytes + Sync + Send,
[u8; NUM_BYTES]: From<GenericArray<u8, <D as OutputSizeUser>::OutputSize>>,
[u8; NUM_BYTES]: From<Output<D>>,
{
type Node = [u8; NUM_BYTES];
type Data = FieldElement<F>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ use core::marker::PhantomData;
use crate::hash::poseidon::Poseidon;
use crate::merkle_tree::traits::IsMerkleTreeBackend;
use alloc::vec::Vec;
use digest::{Digest, Output};
use lambdaworks_math::{
field::{element::FieldElement, traits::IsField},
traits::AsBytes,
};
use sha3::{
digest::{generic_array::GenericArray, OutputSizeUser},
Digest,
};

#[derive(Clone)]
pub struct FieldElementVectorBackend<F, D: Digest, const NUM_BYTES: usize> {
Expand All @@ -32,7 +29,7 @@ impl<F, D: Digest, const NUM_BYTES: usize> IsMerkleTreeBackend
where
F: IsField,
FieldElement<F>: AsBytes,
[u8; NUM_BYTES]: From<GenericArray<u8, <D as OutputSizeUser>::OutputSize>>,
[u8; NUM_BYTES]: From<Output<D>>,
Vec<FieldElement<F>>: Sync + Send,
{
type Node = [u8; NUM_BYTES];
Expand Down
2 changes: 1 addition & 1 deletion crates/provers/gkr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ lambdaworks-crypto = { workspace = true }
lambdaworks-sumcheck = { workspace = true }
thiserror = "1.0"
blake2 = "0.10"
sha3 = "0.10"
sha3 = "0.10.8"
digest = "0.10"


Expand Down
6 changes: 3 additions & 3 deletions crates/provers/groth16/arkworks-adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ repository.workspace = true
[dependencies]
lambdaworks-math.workspace = true
lambdaworks-groth16.workspace = true
ark-r1cs-std = { version = "^0.3.1" }
ark-r1cs-std = { version = "0.4.0" }
ark-bls12-381 = { version = "0.4.0" }
ark-ff = { version = "^0.4.2" }
ark-relations = { version = "^0.4.0" }
ark-ff = { version = "0.4.2" }
ark-relations = { version = "0.4.0" }
ark-serialize = { version = "0.4.2" }
num-bigint = { version = "0.4", default-features = false }
rand = "0.8.5"
2 changes: 1 addition & 1 deletion crates/provers/plonk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ lambdaworks-crypto.workspace = true

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sha3 = { version = "0.10", default-features = false }
sha3 = { version = "0.10.8", default-features = false }
sha2 = { version = "0.10", default-features = false }
2 changes: 1 addition & 1 deletion crates/provers/stark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rand = "0.8.5"
thiserror = "1.0.38"
log = "0.4.17"
bincode = { version = "2.0.1", features = ["serde"] }
sha3 = "0.10.6"
sha3 = "0.10.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
num-integer = "0.1.45"
Expand Down
2 changes: 1 addition & 1 deletion crates/provers/winterfell_adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ miden-air = { package = "miden-air", version = "0.7", default-features = false }
miden-core = { package = "miden-core", version = "0.7", default-features = false }
miden-assembly = { package = "miden-assembly", version = "0.7", default-features = false }
miden-processor = { package = "miden-processor", version = "0.7", default-features = false }
sha3 = "0.10"
sha3 = "0.10.8"

[dev-dependencies]
criterion = { version = "0.4", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion examples/schnorr-signature/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ repository.workspace = true
[dependencies]
lambdaworks-math = { workspace = true }
lambdaworks-crypto = { workspace = true }
sha3 = { version = "0.10", default-features = false }
sha3 = { version = "0.10.8", default-features = false }
rand = "0.8.5"
rand_chacha = "0.3.1"
Loading