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 uses the ScalarField of the given C. CF1 represents the ConstraintField used for the main
11/// folding circuit which is over E1::Fr, where E1 is the main curve where we do the folding.
12/// In CF1, the points of C can not be natively represented.
13pub type CF1<C> = <<C as CurveGroup>::Affine as AffineRepr>::ScalarField;
14/// CF2 uses the BaseField of the given C. CF2 represents the ConstraintField used for the
15/// CycleFold circuit which is over E2::Fr=E1::Fq, where E2 is the auxiliary curve (from
16/// [CycleFold](https://eprint.iacr.org/2023/1192.pdf) approach) where we check the folding of the
17/// commitments (elliptic curve points).
18/// In CF2, the points of C can be natively represented.
19pub type CF2<C> = <<C as CurveGroup>::BaseField as Field>::BasePrimeField;