Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c0012ba
refactor: move pvss circuits to enclave
cedoor Jan 16, 2026
b875a04
refactor: update crisp circuits to use new pvss circuits
cedoor Jan 16, 2026
5f2a834
refactor: update pvss lib name
cedoor Jan 16, 2026
e05604a
chore: add license to pvss circuits
cedoor Jan 16, 2026
3bf41e2
ci: update ci workflow to check formatting all circuits
cedoor Jan 16, 2026
882ae9e
ci: use scripts to check formatting all circuits
cedoor Jan 16, 2026
c5dacc4
chore: align versions in nargo dependencies to bb version
cedoor Jan 19, 2026
a39ae48
chore: update script to use nargo test without workspace flag
cedoor Jan 19, 2026
ee2c677
make commitments pub
0xjei Jan 19, 2026
3531475
rename c7 folder
0xjei Jan 19, 2026
fd5ff59
remove unused decryption_share_bound from C6
0xjei Jan 19, 2026
6e1172b
improve comment on ascending order of party_ids for C7
0xjei Jan 19, 2026
ebcc3fd
fix wrong formula for C7
0xjei Jan 19, 2026
77202eb
add missing assertion for determinism
0xjei Jan 19, 2026
2574f61
fix wrong flatten bit for a in C1
0xjei Jan 19, 2026
211bea2
small nits on docs, safety and script
0xjei Jan 19, 2026
a86254e
fix potential overflow in unsafe sub
0xjei Jan 19, 2026
83ea3e0
improve comment for range_check_2bounds
0xjei Jan 19, 2026
e79513f
Merge branch 'main' into refactor/pvss-migration
0xjei Jan 19, 2026
a08c50b
make c7 pub inputs
0xjei Jan 19, 2026
84aec03
rename t_bn
0xjei Jan 19, 2026
1f2f15e
fix: small fixes in CRISP after pvss migration
cedoor Jan 19, 2026
8f5bb57
avoid intermediate overflow in eval_mod
0xjei Jan 20, 2026
648cb8c
update stale overflow warning in sub_with_underflow method
0xjei Jan 20, 2026
a51e215
update public inputs
0xjei Jan 20, 2026
659a4b5
add wrappers
0xjei Jan 20, 2026
b873721
update C2a and C2b templates with parity matrix as constant
0xjei Jan 20, 2026
3bc99a5
update nargo
0xjei Jan 20, 2026
bff1dd6
remove unused constants from c6
0xjei Jan 20, 2026
10ec004
update c6 docs
0xjei Jan 20, 2026
77499fe
update script and nargo subfolders for workspace
0xjei Jan 20, 2026
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
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -588,18 +588,10 @@ jobs:
toolchain: ${{ env.NOIR_TOOLCHAIN }}

- name: Check formatting
working-directory: ./circuits
run: nargo fmt --check

- name: Compile Noir circuits
working-directory: ./circuits
run: |
nargo compile --workspace
run: ./scripts/lint-circuits.sh

- name: Test Noir circuits
working-directory: ./circuits
run: |
nargo test --workspace
run: ./scripts/test-circuits.sh

- name: Upload circuit artifacts
uses: actions/upload-artifact@v4
Expand Down
6 changes: 0 additions & 6 deletions circuits/Nargo.toml

This file was deleted.

9 changes: 9 additions & 0 deletions circuits/bin/aggregation/fold/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "fold"
type = "bin"
authors = ["Gnosis Guild / Enclave"]
version = "1.0.0-beta.15"

[dependencies]
lib = { path = "../../../lib" }
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20251104", directory = "barretenberg/noir/bb_proof_verification" }
25 changes: 25 additions & 0 deletions circuits/bin/aggregation/fold/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.

use bb_proof_verification::{UltraHonkProof, UltraHonkVerificationKey, verify_ultrahonk_proof};
use lib::math::commitments::compute_aggregation_commitment;

fn main(
verification_key: UltraHonkVerificationKey,
proofs: [UltraHonkProof; 2],
commitments: pub [Field; 2],
key_hash: Field,
) -> pub Field {
verify_ultrahonk_proof(verification_key, proofs[0], [commitments[0]], key_hash);
verify_ultrahonk_proof(verification_key, proofs[1], [commitments[1]], key_hash);

let mut commitments_vec = Vec::new();

commitments_vec.push(commitments[0]);
commitments_vec.push(commitments[1]);

compute_aggregation_commitment(commitments_vec)
}
10 changes: 10 additions & 0 deletions circuits/bin/aggregation/insecure/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[workspace]
members = [
"pk_trbfv_wrapper",
"verify_shares_trbfv_wrapper",
"enc_bfv_wrapper",
"dec_bfv_wrapper",
"pk_agg_trbfv_wrapper",
"dec_share_trbfv_wrapper",
"dec_shares_agg_trbfv_wrapper",
]
9 changes: 9 additions & 0 deletions circuits/bin/aggregation/insecure/dec_bfv_wrapper/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "dec_bfv_wrapper"
type = "bin"
authors = ["Gnosis Guild / Enclave"]
version = "1.0.0-beta.15"

