sonobe/folding-schemes/src/folding/circuits/mod.rs
folding-schemes/src/folding/circuits/mod.rsRaw
1/// Circuits and gadgets shared across the different folding schemes.
2use ark_ec::{AffineRepr, CurveGroup};
3use ark_ff::Field;
4
5pub mod cyclefold;
6pub mod nonnative;
7pub mod sum_check;
8pub mod utils;
9
10/// CF1 represents the ConstraintField used for the main folding circuit which is over E1::Fr, where
11/// E1 is the main curve where we do the folding.
12pub type CF1<C> = <<C as CurveGroup>::Affine as AffineRepr>::ScalarField;
13/// CF2 represents the ConstraintField used for the CycleFold circuit which is over E2::Fr=E1::Fq,
14/// where E2 is the auxiliary curve (from [CycleFold](https://eprint.iacr.org/2023/1192.pdf)
15/// approach) where we check the folding of the commitments (elliptic curve points).
16pub type CF2<C> = <<C as CurveGroup>::BaseField as Field>::BasePrimeField;