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::{CurveGroup, Group};
3use ark_ff::Field;
4
5pub mod cyclefold;
6pub mod decider;
7pub mod nonnative;
8pub mod sum_check;
9pub mod utils;
10
11/// CF1 uses the ScalarField of the given C. CF1 represents the ConstraintField used for the main
12/// folding circuit which is over E1::Fr, where E1 is the main curve where we do the folding.
13/// In CF1, the points of C can not be natively represented.
14pub type CF1<C> = <C as Group>::ScalarField;
15/// CF2 uses the BaseField of the given C. CF2 represents the ConstraintField used for the
16/// CycleFold circuit which is over E2::Fr=E1::Fq, where E2 is the auxiliary curve (from
17/// [CycleFold](https://eprint.iacr.org/2023/1192.pdf) approach) where we check the folding of the
18/// commitments (elliptic curve points).
19/// In CF2, the points of C can be natively represented.
20pub type CF2<C> = <<C as CurveGroup>::BaseField as Field>::BasePrimeField;