[dependencies]
lib = { path = "../../../../lib" }
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20251104", directory = "barretenberg/noir/bb_proof_verification" }
34 changes: 34 additions & 0 deletions circuits/bin/aggregation/insecure/dec_bfv_wrapper/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.

use bb_proof_verification::{UltraHonkProof, UltraHonkVerificationKey, verify_ultrahonk_proof};
use lib::math::commitments::compute_aggregation_commitment;

// Number of proofs.
pub global N_PROOFS: u32 = 2;
/// Number of public inputs/outputs per proof.
pub global N_PUBLIC_INPUTS: u32 = 11;

fn main(
verification_key: UltraHonkVerificationKey,
proofs: [UltraHonkProof; N_PROOFS],
public_inputs: pub [[Field; N_PUBLIC_INPUTS]; N_PROOFS],
key_hash: Field,
) -> pub Field {
for i in 0..N_PROOFS {
verify_ultrahonk_proof(verification_key, proofs[i], public_inputs[i], key_hash);
}

let mut aggregated_public_inputs = Vec::new();

for i in 0..N_PROOFS {
for j in 0..N_PUBLIC_INPUTS {
aggregated_public_inputs.push(public_inputs[i][j]);
}
}

compute_aggregation_commitment(aggregated_public_inputs)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "dec_share_trbfv_wrapper"
type = "bin"
authors = ["Gnosis Guild / Enclave"]
version = "1.0.0-beta.15"

[dependencies]
lib = { path = "../../../../lib" }
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20251104", directory = "barretenberg/noir/bb_proof_verification" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.

use bb_proof_verification::{UltraHonkProof, UltraHonkVerificationKey, verify_ultrahonk_proof};
use lib::math::commitments::compute_aggregation_commitment;

// Number of proofs.
pub global N_PROOFS: u32 = 1;
/// Number of public inputs/outputs per proof.
pub global N_PUBLIC_INPUTS: u32 = 3074;

fn main(
verification_key: UltraHonkVerificationKey,
proofs: [UltraHonkProof; N_PROOFS],
public_inputs: pub [[Field; N_PUBLIC_INPUTS]; N_PROOFS],
key_hash: Field,
) -> pub Field {
for i in 0..N_PROOFS {
verify_ultrahonk_proof(verification_key, proofs[i], public_inputs[i], key_hash);
}

let mut aggregated_public_inputs = Vec::new();

for i in 0..N_PROOFS {
for j in 0..N_PUBLIC_INPUTS {
aggregated_public_inputs.push(public_inputs[i][j]);
}
}

compute_aggregation_commitment(aggregated_public_inputs)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "dec_shares_agg_trbfv_wrapper"
type = "bin"
authors = ["Gnosis Guild / Enclave"]
version = "1.0.0-beta.15"

[dependencies]
lib = { path = "../../../../lib" }
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20251104", directory = "barretenberg/noir/bb_proof_verification" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.

use bb_proof_verification::{UltraHonkProof, UltraHonkVerificationKey, verify_ultrahonk_proof};
use lib::math::commitments::compute_aggregation_commitment;

// Number of proofs.
pub global N_PROOFS: u32 = 1;
/// Number of public inputs/outputs per proof.
pub global N_PUBLIC_INPUTS: u32 = 563;

fn main(
verification_key: UltraHonkVerificationKey,
proofs: [UltraHonkProof; N_PROOFS],
public_inputs: pub [[Field; N_PUBLIC_INPUTS]; N_PROOFS],
key_hash: Field,
) -> pub Field {
for i in 0..N_PROOFS {
verify_ultrahonk_proof(verification_key, proofs[i], public_inputs[i], key_hash);
}

let mut aggregated_public_inputs = Vec::new();

for i in 0..N_PROOFS {
for j in 0..N_PUBLIC_INPUTS {
aggregated_public_inputs.push(public_inputs[i][j]);
}
}

compute_aggregation_commitment(aggregated_public_inputs)
}
9 changes: 9 additions & 0 deletions circuits/bin/aggregation/insecure/enc_bfv_wrapper/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "enc_bfv_wrapper"
type = "bin"
authors = ["Gnosis Guild / Enclave"]
version = "1.0.0-beta.15"

[dependencies]
lib = { path = "../../../../lib" }
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20251104", directory = "barretenberg/noir/bb_proof_verification" }
34 changes: 34 additions & 0 deletions circuits/bin/aggregation/insecure/enc_bfv_wrapper/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.

use bb_proof_verification::{UltraHonkProof, UltraHonkVerificationKey, verify_ultrahonk_proof};
use lib::math::commitments::compute_aggregation_commitment;

// Number of proofs.
pub global N_PROOFS: u32 = 2;
/// Number of public inputs/outputs per proof.
pub global N_PUBLIC_INPUTS: u32 = 1026;

fn main(
verification_key: UltraHonkVerificationKey,
proofs: [UltraHonkProof; N_PROOFS],
public_inputs: pub [[Field; N_PUBLIC_INPUTS]; N_PROOFS],
key_hash: Field,
) -> pub Field {
for i in 0..N_PROOFS {
verify_ultrahonk_proof(verification_key, proofs[i], public_inputs[i], key_hash);
}

let mut aggregated_public_inputs = Vec::new();

for i in 0..N_PROOFS {
for j in 0..N_PUBLIC_INPUTS {
aggregated_public_inputs.push(public_inputs[i][j]);
}
}

compute_aggregation_commitment(aggregated_public_inputs)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "pk_agg_trbfv_wrapper"
type = "bin"
authors = ["Gnosis Guild / Enclave"]
version = "1.0.0-beta.15"

[dependencies]
lib = { path = "../../../../lib" }
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20251104", directory = "barretenberg/noir/bb_proof_verification" }
34 changes: 34 additions & 0 deletions circuits/bin/aggregation/insecure/pk_agg_trbfv_wrapper/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.

use bb_proof_verification::{UltraHonkProof, UltraHonkVerificationKey, verify_ultrahonk_proof};
use lib::math::commitments::compute_aggregation_commitment;

// Number of proofs.
pub global N_PROOFS: u32 = 1;
/// Number of public inputs/outputs per proof.
pub global N_PUBLIC_INPUTS: u32 = 6;

fn main(
verification_key: UltraHonkVerificationKey,
proofs: [UltraHonkProof; N_PROOFS],
public_inputs: pub [[Field; N_PUBLIC_INPUTS]; N_PROOFS],
key_hash: Field,
) -> pub Field {
for i in 0..N_PROOFS {
verify_ultrahonk_proof(verification_key, proofs[i], public_inputs[i], key_hash);
}

let mut aggregated_public_inputs = Vec::new();

for i in 0..N_PROOFS {
for j in 0..N_PUBLIC_INPUTS {
aggregated_public_inputs.push(public_inputs[i][j]);
}
}

compute_aggregation_commitment(aggregated_public_inputs)
}
9 changes: 9 additions & 0 deletions circuits/bin/aggregation/insecure/pk_trbfv_wrapper/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "pk_trbfv_wrapper"
type = "bin"
authors = ["Gnosis Guild / Enclave"]
version = "1.0.0-beta.15"

[dependencies]
lib = { path = "../../../../lib" }
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20251104", directory = "barretenberg/noir/bb_proof_verification" }
34 changes: 34 additions & 0 deletions circuits/bin/aggregation/insecure/pk_trbfv_wrapper/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.

use bb_proof_verification::{UltraHonkProof, UltraHonkVerificationKey, verify_ultrahonk_proof};
use lib::math::commitments::compute_aggregation_commitment;

// Number of proofs.
pub global N_PROOFS: u32 = 1;
/// Number of public inputs/outputs per proof.
pub global N_PUBLIC_INPUTS: u32 = 1027;

fn main(
verification_key: UltraHonkVerificationKey,
proofs: [UltraHonkProof; N_PROOFS],
public_inputs: pub [[Field; N_PUBLIC_INPUTS]; N_PROOFS],
key_hash: Field,
) -> pub Field {
for i in 0..N_PROOFS {
verify_ultrahonk_proof(verification_key, proofs[i], public_inputs[i], key_hash);
}

let mut aggregated_public_inputs = Vec::new();

for i in 0..N_PROOFS {
for j in 0..N_PUBLIC_INPUTS {
aggregated_public_inputs.push(public_inputs[i][j]);
}
}

compute_aggregation_commitment(aggregated_public_inputs)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "verify_shares_trbfv_wrapper"
type = "bin"
authors = ["Gnosis Guild / Enclave"]
version = "1.0.0-beta.15"

[dependencies]
lib = { path = "../../../../lib" }
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20251104", directory = "barretenberg/noir/bb_proof_verification" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.

use bb_proof_verification::{UltraHonkProof, UltraHonkVerificationKey, verify_ultrahonk_proof};
use lib::math::commitments::compute_aggregation_commitment;

// Number of proofs.
pub global N_PROOFS: u32 = 2;
/// Number of public inputs/outputs per proof.
pub global N_PUBLIC_INPUTS: u32 = 11;

fn main(
verification_key: UltraHonkVerificationKey,
proofs: [UltraHonkProof; N_PROOFS],
public_inputs: pub [[Field; N_PUBLIC_INPUTS]; N_PROOFS],
key_hash: Field,
) -> pub Field {
for i in 0..N_PROOFS {
verify_ultrahonk_proof(verification_key, proofs[i], public_inputs[i], key_hash);
}

let mut aggregated_public_inputs = Vec::new();

for i in 0..N_PROOFS {
for j in 0..N_PUBLIC_INPUTS {
aggregated_public_inputs.push(public_inputs[i][j]);
}
}

compute_aggregation_commitment(aggregated_public_inputs)
}
Loading
Loading